| | |
| | | MX_USART1_UART_Init(); |
| | | MX_SPI1_Init(); |
| | | MX_ADC_Init(); |
| | | |
| | | //MX_TIM2_Init(); |
| | | /* USER CODE BEGIN 2 */ |
| | | LED_LG_ON; |
| | |
| | | // BarInit(); |
| | | GPIO_InitTypeDef GPIO_InitStruct = {0}; |
| | | |
| | | HAL_GPIO_WritePin(DW1000_RSTn_GPIO, DW1000_RSTn, GPIO_PIN_RESET); |
| | | |
| | | |
| | | GPIO_InitStruct.Pin = DW1000_RSTn; |
| | | GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; |
| | | GPIO_InitStruct.Pull = GPIO_NOPULL; |
| | | GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; |
| | | HAL_GPIO_Init(DW1000_RSTn_GPIO, &GPIO_InitStruct); |
| | | GPIO_InitStruct.Pin = DW1000_RSTn; |
| | | GPIO_InitStruct.Mode = GPIO_MODE_INPUT;// 设置为输入模式 |
| | | GPIO_InitStruct.Pull = GPIO_NOPULL;//不使用上拉或下拉 |
| | | HAL_GPIO_Init(DW1000_RSTn_GPIO,&GPIO_InitStruct); //初始化GPIO |
| | | // Dw1000_Init(); |
| | | // Dw1000_App_Init(); |
| | | // HardWareTypeDiffConfig(); |
| | |
| | | |
| | | GPIO_InitStruct.Pin = DW1000_RSTn; |
| | | GPIO_InitStruct.Mode = GPIO_MODE_INPUT;// 设置为输入模式 |
| | | GPIO_InitStruct.Pull = GPIO_PULLUP;//不使用上拉或下拉 |
| | | GPIO_InitStruct.Pull = GPIO_NOPULL;//不使用上拉或下拉 |
| | | HAL_GPIO_Init(DW1000_RSTn_GPIO,&GPIO_InitStruct); //初始化GPIO |
| | | } |
| | | // button_delay+=1/(float)tag_frequency; |