| | |
| | | #include "Spi.h" |
| | | #include "dw_driver.h" |
| | | #include "led.h" |
| | | #include "beep.h" |
| | | |
| | | /* Example application name and version to display on LCD screen. */ |
| | | #define APP_NAME "DS TWR INIT v1.1" |
| | |
| | | uint32_t rec_dist, hex_dist; |
| | | uint16_t check; |
| | | |
| | | uint8_t tempaaaa[5] = {0}; |
| | | |
| | | void Device_Init(void) |
| | | { |
| | | Rcc_Init(); |
| | | Nvic_Init(); |
| | | Systick_Init(); |
| | | Led_Init(); |
| | | Beep_Init(); |
| | | DW_GPIO_Init(); |
| | | Usart_Init(); |
| | | Spi_Init(); |
| | | |
| | | GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE); |
| | | |
| | | while(1) |
| | | { |
| | | dwt_readsystime(tempaaaa); |
| | | delay_ms(500); |
| | | // dwt_readsystime(&tempb); |
| | | // delay_ms(500); |
| | | } |
| | | } |
| | | |
| | | int main(void) |