/* initialize the parameters of SPI struct with the default values  */
void spi_struct_para_init(spi_parameter_struct *spi_struct)
/* initialize the parameters of SPI struct with the default values  */
void spi_struct_para_init(spi_parameter_struct *spi_struct)
{
    spi_struct->device_mode = SPI_SLAVE;
    spi_struct->trans_mode = SPI_TRANSMODE_FULLDUPLEX;
    spi_struct->frame_size = SPI_FRAMESIZE_8BIT;
    spi_struct->nss = SPI_NSS_HARD;
    spi_struct->clock_polarity_phase = SPI_CK_PL_LOW_PH_1EDGE;
    spi_struct->prescale = SPI_PSC_2;
}