knob 2.0.0.0
|
Functions | |
void | knob_cfg_setup (knob_cfg_t *cfg) |
Config Object Initialization function. | |
KNOB_RETVAL | knob_init (knob_t *ctx, knob_cfg_t *cfg) |
Initialization function. | |
void | knob_default_cfg (knob_t *ctx) |
Click Default Configuration function. | |
void | knob_generic_write (knob_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | knob_generic_read (knob_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | knob_reset (knob_t *ctx) |
Functions for reset device. | |
void | knob_led_output_enable (knob_t *ctx, uint8_t state) |
Functions for enable Led Output. | |
uint8_t | knob_get_ena_state (knob_t *ctx) |
Functions for get ENA pin state. | |
uint8_t | knob_get_enb_state (knob_t *ctx) |
Functions for get ENB pin state. | |
uint8_t | knob_get_sw_button_state (knob_t *ctx) |
Functions for get SW pin(switch button) state. | |
void | knob_set_encoder_start_position (knob_t *ctx, int32_t position) |
Functions for set new start encoder position. | |
void | knob_set_led_state (knob_t *ctx, uint8_t led, uint8_t state) |
Functions for set led state(PWM on the LED) | |
void | knob_set_brightness (knob_t *ctx, uint8_t led, uint8_t value) |
Functions for set Brightness. | |
void | knob_set_output_gain (knob_t *ctx, uint8_t led, uint8_t value) |
Functions for set output GAIN. | |
void | knob_get_encoder_position (knob_t *ctx, int32_t *position, uint8_t *dir) |
Functions for get Encoder position. | |
void knob_cfg_setup | ( | knob_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void knob_default_cfg | ( | knob_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Knob click.
- Led output enable ** KNOB_ENABLE_LED_OUTPUTS - Output gain ** KNOB_OUTPUT_GAIN_ALL_LED ** KNOB_FULL_OUTPUT_CURRENT_GAIN - Encoder start position ** Sets on the 1 *
void knob_generic_read | ( | knob_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void knob_generic_write | ( | knob_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
uint8_t knob_get_ena_state | ( | knob_t * | ctx | ) |
Functions for get ENA pin state.
ctx | Click object. |
uint8_t knob_get_enb_state | ( | knob_t * | ctx | ) |
Functions for get ENB pin state.
ctx | Click object. |
void knob_get_encoder_position | ( | knob_t * | ctx, |
int32_t * | position, | ||
uint8_t * | dir ) |
Functions for get Encoder position.
ctx | Click object. |
position | Encoder position (counter) |
dir | Encoder direction |
uint8_t knob_get_sw_button_state | ( | knob_t * | ctx | ) |
Functions for get SW pin(switch button) state.
ctx | Click object. |
KNOB_RETVAL knob_init | ( | knob_t * | ctx, |
knob_cfg_t * | cfg ) |
Initialization function.
knob | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void knob_led_output_enable | ( | knob_t * | ctx, |
uint8_t | state ) |
Functions for enable Led Output.
ctx | Click object. |
state | Enable or disable leds |
void knob_reset | ( | knob_t * | ctx | ) |
Functions for reset device.
ctx | Click object. |
void knob_set_brightness | ( | knob_t * | ctx, |
uint8_t | led, | ||
uint8_t | value ) |
Functions for set Brightness.
ctx | Click object. |
led | LEDs |
value | PWM(state) |
void knob_set_encoder_start_position | ( | knob_t * | ctx, |
int32_t | position ) |
Functions for set new start encoder position.
ctx | Click object. |
position | Start encoder position |
void knob_set_led_state | ( | knob_t * | ctx, |
uint8_t | led, | ||
uint8_t | state ) |
Functions for set led state(PWM on the LED)
ctx | Click object. |
led | LEDs |
value | PWM (state) |
void knob_set_output_gain | ( | knob_t * | ctx, |
uint8_t | led, | ||
uint8_t | value ) |
Functions for set output GAIN.
ctx | Click object. |
led | LEDs |
value | PWM(state) |