/**************************************************************************** * * Copy right: 2024-, Copyrigths of EigenComm Ltd. * File name: api_comm.c * Description: ec7xx openhal entry source file * History: Rev1.0 2024-01-10 * ****************************************************************************/ #include #include #include /* memset */ #include /* atoi */ #include "Driver_Common.h" #include "system_ec7xx.h" #include DEBUG_LOG_HEADER_FILE #include "devicemanager.h" #include "api_comm.h" osEventFlagsId_t successEvent = NULL; //传输成功输入 osEventFlagsId_t hwfaultEvent = NULL; //硬件异常输入 osEventFlagsId_t exceptionEvt = NULL; //硬件异常输出 static osThreadId_t exceptionHandle = NULL; #define EPAT_LOG(subId, debugLevel, format, ...) \ ECPLAT_PRINTF(UNILOG_OPEN_HAL, subId, debugLevel, format, ##__VA_ARGS__) /** \fn \brief 如果不可修改str则打印剩余所有内容 \return */ int open_hal_parse(char* str,void *output) { if(str == NULL) return 0; char *head = NULL; char *line_str[16]; int num = 0; head = strtok(str, "\n"); while( head != NULL ) { line_str[num] = head; head = strtok(NULL, "\n"); num ++; } if (strstr(line_str[0], "paddr") != NULL){ for (int i = 1; i < num; i++) { PadConfigLite_t liteConfig = {0}; uint32_t index = api_pad_default(line_str[i],&liteConfig); if(index