UART commands work

This commit is contained in:
StefansE
2026-03-27 19:40:53 +01:00
parent ba8855eb21
commit e6e97f0412
10 changed files with 267 additions and 11 deletions

View File

@@ -50,7 +50,7 @@
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
extern uint8_t UART_RxBuf[6];
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
@@ -122,6 +122,7 @@ int main(void)
/* USER CODE BEGIN 3 */
uint8_t UART_Buff[] = "Hello World\n";
#define EFFECT_TIME 10000
@@ -141,10 +142,12 @@ int main(void)
// ws_Effect_RoudTheClock();
HAL_UART_Receive_IT(&huart2, UART_RxBuf, sizeof(UART_RxBuf));
HAL_GPIO_TogglePin(LED_Green_GPIO_Port, LED_Green_Pin);
HAL_UART_Transmit(&huart2, UART_Buff, sizeof(UART_Buff), 1000);
HAL_Delay(1000);
}