angle2 2.0.0.0
Public function

Functions

void angle2_cfg_setup (angle2_cfg_t *cfg)
 Config Object Initialization function.
 
ANGLE2_RETVAL angle2_init (angle2_t *ctx, angle2_cfg_t *cfg)
 Initialization function.
 
void angle2_default_cfg (angle2_t *ctx)
 Click Default Configuration function.
 
void angle2_generic_transfer (angle2_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
double angle2_write_reg (angle2_t *ctx, uint8_t addr, uint8_t input)
 Register write function.
 
double angle2_read_reg (angle2_t *ctx, uint8_t addr, uint8_t *output)
 Register read function.
 
double angle2_get_angle (angle2_t *ctx)
 Angle read function.
 
double angle2_get_angle_with_time_index (angle2_t *ctx, uint8_t *time_index)
 Angle with time index read function.
 
void angle2_set_zero_scale (angle2_t *ctx, double zero_deg)
 Set zero scale function.
 
void angle2_enable_trimming (angle2_t *ctx, uint8_t state)
 Enable trimming function.
 
void angle2_flash_reg (angle2_t *ctx, uint8_t reg_sel)
 Flash register function.
 

Detailed Description

Function Documentation

◆ angle2_cfg_setup()

void angle2_cfg_setup ( angle2_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ angle2_default_cfg()

void angle2_default_cfg ( angle2_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Angle 2 click.

◆ angle2_enable_trimming()

void angle2_enable_trimming ( angle2_t * ctx,
uint8_t state )

Enable trimming function.

Parameters
ctxClick object.
stateTrimming state.

@description This function sets the trimming state.

◆ angle2_flash_reg()

void angle2_flash_reg ( angle2_t * ctx,
uint8_t reg_sel )

Flash register function.

Parameters
ctxClick object.
reg_selRegister select.

@description This function flashes the specified register.

◆ angle2_generic_transfer()

void angle2_generic_transfer ( angle2_t * ctx,
uint8_t * wr_buf,
uint16_t wr_len,
uint8_t * rd_buf,
uint16_t rd_len )

Generic transfer function.

Parameters
ctxClick object.
wr_bufWrite data buffer
wr_lenNumber of byte in write data buffer
rd_bufRead data buffer
rd_lenNumber of byte in read data buffer

@description Generic SPI transfer, for sending and receiving packages

◆ angle2_get_angle()

double angle2_get_angle ( angle2_t * ctx)

Angle read function.

Parameters
ctxClick object.

@description This function reads angle data from the click module.

◆ angle2_get_angle_with_time_index()

double angle2_get_angle_with_time_index ( angle2_t * ctx,
uint8_t * time_index )

Angle with time index read function.

Parameters
ctxClick object.

@description This function reads angle and time index data from the click module.

◆ angle2_init()

ANGLE2_RETVAL angle2_init ( angle2_t * ctx,
angle2_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ angle2_read_reg()

double angle2_read_reg ( angle2_t * ctx,
uint8_t addr,
uint8_t * output )

Register read function.

Parameters
ctxClick object.
addrRegister address.
outputVariable in which the read data is stored.

@description This function reads 1 byte of data from the specified register address.

◆ angle2_set_zero_scale()

void angle2_set_zero_scale ( angle2_t * ctx,
double zero_deg )

Set zero scale function.

Parameters
ctxClick object.
zero_degZero degree value.

@description This function sets the zero scale value.

◆ angle2_write_reg()

double angle2_write_reg ( angle2_t * ctx,
uint8_t addr,
uint8_t input )

Register write function.

Parameters
ctxClick object.
addrRegister address.
inputData to be written.

@description This function writes 1 byte of data to the specified register address.