diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-10-26 16:20:39 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-10-26 16:20:39 +0200 |
commit | d945680142d5b16d8809ea200833edd97caec2f8 (patch) | |
tree | ba1e23bf440181e8a2c61587b5274877563fe880 /stm32f091/test.c | |
parent | e2ae9e96ba05baa389ebc49a65a941bada87e3aa (diff) |
esp send with dma in seperate function
Diffstat (limited to 'stm32f091/test.c')
-rw-r--r-- | stm32f091/test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stm32f091/test.c b/stm32f091/test.c index 4d1b936..0960d0f 100644 --- a/stm32f091/test.c +++ b/stm32f091/test.c @@ -2,9 +2,9 @@ #include <FreeRTOS.h> #include <task.h> +#include "esp8266.h" #include "setup.h" - -uint8_t tx_buffer[] = "AT\r\n"; +#include "util.h" void ws_test_read_task() { uint8_t* buf; // TODO: not working @@ -15,9 +15,9 @@ void ws_test_read_task() { } void ws_test_write_task() { + uint8_t data[] = "AT\r\n"; while (1) { - HAL_UART_Transmit_DMA(&huart1, tx_buffer, sizeof(tx_buffer)); - __HAL_UART_ENABLE_IT(&huart1, UART_IT_TXE); + ws_esp8266_send(data, sizeof(data)); HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_5); vTaskDelay(portTICK_PERIOD_MS * 1000 * 1); |