diff --git a/NSPE/WIFI_IOT/app/app_cfg.h b/NSPE/WIFI_IOT/app/app_cfg.h index 3652754..58a2323 100644 --- a/NSPE/WIFI_IOT/app/app_cfg.h +++ b/NSPE/WIFI_IOT/app/app_cfg.h @@ -116,6 +116,9 @@ OF SUCH DAMAGE. #ifdef CONFIG_IPERF_TEST #define IPERF_TASK_MAX 1 + +#define CONFIG_PRINT_IN_SEQUENCE + #ifdef CONFIG_PRINT_IN_SEQUENCE #define IPERF_STACK_SIZE 1024 #else diff --git a/NSPE/WIFI_IOT/bsp/drivers/0_Project/IAR_for_Stm8/Uart_PingPong/ebyte/ebyte_callback.c b/NSPE/WIFI_IOT/bsp/drivers/0_Project/IAR_for_Stm8/Uart_PingPong/ebyte/ebyte_callback.c index dbe525c..b38225e 100755 --- a/NSPE/WIFI_IOT/bsp/drivers/0_Project/IAR_for_Stm8/Uart_PingPong/ebyte/ebyte_callback.c +++ b/NSPE/WIFI_IOT/bsp/drivers/0_Project/IAR_for_Stm8/Uart_PingPong/ebyte/ebyte_callback.c @@ -1,20 +1,20 @@ /** ********************************************************************************** * @file ebyte_callback.h - * @brief EBYTE驱动库的收发完成回调函数 由客户实现自己的逻辑代码 - * @details 详情请参见 https://www.ebyte.com/ - * @author JiangHeng - * @date 2021-05-13 - * @version 1.0.0 + * @brief EBYTE驱动库的收发完成回调函数 由客户实现自己的逻辑代码 + * @details 详情请参见 https://www.ebyte.com/ + * @author JiangHeng + * @date 2021-05-13 + * @version 1.0.0 ********************************************************************************** - * @copyright BSD License - * 成都亿佰特电子科技有限公司 - * ______ ____ __ __ _______ ______ + * @copyright BSD License + * 成都亿佰特电子科技有限公司 + * ______ ____ __ __ _______ ______ * | ____| | _ \ \ \ / / |__ __| | ____| - * | |__ | |_) | \ \_/ / | | | |__ - * | __| | _ < \ / | | | __| - * | |____ | |_) | | | | | | |____ - * |______| |____/ |_| |_| |______| + * | |__ | |_) | \ \_/ / | | | |__ + * | __| | _ < \ / | | | __| + * | |____ | |_) | | | | | | |____ + * |______| |____/ |_| |_| |______| * ********************************************************************************** */ @@ -36,26 +36,26 @@ extern uint8_t PcEchoBuffer[20]; /* ! * @brief 发送完成回调接口 由客户实现自己的发送完成逻辑 - * + * * @param state 上层回调提供的状态码 客户请根据示例注释找到对应区域 - * + * */ void Ebyte_Port_TransmitCallback( uint16e_t state ) -{ +{ /* 发送: 正常完成 */ if( state &= 0x0001 ) { - //To-do 实现自己的逻辑 + //To-do 实现自己的逻辑 } /* 发送: 异常超时 */ else if ( state &= 0x0200 ) { - //To-do 实现自己的逻辑 + //To-do 实现自己的逻辑 } /* 发送: 未知错误 */ else { - /* 发送状态标识不正确,请检查软硬件 + /* 发送状态标识不正确,请检查软硬件 常见问题 1:SPI通信不正确 2:模块供电不足 */ while(1); } @@ -63,9 +63,9 @@ void Ebyte_Port_TransmitCallback( uint16e_t state ) /* ! * @brief 接收完成回调接口 由客户实现自己的发送完成逻辑 - * + * * @param state 上层回调提供的状态码 客户请根据示例注释找到对应区域 - * + * */ void Ebyte_Port_ReceiveCallback( uint16_t state, uint8_t *buffer, uint8_t length ) { @@ -97,13 +97,13 @@ void Ebyte_Port_ReceiveCallback( uint16_t state, uint8_t *buffer, uint8_t lengt { BufferPong[4] = buffer[4];//第5字节为按键标识 } - + } if( j!=4 && length == 5 && PC_isConnected ) { p = buffer; - + for( j = 0; j < 4; j++ ) { if( BufferPong[j] != *p++ ) @@ -133,8 +133,8 @@ void Ebyte_Port_ReceiveCallback( uint16_t state, uint8_t *buffer, uint8_t lengt if( ! PC_isConnected ) { - - DEBUG("\r\n Receive Data:"); + + DEBUGPRINT("\r\n Receive Data:"); Ebyte_BSP_UartTransmit ( buffer, length ); } @@ -143,12 +143,12 @@ void Ebyte_Port_ReceiveCallback( uint16_t state, uint8_t *buffer, uint8_t lengt /* 接收: 异常超时 */ else if ( state &= 0x0200 ) { - //To-do 实现自己的逻辑 + //To-do 实现自己的逻辑 } /* 接收: 未知错误 */ else { - /* 发送状态标识不正确,请检查软硬件 + /* 发送状态标识不正确,请检查软硬件 常见问题 1:SPI通信不正确 2:模块供电不足 */ while(1); } diff --git a/NSPE/WIFI_IOT/bsp/drivers/0_Project/IAR_for_Stm8/Uart_PingPong/main.c b/NSPE/WIFI_IOT/bsp/drivers/0_Project/IAR_for_Stm8/Uart_PingPong/main.c index 892248f..c578b3a 100755 --- a/NSPE/WIFI_IOT/bsp/drivers/0_Project/IAR_for_Stm8/Uart_PingPong/main.c +++ b/NSPE/WIFI_IOT/bsp/drivers/0_Project/IAR_for_Stm8/Uart_PingPong/main.c @@ -23,6 +23,7 @@ #include "ebyte_kfifo.h" #include "ebyte_debug.h" #include "wrapper_os.h" +#include "debug_print.h" void Task_Transmit( void ); void Task_Button( void ); @@ -68,8 +69,8 @@ int ebyte_main( void ) /* MCU 开全局中断 */ // Ebyte_BSP_GlobalIntEnable(); - DEBUG( "Start PingPong.....\r\n" ); - DEBUG( "Please push button1 or button2.....\r\n" ); + DEBUGPRINT( "Start PingPong.....\r\n" ); + DEBUGPRINT( "Please push button1 or button2.....\r\n" ); while( 1 ) { /* 按键事件响应 */ @@ -139,7 +140,7 @@ void Task_Transmit( void ) { pongLength = 5; }else{ - DEBUG( "\r\n Echo : pong \r\n" ); + DEBUGPRINT( "\r\n Echo : pong \r\n" ); pongLength = 4; } @@ -178,7 +179,7 @@ void Task_Button( void ) pingLength = 5; }else { - DEBUG( "\r\n Send Command : ping \r\n" ); + DEBUGPRINT( "\r\n Send Command : ping \r\n" ); pingLength = 4; } @@ -204,7 +205,7 @@ void Task_Button( void ) pingLength = 5; }else { - DEBUG( "\r\n Send Command : ping \r\n" ); + DEBUGPRINT( "\r\n Send Command : ping \r\n" ); pingLength = 4; } diff --git a/NSPE/WIFI_IOT/bsp/drivers/2_Ebyte_Board_Support/E15-EVB02/board.h b/NSPE/WIFI_IOT/bsp/drivers/2_Ebyte_Board_Support/E15-EVB02/board.h index 5e0b3f1..e14e5ef 100755 --- a/NSPE/WIFI_IOT/bsp/drivers/2_Ebyte_Board_Support/E15-EVB02/board.h +++ b/NSPE/WIFI_IOT/bsp/drivers/2_Ebyte_Board_Support/E15-EVB02/board.h @@ -24,6 +24,7 @@ #include //#include "stm8l15x_conf.h" #include "gd32w51x.h" +#include "debug_print.h" #include "board_mini_printf.h" /* 引脚配置 LED */ diff --git a/NSPE/WIFI_IOT/bsp/drivers/3_Ebyte_WirelessModule_Drivers/E48xMx/radio.c b/NSPE/WIFI_IOT/bsp/drivers/3_Ebyte_WirelessModule_Drivers/E48xMx/radio.c index e12e9b2..24d5d16 100755 --- a/NSPE/WIFI_IOT/bsp/drivers/3_Ebyte_WirelessModule_Drivers/E48xMx/radio.c +++ b/NSPE/WIFI_IOT/bsp/drivers/3_Ebyte_WirelessModule_Drivers/E48xMx/radio.c @@ -389,12 +389,12 @@ void vRadioCheckLink(void) g_chip_id = lRadioChipVersion(); if(0x00231000==(g_chip_id&0x00FFFF00)) break; - DEBUG( "Link Error.....\r\n" ); + DEBUGPRINT( "Link Error.....\r\n" ); delay1ms(500); i++; if(i >= 20) while(1); } - DEBUG( "Link Device:E48-XXXM20S....\r\n" ); + DEBUGPRINT( "Link Device:E48-XXXM20S....\r\n" ); } void vRadioSetFreqChannel(uint8_t channel)