add rhf76 lora module code

This commit is contained in:
supowang
2019-10-10 14:53:22 +08:00
parent b6af64f40d
commit 7a1753c36c
9 changed files with 605 additions and 211 deletions

View File

@@ -21,7 +21,7 @@
#include "usart.h"
/* USER CODE BEGIN 0 */
uint8_t ch;
/* USER CODE END 0 */
UART_HandleTypeDef huart1;
@@ -46,7 +46,7 @@ void MX_USART1_UART_Init(void)
{
Error_Handler();
}
HAL_UART_Receive_IT(&huart1, &ch, 1);
}
/* USART2 init function */
@@ -176,7 +176,14 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle)
}
/* USER CODE BEGIN 1 */
//extern void g_ring_buf(uint8_t in_data);
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
if (huart== &huart1) {
HAL_UART_Receive_IT(&huart1, &ch, 1);
//g_ring_buf(ch);
}
}
/* USER CODE END 1 */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/