void WDRV_SPI_In(uint8_t *const OutBuf, uint16_t OutSize, uint8_t *const InBuf, uint16_t InSize) { bool intEnabled = SYS_INT_SourceDisable(MRF_INT_SOURCE); Spi_Read(OutBuf, OutSize, InBuf, InSize); if(intEnabled) WDRV_INTR_SourceEnable(); }
void WDRV_SPI_Out(uint8_t *const bufOut, uint16_t OutSize) { bool intEnabled = SYS_INT_SourceDisable(MRF_INT_SOURCE); Spi_Write(bufOut, OutSize); if(intEnabled) WDRV_INTR_SourceEnable(); }
void WDRV_SPI_In(uint8_t * const OutBuf, uint16_t OutSize, uint8_t * const InBuf, uint16_t InSize) { bool intEnabled = SYS_INT_SourceDisable(MRF_INT_SOURCE); WDRV_DISABLE_INTR(); CS_Assert(); IspSpi_TxAndRx(OutBuf, OutSize, InBuf, InSize); CS_Deassert(); WDRV_ENABLE_INTR(); if(intEnabled) WDRV_INTR_SourceEnable(); }
void WDRV_SPI_Out(uint8_t * const bufOut, uint16_t OutSize) { uint8_t rxBuf[4]; bool intEnabled = SYS_INT_SourceDisable(MRF_INT_SOURCE); WDRV_DISABLE_INTR(); CS_Assert(); IspSpi_TxAndRx(bufOut, OutSize, rxBuf, 0); CS_Deassert(); WDRV_ENABLE_INTR(); if(intEnabled) WDRV_INTR_SourceEnable(); }