Base I2C component.
More...
#include "WDG_ex.h"
#include "I2C_component.h"
Base I2C component.
- Author
- SMFSW
- Copyright
- MIT (c) 2017-2026, SMFSW
- Warning
- Components with a xxx_proc file can access I2C_slave_t instance through CPNT->cfg.slave_inst. Please keep in mind some components are somewhat custom and needs to be accesses through CPNT->cfg.slave_inst_xxx instead if needed.
◆ I2C_set_slave_address()
| void I2C_set_slave_address |
( |
I2C_slave_t *const | slave, |
|
|
const uint16_t | devAddress ) |
I2C Slave device address change.
- Parameters
-
| [in,out] | slave | - pointer to I2C slave instance |
| [in] | devAddress | - Device Address |
◆ I2C_set_slave_instance()
| void I2C_set_slave_instance |
( |
I2C_slave_t *const | slave, |
|
|
I2C_HandleTypeDef *const | hi2c ) |
I2C Slave device HAL instance change.
- Parameters
-
| [in,out] | slave | - pointer to I2C slave instance |
| [in] | hi2c | - pointer to HAL I2C instance |
◆ I2C_slave_init()
| void I2C_slave_init |
( |
I2C_slave_t *const | slave, |
|
|
I2C_HandleTypeDef *const | hi2c, |
|
|
const uint16_t | devAddress, |
|
|
const uint32_t | timeout ) |
I2C Slave device initialization.
- Parameters
-
| [in,out] | slave | - pointer to I2C slave instance to initialize |
| [in] | hi2c | - pointer to HAL I2C instance |
| [in] | devAddress | - Device Address |
| [in] | timeout | - Transaction timeout |
◆ I2C_Watchdog_Refresh()
| void I2C_Watchdog_Refresh |
( |
void | | ) |
|
I2C Watchdog refresh callback.
- Weak Functions
- Function declared as weak, can be customly implemented in user code is specific actions needs to be taken (IWDG refreshed by default)