| | |
| | | Internet_Init(); |
| | | UDPClient_Init(); |
| | | TCPClient_Init(); |
| | | BT_Init(); |
| | | while (1) |
| | | { |
| | | //HIDO_UINT32 timeout = HIDO_TimerGetNearestTimeout(1000); |
| | |
| | | { |
| | | MCUFlash_Init(); |
| | | parameter_init(); |
| | | printf("demo run!\r\n"); |
| | | |
| | | /* 开机信息输出:版本号、设备ID、IP、端口(UDP/TCP) */ |
| | | { |
| | | uint16_t dev_id = g_com_map[DEV_ID]; |
| | | uint16_t udp_port = g_com_map[UDP_PORT]; |
| | |
| | | uint16_t tip2 = g_com_map[TCP_IP_2]; |
| | | uint16_t tip3 = g_com_map[TCP_IP_3]; |
| | | |
| | | /* VERSION 索引在 global_param.h 中为 0x1,如果需要打印版本号字符串,可映射到其它存储;目前仅打印整数 */ |
| | | |
| | | uint16_t version = g_com_map[VERSION]; |
| | | |
| | | printf("[BOOT] Version: %u\r\n", version); |
| | | printf("[BOOT] DeviceID: %u\r\n", dev_id); |
| | | printf("[BOOT] UDP Server: %u.%u.%u.%u:%u\r\n", ip0, ip1, ip2, ip3, udp_port); |
| | | printf("[BOOT] TCP Server: %u.%u.%u.%u:%u\r\n", tip0, tip1, tip2, tip3, tcp_port); |
| | | // printf("[BOOT] Version: %u\r\n", version); |
| | | // printf("[BOOT] DeviceID: %u\r\n", dev_id); |
| | | // printf("[BOOT] UDP Server: %u.%u.%u.%u:%u\r\n", ip0, ip1, ip2, ip3, udp_port); |
| | | // printf("[BOOT] TCP Server: %u.%u.%u.%u:%u\r\n", tip0, tip1, tip2, tip3, tcp_port); |
| | | } |
| | | TaskHandle_t xTaskHandle = NULL; |
| | | |
| | |
| | | .cb_mem = NULL, |
| | | .cb_size = 0}; |
| | | |
| | | // �����������ź�������ʼ����Ϊ0��������Ϊ1�� |
| | | // |
| | | g_semaphoreHandle = osSemaphoreNew(1, 0, &semaphore_attr); |
| | | |
| | | xTaskCreate( |