Ignore:
Timestamp:
Apr 27, 2018, 2:26:14 PM (6 years ago)
Author:
coas-nagasima
Message:

syscallが関数呼びになるよう変更
他更新

Location:
asp3_tinet_ecnl_rx/trunk/app1_usb_watt_meter/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • asp3_tinet_ecnl_rx/trunk/app1_usb_watt_meter/src/client.c

    r337 r342  
    245245        FIL file;
    246246        FRESULT ret;
    247         char fname[] = {"0:/log/20160101000000.log"};
     247        char fname[] = {"1:/log/20160101000000.log"};
    248248
    249249        get_logfname(fname);
  • asp3_tinet_ecnl_rx/trunk/app1_usb_watt_meter/src/echonet_main.c

    r340 r342  
    5050#include "echonet_main.h"
    5151#include "echonet_cfg.h"
    52 #include "rx630.h"
     52#include "target_kernel_impl.h"
    5353#include "ff.h"
    5454#include "diskio.h"
     
    5959#include <net/ethernet.h>
    6060#include <net/if_var.h>
     61#include "ntshell_main.h"
    6162
    6263/* TODO: メーカーコードを設定 */
     
    504505
    505506        /* 3ms後に7SEG表示を更新 */
    506         main_led_timer = 3;
     507        main_led_timer = 3 * 1000;
    507508
    508509        /* 10ms後にボタン状態を確認 */
    509         main_timer = 10;
     510        main_timer = 10 * 1000;
    510511
    511512        /* 12bitADC初期化 */
     
    520521
    521522        /* 1秒後に表示を更新 */
    522         main_adv_timer = 1000;
     523        main_adv_timer = 1000 * 1000;
     524
     525        ER ret = act_tsk(MAIN_TASK);
     526        if (ret != E_OK) {
     527                syslog(LOG_ERROR, "act_tsk");
     528        }
    523529}
    524530
     
    759765
    760766                        if (electric_energy_meter_data[0].current_pos == 0) {
    761                                 //act_tsk(CLIENT_TASK);
     767                                cmd_execute("logupload", NULL);
    762768                        }
    763769                }
  • asp3_tinet_ecnl_rx/trunk/app1_usb_watt_meter/src/main.c

    r340 r342  
    7777#include "client.h"
    7878#include "ntp_cli.h"
     79#include "netcmd.h"
    7980
    8081ID ws_api_mailboxid = MAIN_DATAQUEUE;
     
    8384#ifdef IF_ETHER_BTUSB
    8485extern int bt_bnep_mode;
    85 
     86/* PANU向けリモートアドレス */
    8687// BUFFALLO
    8788//bd_addr_t remote_addr = { 0x00,0x1B,0xDC,0x04,0x5C,0x2D };
     
    144145
    145146ntshell_t ntshell;
    146 void _start_c(long *p);
    147147
    148148/*
     
    150150 */
    151151void main_task(intptr_t exinf)
    152 {
    153         long args[] = {
    154                 1,
    155                 (long)"ntshell",
    156         };
    157         _start_c(args);
    158 }
    159 
    160 int main(int argc, char **argv)
    161152{
    162153#ifdef IF_ETHER_BTUSB
     
    170161        ntshell_set_prompt(&ntshell, "NTShell>");
    171162        ntshell_execute(&ntshell);
    172 
    173         return 0;
    174163}
    175164
     
    187176        fno.lfsize = _MAX_LFN + 1;
    188177#endif
    189         ER ret2;
     178        ER ret;
    190179
    191180        //wolfSSL_Debugging_ON();
     
    247236#endif
    248237
    249         ret2 = get_tim(&main_obj.now);
    250         if (ret2 != E_OK) {
     238        ret = get_tim(&main_obj.now);
     239        if (ret != E_OK) {
    251240                syslog(LOG_ERROR, "get_tim");
    252241                ext_tsk();
     
    339328
    340329extern int curl_main(int argc, char **argv);
    341 extern int usrcmd_ping(int argc, char **argv);
    342 extern int usrcmd_dhcp4c(int argc, char **argv);
    343 extern int usrcmd_dnsc(int argc, char **argv);
    344 extern int usrcmd_ntpc(int argc, char **argv);
    345330
    346331static const cmd_table_t cmdlist[] = {
  • asp3_tinet_ecnl_rx/trunk/app1_usb_watt_meter/src/main.cfg

    r340 r342  
    8484INCLUDE("echonet_main.cfg");
    8585
    86 CRE_TSK(MAIN_TASK, { TA_ACT, 0, main_task, MAIN_PRIORITY, MAIN_STACK_SIZE, NULL });
     86CRE_TSK(MAIN_TASK, { TA_NULL, 0, main_task, MAIN_PRIORITY, MAIN_STACK_SIZE, NULL });
    8787CRE_DTQ(MAIN_DATAQUEUE, { TA_TFIFO, NUM_MAIN_DATAQUEUE, NULL });
  • asp3_tinet_ecnl_rx/trunk/app1_usb_watt_meter/src/tinet_app_config.h

    r337 r342  
    2929 *  接的または間接的に生じたいかなる損害に関しても,その責任を負わない.
    3030 *
    31  *  @(#) $Id$
     31 *  @(#) $Id: tinet_app_config.h 1505 2018-04-17 11:22:02Z coas-nagasima $
    3232 */
    3333
     
    624624/* DNS サーバの IP アドレス */
    625625
    626 #if !defined(DHCP6_CLI_CFG)
     626//#if !defined(DHCP6_CLI_CFG)
    627627
    628628#define IPV6_ADDR_DNS_INIT      \
     
    632632            UINT_C(0xfe), UINT_C(0x56), UINT_C(0xc5), UINT_C(0xd6) }}}
    633633
    634 #endif  /* of #if !defined(DHCP6_CLI_CFG) */
    635 
    636 #if !defined(DHCP4_CLI_CFG)
    637 #define IPV4_ADDR_DNS           MAKE_IPV4_ADDR(192,168,2,1)
    638 #endif
     634//#endif        /* of #if !defined(DHCP6_CLI_CFG) */
     635
     636//#if !defined(DHCP4_CLI_CFG)
     637#define IPV4_ADDR_DNS           MAKE_IPV4_ADDR(192,168,137,1)
     638//#endif
    639639
    640640/* DOMAIN 名 */
Note: See TracChangeset for help on using the changeset viewer.