| | |
| | | #include "syn6288.h" |
| | | #include "dw_mbx_tag.h" |
| | | #include "GPS.h" |
| | | #include "lora.h" |
| | | #define NSH1 0x0001 |
| | | #define GP 0x0002 |
| | | #define FLASH_HARDWARE_VERSION_MAP (uint32_t)0x08004F00 //硬件版本号和批次信息位置 |
| | |
| | | |
| | | /* Private user code ---------------------------------------------------------*/ |
| | | /* USER CODE BEGIN 0 */ |
| | | extern uint8_t shengji_flag; |
| | | uint32_t dev_id; |
| | | uint16_t heartbeat_timer,poll_timer,sync_timer; |
| | | uint8_t aRxBuffer[1],group_id; |
| | |
| | | hardware_pici = STMFLASH_ReadHalfWord(FLASH_HARDWARE_VERSION_MAP+2); |
| | | hardware_type = STMFLASH_ReadHalfWord(FLASH_HARDWARE_VERSION_MAP+4); |
| | | //deca_sleep(1000); |
| | | g_com_map[VERSION] = (1<<8)|6; |
| | | g_com_map[VERSION] = (1<<8)|7; |
| | | // g_com_map[DEV_ID]=1158; |
| | | // #ifdef DEBUG_MODE |
| | | // // g_com_map[GROUP_ID]=21; |
| | |
| | | PowerDownDetect(); |
| | | Lora_Send_Poll(); |
| | | TTSchaxun_Busy(); |
| | | LoraUp_Poll(); |
| | | // #ifndef DEBUG_MODE |
| | | // if(!HAL_GPIO_ReadPin(INPUT_5V_GPIO_Port,INPUT_5V_Pin)) |
| | | // { |
| | |
| | | } |
| | | void HAL_LPTIM_CompareMatchCallback(LPTIM_HandleTypeDef *hlptim) |
| | | { |
| | | if(chongqi_flag==0) |
| | | if(chongqi_flag==0&&shengji_flag==0) |
| | | { |
| | | SystemClock_Config(); |
| | | Set4LEDColor(powerled,loraled,gpsled,uwbled); |