/* Configure the smart card mode according to the specified parameters in the uart_scard_config_t.  */
void ald_uart_scard_config(ald_uart_handle_t *hperh, ald_uart_scard_config_t *config)
/* Configure the smart card mode according to the specified parameters in the uart_scard_config_t.  */
void ald_uart_scard_config(ald_uart_handle_t *hperh, ald_uart_scard_config_t *config)
{
    assert_param(IS_UART_ENHANCE(hperh->perh));
    assert_param(IS_UART_SCARD_CLK(config->clk_div));
    MODIFY_REG(hperh->perh->SCARD, UART_SCARD_BLEN_MSK, config->block_len << UART_SCARD_BLEN_POSS);
    MODIFY_REG(hperh->perh->SCARD, UART_SCARD_GT_MSK, config->pt << UART_SCARD_GT_POSS);
    MODIFY_REG(hperh->perh->SCARD, UART_SCARD_SCCNT_MSK, config->retry << UART_SCARD_SCCNT_POSS);
    MODIFY_REG(hperh->perh->SCARD, UART_SCARD_PSC_MSK, config->clk_div << UART_SCARD_PSC_POSS);
    MODIFY_REG(hperh->perh->SCARD, UART_SCARD_SCLKEN_MSK, config->clk_out << UART_SCARD_SCLKEN_POS);
    return;
}