MicrOS
|
#include "micros_serial.h"
Functions | |
void | micros_serial_init (unsigned int port, unsigned int baud_rate, unsigned int data_bits, unsigned int stop_bits, unsigned int parity) |
Inits serial port. More... | |
bool | micros_serial_is_busy (unsigned int port) |
Checks if the specified serial port is busy. More... | |
bool | micros_serial_is_queue_empty (unsigned int port) |
Checks if the specified serial port queue is empty. More... | |
void | micros_serial_send (unsigned int port, char c) |
Sends a char on the specified serial port. More... | |
void | micros_serial_send_string (unsigned int port, char *str) |
Sends a string on the specified serial port. More... | |
char | micros_serial_receive (unsigned int port) |
Reads a char on the specified serial port. More... | |
void micros_serial_init | ( | unsigned int | port, |
unsigned int | baud_rate, | ||
unsigned int | data_bits, | ||
unsigned int | stop_bits, | ||
unsigned int | parity | ||
) |
Inits serial port.
Inits serial port with the specified parameters
port | Serial port ID (MICROS_COMx_PORT). |
baud_rate | Speed of the serial port in bauds. |
data_bits | Data length (set 8 for default). |
stop_bits | Stop bits for the single message (set 1 for default). |
parity | Parity of the message (set MICROS_PARITY_NONE for default). |
bool micros_serial_is_busy | ( | unsigned int | port | ) |
Checks if the specified serial port is busy.
Checks if the specified serial port is busy.
port | Serial port ID (MICROS_COMx_PORT). |
bool micros_serial_is_queue_empty | ( | unsigned int | port | ) |
Checks if the specified serial port queue is empty.
Checks if the specified serial port queue is empty.
port | Serial port ID (MICROS_COMx_PORT). |
char micros_serial_receive | ( | unsigned int | port | ) |
Reads a char on the specified serial port.
Reads a char on the specified serial port.
port | Serial port ID (MICROS_COMx_PORT). |
void micros_serial_send | ( | unsigned int | port, |
char | c | ||
) |
Sends a char on the specified serial port.
Sends a char on the specified serial port.
port | Serial port ID (MICROS_COMx_PORT). |
c | Char to send. |
void micros_serial_send_string | ( | unsigned int | port, |
char * | str | ||
) |
Sends a string on the specified serial port.
Sends a string on the specified serial port.
port | Serial port ID (MICROS_COMx_PORT). |
string | String to send. |