uartdrv.c File Reference

UARTDRV API implementation.

Version
5.6.0

License

Copyright 2016 Silicon Laboratories, Inc, www.silabs.com

This file is licensed under the Silabs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.

Definition in file uartdrv.c .

#include <string.h>
#include " uartdrv.h "
#include " em_device.h "
#include " em_emu.h "
#include " em_gpio.h "
#include " em_core.h "
#include " gpiointerrupt.h "

Functions

Ecode_t UARTDRV_Abort ( UARTDRV_Handle_t handle, UARTDRV_AbortType_t type)
Abort ongoing UART transfers.
Ecode_t UARTDRV_DeInit ( UARTDRV_Handle_t handle)
Deinitialize a UART driver instance.
UARTDRV_FlowControlState_t UARTDRV_FlowControlGetPeerStatus ( UARTDRV_Handle_t handle)
Check the peer's flow control status.
UARTDRV_FlowControlState_t UARTDRV_FlowControlGetSelfStatus ( UARTDRV_Handle_t handle)
Check the self flow control status.
Ecode_t UARTDRV_FlowControlIgnoreRestrain ( UARTDRV_Handle_t handle)
Enable transmission when restrained by flow control.
Ecode_t UARTDRV_FlowControlSet ( UARTDRV_Handle_t handle, UARTDRV_FlowControlState_t state)
Set UART flow control state. Set nRTS pin if hardware flow control is enabled. Send XON/XOFF if software flow control is enabled.
Ecode_t UARTDRV_FlowControlSetPeerStatus ( UARTDRV_Handle_t handle, UARTDRV_FlowControlState_t state)
Set peer UART flow control state. Pause/resume transmit accordingly. Only for manual software flow control.
UARTDRV_Count_t UARTDRV_ForceReceive ( UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t maxCount)
Direct receive without interrupts or callback. This is a blocking function.
Ecode_t UARTDRV_ForceTransmit ( UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t count)
Direct transmit without interrupts or callback. This is a blocking function. that ignores flow control if enabled.
UARTDRV_Status_t UARTDRV_GetPeripheralStatus ( UARTDRV_Handle_t handle)
Return the status of the UART peripheral associated with a given handle.
uint8_t UARTDRV_GetReceiveDepth ( UARTDRV_Handle_t handle)
Return the number of queued receive operations.
UARTDRV_Status_t UARTDRV_GetReceiveStatus ( UARTDRV_Handle_t handle, uint8_t **buffer, UARTDRV_Count_t *itemsReceived, UARTDRV_Count_t *itemsRemaining)
Check the status of the UART and gather information about any ongoing receive operations.
uint8_t UARTDRV_GetTransmitDepth ( UARTDRV_Handle_t handle)
Returns the number of queued transmit operations.
UARTDRV_Status_t UARTDRV_GetTransmitStatus ( UARTDRV_Handle_t handle, uint8_t **buffer, UARTDRV_Count_t *itemsSent, UARTDRV_Count_t *itemsRemaining)
Check the status of the UART and gather information about any ongoing transmit operations.
Ecode_t UARTDRV_InitLeuart ( UARTDRV_Handle_t handle, const UARTDRV_InitLeuart_t *initData)
Initialize a LEUART driver instance.
Ecode_t UARTDRV_InitUart ( UARTDRV_Handle_t handle, const UARTDRV_InitUart_t *initData)
Initialize a U(S)ART driver instance.
Ecode_t UARTDRV_PauseTransmit ( UARTDRV_Handle_t handle)
Pause an ongoing transmit operation.
Ecode_t UARTDRV_Receive ( UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t count, UARTDRV_Callback_t callback)
Start a non-blocking receive.
Ecode_t UARTDRV_ReceiveB ( UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t count)
Start a blocking receive.
Ecode_t UARTDRV_ResumeTransmit ( UARTDRV_Handle_t handle)
Resume a paused transmit operation.
Ecode_t UARTDRV_Transmit ( UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t count, UARTDRV_Callback_t callback)
Start a non-blocking transmit.
Ecode_t UARTDRV_TransmitB ( UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t count)
Start a blocking transmit.