|
| bool | uart_init (serial_t *obj, uint32_t baudrate, uint32_t databits, uint32_t parity, uint32_t stopbits, bool rx_invert, bool tx_invert, bool data_invert) |
| | Initialize the UART interface.
|
| |
| void | uart_deinit (serial_t *obj) |
| | Deinitialize the UART interface: reset the peripheral and disable its clock.
|
| |
| int | uart_getc (serial_t *obj, unsigned char *c) |
| | Configure the UART interface for low power operation: select HSI (LSE on STM32WB0x) as the source clock of the low power wakeup and enable the wakeup EXTI line when available.
|
| |
| void | uart_attach_rx_callback (serial_t *obj, void(*callback)(serial_t *)) |
| | Begin an asynchronous RX transfer (enable interrupt for data collecting).
|
| |
| void | uart_attach_tx_callback (serial_t *obj, int(*callback)(serial_t *), size_t size) |
| | Begin an asynchronous TX transfer (enable interrupt for data sending).
|
| |
| uint8_t | serial_tx_active (serial_t *obj) |
| | Determine if the serial peripheral is already in use for TX.
|
| |
| uint8_t | serial_rx_active (serial_t *obj) |
| | Determine if the serial peripheral is already in use for RX.
|
| |
| void | uart_enable_tx (serial_t *obj) |
| | Enable the transmitter for half-duplex mode (when pin_rx is NC).
|
| |
| void | uart_enable_rx (serial_t *obj) |
| | Enable the receiver for half-duplex mode (when pin_rx is NC).
|
| |
| size_t | uart_debug_write (uint8_t *data, uint32_t size) |
| | Write data on the UART, used by printf for debug only (syscalls).
|
| |
Header for uart module.
- Author
- WI6LABS, fpistm
- Attention
© COPYRIGHT(c) 2016 STMicroelectronics
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.