| | |
| | | |
| | | #define ONTIME3 1 // 500ms |
| | | #define OFFTIME3 5 // 500ms |
| | | |
| | | void main_logic(void) //主é»è¾å¨è¿éæ§è¡ |
| | | { |
| | | static uint8_t beep_state,timer_state,beep_timer,beep_ontime,beep_offtime; |
| | |
| | | #include "global_param.h" |
| | | #include "filters.h" |
| | | #include <stdio.h> |
| | | |
| | | #include "beep.h" |
| | | |
| | | |
| | | /*------------------------------------ Marcos ------------------------------------------*/ |
| | |
| | | g_pairstart=0; |
| | | g_com_map[PAIR_ID]=tag_id_recv; |
| | | save_com_map_to_flash(); |
| | | BEEP2_ON; |
| | | delay_ms(1000); |
| | | printf("Pair Finish PairID: %d. \r\n",g_com_map[PAIR_ID]); |
| | | } |
| | | g_flag_Taggetdist[tag_id_recv]=0; |
| | |
| | | #include "stm32f10x.h" |
| | | #include "filters.h" |
| | | |
| | | #define WORK_MODE_TAG |
| | | //#define WORK_MODE_ANCHOR |
| | | |
| | | #define TAG_NUM_IN_SYS 256 |
| | | #define DFT_RAND_DLY_TIM_MS 1 |
| | | |
| | |
| | | #include "serial_at_cmd_app.h" |
| | | #include "global_param.h" |
| | | |
| | | #define WORK_MODE_TAG |
| | | //#define WORK_MODE_ANCHOR |
| | | |
| | | |
| | | void Device_Init(void) |
| | | { |
| | |
| | | uint8_t g_start_send_flag = 0; |
| | | uint16_t sysscal; |
| | | extern uint16_t g_Resttimer; |
| | | extern uint8_t g_pairstart; |
| | | void SysTick_Handler(void) |
| | | {uint16_t i; |
| | | time32_incr++; |
| | |
| | | // { |
| | | // dis_after_filter = DEFAULT_DISTANCE; |
| | | // } |
| | | #ifdef WORK_MODE_ANCHOR |
| | | TagDistClear(); |
| | | if(g_pairstart!=1) |
| | | main_logic(); |
| | | |
| | | #endif |
| | | |
| | | } |
| | | |
| | |
| | | g_start_send_flag = 1; |
| | | RTC_SET_ALARM(1); |
| | | tt++; |
| | | |
| | | |
| | | //SYS.wake_id|=1<<17; |
| | | } |
| | | void USART1_IRQHandler(void) |