Fix for starting sampling of data
This commit is contained in:
parent
6838df050b
commit
fd743c755e
@ -11,7 +11,7 @@
|
||||
#include "drivers/usart.h"
|
||||
|
||||
#define ARDUINO_BAUD 115200
|
||||
#define ARDUINO_DMA_SIZE 100
|
||||
#define ARDUINO_DMA_SIZE 15
|
||||
|
||||
void arduinoCom_init(USART_TypeDef* usart_inst);
|
||||
|
||||
|
@ -63,7 +63,7 @@ arduino_data_t data_arr[ARDUINO_DATA_COUNT] = {
|
||||
|
||||
void arduinoCom_init(USART_TypeDef* usart_inst)
|
||||
{
|
||||
usart_init_dma(usart_inst, &dmaHandler, ARDUINO_BAUD, STOP_BITS_2, PARITY_EVEN, ARDUINO_DMA_SIZE, 0);
|
||||
usart_init_dma(usart_inst, &dmaHandler, ARDUINO_BAUD, STOP_BITS_1, PARITY_NONE, ARDUINO_DMA_SIZE, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -107,6 +107,7 @@ void arduino_read()
|
||||
static uint8_t current_header = 0;
|
||||
static uint8_t crc = 0;
|
||||
static arduino_data_t msg_header_and_size = {0};
|
||||
arduino_frame_available();
|
||||
|
||||
if (raw_dma_data_t.new_data)
|
||||
{
|
||||
|
Reference in New Issue
Block a user