void TwoWire::end() { NVIC_DisableIRQ(irqNumber); I2C_HAL_Disable(instance); I2C_HAL_SetAddress7bit(instance, 0); SIM_HAL_DisableClock(SIM, gate_name); }
void Uart::end() { UART_HAL_Init(instance); NVIC_DisableIRQ(irqNumber); SIM_HAL_DisableClock(SIM, gate_name); rxBuffer.clear(); }
/*FUNCTION********************************************************************** * * Function Name : CLOCK_SYS_DisableUartClock * Description : Disable the clock for UART module * This function enables the clock for UART module * *END**************************************************************************/ void CLOCK_SYS_DisableUartClock(uint32_t instance) { assert(instance < sizeof(uartGateTable)/sizeof(uartGateTable[0])); SIM_HAL_DisableClock(SIM, uartGateTable[instance]); }
/*FUNCTION********************************************************************** * * Function Name : CLOCK_SYS_DisableI2cClock * Description : Disable the clock for I2C module * This function disables the clock for I2C module * *END**************************************************************************/ void CLOCK_SYS_DisableI2cClock(uint32_t instance) { assert(instance < sizeof(i2cGateTable)/sizeof(i2cGateTable[0])); SIM_HAL_DisableClock(SIM, i2cGateTable[instance]); }
/*FUNCTION********************************************************************** * * Function Name : CLOCK_SYS_DisableSpiClock * Description : Disable the clock for SPI module * This function disables the clock for SPI module * *END**************************************************************************/ void CLOCK_SYS_DisableSpiClock(uint32_t instance) { assert(instance < sizeof(spiGateTable)/sizeof(spiGateTable[0])); SIM_HAL_DisableClock(SIM, spiGateTable[instance]); }
/*FUNCTION********************************************************************** * * Function Name : CLOCK_SYS_DisableFtmClock * Description : Disable the clock for FTM module * This function disables the clock for FTM module * *END**************************************************************************/ void CLOCK_SYS_DisableFtmClock(uint32_t instance) { assert(instance < sizeof(ftmGateTable)/sizeof(ftmGateTable[0])); SIM_HAL_DisableClock(SIM, ftmGateTable[instance]); }
/*FUNCTION********************************************************************** * * Function Name : CLOCK_SYS_DisablePdbClock * Description : Disable the clock for PDB module * This function disables the clock for PDB module * *END**************************************************************************/ void CLOCK_SYS_DisablePdbClock(uint32_t instance) { assert(instance < sizeof(pdbGateTable)/sizeof(pdbGateTable[0])); SIM_HAL_DisableClock(SIM, pdbGateTable[instance]); }