/* Changes baud rate based on predetermined register settings. */
static void r_sci_uart_baud_set(R_SCI0_Type *p_sci_reg, baud_setting_t const *const p_baud_setting)
/* Changes baud rate based on predetermined register settings. */
static void r_sci_uart_baud_set(R_SCI0_Type *p_sci_reg, baud_setting_t const *const p_baud_setting)
{
    p_sci_reg->BRR = p_baud_setting->brr;
    p_sci_reg->SMR_b.CKS = (uint8_t) (SCI_SMR_CKS_VALUE_MASK & p_baud_setting->cks);
    p_sci_reg->MDDR = p_baud_setting->mddr;
    p_sci_reg->SEMR = (uint8_t) ((p_sci_reg->SEMR & ~(SCI_UART_SEMR_BAUD_SETTING_MASK)) |
                                 (p_baud_setting->semr_baudrate_bits & SCI_UART_SEMR_BAUD_SETTING_MASK));
}