Hardware Application Layer for Serial Communication.
More...
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/uart.h"
#include <string.h>
Go to the source code of this file.
Hardware Application Layer for Serial Communication.
- Author
- Jesus Minjares (https://github.com/jminjares4)
- Version
- 0.1
- Date
- 2021-11-27
- Copyright
- Copyright (c) 2021
◆ EIGHT_BITS
| #define EIGHT_BITS UART_DATA_8_BITS |
◆ FIVE_BITS
| #define FIVE_BITS UART_DATA_5_BITS |
◆ NO_PIN
| #define NO_PIN UART_PIN_NO_CHANGE |
◆ ONE_HALF_STOP_BIT
| #define ONE_HALF_STOP_BIT UART_STOP_BITS_1_5 |
◆ ONE_STOP_BIT
| #define ONE_STOP_BIT UART_STOP_BITS_1 |
◆ SEVEN_BITS
| #define SEVEN_BITS UART_DATA_7_BITS |
◆ SIX_BITS
| #define SIX_BITS UART_DATA_6_BITS |
◆ TWO_STOP_BIT
| #define TWO_STOP_BIT UART_STOP_BITS_2 |
◆ UART_0
| #define UART_0 UART_NUM_0 |
◆ UART_0_RX
◆ UART_0_TX
◆ UART_1
| #define UART_1 UART_NUM_1 |
◆ UART_1_RX
◆ UART_1_TX
◆ UART_2
| #define UART_2 UART_NUM_2 |
◆ UART_2_RX
◆ UART_2_TX
◆ UART_BUFFER_SIZE
| #define UART_BUFFER_SIZE 1024 |
◆ SerialComm
◆ serial_write()
| void serial_write |
( |
SerialComm * |
serial, |
|
|
char * |
str, |
|
|
int |
size |
|
) |
| |
serial_write will write the bytes that will be sent via serial communication
- Parameters
-
| serial | pass a SerialComm by reference |
| str | string that will be sent via the serial communication |
| size | length of string |
- Parameters
-
| serial | pass a SerialComm by reference |
| str | string that will be sent via the serial communication |
| size | length of string |
◆ serialCommInit()
serialCommInit will intialize external serial communication
- Parameters
-
- Returns
- None
- Parameters
-
- Returns
- None