11#ifndef _SERIAL_COMMUNICATION_H_
12#define _SERIAL_COMMUNICATION_H_
15#include "freertos/FreeRTOS.h"
16#include "freertos/task.h"
17#include "driver/uart.h"
33#define UART_BUFFER_SIZE 1024
36#define UART_0 UART_NUM_0
37#define UART_1 UART_NUM_1
38#define UART_2 UART_NUM_2
41#define NO_PIN UART_PIN_NO_CHANGE
43#define FIVE_BITS UART_DATA_5_BITS
44#define SIX_BITS UART_DATA_6_BITS
45#define SEVEN_BITS UART_DATA_7_BITS
46#define EIGHT_BITS UART_DATA_8_BITS
48#define ONE_STOP_BIT UART_STOP_BITS_1
49#define ONE_HALF_STOP_BIT UART_STOP_BITS_1_5
50#define TWO_STOP_BIT UART_STOP_BITS_2
void serial_write(SerialComm *serial, char *str, int size)
serial_write will write the bytes that will be sent via serial communication
Definition: serial_communication.c:55
void serialCommInit(SerialComm *serial)
serialCommInit will intialize external serial communication
Definition: serial_communication.c:32
Custom SerialComm structure for UART adaptablity.
Definition: serial_communication.h:73
int gpio_rts
Definition: serial_communication.h:76
uart_parity_t parity
Definition: serial_communication.h:80
uart_word_length_t data_bits
Definition: serial_communication.h:82
uint32_t baud_rate
Definition: serial_communication.h:79
uart_stop_bits_t stop_bits
Definition: serial_communication.h:81
int gpio_rx
Definition: serial_communication.h:74
int gpio_tx
Definition: serial_communication.h:75
int gpio_cts
Definition: serial_communication.h:77
uart_port_t uart_num
Definition: serial_communication.h:78