| | |
| | | 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)|12; |
| | | g_com_map[VERSION] = (1<<8)|16; |
| | | // testprogram(); |
| | | // g_com_map[DEV_ID]=0x6777; |
| | | #ifdef DEBUG_MODE |
| | |
| | | MX_USART1_UART_Init(); |
| | | MX_IWDG_Init(); |
| | | /* USER CODE BEGIN 2 */ |
| | | GPIO_InitTypeDef GPIO_InitStruct = {0}; |
| | | /*Configure GPIO pin Output Level */ |
| | | HAL_GPIO_WritePin(GPIOB, GPIO_PIN_14, GPIO_PIN_RESET); |
| | | /*Configure GPIO pins : SCL_Pin SDA_Pin */ |
| | | GPIO_InitStruct.Pin = GPIO_PIN_14; |
| | | GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; |
| | | GPIO_InitStruct.Pull = GPIO_NOPULL; |
| | | GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; |
| | | HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); |
| | | |
| | | LED_LG_ON; |
| | | Program_Init(); |
| | | // LIS3DH_Data_Init(); |
| | |
| | | extern uint8_t tx_near_msg[80],stationary_flag; |
| | | float key_keeptime; |
| | | extern float freqlost_count,range_lost_time; |
| | | uint8_t g_start_send_time; |
| | | void HAL_LPTIM_CompareMatchCallback(LPTIM_HandleTypeDef *hlptim) |
| | | { |
| | | static uint8_t i=0; |