Bluenet
5.7.0
Bluenet, firmware for nRF52 smart home devices
|
Go to the source code of this file.
Functions | |
void | serial_config (uint8_t pinRx, uint8_t pinTx) |
Author: Crownstone Team Copyright: Crownstone (https://crownstone.rocks) Date: 10 Oct., 2014 License: LGPLv3+, Apache License 2.0, and/or MIT (triple-licensed) More... | |
void | serial_init (serial_enable_t enabled) |
Init the UART. More... | |
void | serial_enable (serial_enable_t enabled) |
Change what is enabled. More... | |
void | serial_set_read_callback (serial_read_callback callback) |
Set the callback. More... | |
serial_enable_t | serial_get_state () |
Get the state of the serial. More... | |
bool | serial_tx_ready () |
Returns whether serial is ready for TX, and has it enabled. More... | |
void | serial_write (uint8_t val) |
Write a single byte. More... | |
void serial_config | ( | uint8_t | pinRx, |
uint8_t | pinTx | ||
) |
Author: Crownstone Team Copyright: Crownstone (https://crownstone.rocks) Date: 10 Oct., 2014 License: LGPLv3+, Apache License 2.0, and/or MIT (triple-licensed)
Driver class for serial / UART.
Note: this class is also used by C code. General configuration of the serial connection. This sets the pin to be used for UART, the baudrate, the parity bits, etc. Should only be called once.
void serial_enable | ( | serial_enable_t | enabled | ) |
Change what is enabled.
serial_enable_t serial_get_state | ( | ) |
Get the state of the serial.
void serial_init | ( | serial_enable_t | enabled | ) |
Init the UART.
Make sure it has been configured first.
void serial_set_read_callback | ( | serial_read_callback | callback | ) |
Set the callback.
bool serial_tx_ready | ( | ) |
Returns whether serial is ready for TX, and has it enabled.
void serial_write | ( | uint8_t | val | ) |
Write a single byte.