| | |
| | | MinuteTask(); |
| | | } |
| | | //UWB更新列表 |
| | | TagListUpdate(); |
| | | // TagListUpdate(); |
| | | //GPS_Poll(); |
| | | gps_power_state=1;//测试gps长开 |
| | | //UWB状态检测 |
| | |
| | | static void sleep_timer_callback(void *dev, uint32_t time) |
| | | { |
| | | g_start_send_flag=1; |
| | | // HIDO_TimerGetTick(); |
| | | HIDO_TimerTick(); |
| | | // #ifdef DEBUG_BOXING |
| | | //// gpio_pin_clr(IO_PIN_5);//测试 |
| | | // gpio_pin_set(IO_PIN_5);//测试 |
| | |
| | | RadioIrqProcess(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | void Board_LORA_NVIC_Init(GPIO_IRQ_HANDLER_T irq_handler) //LORA 中断配置 |
| | | { |
| | | // io_pin_mux_set(_4G_USART_RX_Pin,IO_FUNC0);//把原先io 变为普通GPIO |
| | | gpio_pin_set_dir(LORA_DIO , GPIO_DIR_IN, 0); |
| | | io_pull_set(LORA_DIO, IO_HIGH_Z, IO_PULL_UP_NONE); |
| | | gpio_enable_irq(LORA_DIO, GPIO_IRQ_TYPE_RISING_EDGE, irq_handler); |
| | | gpio_enable_irq(LORA_DIO, GPIO_IRQ_TYPE_RISING_EDGE, irq_handler); |
| | | } |
| | | extern uint8_t pca9555writedata_input[10];//暂存输入寄存器所有配置的数组 |
| | | static void pca_handler(enum IO_PIN_T pin) |
| | |
| | | //board_led_init(); |
| | | spi_init(); |
| | | Board_LORA_NVIC_Init(Lora_irq_handler); |
| | | pca_input_detection_init(pca_handler); |
| | | IIC2_Init(); |
| | | Accelerometer_Init(); |
| | | PCA9555_init(); |
| | |
| | | while (1) |
| | | { |
| | | Lora_Tx_Poll(); |
| | | uwb_app_poll(); |
| | | IdleTask(); |
| | | } |
| | | } |