42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
54#include "drv_analog_in.h"
67#define ANALOGKEY_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.an_pin = MIKROBUS( mikrobus, MIKROBUS_AN )
uint16_t analogkey_generic_read(analogkey_t *ctx)
Generic read function.
void analogkey_cfg_setup(analogkey_cfg_t *cfg)
Config Object Initialization function.
float analogkey_read_voltage(analogkey_t *ctx)
Generic read function.
analogkey_key_id_t analogkey_get_key(analogkey_t *ctx, float an_value)
Detects which button is pressed.
err_t analogkey_init(analogkey_t *ctx, analogkey_cfg_t *cfg)
Initialization function.
analogkey_key_id_t
Click touch key definition.
Definition analogkey.h:82
@ ANALOGKEY_TOUCH_KEY_2
Definition analogkey.h:85
@ ANALOGKEY_TOUCH_KEY_4
Definition analogkey.h:87
@ ANALOGKEY_TOUCH_KEY_NONE
Definition analogkey.h:83
@ ANALOGKEY_TOUCH_KEY_5
Definition analogkey.h:88
@ ANALOGKEY_TOUCH_KEY_3
Definition analogkey.h:86
@ ANALOGKEY_TOUCH_KEY_1
Definition analogkey.h:84
@ ANALOGKEY_TOUCH_KEY_6
Definition analogkey.h:89
Click configuration structure definition.
Definition analogkey.h:108
analog_in_resolution_t resolution
Definition analogkey.h:115
float vref
Definition analogkey.h:116
pin_name_t an_pin
Definition analogkey.h:111
float vsel
Definition analogkey.h:117
Click ctx object definition.
Definition analogkey.h:97
float vdiv
Definition analogkey.h:100
float vref
Definition analogkey.h:99
analog_in_t adc
Definition analogkey.h:98