amrangle 2.0.0.0
amrangle.h File Reference

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

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

Go to the source code of this file.

Data Structures

struct  amrangle_t
 AMR Angle Click context object. More...
 
struct  amrangle_cfg_t
 AMR Angle Click configuration object. More...
 

Macros

#define AMRANGLE_ARM_TOOLCHAIN   0x00
 AMR Angle arm toolchain.
 
#define AMRANGLE_PIC_TOOLCHAIN   0x01
 AMR Angle pic toolchain.
 
#define AMRANGLE_GAIN_CONTROL_EN   0x01
 AMR Angle gain control enable.
 
#define AMRANGLE_GAIN_CONTROL_DIS   0x00
 AMR Angle gain control disable.
 
#define AMRANGLE_POWER_DOWN_EN   0x01
 AMR Angle power down enable.
 
#define AMRANGLE_POWER_DOWN_DIS   0x00
 AMR Angle power down disable.
 
#define AMRANGLE_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  amrangle_return_value_t { AMRANGLE_OK = 0 , AMRANGLE_ERROR = -1 }
 AMR Angle Click return value data. More...
 

Functions

void amrangle_cfg_setup (amrangle_cfg_t *cfg, uint8_t sel_toolchain)
 AMR Angle configuration object setup function.
 
err_t amrangle_init (amrangle_t *ctx, amrangle_cfg_t *cfg)
 AMR Angle initialization function.
 
void amrangle_default_cfg (amrangle_t *ctx)
 AMR Angle default configuration function.
 
float amrangle_angle_read (amrangle_t *ctx)
 AMR Angle read angle function.
 
err_t amrangle_read_vtp_voltage (amrangle_t *ctx, float *vtp_volts)
 AMR Angle read vtp voltage function.
 
float amrangle_read_vtp_temp (amrangle_t *ctx)
 AMR Angle read temperature function.
 
void amrangle_gain_control_mode (amrangle_t *ctx, uint8_t gain_control)
 AMR Angle gain control mode function.
 
void amrangle_power_down_pin (amrangle_t *ctx, uint8_t pd_state)
 AMR Angle power down function.
 

Detailed Description

This file contains API for AMR Angle Click Driver.

Enumeration Type Documentation

◆ amrangle_return_value_t

AMR Angle Click return value data.

Predefined enum values for driver return values.

Enumerator
AMRANGLE_OK 
AMRANGLE_ERROR