angle10 2.1.0.0
angle10.h File Reference

This file contains API for Angle 10 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_analog_in.h"

Go to the source code of this file.

Data Structures

struct  angle10_t
 Angle 10 Click context object. More...
 
struct  angle10_cfg_t
 Angle 10 Click configuration object. More...
 

Macros

#define ANGLE10_FULL_CIRCLE   360.0
 Angle 10 angle calculation values.
 
#define ANGLE10_NUM_CONVERSIONS   50
 
#define ANGLE10_VREF_3V3   3.3
 Angle 10 ADC setting.
 
#define ANGLE10_VREF_5V   5.0
 
#define ANGLE10_MAP_MIKROBUS(cfg, mikrobus)    cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN );
 MikroBUS pin mapping.
 

Enumerations

enum  angle10_return_value_t { ANGLE10_OK = 0 , ANGLE10_ERROR = -1 }
 Angle 10 Click return value data. More...
 

Functions

void angle10_cfg_setup (angle10_cfg_t *cfg)
 Angle 10 configuration object setup function.
 
err_t angle10_init (angle10_t *ctx, angle10_cfg_t *cfg)
 Angle 10 initialization function.
 
err_t angle10_read_raw_adc (angle10_t *ctx, uint16_t *raw_adc)
 Angle 10 read raw ADC value function.
 
err_t angle10_read_voltage (angle10_t *ctx, float *voltage)
 Angle 10 read voltage level function.
 
err_t angle10_set_vref (angle10_t *ctx, float vref)
 Angle 10 set vref function.
 
err_t angle10_get_angle (angle10_t *ctx, float *angle)
 Angle 10 get angle function.
 

Detailed Description

This file contains API for Angle 10 Click Driver.

Enumeration Type Documentation

◆ angle10_return_value_t

Angle 10 Click return value data.

Predefined enum values for driver return values.

Enumerator
ANGLE10_OK 
ANGLE10_ERROR