KETCube UART driver for STM32L0.
More...
KETCube UART driver for STM32L0.
◆ KETCUBE_UART_NAME
#define KETCUBE_UART_NAME "uart_drv" |
◆ ketCube_UART_SimpleCbFn_t
typedef void(* ketCube_UART_SimpleCbFn_t) (void) |
◆ ketCube_UART_ChannelNo_t
UART supported channels.
- Todo:
- rename to respect channel names: USART 1,2,4,5, LPUART
Enumerator |
---|
KETCUBE_UART_CHANNEL_1 | |
KETCUBE_UART_CHANNEL_2 | |
KETCUBE_UART_CHANNEL_3 | |
KETCUBE_UART_CHANNEL_4 | |
KETCUBE_UART_CHANNEL_5 | |
KETCUBE_UART_CHANNEL_COUNT | |
◆ ketCube_UART_DisableAll()
void ketCube_UART_DisableAll |
( |
void |
| ) |
|
Disable All UART Instances.
◆ ketCube_UART_EnableAll()
void ketCube_UART_EnableAll |
( |
void |
| ) |
|
Enable All Registered UART Instances.
◆ ketCube_UART_ErrorCallback()
◆ ketCube_UART_GetHandle()
Retrieve UART handle for given channel.
- Parameters
-
- Return values
-
valid | handle or NULL if the channel hasn't been registered |
◆ ketCube_UART_IoDeInitAll()
void ketCube_UART_IoDeInitAll |
( |
void |
| ) |
|
Denitialize all registered descriptors (e.g. when going to sleep)
◆ ketCube_UART_IoDeInitCallback()
◆ ketCube_UART_IoInitAll()
void ketCube_UART_IoInitAll |
( |
void |
| ) |
|
Initialize all registered descriptors (e.g. when going back from sleep)
◆ ketCube_UART_IoInitCallback()
◆ ketCube_UART_IRQCallback()
◆ ketCube_UART_ReceiveCallback()
◆ ketCube_UART_RegisterHandle()
Register UART channel for exclusive access.
- Parameters
-
channel | UART channel to be registered |
descriptor | descriptor with filled information |
- Return values
-
KETCUBE_CFG_DRV_OK | in case of success |
KETCUBE_CFG_DRV_ERROR | in case of failure |
◆ ketCube_UART_SetupPin()
Setup UART PIN(s)
- Parameters
-
pin | KETCube PIN |
port | KETCube PORT |
af | alternate function for selected UART peripheral and PIN |
- Return values
-
KETCUBE_CFG_DRV_OK | in case of success |
KETCUBE_CFG_DRV_ERROR | in case of failure |
◆ ketCube_UART_TransmitCallback()
◆ ketCube_UART_UnRegisterHandle()
Unregister UART channel.
- Parameters
-
channel | UART channel to be unregistered |
- Return values
-
KETCUBE_CFGDRV_OK | in case of success |
KETCUBE_CFG_DRV_ERROR | in case of failure |
◆ ketCube_UART_WakeupCallback()