GPS Device
Loading...
Searching...
No Matches
I2C Internal Helpers

Functions

static void i2c_set_pclk (I2C_REGDEF_ts const *i2c_instance, EN_STATUS_te en_status)
 Enables or disables the peripheral clock for an I2C instance.

Detailed Description

Function Documentation

◆ i2c_set_pclk()

void i2c_set_pclk ( I2C_REGDEF_ts const * i2c_instance,
EN_STATUS_te en_status )
static

Enables or disables the peripheral clock for an I2C instance.

Routes to the appropriate RCC APB1 clock enable/disable call based on the instance pointer. Called by i2c_init and i2c_deinit.

Parameters
[in]i2c_instancePointer to the I2C peripheral instance.
[in]en_statusENABLE to enable the clock, DISABLE to disable it.

Definition at line 250 of file stm32f401re_i2c.c.

250 {
251 if(i2c_instance == I2C1) {
253 }
254 else if(i2c_instance == I2C2) {
256 }
257 else if(i2c_instance == I2C3) {
259 }
260}
void rcc_set_pclk_apb1(RCC_APB1ENR_te periph_position, EN_STATUS_te en_status)
Enables or disables the peripheral clock for an APB1 peripheral.
#define I2C3
#define I2C1
#define I2C2
@ RCC_APB1ENR_I2C3EN
@ RCC_APB1ENR_I2C1EN
@ RCC_APB1ENR_I2C2EN
Here is the call graph for this function:
Here is the caller graph for this function: