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 STRETCH_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.an_pin = MIKROBUS( mikrobus, MIKROBUS_AN ); \
69 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM )
76#define STRETCH_RETVAL uint8_t
78#define STRETCH_OK 0x00
79#define STRETCH_INIT_ERROR 0xFF
#define STRETCH_RETVAL
Definition stretch.h:76
STRETCH_RETVAL stretch_init(stretch_t *ctx, stretch_cfg_t *cfg)
Initialization function.
void stretch_cfg_setup(stretch_cfg_t *cfg)
Config Object Initialization function.
void stretch_turn_on_led(stretch_t *ctx)
Turn on the LED function.
stretch_data_t stretch_generic_read(stretch_t *ctx)
Generic read function.
void stretch_turn_off_led(stretch_t *ctx)
Turn off the LED function.
void stretch_default_cfg(stretch_t *ctx)
Click Default Configuration function.
uint16_t stretch_data_t
Analog data type.
Definition stretch.h:92
Click configuration structure definition.
Definition stretch.h:113
analog_in_resolution_t resolution
Definition stretch.h:125
float vref
Definition stretch.h:126
pin_name_t an_pin
Definition stretch.h:116
pin_name_t pwm
Definition stretch.h:120
Click ctx object definition.
Definition stretch.h:98
digital_out_t pwm
Definition stretch.h:101
analog_in_t adc
Definition stretch.h:105