Fixed portability issue

This commit is contained in:
2017-10-18 11:23:51 +02:00
parent b9c910b283
commit 336a9599e4
4 changed files with 5 additions and 6 deletions

View File

@ -55,11 +55,10 @@ void uart::reset_cb() {
}
void uart::transmit_data() {
if(regs->r_txdata.data != '\r') queue.push_back(regs->r_txdata.data);
if (queue.size() >> 0 && (regs->r_txdata.data == '\n' || regs->r_txdata.data == 0)) {
LOG(INFO) << this->name() << " transmit: '" << std::string(queue.begin(), queue.end()) << "'";
queue.clear();
} else {
queue.push_back(regs->r_txdata.data);
}
}