| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #include "nim_config.h"
- #include "lwiplib.h"
- #include "lwipopts.h"
- #include "hlx.h"
- #define LEN_IP_ADDR (4u)
- #define ASCII_NUM_IDX (48u)
- void DeviceInit();
- double inputdata[2000]={0};
- double outputdata[2000]={0};
- int main()
- {
- DeviceInit();
- ConsolePuts("\r\n ============NIM DSP START===========.\r\n", -1);
- lwip_tcp_init(TCP_SERVER_PORT); //开启本设备TCP服务器
- //struct udp_pcb *upcb = upcb = udp_new();
- //lwip_udp_connect(upcb, UI_IP_ADDRESS, UI_UDP_PORT);
- //emg_denoised(inputdata,2000,1000,outputdata);
- // 主循环
- for (;;)
- {
- // ConsoleRecvWait(10);
- // if (ConsoleRecvFlag() == REV_OK)
- // {
- // unsigned char *data = ConsoleRecvData();
- // lwip_udp_send_gui("123456", 6);
- // ConsoleRecvClear();
- // }
- HlxMain();
- }
- }
- /**
- * @title 全局中断
- */
- void InterruptInit(void)
- {
- // 初始化 DSP 中断控制器
- IntDSPINTCInit();
- // 使能 DSP 全局中断
- IntGlobalEnable();
- }
- /**
- * 设备初始化
- */
- void DeviceInit()
- {
- InterruptInit();
- ConsoleDeviceInit();//控制台初始化
- lwip_device_init(); //以太网模块初始化
- HlxInit();
- }
|