uart_soft.h
Go to the documentation of this file.
/* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
extern volatile bool uart_soft_received[4];
bool uart_soft_setup(uint32_t *rx_baudrates, uint32_t *tx_baudrates);
uint8_t uart_soft_getbyte(uint8_t uart);
void uart_soft_flush(uint8_t uart);
void uart_soft_putbyte_nonblocking(uint8_t uart, uint8_t byte);
void uart_soft_putbyte_blocking(uint8_t uart, uint8_t byte);
uart_soft_setup
bool uart_soft_setup(uint32_t *rx_baudrates, uint32_t *tx_baudrates)
setup software UART ports
Definition: uart_soft.c:115
uart_soft_received
volatile bool uart_soft_received[4]
if data has been received from UART port and is available to be read
Definition: uart_soft.c:98
uart_soft_putbyte_nonblocking
void uart_soft_putbyte_nonblocking(uint8_t uart, uint8_t byte)
put byte in buffer to be transmitted on UART port
Definition: uart_soft.c:290
uart_soft_flush
void uart_soft_flush(uint8_t uart)
ensure all bytes are transmitted for the UART
Definition: uart_soft.c:253
soft_uart_tx_state::byte
volatile uint8_t byte
byte being transmitted
Definition: uart_soft.c:88
uart_soft_putbyte_blocking
void uart_soft_putbyte_blocking(uint8_t uart, uint8_t byte)
transmit byte on UART port
Definition: uart_soft.c:303
uart_soft_getbyte
uint8_t uart_soft_getbyte(uint8_t uart)
get received byte from UART port
Definition: uart_soft.c:195