targets/TARGET_Cypress/TARGET_PSOC6/i2c_api.c
static void i2c_init_peripheral(i2c_obj_t *obj)
{
    cy_stc_scb_i2c_config_t i2c_config = default_i2c_config;
    I2cDividerInfo *p_div = &i2c_dividers[obj->divider];

    Cy_SCB_I2C_Init(obj->base, &i2c_config, &obj->context);
    Cy_SCB_I2C_SetDataRate(obj->base, obj->actual_speed, p_div->clk_frequency);
    Cy_SCB_I2C_Enable(obj->base);
}
/*
 * Initializes and enables I2C/SCB.
 */
Initializes and enables I2C/SCB.
Initializes and enables I2C / SCB .
static void i2c_init_peripheral(i2c_obj_t *obj)
{
    cy_stc_scb_i2c_config_t i2c_config = default_i2c_config;
    I2cDividerInfo *p_div = &i2c_dividers[obj->divider];
    Cy_SCB_I2C_Init(obj->base, &i2c_config, &obj->context);
    Cy_SCB_I2C_SetDataRate(obj->base, obj->actual_speed, p_div->clk_frequency);
    Cy_SCB_I2C_Enable(obj->base);
}
static void i2c_init_peripheral ( i2c_obj_t * obj ) { cy_stc_scb_i2c_config_t i2c_config = default_i2c_config ; I2cDividerInfo * p_div = & i2c_dividers [ obj -> divider ] ; Cy_SCB_I2C_Init ( obj -> base , & i2c_config , & obj -> context ) ; Cy_SCB_I2C_SetDataRate ( obj -> base , obj -> actual_speed , p_div -> clk_frequency ) ; Cy_SCB_I2C_Enable ( obj -> base ) ; }
Initializes and enables I2C/SCB.
Initializes and enables I2C / SCB .