pot5 2.1.0.0
|
This file contains API for POT 5 Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_analog_in.h"
#include "drv_i2c_master.h"
Go to the source code of this file.
Data Structures | |
struct | pot5_t |
POT 5 Click context object. More... | |
struct | pot5_cfg_t |
POT 5 Click configuration object. More... | |
Macros | |
#define | POT5_PERCENTS 100 |
POT 5 potentiometer setting. | |
#define | POT5_ROUND_TO_NEAREST_INT 0.5 |
#define | POT5_ADC_RESOLUTION 0x0FFF |
POT 5 ADC setting. | |
#define | POT5_VREF_3V3 3.3 |
#define | POT5_VREF_5V 5.0 |
#define | POT5_SET_DEV_ADDR 0x4D |
POT 5 device address setting. | |
#define | POT5_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | pot5_drv_t { POT5_DRV_SEL_ADC , POT5_DRV_SEL_I2C } |
POT 5 Click driver selector. More... | |
enum | pot5_return_value_t { POT5_OK = 0 , POT5_ERROR = -1 } |
POT 5 Click return value data. More... | |
Functions | |
void | pot5_cfg_setup (pot5_cfg_t *cfg) |
POT 5 configuration object setup function. | |
void | pot5_drv_interface_selection (pot5_cfg_t *cfg, pot5_drv_t drv_sel) |
POT 5 driver interface setup function. | |
err_t | pot5_init (pot5_t *ctx, pot5_cfg_t *cfg) |
POT 5 initialization function. | |
err_t | pot5_read_raw_adc (pot5_t *ctx, uint16_t *raw_adc) |
POT 5 read raw ADC value function. | |
err_t | pot5_read_voltage (pot5_t *ctx, float *voltage) |
POT 5 read voltage level function. | |
err_t | pot5_set_vref (pot5_t *ctx, float vref) |
POT 5 set vref function. | |
uint8_t | pot5_convert_voltage_to_percents (pot5_t *ctx, float voltage) |
POT 5 convert voltage to percents function. | |
This file contains API for POT 5 Click Driver.
enum pot5_drv_t |
enum pot5_return_value_t |