/* get SPI CRC send value or receive value  */
uint16_t spi_crc_get(uint32_t spi_periph, uint8_t spi_crc)
/* get SPI CRC send value or receive value  */
uint16_t spi_crc_get(uint32_t spi_periph, uint8_t spi_crc)
{
    if(SPI_CRC_TX == spi_crc) {
        return ((uint16_t)(SPI_TCRC(spi_periph)));
    } else {
        return ((uint16_t)(SPI_RCRC(spi_periph)));
    }
}