MAV'RIC
Public Member Functions
Serial_dummy Class Reference
Inheritance diagram for Serial_dummy:
Inheritance graph
[legend]
Collaboration diagram for Serial_dummy:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Serial_dummy (void)
 Initialises the peripheral.
bool init (void)
 Hardware initialization.
uint32_t readable (void)
 Test if there are bytes available to read.
uint32_t writeable (void)
 Test if there is space available to write bytes.
void flush (void)
 Sends instantaneously all outgoing bytes.
bool attach (serial_interrupt_callback_t __attribute__((unused)) func)
 Attach a function to call after a receive interrupt is generated.
bool write (const uint8_t __attribute__((unused))*bytes, const uint32_t __attribute__((unused)) size=1)
 Write bytes on the serial line.
bool read (uint8_t __attribute__((unused))*bytes, const uint32_t __attribute__((unused)) size=1)
 Read bytes from the serial line.

Constructor & Destructor Documentation

Serial_dummy::Serial_dummy ( void  ) [inline]

Initialises the peripheral.

Parameters:
configDevice configuration

Member Function Documentation

bool Serial_dummy::attach ( serial_interrupt_callback_t __attribute__((unused))  func) [inline]

Attach a function to call after a receive interrupt is generated.

A default handler should be provided by the implementation to add the incoming data in a buffer, so is not mandatory to call this method. The function callback will be called after the interrupt handler

Parameters:
funcPointer to the callback function
Returns:
true Success
false Failed
void Serial_dummy::flush ( void  ) [inline, virtual]

Sends instantaneously all outgoing bytes.

Returns:
Number of bytes available for writing

Implements Serial.

bool Serial_dummy::init ( void  ) [inline, virtual]

Hardware initialization.

Returns:
true Success
false Error

Implements Serial.

bool Serial_dummy::read ( uint8_t __attribute__((unused))*  bytes,
const uint32_t __attribute__((unused))  size = 1 
) [inline]

Read bytes from the serial line.

Parameters:
bytesIncoming bytes
sizeNumber of bytes to read
Returns:
true Data successfully read
false Data not read
uint32_t Serial_dummy::readable ( void  ) [inline, virtual]

Test if there are bytes available to read.

Returns:
Number of incoming bytes available

Implements Serial.

bool Serial_dummy::write ( const uint8_t __attribute__((unused))*  bytes,
const uint32_t __attribute__((unused))  size = 1 
) [inline]

Write bytes on the serial line.

Parameters:
byteOutgoing bytes
sizeNumber of bytes to write
Returns:
true Data successfully written
false Data not written
uint32_t Serial_dummy::writeable ( void  ) [inline, virtual]

Test if there is space available to write bytes.

Returns:
Number of bytes available for writing

Implements Serial.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines