|
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
Functions | |
void | i2c_application_system_init (void) |
Init the system. More... | |
void | i2c_application_system_reset (void) |
Reset the system. More... | |
void | i2c_application_system_wait_for_interrupt (void) |
Wait for interrupt to occur. More... | |
bool | i2c_application_system_test_wakeup_pin (void) |
Check if wakeup pin is high. More... | |
void | i2c_application_system_set_ready_pin (bool enable) |
Set the ready pin state. More... | |
void | i2c_application_system_setup_generic_gpio_pin (bool enable) |
Setup the generic gpio pin. More... | |
void | i2c_application_system_set_generic_gpio_pin (bool enable) |
Set the generic gpio pin output state. More... | |
void | i2c_application_enter_low_power_state (void) |
Make the MCU enter its low power state. More... | |
void | i2c_application_set_periodic_wakeup (uint32_t period_ms) |
Set up a periodic timer used to wake up the system from sleep. More... | |
bool | i2c_application_is_periodic_wakeup (void) |
Test if a periodic wake up has occurred. More... | |
void i2c_application_enter_low_power_state | ( | void | ) |
Make the MCU enter its low power state.
This function is called by the i2c application when the MCU should power down.
Wait for the i2c interface to be idle, if not idle after retries, power down anyway!
Definition at line 192 of file i2c_application_system_stm32.c.
bool i2c_application_is_periodic_wakeup | ( | void | ) |
Test if a periodic wake up has occurred.
Definition at line 223 of file i2c_application_system_stm32.c.
void i2c_application_set_periodic_wakeup | ( | uint32_t | period_ms | ) |
Set up a periodic timer used to wake up the system from sleep.
If the time_msec is set to zero the periodic wakeup will be disabled.
period_ms | Period time in milliseconds |
Definition at line 216 of file i2c_application_system_stm32.c.
void i2c_application_system_init | ( | void | ) |
Init the system.
This function is called by the i2c application during initialization.
Calling this function with wrong parameters will return HAL_ERROR Calling this function when the i2c module is in the wrong state return HAL_BUSY
Definition at line 110 of file i2c_application_system_stm32.c.
void i2c_application_system_reset | ( | void | ) |
Reset the system.
This function is called by the i2c application when the system should be restarted.
Wait for the i2c interface to be idle, if not idle after retries, reset anyway!
Definition at line 129 of file i2c_application_system_stm32.c.
void i2c_application_system_set_generic_gpio_pin | ( | bool | enable | ) |
Set the generic gpio pin output state.
This function is used to set the output state of the generic gpio pin
[in] | enable | pin output is set to high level when enable is true |
Definition at line 184 of file i2c_application_system_stm32.c.
void i2c_application_system_set_ready_pin | ( | bool | enable | ) |
Set the ready pin state.
This function is used to set the state of the ready pin
[in] | enable | pin is set to high level when enable is true |
Definition at line 155 of file i2c_application_system_stm32.c.
void i2c_application_system_setup_generic_gpio_pin | ( | bool | enable | ) |
Setup the generic gpio pin.
This function is used to setup the generic gpio pin
[in] | enable | pin is set to output driver when enable is true |
Definition at line 163 of file i2c_application_system_stm32.c.
bool i2c_application_system_test_wakeup_pin | ( | void | ) |
Check if wakeup pin is high.
This function is used to test if the system should power down
Definition at line 147 of file i2c_application_system_stm32.c.
void i2c_application_system_wait_for_interrupt | ( | void | ) |
Wait for interrupt to occur.
Definition at line 141 of file i2c_application_system_stm32.c.