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
Initialises the peripheral.
- Parameters:
-
config | Device configuration |
Member Function Documentation
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:
-
func | Pointer to the callback function |
- Returns:
- true Success
-
false Failed
Sends instantaneously all outgoing bytes.
- Returns:
- Number of bytes available for writing
Implements Serial.
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:
-
bytes | Incoming bytes |
size | Number of bytes to read |
- Returns:
- true Data successfully read
-
false Data not read
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:
-
byte | Outgoing bytes |
size | Number of bytes to write |
- Returns:
- true Data successfully written
-
false Data not written
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: