diff options
author | Dominik Sliwa <dominik.sliwa@toradex.com> | 2017-04-10 13:41:28 +0200 |
---|---|---|
committer | Dominik Sliwa <dominik.sliwa@toradex.com> | 2017-04-10 13:41:28 +0200 |
commit | d0e5a94a55334b0a27652959fba5066f56128135 (patch) | |
tree | 058987518e64691297b4409d5b06d65e9b335167 /drivers | |
parent | b3bc06bef795fdc57254729c74c04e2732a6092d (diff) |
CAN and communication updates
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/fsl_dspi.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/fsl_dspi.c b/drivers/fsl_dspi.c index b2f28ed..51da2d8 100644 --- a/drivers/fsl_dspi.c +++ b/drivers/fsl_dspi.c @@ -29,6 +29,7 @@ */ #include "fsl_dspi.h" +#include "com_task.h" /******************************************************************************* * Definitions @@ -1434,6 +1435,7 @@ void DSPI_SlaveTransferHandleIRQ(SPI_Type *base, dspi_slave_handle_t *handle) uint8_t dummyPattern = DSPI_DUMMY_DATA; uint32_t dataReceived; uint32_t dataSend = 0; + //uint32_t dataCount = 0; /* Because SPI protocol is synchronous, the number of bytes that that slave received from the * master is the actual number of bytes that the slave transmitted to the master. So we only @@ -1464,6 +1466,13 @@ void DSPI_SlaveTransferHandleIRQ(SPI_Type *base, dspi_slave_handle_t *handle) /* Descrease remaining receive byte count */ --handle->remainingReceiveByteCount; + /* dataCount = handle->totalByteCount - handle->remainingReceiveByteCount; + + if (dataCount == 2 && (*(handle->rxData - 1) == APALIS_TK1_K20_BULK_WRITE_INST) + && (dataReceived < APALIS_TK1_K20_MAX_BULK)) + handle->totalByteCount += dataReceived; +*/ + if (handle->remainingSendByteCount > 0) { if (handle->txData) |