| | |
| | | #include "serial_at_cmd_app.h" |
| | | #include "global_param.h" |
| | | |
| | | #define WORK_MODE_TAG |
| | | //#define WORK_MODE_ANCHOR |
| | | //#define WORK_MODE_TAG |
| | | #define WORK_MODE_ANCHOR |
| | | |
| | | void Device_Init(void) |
| | | { |
| | | // Rcc_Init(); |
| | | SystemInit(); |
| | | RCC_Configuration(); |
| | | //SystemInit(); |
| | | Nvic_Init(); |
| | | Systick_Init(); |
| | | #ifdef WORK_MODE_TAG |
| | |
| | | |
| | | int main(void) |
| | | { |
| | | |
| | | delay_ms(1000); |
| | | Device_Init(); |
| | | Program_Init(); |
| | | Dw1000_Init(); |
| | |
| | | #endif |
| | | Dw1000_App_Init(); |
| | | /* Loop forever initiating ranging exchanges. */ |
| | | RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE); |
| | | while(1) |
| | | { |
| | | #ifdef WORK_MODE_TAG |
| | |
| | | Tag_App(); |
| | | } |
| | | // UART_CheckReceive(); |
| | | RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE); |
| | | PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI); |
| | | #else |
| | | Anchor_App(); |