tilt4
2.1.0.0
|
API for configuring and manipulating Tilt 4 Click driver. More...
Modules | |
Tilt 4 MikroBUS Map | |
MikroBUS pin mapping of Tilt 4 Click driver. | |
Tilt4_set | |
Functions | |
void | tilt4_cfg_setup (tilt4_cfg_t *cfg) |
Tilt 4 configuration object setup function. More... | |
err_t | tilt4_init (tilt4_t *ctx, tilt4_cfg_t *cfg) |
Tilt 4 initialization function. More... | |
uint8_t | tilt4_read_int_state (tilt4_t *ctx) |
Tilt 4 Interrupt pin reading function. More... | |
void | tilt4_set_led_state (tilt4_t *ctx, uint8_t pin_state) |
Tilt 4 LED pin setting function. More... | |
API for configuring and manipulating Tilt 4 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void tilt4_cfg_setup | ( | tilt4_cfg_t * | cfg | ) |
Tilt 4 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See tilt4_cfg_t object definition for detailed explanation. |
err_t tilt4_init | ( | tilt4_t * | ctx, |
tilt4_cfg_t * | cfg | ||
) |
Tilt 4 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See tilt4_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See tilt4_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t tilt4_read_int_state | ( | tilt4_t * | ctx | ) |
Tilt 4 Interrupt pin reading function.
This function reads the state of the interrupt pin of Tilt 4 click board.
[in] | ctx | : Click context object. See tilt4_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. void tilt4_set_led_state | ( | tilt4_t * | ctx, |
uint8_t | pin_state | ||
) |
Tilt 4 LED pin setting function.
This function sets the LED pin on the selected level level of Tilt 4 click board.
[in] | ctx | : Click context object. See tilt4_t object definition for detailed explanation. |
[in] | pin_state | : State of the LED pin. |