Merge pull request #2400 from NXPmicro/Fix_Duplicate_Define_KL27Z

KL27Z: Fix duplicate define error
pull/2401/head
Martin Kojtal 2016-08-12 09:06:17 +02:00 committed by GitHub
commit 0b74dc1fc4
4 changed files with 8 additions and 6 deletions

View File

@ -77,7 +77,7 @@ static void FLEXIO_SPI_DMAConfig(FLEXIO_SPI_Type *base,
******************************************************************************/
/* Dummy data used to send */
const uint16_t s_dummyData = FLEXIO_SPI_DUMMYDATA;
static const uint16_t s_dummyData = FLEXIO_SPI_DUMMYDATA;
/*< @brief user configurable flexio spi handle count. */
#define FLEXIO_SPI_HANDLE_COUNT 2

View File

@ -38,7 +38,6 @@
* @{
*/
/*! @file */
/*******************************************************************************
* Definitions

View File

@ -80,7 +80,7 @@ static void SPI_RxDMACallback(dma_handle_t *handle, void *userData);
******************************************************************************/
/* Dummy data used to send */
const uint8_t s_dummyData = SPI_DUMMYDATA;
static const uint8_t s_dummyData = SPI_DUMMYDATA;
/*******************************************************************************
* Code
@ -168,7 +168,7 @@ void SPI_MasterTransferCreateHandleDMA(SPI_Type *base,
handle->bytesPerFrame = 1U;
#endif /* FSL_FEATURE_SPI_16BIT_TRANSFERS */
#if defined(FSL_FEATURE_SPI_FIFO_SIZE) && (FSL_FEATURE_SPI_FIFO_SIZE > 1)
#if defined(FSL_FEATURE_SPI_HAS_FIFO) && (FSL_FEATURE_SPI_HAS_FIFO)
/* If using DMA, disable FIFO, as the FIFO may cause data loss if the data size is not integer
times of 2bytes. As SPI cannot set watermark to 0, only can set to 1/2 FIFO size or 3/4 FIFO
size. */
@ -177,7 +177,7 @@ void SPI_MasterTransferCreateHandleDMA(SPI_Type *base,
base->C3 &= ~SPI_C3_FIFOMODE_MASK;
}
#endif /* FSL_FEATURE_SPI_FIFO_SIZE */
#endif /* FSL_FEATURE_SPI_HAS_FIFO */
/* Set the non-change attribute for Tx DMA transfer, to improve efficiency */
config.destAddr = SPI_GetDataRegisterAddress(base);
@ -226,6 +226,10 @@ status_t SPI_MasterTransferDMA(SPI_Type *base, spi_dma_handle_t *handle, spi_tra
return kStatus_InvalidArgument;
}
/* Disable SPI and then enable it, this is used to clear S register*/
SPI_Enable(base, false);
SPI_Enable(base, true);
/* Configure tx transfer DMA */
config.destAddr = SPI_GetDataRegisterAddress(base);
config.enableDestIncrement = false;

View File

@ -38,7 +38,6 @@
* @{
*/
/*! @file */
/*******************************************************************************
* Definitions