22 lines
528 B
C++
22 lines
528 B
C++
#include <stdio.h>
|
|
#include "usart.h"
|
|
extern "C" FILE mystdout;
|
|
|
|
Usart::Usart(const uint32_t _baud) noexcept : BaseLayer (), tx_ring () {
|
|
stdout = &mystdout;
|
|
}
|
|
void Usart::irq () {
|
|
}
|
|
void Usart::SetRS485 (const bool polarity) const {
|
|
}
|
|
void Usart::SetHalfDuplex (const bool on) const {
|
|
}
|
|
|
|
uint32_t Usart::Down (const char * data, const uint32_t len) {
|
|
//int n = fwrite (data, 1, len, stdout);
|
|
for (unsigned n=0; n<len; n++) putchar(data[n]);
|
|
return len;
|
|
}
|
|
extern "C" {
|
|
void __cxa_pure_virtual() { while (1); }
|
|
};
|