2012-12-14 21:55:38 -04:00
|
|
|
|
|
|
|
#include "UARTDriver.h"
|
|
|
|
|
|
|
|
using namespace Empty;
|
|
|
|
|
2015-12-07 14:53:55 -04:00
|
|
|
UARTDriver::UARTDriver() {}
|
2012-12-14 21:55:38 -04:00
|
|
|
|
2015-12-07 14:53:55 -04:00
|
|
|
void UARTDriver::begin(uint32_t b) {}
|
|
|
|
void UARTDriver::begin(uint32_t b, uint16_t rxS, uint16_t txS) {}
|
|
|
|
void UARTDriver::end() {}
|
|
|
|
void UARTDriver::flush() {}
|
|
|
|
bool UARTDriver::is_initialized() { return false; }
|
|
|
|
void UARTDriver::set_blocking_writes(bool blocking) {}
|
|
|
|
bool UARTDriver::tx_pending() { return false; }
|
2012-12-14 21:55:38 -04:00
|
|
|
|
|
|
|
/* Empty implementations of Stream virtual methods */
|
2016-08-02 10:42:50 -03:00
|
|
|
uint32_t UARTDriver::available() { return 0; }
|
|
|
|
uint32_t UARTDriver::txspace() { return 1; }
|
2015-12-07 14:53:55 -04:00
|
|
|
int16_t UARTDriver::read() { return -1; }
|
2012-12-14 21:55:38 -04:00
|
|
|
|
|
|
|
/* Empty implementations of Print virtual methods */
|
2015-12-07 14:53:55 -04:00
|
|
|
size_t UARTDriver::write(uint8_t c) { return 0; }
|
2013-10-02 04:37:11 -03:00
|
|
|
|
2015-12-07 14:53:55 -04:00
|
|
|
size_t UARTDriver::write(const uint8_t *buffer, size_t size)
|
2013-10-02 04:37:11 -03:00
|
|
|
{
|
|
|
|
size_t n = 0;
|
|
|
|
while (size--) {
|
|
|
|
n += write(*buffer++);
|
|
|
|
}
|
|
|
|
return n;
|
|
|
|
}
|