mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-08-06 15:15:15 +08:00
Merge branch 'bugfix/spi_SPIIntClear' into 'release/v2.x.x'
fix(spi): Fix spi_interface SPIIntClear error. See merge request sdk/ESP8266_RTOS_SDK!263
This commit is contained in:
@ -481,7 +481,7 @@ void ICACHE_FLASH_ATTR SPICsPinSelect(SpiNum spiNum, SpiPinCS pinCs)
|
||||
* @brief Enable SPI interrupt source.
|
||||
*
|
||||
*/
|
||||
void ICACHE_FLASH_ATTR SPIIntEnable(SpiNum spiNum, SpiIntSrc intSrc)
|
||||
void ICACHE_FLASH_ATTR SPIIntEnable(SpiNum spiNum, SpiIntSrc_DoneEn intSrc)
|
||||
{
|
||||
if (spiNum > SpiNum_HSPI) {
|
||||
return;
|
||||
@ -493,7 +493,7 @@ void ICACHE_FLASH_ATTR SPIIntEnable(SpiNum spiNum, SpiIntSrc intSrc)
|
||||
* @brief Disable SPI interrupt source.
|
||||
*
|
||||
*/
|
||||
void ICACHE_FLASH_ATTR SPIIntDisable(SpiNum spiNum, SpiIntSrc intSrc)
|
||||
void ICACHE_FLASH_ATTR SPIIntDisable(SpiNum spiNum, SpiIntSrc_DoneEn intSrc)
|
||||
{
|
||||
if (spiNum > SpiNum_HSPI) {
|
||||
return;
|
||||
@ -510,11 +510,11 @@ void ICACHE_FLASH_ATTR SPIIntClear(SpiNum spiNum)
|
||||
if (spiNum > SpiNum_HSPI) {
|
||||
return;
|
||||
}
|
||||
CLEAR_PERI_REG_MASK(SPI_SLAVE(spiNum), SpiIntSrc_TransDoneEn
|
||||
| SpiIntSrc_WrStaDoneEn
|
||||
| SpiIntSrc_RdStaDoneEn
|
||||
| SpiIntSrc_WrBufDoneEn
|
||||
| SpiIntSrc_RdBufDoneEn);
|
||||
CLEAR_PERI_REG_MASK(SPI_SLAVE(spiNum), SpiIntSrc_TransDone
|
||||
| SpiIntSrc_WrStaDone
|
||||
| SpiIntSrc_RdStaDone
|
||||
| SpiIntSrc_WrBufDone
|
||||
| SpiIntSrc_RdBufDone);
|
||||
}
|
||||
|
||||
|
||||
|
@ -108,15 +108,24 @@ typedef enum
|
||||
SpiBitOrder_LSBFirst = 1,
|
||||
} SpiBitOrder;
|
||||
|
||||
// @brief SPI interrupt soource defined.
|
||||
// @brief SPI interrupt source done defined.
|
||||
typedef enum
|
||||
{
|
||||
SpiIntSrc_TransDone = SPI_TRANS_DONE,
|
||||
SpiIntSrc_WrStaDone = SPI_SLV_WR_STA_DONE,
|
||||
SpiIntSrc_RdStaDone = SPI_SLV_RD_STA_DONE,
|
||||
SpiIntSrc_WrBufDone = SPI_SLV_WR_BUF_DONE,
|
||||
SpiIntSrc_RdBufDone = SPI_SLV_RD_BUF_DONE,
|
||||
} SpiIntSrc_Done;
|
||||
|
||||
// @brief SPI interrupt source done enable defined.
|
||||
typedef enum {
|
||||
SpiIntSrc_TransDoneEn = SPI_TRANS_DONE_EN,
|
||||
SpiIntSrc_WrStaDoneEn = SPI_SLV_WR_STA_DONE_EN,
|
||||
SpiIntSrc_RdStaDoneEn = SPI_SLV_RD_STA_DONE_EN,
|
||||
SpiIntSrc_WrBufDoneEn = SPI_SLV_WR_BUF_DONE_EN,
|
||||
SpiIntSrc_RdBufDoneEn = SPI_SLV_RD_BUF_DONE_EN,
|
||||
} SpiIntSrc;
|
||||
} SpiIntSrc_DoneEn;
|
||||
|
||||
// @brief SPI CS pin.
|
||||
typedef enum
|
||||
@ -297,7 +306,7 @@ void SPICsPinSelect(SpiNum spiNum, SpiPinCS pinCs);
|
||||
*
|
||||
* @return void.
|
||||
*/
|
||||
void SPIIntEnable(SpiNum spiNum, SpiIntSrc intSrc);
|
||||
void SPIIntEnable(SpiNum spiNum, SpiIntSrc_DoneEn intSrc);
|
||||
|
||||
/**
|
||||
* @brief Disable SPI module interrupt source.
|
||||
@ -309,7 +318,7 @@ void SPIIntEnable(SpiNum spiNum, SpiIntSrc intSrc);
|
||||
*
|
||||
* @return void.
|
||||
*/
|
||||
void SPIIntDisable(SpiNum spiNum, SpiIntSrc intSrc);
|
||||
void SPIIntDisable(SpiNum spiNum, SpiIntSrc_DoneEn intSrc);
|
||||
|
||||
/**
|
||||
* @brief Clear all of spi interrupt.
|
||||
|
Reference in New Issue
Block a user