B15F
Board 15 Famulus Edition
|
#include <usart.h>
Public Member Functions | |
USART ()=default | |
virtual | ~USART (void) |
void | openDevice (std::string device) |
void | closeDevice (void) |
void | clearInputBuffer (void) |
void | clearOutputBuffer (void) |
void | flushOutputBuffer (void) |
void | transmit (uint8_t *buffer, uint16_t offset, uint8_t len) |
void | receive (uint8_t *buffer, uint16_t offset, uint8_t len) |
void | drop (uint8_t len) |
uint32_t | getBaudrate (void) |
uint8_t | getTimeout (void) |
void | setBaudrate (uint32_t baudrate) |
void | setTimeout (uint8_t timeout) |
|
explicitdefault |
Standard-Konstruktor
|
virtual |
Destructor, ruft automatisch closeDevice() auf
void USART::clearInputBuffer | ( | void | ) |
Verwirft Daten, die bereits im Puffer liegen, aber noch nicht gelesen wurden
USARTException |
void USART::clearOutputBuffer | ( | void | ) |
Verwirft Daten, die bereits im Puffer liegen, aber noch nicht gesendet wurden
USARTException |
void USART::closeDevice | ( | void | ) |
void USART::drop | ( | uint8_t | len | ) |
Receives n bytes but discards them
len | count of bytes to receive |
USARTException |
void USART::flushOutputBuffer | ( | void | ) |
Schreibt Daten, die bereits im Puffer liegen, aber noch nicht gesendet wurden
USARTException |
uint32_t USART::getBaudrate | ( | void | ) |
uint8_t USART::getTimeout | ( | void | ) |
void USART::openDevice | ( | std::string | device | ) |
void USART::receive | ( | uint8_t * | buffer, |
uint16_t | offset, | ||
uint8_t | len | ||
) |
Receives n bytes from USART and writes them into the buffer
buffer | target buffer |
offset | in buffer (mostly 0) |
len | count of bytes to receive |
USARTException |
void USART::setBaudrate | ( | uint32_t | baudrate | ) |
Setzt die Baudrate Änderungen werden erst nach openDevice() wirksam
void USART::setTimeout | ( | uint8_t | timeout | ) |
Setzt den Timeout (in Dezisekunden) Änderungen werden erst nach openDevice() wirksam
void USART::transmit | ( | uint8_t * | buffer, |
uint16_t | offset, | ||
uint8_t | len | ||
) |
Sends n bytes from the buffer over USART
buffer | target buffer |
offset | in buffer (mostly 0) |
len | count of bytes to send |
USARTException |