diff --git a/.vscode/settings.json b/.vscode/settings.json index 338e87b..accf815 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,6 +18,7 @@ } ], "files.associations": { + "*.sqlbook": "sql", "*.ndjson": "jsonl", "*.dbclient-js": "javascript", "rtthread.h": "c", @@ -59,7 +60,16 @@ "string.h": "c", "completion.h": "c", "bsp_vin_detection.h": "c", - "ulog_def.h": "c" + "ulog_def.h": "c", + "rtdbg.h": "c", + "bsp_nt26k.h": "c", + "bsp_rng.h": "c", + "time.h": "c", + "bsp_adc.h": "c", + "ch32v30x.h": "c", + "lwutil.h": "c", + "ch32v30x_adc.h": "c", + "bsp_wdg.h": "c" }, "commentTranslate.multiLineMerge": true, "C_Cpp.errorSquiggles": "disabled" diff --git a/applications/main.c b/applications/main.c index 9be1c07..3e68a0c 100644 --- a/applications/main.c +++ b/applications/main.c @@ -2,7 +2,7 @@ * @Author: mbw * @Date: 2024-10-23 17:14:16 * @LastEditors: mbw && 1600520629@qq.com - * @LastEditTime: 2025-02-15 14:12:31 + * @LastEditTime: 2025-02-21 10:17:35 * @FilePath: \JT-DT-YD4N02A_RTT_MRS-NT26K\applications\main.c * @Descrt_thread_ * diff --git a/applications/user_sys.c b/applications/user_sys.c index ce106ff..3286e19 100644 --- a/applications/user_sys.c +++ b/applications/user_sys.c @@ -2,7 +2,7 @@ * @Author: mbw * @Date: 2024-10-10 15:50:39 * @LastEditors: mbw && 1600520629@qq.com - * @LastEditTime: 2025-01-10 11:43:48 + * @LastEditTime: 2025-03-03 17:06:31 * @FilePath: \JT-DT-YD4N02A_RTT_MRS-NT26K\applications\user_sys.c * @Description: * diff --git a/applications/user_sys.h b/applications/user_sys.h index a1609cd..cab2d1a 100644 --- a/applications/user_sys.h +++ b/applications/user_sys.h @@ -32,6 +32,9 @@ #define SYS_IOT_URL ("8.130.127.158") #define SYS_IOT_PORT ("7101") +// #define SYS_IOT_URL ("8.130.117.149") +// #define SYS_IOT_PORT ("7137") + // #define SYS_IOT_URL ("121.41.227.175") // #define SYS_IOT_PORT ("2345") @@ -41,8 +44,7 @@ rt_kprintf("Compiled on: %s at %s\n", __DATE__, __TIME__); \ } while (0) -// #define SYS_IOT_URL ("8.130.117.149") -// #define SYS_IOT_PORT ("7137") + // 定义宏来打印编译时间和日期 // #define COMPILE_TIME \ // do { \ diff --git a/bsp/inc/bsp_h308.h b/bsp/inc/bsp_h308.h index 7c0cc42..da5e431 100644 --- a/bsp/inc/bsp_h308.h +++ b/bsp/inc/bsp_h308.h @@ -33,11 +33,11 @@ #define H308_PWR_PIN GET_PIN(B, 9) #define H308_RST_PIN GET_PIN(C, 12) -#define H308_PWR_ON rt_pin_write(H308_PWR_PIN, PIN_HIGH) -#define H308_PWR_OFF rt_pin_write(H308_PWR_PIN, PIN_LOW) +// #define H308_PWR_ON rt_pin_write(H308_PWR_PIN, PIN_HIGH) +// #define H308_PWR_OFF rt_pin_write(H308_PWR_PIN, PIN_LOW) -// #define H308_PWR_ON rt_pin_write(H308_PWR_PIN, PIN_LOW) -// #define H308_PWR_OFF rt_pin_write(H308_PWR_PIN, PIN_HIGH) +#define H308_PWR_ON rt_pin_write(H308_PWR_PIN, PIN_LOW) +#define H308_PWR_OFF rt_pin_write(H308_PWR_PIN, PIN_HIGH) #define H308_RST_ON rt_pin_write(H308_RST_PIN, PIN_LOW) #define H308_RST_OFF rt_pin_write(H308_RST_PIN, PIN_HIGH) diff --git a/bsp/src/at_device_nt26k.c b/bsp/src/at_device_nt26k.c index 63ee575..2deb667 100644 --- a/bsp/src/at_device_nt26k.c +++ b/bsp/src/at_device_nt26k.c @@ -2,7 +2,7 @@ * @Author : stark1898y 1658608470@qq.com * @Date : 2024-09-04 13:33:49 * @LastEditors: mbw && 1600520629@qq.com - * @LastEditTime: 2025-02-14 11:10:57 + * @LastEditTime: 2025-03-17 11:43:44 * @FilePath: \JT-DT-YD4N02A_RTT_MRS-NT26K\bsp\src\at_device_nt26k.c * @Description : * @@ -1006,7 +1006,7 @@ static void nt26k_init_thread_entry(void *parameter) { // 已经写入了,将其赋值给结构体 rt_memset((char *)nt26k.imsi, 0, NT26K_IMSI_LEN); - Get_IotImei((char *)&nt26k.imsi[0], NT26K_IMSI_LEN); + Get_IotImsi((char *)&nt26k.imsi[0], NT26K_IMSI_LEN);//这块原来写错了,写成饿了IMEI,所以发上去的也是IMEI号码 } /* check signal strength */ for (i = 0; i < CSQ_RETRY; i++) diff --git a/bsp/src/bsp_flash.c b/bsp/src/bsp_flash.c index fc43177..1a366a0 100644 --- a/bsp/src/bsp_flash.c +++ b/bsp/src/bsp_flash.c @@ -799,7 +799,7 @@ int BSP_Flash_Init (void) LOG_D ("Flash_Set_Sever_Data error!"); } - Flash_SetProductTimeLimit (2025, 2, 10, 13, 50, 20, kFactoryTimeId); + Flash_SetProductTimeLimit (2025, 3, 3, 9, 50, 20, kFactoryTimeId); Set_ExpirationTime (MAX_EXPIRATION_DAYS); sci.hw_ver = SYS_HW_VERSION; diff --git a/bsp/src/bsp_h308.c b/bsp/src/bsp_h308.c index 8c136ac..d35b641 100644 --- a/bsp/src/bsp_h308.c +++ b/bsp/src/bsp_h308.c @@ -2,7 +2,7 @@ * @Author: mbw * @Date: 2024-11-14 10:21:04 * @LastEditors: mbw && 1600520629@qq.com - * @LastEditTime: 2025-02-15 16:05:43 + * @LastEditTime: 2025-02-17 11:17:13 * @FilePath: \JT-DT-YD4N02A_RTT_MRS-NT26K\bsp\src\bsp_h308.c * @Description: * @@ -326,10 +326,8 @@ static void h308_thread_entry(void *param) { alarm_value = 10; } - H308.alarm_value = alarm_value; LOG_D("报警阈值:%d%LEL", H308.alarm_value); - while (1) { ret = rt_sem_take(uart4_rx_ok_sem, 3000); @@ -366,7 +364,6 @@ static void h308_thread_entry(void *param) } } rt_memset(str, 0, len); - if (h308_rx_timout_cnt) { h308_rx_timout_cnt = 0; @@ -427,10 +424,9 @@ int BSP_H308_Init(void) LOG_E("rt_thread_init h308_thread Failed"); return ret; } - return ret; } -INIT_DEVICE_EXPORT(BSP_H308_Init); +INIT_COMPONENT_EXPORT(BSP_H308_Init); void UART4_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast"))); void UART4_IRQHandler(void) diff --git a/bsp/src/bsp_nt26k.c b/bsp/src/bsp_nt26k.c index da66029..8e4b86f 100644 --- a/bsp/src/bsp_nt26k.c +++ b/bsp/src/bsp_nt26k.c @@ -2,7 +2,7 @@ * @Author: mbw * @Date: 2024-10-09 08:42:14 * @LastEditors: mbw && 1600520629@qq.com - * @LastEditTime: 2025-02-15 14:17:23 + * @LastEditTime: 2025-03-04 09:23:02 * @FilePath: \JT-DT-YD4N02A_RTT_MRS-NT26K\bsp\src\bsp_nt26k.c * @Description: * @@ -752,11 +752,7 @@ int Nt26k_Send_Device_Failure(struct at_device *device, void *param) return RT_EOK; } - - const Nt26kEventInfo nt26k_event_info[] = { - // {kNt26kPowerOnEvent, NT26K_PRIORITY_HIGHEST, "上电心跳事件", Nt26k_Send_Power_On}, - // {kNt26kPowerDownEvent, NT26K_PRIORITY_HIGH, "掉电事件", Nt26k_Send_Power_Off}, {kNt26kPowerOnEvent, NT26K_PRIORITY_HIGH, "上电心跳事件", Nt26k_Send_Power_On}, {kNt26kPowerDownEvent, NT26K_PRIORITY_HIGHEST, "掉电事件", Nt26k_Send_Power_Off}, {kNt26kSelfCheckEvent, NT26K_PRIORITY_MEDIUM, "自检事件", Nt26k_Send_Self_Check}, diff --git a/packages/agile_led-1.1.1/agile_led.c b/packages/agile_led-1.1.1/agile_led.c index ed3e885..b7198f3 100644 --- a/packages/agile_led-1.1.1/agile_led.c +++ b/packages/agile_led-1.1.1/agile_led.c @@ -2,8 +2,8 @@ * @Author : stark1898y 1658608470@qq.com * @Date : 2024-07-04 16:13:57 * @LastEditors: mbw && 1600520629@qq.com - * @LastEditTime: 2024-12-23 10:01:08 - * @FilePath: \JT-DT-YD4N02A_RTT_MRS-4G\packages\agile_led-1.1.1\agile_led.c + * @LastEditTime: 2025-02-20 17:17:23 + * @FilePath: \JT-DT-YD4N02A_RTT_MRS-NT26K\packages\agile_led-1.1.1\agile_led.c * @Description : * * Copyright (c) 2024 by yzy, All Rights Reserved. diff --git a/rt-thread/rtconfig.h b/rt-thread/rtconfig.h index 50a3a0f..f7da23a 100644 --- a/rt-thread/rtconfig.h +++ b/rt-thread/rtconfig.h @@ -15,8 +15,8 @@ /*使用动态日志及密码功能时,需开启宏 FINSH_USING_AUTH ULOG_USING_FILTER ENABLE_LOG_ALL ULOG_OUTPUT_LVL = 7 以及设置ulog.c 1522行 输出等级为0*/ /**/ -#define FINSH_USING_AUTH //开启终端密码登录功能 -#define ULOG_USING_FILTER //开启动态修改日志等级 默认修改在ulog.c 1522行 +// #define FINSH_USING_AUTH //开启终端密码登录功能 +// #define ULOG_USING_FILTER //开启动态修改日志等级 默认修改在ulog.c 1522行 #define ENABLE_LOG_ALL #define TEST_ENABLE //打开所有的终端测试程序