EFM32 Wonder Gecko Software Documentation  efm32wg-doc-5.1.2
uartdrv.c File Reference

Detailed Description

UARTDRV API implementation.

Version
5.1.2

License

Copyright 2016 Silicon Laboratories, Inc, http://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"

Go to the source code of this file.

Functions

Ecode_t UARTDRV_Abort (UARTDRV_Handle_t handle, UARTDRV_AbortType_t type)
 Abort ongoing UART transfers. More...
 
Ecode_t UARTDRV_DeInit (UARTDRV_Handle_t handle)
 Deinitialize a UART driver instance. More...
 
UARTDRV_FlowControlState_t UARTDRV_FlowControlGetPeerStatus (UARTDRV_Handle_t handle)
 Checks the peer's flow control status. More...
 
UARTDRV_FlowControlState_t UARTDRV_FlowControlGetSelfStatus (UARTDRV_Handle_t handle)
 Checks the self's flow control status. More...
 
Ecode_t UARTDRV_FlowControlIgnoreRestrain (UARTDRV_Handle_t handle)
 Enables transmission when restrained by flow control. More...
 
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. More...
 
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. More...
 
UARTDRV_Count_t UARTDRV_ForceReceive (UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t maxCount)
 Direct receive without interrupts or callback. Blocking function. More...
 
Ecode_t UARTDRV_ForceTransmit (UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t count)
 Direct transmit without interrupts or callback. Blocking function that ignores flow control if enabled. More...
 
UARTDRV_Status_t UARTDRV_GetPeripheralStatus (UARTDRV_Handle_t handle)
 Returns the status of the UART peripheral associated with a given handle. More...
 
uint8_t UARTDRV_GetReceiveDepth (UARTDRV_Handle_t handle)
 Returns the number of queued receive operations. More...
 
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. More...
 
uint8_t UARTDRV_GetTransmitDepth (UARTDRV_Handle_t handle)
 Returns the number of queued transmit operations. More...
 
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. More...
 
Ecode_t UARTDRV_InitLeuart (UARTDRV_Handle_t handle, const UARTDRV_InitLeuart_t *initData)
 Initialize a LEUART driver instance. More...
 
Ecode_t UARTDRV_InitUart (UARTDRV_Handle_t handle, const UARTDRV_InitUart_t *initData)
 Initialize a U(S)ART driver instance. More...
 
Ecode_t UARTDRV_PauseTransmit (UARTDRV_Handle_t handle)
 Pause an ongoing transmit operation. More...
 
Ecode_t UARTDRV_Receive (UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t count, UARTDRV_Callback_t callback)
 Start a non-blocking receive. More...
 
Ecode_t UARTDRV_ReceiveB (UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t count)
 Start a blocking receive. More...
 
Ecode_t UARTDRV_ResumeTransmit (UARTDRV_Handle_t handle)
 Resume a paused transmit operation. More...
 
Ecode_t UARTDRV_Transmit (UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t count, UARTDRV_Callback_t callback)
 Start a non-blocking transmit. More...
 
Ecode_t UARTDRV_TransmitB (UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t count)
 Start a blocking transmit. More...