| | |
| | | #include "Rcc_Nvic_Systick.h" |
| | | #include "Usart.h" |
| | | #include "Spi.h" |
| | | #include "dw_driver.h |
| | | #include "dw_driver.h" |
| | | #include "led.h" |
| | | |
| | | /* Example application name and version to display on LCD screen. */ |
| | |
| | | *ts += ts_field[i] << (i * 8); |
| | | } |
| | | } |
| | | void GPIO_Toggle(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
| | | { |
| | | GPIO_WriteBit(GPIOx, GPIO_Pin, (BitAction)!GPIO_ReadOutputDataBit(GPIOx, GPIO_Pin)); |
| | | } |
| | | //void GPIO_Toggle(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
| | | //{ |
| | | // GPIO_WriteBit(GPIOx, GPIO_Pin, (BitAction)!GPIO_ReadOutputDataBit(GPIOx, GPIO_Pin)); |
| | | //} |
| | | int fputc(int ch, FILE *f) |
| | | |
| | | { |
| | |
| | | deca_sleep(100); |
| | | } |
| | | } |
| | | extern volatile unsigned long time32_reset; |
| | | //extern volatile unsigned long time32_reset; |
| | | extern uint8_t Work_Mode; |
| | | uint32 frame_len; |
| | | uint8_t send[9]; |
| | |
| | | |
| | | /* Increment frame sequence number after transmission of the final message (modulo 256). */ |
| | | frame_seq_nb++; |
| | | time32_reset = 0; |
| | | // time32_reset = 0; |
| | | GPIO_Toggle(GPIOA, LED_PIN); //LEDéªç |
| | | jumptime = 0; |
| | | } |
| | |
| | | |
| | | dis = dist2 * 100; //dis 为åä½ä¸ºcmçè·ç¦» |
| | | dist[TAG_ID] = LP(dis, TAG_ID); //LP 为ä½é滤波å¨ï¼è®©æ°æ®æ´ç¨³å® |
| | | time32_reset = 0; |
| | | // time32_reset = 0; |
| | | GPIO_Toggle(GPIOA, LED_PIN); |
| | | if (GPIO_ReadInputDataBit(GPIOA, SW2) != RESET) //éè¿æ¨ç å¼å
³å¤ææ°æ®è¾åºæ ¼å¼ |
| | | { |