Uart0 Class Reference

#include <uart0.hpp>

Inheritance diagram for Uart0:
Collaboration diagram for Uart0:

Public Member Functions

bool init (unsigned int baudRate, int rxQSize=32, int txQSize=64)
 
- Public Member Functions inherited from UartDev
void setBaudRate (unsigned int baudRate)
 Reset the baud-rate after UART has been initialized. More...
 
bool getChar (char *pInputChar, unsigned int timeout=portMAX_DELAY)
 
bool putChar (char out, unsigned int timeout=portMAX_DELAY)
 
bool flush (void)
 Flushed all pending transmission of the uart queue. More...
 
void handleInterrupt ()
 
unsigned int getRxQueueSize () const
 
unsigned int getTxQueueSize () const
 
unsigned int getRxQueueWatermark () const
 
unsigned int getTxQueueWatermark () const
 
bool recentlyActive (unsigned int ms=3000) const
 
TickType_t getLastActivityTime (void) const
 
void resetActivity (void)
 
- Public Member Functions inherited from CharDev
bool gets (char *pBuff, int maxLen, unsigned int timeout=0xffffffff)
 
int printf (const char *format,...)
 
int scanf (const char *format,...)
 
uint16_t getPrintfMemSize (void) const
 
bool put (const char *pString, unsigned int timeout=0xffffffff)
 
void putline (const char *pBuff, unsigned int timeout=0xffffffff)
 
bool isReady (void)
 
void setReady (bool r)
 

Static Public Member Functions

Static functions to use for printf/scanf redirection.
static char getcharIntrDriven (char unused)
 
static char putcharIntrDriven (char thechar)
 
- Static Public Member Functions inherited from SingletonTemplate< Uart0 >
static Uart0getInstance ()
 Public member to get instance of this SINGLETON class. More...
 

Friends

class SingletonTemplate< Uart0 >
 Friend class used for Singleton Template. More...
 

Additional Inherited Members

- Protected Member Functions inherited from UartDev
bool init (unsigned int pclk, unsigned int baudRate, int rxQSize=32, int txQSize=32)
 
 UartDev (unsigned int *pUARTBaseAddr)
 
 ~UartDev ()
 
- Protected Member Functions inherited from CharDev
 CharDev ()
 
virtual ~CharDev ()
 
- Protected Member Functions inherited from SingletonTemplate< Uart0 >
 SingletonTemplate ()
 
- Static Protected Attributes inherited from SingletonTemplate< Uart0 >
static SingletonTemplatempSingletonInstance
 

Detailed Description

UART0 Interrupt Driven Driver This simply uses UartDev, and forwards the UART3 IRQ to UartDev::handleInterrupt() This enforces Singleton class, otherwise it's a thin wrapper around UartDev class.

Member Function Documentation

static char Uart0::getcharIntrDriven ( char  unused)
inlinestatic
bool Uart0::init ( unsigned int  baudRate,
int  rxQSize = 32,
int  txQSize = 64 
)

Initializes UART0 at the given

Parameters
baudRate
rxQSizeThe size of the receive queue (optional, defaults to 32)
txQSizeThe size of the transmit queue (optional, defaults to 64)
static char Uart0::putcharIntrDriven ( char  thechar)
inlinestatic

Friends And Related Function Documentation

friend class SingletonTemplate< Uart0 >
friend

Friend class used for Singleton Template.


The documentation for this class was generated from the following files:
  • /var/www/html/SJSU-DEV-Linux/firmware/default/lib/L2_Drivers/uart0.hpp
  • /var/www/html/SJSU-DEV-Linux/firmware/default/lib/L2_Drivers/src/uart0.cpp