EFM32 Jade Gecko 12 Software Documentation
efm32jg12-doc-5.1.2
|
Data Structures | |
struct | I2CSPM_Init_TypeDef |
Macros | |
#define | I2CSPM_INIT_DEFAULT |
Functions | |
void | I2CSPM_Init (I2CSPM_Init_TypeDef *init) |
Initalize I2C peripheral. More... | |
I2C_TransferReturn_TypeDef | I2CSPM_Transfer (I2C_TypeDef *i2c, I2C_TransferSeq_TypeDef *seq) |
Perform I2C transfer. More... | |
#define I2CSPM_INIT_DEFAULT |
Default config for I2C init structure. The default may be overridden by a i2cspmconfig.h file.
Definition at line 73 of file i2cspm.h.
Referenced by BOARD_init().
void I2CSPM_Init | ( | I2CSPM_Init_TypeDef * | init | ) |
Initalize I2C peripheral.
This driver supports master mode only, single bus-master. In addition to configuring the I2C peripheral module, it also configures DK/STK specific setup in order to use the I2C bus.
[in] | init | Pointer to I2C initialization structure |
Definition at line 39 of file i2cspm.c.
References _I2C_ROUTELOC0_SCLLOC_SHIFT, _I2C_ROUTELOC0_SDALOC_SHIFT, I2C_Init_TypeDef::clhr, CMU_ClockEnable(), cmuClock_HFPER, cmuClock_I2C0, cmuClock_I2C1, I2C_Init_TypeDef::enable, I2C_Init_TypeDef::freq, GPIO_PinModeSet(), GPIO_PinOutClear(), GPIO_PinOutSet(), gpioModeWiredAndPullUp, I2C0, I2C1, I2C_Init(), I2C_ROUTEPEN_SCLPEN, I2C_ROUTEPEN_SDAPEN, I2CSPM_Init_TypeDef::i2cClhr, I2CSPM_Init_TypeDef::i2cMaxFreq, I2CSPM_Init_TypeDef::i2cRefFreq, I2C_Init_TypeDef::master, I2CSPM_Init_TypeDef::port, I2CSPM_Init_TypeDef::portLocationScl, I2CSPM_Init_TypeDef::portLocationSda, I2C_Init_TypeDef::refFreq, I2C_TypeDef::ROUTELOC0, I2C_TypeDef::ROUTEPEN, I2CSPM_Init_TypeDef::sclPin, I2CSPM_Init_TypeDef::sclPort, I2CSPM_Init_TypeDef::sdaPin, and I2CSPM_Init_TypeDef::sdaPort.
Referenced by BOARD_init().
I2C_TransferReturn_TypeDef I2CSPM_Transfer | ( | I2C_TypeDef * | i2c, |
I2C_TransferSeq_TypeDef * | seq | ||
) |
Perform I2C transfer.
This driver only supports master mode, single bus-master. It does not return until the transfer is complete, polling for completion.
[in] | i2c | Pointer to the peripheral port |
[in] | seq | Pointer to sequence structure defining the I2C transfer to take place. The referenced structure must exist until the transfer has fully completed. |
Definition at line 124 of file i2cspm.c.
References I2C_Transfer(), I2C_TransferInit(), and i2cTransferInProgress.
Referenced by CCS811_getMeasurement(), CCS811_getRawData(), CCS811_readMailbox(), CCS811_setEnvData(), CCS811_setMeasureMode(), CCS811_softwareReset(), EEPROM_AckPoll(), EEPROM_Read(), EEPROM_Write(), SI1133_registerBlockRead(), SI1133_registerBlockWrite(), SI1133_registerRead(), SI1133_registerWrite(), Si1147_Read_Block_Register(), Si1147_Read_Register(), Si1147_Write_Block_Register(), Si1147_Write_Register(), Si7013_Detect(), Si7013_GetFirmwareRevision(), SI7021_cmdRead(), SI7021_cmdWrite(), SI7210_regRead(), SI7210_regWrite(), TEMPSENS_RegisterGet(), and TEMPSENS_RegisterSet().