/* USER CODE BEGIN 0 */uint8_t aRxBuffer[1];uint8_t aTxBuffer[]="ok";/* USER CODE END 0 */
/* USER CODE BEGIN 2 */ HAL_UART_Receive_DMA(&huart1,aRxBuffer,1); HAL_UART_Transmit_DMA(&huart1,aTxBuffer,sizeof(aTxBuffer)); /* USER CODE END 2 */
/* USER CODE BEGIN 4 */void HAL_UART_RxCpltCallback(UART_HandleTypeDef *UartHandle){ HAL_UART_Transmit(&huart1,aRxBuffer,1,0);}/* USER CODE END 4 */
全部0条评论
快来发表一下你的评论吧 !