lua serialRead (#7520)

Lua serial read
This commit is contained in:
Tom van Dijk
2020-05-15 15:13:23 +02:00
committed by GitHub
parent 51f841d2af
commit 682f0f1b05
4 changed files with 79 additions and 2 deletions
@@ -218,11 +218,18 @@ static uint16_t VCP_DataRx (uint8_t* Buf, uint32_t Len)
#if defined(CLI)
//copy data to the application FIFO
for (uint32_t i = 0; i < Len; i++)
{
for (uint32_t i = 0; i < Len; i++) {
cliRxFifo.push(Buf[i]);
}
#endif
#if defined(LUA) && !defined(CLI)
// copy data to the LUA FIFO
if (luaRxFifo) {
for (uint32_t i = 0; i < Len; i++) {
luaRxFifo->push(Buf[i]);
}
}
#endif
return USBD_OK;
}