tilt3 2.0.0.0
|
API for configuring and manipulating Tilt 3 Click driver. More...
Topics | |
Tilt 3 Settings | |
Settings of Tilt 3 Click driver. | |
Tilt 3 MikroBUS Map | |
MikroBUS pin mapping of Tilt 3 Click driver. | |
Functions | |
void | tilt3_cfg_setup (tilt3_cfg_t *cfg) |
Tilt 3 configuration object setup function. | |
err_t | tilt3_init (tilt3_t *ctx, tilt3_cfg_t *cfg) |
Tilt 3 initialization function. | |
void | tilt3_enable_switch (tilt3_t *ctx) |
Tilt 3 enable switch function. | |
void | tilt3_disable_switch (tilt3_t *ctx) |
Tilt 3 disable switch function. | |
uint8_t | tilt3_get_switch_state (tilt3_t *ctx) |
Tilt 3 get switch state function. | |
API for configuring and manipulating Tilt 3 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void tilt3_cfg_setup | ( | tilt3_cfg_t * | cfg | ) |
Tilt 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See tilt3_cfg_t object definition for detailed explanation. |
void tilt3_disable_switch | ( | tilt3_t * | ctx | ) |
Tilt 3 disable switch function.
This function disables the tilt switch by setting the EN pin to the low logic state.
[in] | ctx | : Click context object. See tilt3_t object definition for detailed explanation. |
void tilt3_enable_switch | ( | tilt3_t * | ctx | ) |
Tilt 3 enable switch function.
This function enables the tilt switch by setting the EN pin to the high logic state.
[in] | ctx | : Click context object. See tilt3_t object definition for detailed explanation. |
uint8_t tilt3_get_switch_state | ( | tilt3_t * | ctx | ) |
Tilt 3 get switch state function.
This function returns the INT pin logic state which indicates the tilt switch state.
[in] | ctx | : Click context object. See tilt3_t object definition for detailed explanation. |
0
- Switch OFF, 1
- Switch ON. err_t tilt3_init | ( | tilt3_t * | ctx, |
tilt3_cfg_t * | cfg ) |
Tilt 3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See tilt3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See tilt3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.