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_i2c_master.h"
66#define UVC_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
68 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
69 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN )
76#define UVC_RETVAL uint8_t
79#define UVC_INIT_ERROR 0xFF
86#define UVC_DEVICE_SLAVE_ADDR 0x4D
#define UVC_RETVAL
Definition uvc.h:76
void uvc_generic_read(uvc_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic read function.
uint16_t uvc_read_raw_data(uvc_t *ctx)
Read 12bit raw data.
void uvc_cfg_setup(uvc_cfg_t *cfg)
Config Object Initialization function.
UVC_RETVAL uvc_init(uvc_t *ctx, uvc_cfg_t *cfg)
Initialization function.
float uvc_get_voltage(uvc_t *ctx)
Calculate voltage.
float uvc_calculate_power(float voltage)
Calculate power.
void uvc_generic_write(uvc_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic write function.
Click configuration structure definition.
Definition uvc.h:119
uint32_t i2c_speed
Definition uvc.h:131
pin_name_t scl
Definition uvc.h:122
pin_name_t sda
Definition uvc.h:123
pin_name_t an
Definition uvc.h:127
uint8_t i2c_address
Definition uvc.h:132
Click ctx object definition.
Definition uvc.h:100
i2c_master_t i2c
Definition uvc.h:107
uint8_t slave_address
Definition uvc.h:111
digital_out_t an
Definition uvc.h:103