22#ifndef _mcci_bootloader_device_i2c_bus_stm32l0_h_
23#define _mcci_bootloader_device_i2c_bus_stm32l0_h_
27#ifndef _mcci_bootloader_device_i2c_bus_stm32l0_types_h_
31#ifndef _mcci_bootloader_device_i2c_device_stm32l0_types_h_
35#ifndef _mcci_bootloader_device_i2c_bus_h_
36# include "mcci_bootloader_device_i2c_bus.h"
64 const McciBootloaderDeviceI2cBusStm32l0_Config_t *
pConfig;
65 uint32_t
timingr[McciBootloaderDeviceI2cSpeed__MAX];
71 McciBootloaderDeviceI2cBusStm32l0_Contents_t
Stm32l0;
95McciBootloaderDeviceI2cBus_t *
99 const McciBootloaderDeviceI2cBusStm32l0_Config_t *pConfig,
100 uint32_t timingr100k,
101 uint32_t timingr400k,
106#define MCCI_BOOTLOADER_STM32L0_I2C_TIMINGR_NOT_SUPPORTED UINT32_C(0xFFFFFFFF)
124#define MCCI_BOOTLOADER_STM32L0_I2C_TIMINGR_100K UINT32_C(0x30922727)
142#define MCCI_BOOTLOADER_STM32L0_I2C_TIMINGR_400K UINT32_C(0x10640e14)
160#define MCCI_BOOTLOADER_STM32L0_I2C_TIMINGR_1M UINT32_C(0x0050090F)
176McciBootloaderDeviceI2cBusStm32l0_t *
178 McciBootloaderDevice_t *pDevice
181 return (McciBootloaderDeviceI2cBusStm32l0_t *)pDevice;
194McciBootloaderDeviceI2cBusStm32l0_t *
196 McciBootloaderDeviceI2cBus_t *pDevice
199 return (McciBootloaderDeviceI2cBusStm32l0_t *)pDevice;
const McciBootloaderDeviceI2cBusStm32l0_Config_t gk_McciBootloaderDeviceI2cBusStm32l0_Config_I2c2
global config for I2C2. Linker discards this if not used.
const McciBootloaderDeviceI2cBusStm32l0_Config_t gk_McciBootloaderDeviceI2cBusStm32l0_Config_I2c3
global config for I2C3. Linker discards this if not used.
static McciBootloaderDeviceI2cBusStm32l0_t * McciBootloaderDeviceI2cBus_getI2cBusStm32l0(McciBootloaderDeviceI2cBus_t *pDevice)
upcast from i2c controller device to enclosing McciBootloaderDeviceI2cBusStm32l0_t
static McciBootloaderDeviceI2cBusStm32l0_t * McciBootloaderDevice_getI2cBusStm32l0(McciBootloaderDevice_t *pDevice)
upcast from device to enclosing McciBootloaderDeviceI2cBusStm32l0_t
McciBootloaderDeviceI2cBus_t * McciBootloader_Stm32L0Interface_initI2cBus(void *pRamForBus, size_t sizeForBus, const McciBootloaderDeviceI2cBusStm32l0_Config_t *pConfig, uint32_t timingr100k, uint32_t timingr400k, uint32_t timingr1M)
Initialize an I2C bus controller driver on an STM32L0.
const McciBootloaderDeviceI2cBusStm32l0_Config_t gk_McciBootloaderDeviceI2cBusStm32l0_Config_I2c1
global config for I2C1. Linker discards this if not used.
McciBootloaderDeviceI2cBus_CONTENTS
const McciBootloaderDeviceI2cBusStm32l0_Config_t * pConfig
pointer to I2C channel-specific bit masks
uint32_t timingr[McciBootloaderDeviceI2cSpeed__MAX]
timing register value to use for each speed
struct McciBootloaderDeviceI2cBusStm32l0_Masks_s::@0 CCIPR_select
values for RCC_CCIPR control for this I2C block
uint32_t value
value to write to RCC_CCIPR in masked field.
uint32_t mask
mask of affected bits. zero means "not applicable for this block".
uint32_t APB1RSTR_mask
bit mask of block-related bit in register MCCI_STM32L0_REG_RCC_APB1RSTR
uint32_t baseAddress
base address of this channel.
uint32_t APB1ENR_mask
bit mask of block-related bit in register MCCI_STM32L0_REG_RCC_APB1ENR
McciBootloaderDeviceI2cBus_UNION
McciBootloaderDeviceI2cBusStm32l0_Contents_t Stm32l0