optoencoder3 2.0.0.0
|
Functions | |
void | optoencoder3_cfg_setup (optoencoder3_cfg_t *cfg) |
Config Object Initialization function. | |
OPTOENCODER3_RETVAL | optoencoder3_init (optoencoder3_t *ctx, optoencoder3_cfg_t *cfg) |
Initialization function. | |
void | optoencoder3_enable (optoencoder3_t *ctx, uint8_t active) |
Sets state of click. | |
uint8_t | optoencoder3_read_pin_o1 (optoencoder3_t *ctx) |
Functions for reading state of pin o1. | |
uint8_t | optoencoder3_read_pin_o2 (optoencoder3_t *ctx) |
Functions for reading state of pin o2. | |
uint8_t | optoencoder3_read_pin_o3 (optoencoder3_t *ctx) |
Functions for reading state of pin o3. | |
uint8_t | optoencoder3_read_pin_o4 (optoencoder3_t *ctx) |
Functions for reading state of pin o4. | |
uint8_t | optoencoder3_cnt (optoencoder3_t *ctx) |
Functions for reading number of swipes. | |
int8_t | optoencoder3_dir_cnt (optoencoder3_t *ctx) |
Functions for reading number of swipe directions. | |
void | optoencoder3_reset_counters (optoencoder3_t *ctx) |
Functions for reseting counters. | |
void | optoencoder3_read_all_pins (optoencoder3_t *ctx, optoencoder3_pins_t *pins) |
Sets state of all pins. | |
void optoencoder3_cfg_setup | ( | optoencoder3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t optoencoder3_cnt | ( | optoencoder3_t * | ctx | ) |
Functions for reading number of swipes.
ctx | Click object. |
int8_t optoencoder3_dir_cnt | ( | optoencoder3_t * | ctx | ) |
Functions for reading number of swipe directions.
ctx | Click object. |
This function adds 1 to counter if it detects swipe from one direction or deducts 1 if it detects swipe from other direction
void optoencoder3_enable | ( | optoencoder3_t * | ctx, |
uint8_t | active ) |
Sets state of click.
ctx | Click object. |
active | State to be set |
OPTOENCODER3_RETVAL optoencoder3_init | ( | optoencoder3_t * | ctx, |
optoencoder3_cfg_t * | cfg ) |
Initialization function.
optoencoder3 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void optoencoder3_read_all_pins | ( | optoencoder3_t * | ctx, |
optoencoder3_pins_t * | pins ) |
Sets state of all pins.
ctx | Click object. |
*pins | Pointer on struct of all pins that is being set |
uint8_t optoencoder3_read_pin_o1 | ( | optoencoder3_t * | ctx | ) |
Functions for reading state of pin o1.
ctx | Click object. |
uint8_t optoencoder3_read_pin_o2 | ( | optoencoder3_t * | ctx | ) |
Functions for reading state of pin o2.
ctx | Click object. |
uint8_t optoencoder3_read_pin_o3 | ( | optoencoder3_t * | ctx | ) |
Functions for reading state of pin o3.
ctx | Click object. |
uint8_t optoencoder3_read_pin_o4 | ( | optoencoder3_t * | ctx | ) |
Functions for reading state of pin o4.
ctx | Click object. |
void optoencoder3_reset_counters | ( | optoencoder3_t * | ctx | ) |
Functions for reseting counters.
ctx | Click object. |