/* retval kStatus_Success Reset successfully. retval kStatus_Fail Some other reset process is ongoing.  */
status_t SEMA4_ResetGateNotify(SEMA4_Type *base, uint8_t gateNum)
/* retval kStatus_Success Reset successfully. retval kStatus_Fail Some other reset process is ongoing.  */
status_t SEMA4_ResetGateNotify(SEMA4_Type *base, uint8_t gateNum)
{
    status_t status;
    assert(!((gateNum < (uint8_t)SEMA4_GATE_NUM_RESET_ALL) && (gateNum >= (uint8_t)FSL_FEATURE_SEMA4_GATE_COUNT)));
    if (0U != (base->RSTNTF & SEMA4_RSTNTF_RSTNSM_MASK))
    {
        status = kStatus_Fail;
    }
    else
    {
        base->RSTNTF = SEMA4_RSTNTF_RSTNSM_RSTNMS_RSTNDP(SEMA4_GATE_IRQ_RESET_PATTERN_1);
        base->RSTNTF = SEMA4_RSTNTF_RSTNSM_RSTNMS_RSTNDP(SEMA4_GATE_IRQ_RESET_PATTERN_2) | SEMA4_RSTNTF_RSTNTN(gateNum);
        status = kStatus_Success;
    }
    return status;
}