angle 2.0.0.0
angle.h File Reference

This file contains API for Angle Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  angle_t
 Click ctx object definition. More...
 
struct  angle_cfg_t
 Click configuration structure definition. More...
 

Macros

#define ANGLE_MAP_MIKROBUS(cfg, mikrobus)
 
#define ANGLE_RETVAL   uint8_t
 
#define ANGLE_OK   0x00
 
#define ANGLE_INIT_ERROR   0xFF
 
#define ANGLE_ERROR_REG_MASK   0x34
 
#define ANGLE_EXTENDED_ERROR_REG_MASK   0x36
 
#define ANGLE_EXTENDED_ERROR_REG   0x26
 
#define ANGLE_ERROR_REG   0x24
 
#define ANGLE_STATUS_REG   0x22
 
#define ANGLE_SETTINGS_REG   0x1E
 
#define ANGLE_CDS_NO_CHANGLE   0x0000 << 13
 
#define ANGLE_CDS_IDLE_MODE   0x0002 << 13
 
#define ANGLE_CDS_RUN_MODE   0x0003 << 13
 
#define ANGLE_HDR_RESET_0   0x0000 << 12
 
#define ANGLE_HDR_RESET_1   0x0001 << 12
 
#define ANGLE_SFR_RESET_0   0x0000 << 11
 
#define ANGLE_SFR_RESET_1   0x0001 << 11
 
#define ANGLE_CSR_STA_0   0x0000 << 9
 
#define ANGLE_CSR_STA_1   0x0001 << 9
 
#define ANGLE_CXE_0   0x0000 << 8
 
#define ANGLE_CXE_1   0x0001 << 8
 
#define ANGLE_CER_0   0x0000 << 7
 
#define ANGLE_CER_1   0x0001 << 7
 

Functions

void angle_cfg_setup (angle_cfg_t *cfg)
 Config Object Initialization function.
 
ANGLE_RETVAL angle_init (angle_t *ctx, angle_cfg_t *cfg)
 Initialization function.
 
void angle_default_cfg (angle_t *ctx)
 Click Default Configuration function.
 
void angle_generic_write (angle_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void angle_generic_read (angle_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
uint16_t angle_get_angle (angle_t *ctx)
 Read angle.
 
uint16_t angle_get_temperature (angle_t *ctx)
 Read temperature.
 
uint16_t angle_get_magnetics (angle_t *ctx)
 Read magnetics.
 
uint16_t angle_get_status (angle_t *ctx, uint8_t reg)
 Read angle status.
 
void angle_set_config (angle_t *ctx, uint16_t set_value)
 Setting angle configuration.
 

Detailed Description

This file contains API for Angle Click driver.