/* This function sets the control bit of the USCI_I2C module.  */
void UI2C_Trigger(UI2C_T *ui2c, uint8_t u8Start, uint8_t u8Stop, uint8_t u8Ptrg, uint8_t u8Ack)
/* This function sets the control bit of the USCI_I2C module.  */
void UI2C_Trigger(UI2C_T *ui2c, uint8_t u8Start, uint8_t u8Stop, uint8_t u8Ptrg, uint8_t u8Ack)
{
    uint32_t u32Reg = 0u;
    uint32_t u32Val = ui2c->PROTCTL & ~(UI2C_PROTCTL_STA_Msk | UI2C_PROTCTL_STO_Msk | UI2C_PROTCTL_AA_Msk);
    if(u8Start)
    {
        u32Reg |= UI2C_PROTCTL_STA_Msk;
    }
    if(u8Stop)
    {
        u32Reg |= UI2C_PROTCTL_STO_Msk;
    }
    if(u8Ptrg)
    {
        u32Reg |= UI2C_PROTCTL_PTRG_Msk;
    }
    if(u8Ack)
    {
        u32Reg |= UI2C_PROTCTL_AA_Msk;
    }
    ui2c->PROTCTL = u32Val | u32Reg;
}