code style

This commit is contained in:
rusefi 2017-05-23 17:39:47 -04:00
parent 3c6c53c301
commit 53057c7586
1 changed files with 4 additions and 4 deletions

View File

@ -147,20 +147,20 @@ void sr5WriteData(ts_channel_s *tsChannel, const uint8_t * buffer, int size) {
if (transferred != size) { if (transferred != size) {
#if EFI_SIMULATOR || defined(__DOXYGEN__) #if EFI_SIMULATOR || defined(__DOXYGEN__)
logMsg("!!! NOT ACCEPTED %d out of %d !!!", transferred, size); logMsg("!!! NOT ACCEPTED %d out of %d !!!", transferred, size);
#endif #endif /* EFI_SIMULATOR */
scheduleMsg(&tsLogger, "!!! NOT ACCEPTED %d out of %d !!!", transferred, size); scheduleMsg(&tsLogger, "!!! NOT ACCEPTED %d out of %d !!!", transferred, size);
} }
} }
int sr5ReadData(ts_channel_s *tsChannel, uint8_t * buffer, int size) { int sr5ReadData(ts_channel_s *tsChannel, uint8_t * buffer, int size) {
#if TS_UART_DMA_MODE && EFI_PROD_CODE #if TS_UART_DMA_MODE || defined(__DOXYGEN__)
UNUSED(tsChannel); UNUSED(tsChannel);
return (int)chIQReadTimeout(&tsUartDma.fifoRxQueue, (uint8_t * )buffer, (size_t)size, SR5_READ_TIMEOUT); return (int)chIQReadTimeout(&tsUartDma.fifoRxQueue, (uint8_t * )buffer, (size_t)size, SR5_READ_TIMEOUT);
#else #else /* TS_UART_DMA_MODE */
if (tsChannel->channel == NULL) if (tsChannel->channel == NULL)
return 0; return 0;
return chnReadTimeout(tsChannel->channel, (uint8_t * )buffer, size, SR5_READ_TIMEOUT); return chnReadTimeout(tsChannel->channel, (uint8_t * )buffer, size, SR5_READ_TIMEOUT);
#endif #endif /* TS_UART_DMA_MODE */
} }