/* Configures the data size for the selected SPI.  */
bool SPI_DataSizeConfig(SPI_TypeDef *spi, u8 data_size)
/* Configures the data size for the selected SPI.  */
bool SPI_DataSizeConfig(SPI_TypeDef *spi, u8 data_size)
{
    if (data_size > 32)
        return false;
    data_size &= 0x1F;
    WRITE_REG(spi->ECR, data_size);
    return true;
}