Use USB VCP as a normal serial driver as well

This commit is contained in:
Raphael Coeffic
2022-03-20 16:22:14 +01:00
parent 530d395204
commit b39baa2360
37 changed files with 357 additions and 248 deletions
@@ -31,7 +31,7 @@ ModuleFifo intmoduleFifo;
static uint8_t * intmoduleTxBufferData;
static volatile uint8_t intmoduleTxBufferRemaining;
bool intmoduleTxBufferSend(uint8_t* data)
uint8_t intmoduleTxBufferSend(uint8_t* data)
{
if (intmoduleTxBufferRemaining) {
*data = *(intmoduleTxBufferData++);
@@ -158,4 +158,8 @@ const etx_serial_driver_t IntmoduleSerialDriver = {
.sendByte = intmoduleSendByte,
.sendBuffer = intmoduleSendBuffer,
.waitForTxCompleted = intmoduleWaitForTxCompleted,
.getByte = nullptr,
.getBaudrate = nullptr,
.setReceiveCb = nullptr,
.setBaudrateCb = nullptr,
};