Classes | Functions | Variables
d_usartDMA.h File Reference
#include "../ASF/sam/drivers/usart/usart.h"
#include "conf_d_usartDMA.h"
Include dependency graph for d_usartDMA.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  port_monitor_helper_t
 

Functions

void d_usartDMA_callback_cdc_disable (void)
 
bool d_usartDMA_callback_cdc_enable (void)
 
void d_usartDMA_callback_cdc_tx_empty_notify (void)
 
int serFindCharacter (int serialNum, uint8_t ch)
 Returns number of characters in buffer before specified character. More...
 
int serGetBaudRate (int serialNum)
 Read USART baudrate. Return value is the baudrate or -1 on failure. More...
 
int serInit (int serialNum, uint32_t baudRate, sam_usart_opt_t *options, uint32_t *overrunStatus)
 Initialize serial port with specific USART/UART and DMA settings. If not NULL, the overrun status will have bits HDW_STATUS_ERR_COM_TX_LIMITED and HDW_STATUS_ERR_COM_RX_OVERRUN set during buffer limitation. More...
 
int serRead (int serialNum, unsigned char *buf, int size)
 Read data on USART. Returns number of bytes read. With use of the PDCA ring buffer, buffer overrun may occur if bytes are received is greater than bytes read plus buffer size. More...
 
int serRxClear (int serialNum, int len)
 Removes removes data from USART Rx buffer. Returns number of bytes removed. Length of -1 removes all data from USART buffer. More...
 
int serRxFree (int serialNum)
 Returns number of bytes available in Rx buffer. More...
 
int serRxUsed (int serialNum)
 Returns number of bytes used in Rx buffer. More...
 
int serSetBaudRate (int serialNum, int baudrate)
 Change USART baudrate. 0 on success, -1 on failure. More...
 
int serTxClear (int serialNum)
 Clear the entire Tx buffer, returns how much was cleared. More...
 
int serTxFree (int serialNum)
 Returns number of bytes available in Tx buffer. More...
 
int serTxUsed (int serialNum)
 Returns number of bytes used in Tx buffer. More...
 
int serWrite (int serialNum, const unsigned char *buf, int size)
 Write data on USART. Returns number of bytes written. More...
 
int validateBaudRate (unsigned int baudRate)
 Returns -1 if the baudrate is not a standard baudrate. More...
 

Variables

port_monitor_helper_t g_portMonitorHelper [MAX_NUMBER_SERIAL_PORTS]
 

Function Documentation

◆ d_usartDMA_callback_cdc_disable()

void d_usartDMA_callback_cdc_disable ( void  )

Definition at line 166 of file d_usartDMA.c.

◆ d_usartDMA_callback_cdc_enable()

bool d_usartDMA_callback_cdc_enable ( void  )

Definition at line 160 of file d_usartDMA.c.

◆ d_usartDMA_callback_cdc_tx_empty_notify()

void d_usartDMA_callback_cdc_tx_empty_notify ( void  )

Definition at line 171 of file d_usartDMA.c.

◆ serFindCharacter()

int serFindCharacter ( int  serialNum,
uint8_t  ch 
)

Returns number of characters in buffer before specified character.

Definition at line 884 of file d_usartDMA.c.

◆ serGetBaudRate()

int serGetBaudRate ( int  serialNum)

Read USART baudrate. Return value is the baudrate or -1 on failure.

Definition at line 1016 of file d_usartDMA.c.

◆ serInit()

int serInit ( int  serialNum,
uint32_t  baudRate,
sam_usart_opt_t options,
uint32_t *  overrunStatus 
)

Initialize serial port with specific USART/UART and DMA settings. If not NULL, the overrun status will have bits HDW_STATUS_ERR_COM_TX_LIMITED and HDW_STATUS_ERR_COM_RX_OVERRUN set during buffer limitation.

Definition at line 1560 of file d_usartDMA.c.

◆ serRead()

int serRead ( int  serialNum,
unsigned char *  buf,
int  size 
)

Read data on USART. Returns number of bytes read. With use of the PDCA ring buffer, buffer overrun may occur if bytes are received is greater than bytes read plus buffer size.

Definition at line 782 of file d_usartDMA.c.

◆ serRxClear()

int serRxClear ( int  serialNum,
int  len 
)

Removes removes data from USART Rx buffer. Returns number of bytes removed. Length of -1 removes all data from USART buffer.

Definition at line 398 of file d_usartDMA.c.

◆ serRxFree()

int serRxFree ( int  serialNum)

Returns number of bytes available in Rx buffer.

Definition at line 332 of file d_usartDMA.c.

◆ serRxUsed()

int serRxUsed ( int  serialNum)

Returns number of bytes used in Rx buffer.

Definition at line 301 of file d_usartDMA.c.

◆ serSetBaudRate()

int serSetBaudRate ( int  serialNum,
int  baudrate 
)

Change USART baudrate. 0 on success, -1 on failure.

Definition at line 995 of file d_usartDMA.c.

◆ serTxClear()

int serTxClear ( int  serialNum)

Clear the entire Tx buffer, returns how much was cleared.

Clear the entire Tx buffer, returns how much was cleared.

Definition at line 344 of file d_usartDMA.c.

◆ serTxFree()

int serTxFree ( int  serialNum)

Returns number of bytes available in Tx buffer.

Definition at line 313 of file d_usartDMA.c.

◆ serTxUsed()

int serTxUsed ( int  serialNum)

Returns number of bytes used in Tx buffer.

Definition at line 289 of file d_usartDMA.c.

◆ serWrite()

int serWrite ( int  serialNum,
const unsigned char *  buf,
int  size 
)

Write data on USART. Returns number of bytes written.

Definition at line 443 of file d_usartDMA.c.

◆ validateBaudRate()

int validateBaudRate ( unsigned int  baudRate)

Returns -1 if the baudrate is not a standard baudrate.

Definition at line 980 of file d_usartDMA.c.

Variable Documentation

◆ g_portMonitorHelper

Definition at line 153 of file d_usartDMA.c.



inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:05