/* SPI parity check error self diagnosis function enable or disable.  */
void SPI_ParityCheckCmd(CM_SPI_TypeDef *SPIx, en_functional_state_t enNewState)
/* SPI parity check error self diagnosis function enable or disable.  */
void SPI_ParityCheckCmd(CM_SPI_TypeDef *SPIx, en_functional_state_t enNewState)
{
    DDL_ASSERT(IS_VALID_SPI_UNIT(SPIx));
    DDL_ASSERT(IS_FUNCTIONAL_STATE(enNewState));
    if (ENABLE == enNewState) {
        SET_REG32_BIT(SPIx->CR1, SPI_CR1_PATE);
    } else {
        CLR_REG32_BIT(SPIx->CR1, SPI_CR1_PATE);
    }
}