magneto2 2.0.0.0
Public function

Functions

void magneto2_cfg_setup (magneto2_cfg_t *cfg)
 Config Object Initialization function.
 
MAGNETO2_RETVAL magneto2_init (magneto2_t *ctx, magneto2_cfg_t *cfg)
 Initialization function.
 
float magneto2_read_angle (magneto2_t *ctx)
 Generic read angle function.
 
uint16_t magneto2_read_data (magneto2_t *ctx)
 Generic read two bytes command function.
 

Detailed Description

Function Documentation

◆ magneto2_cfg_setup()

void magneto2_cfg_setup ( magneto2_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.

◆ magneto2_init()

MAGNETO2_RETVAL magneto2_init ( magneto2_t * ctx,
magneto2_cfg_t * cfg )

Initialization function.

Parameters
magneto2Click object.
cfgClick configuration structure.

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

◆ magneto2_read_angle()

float magneto2_read_angle ( magneto2_t * ctx)

Generic read angle function.

Parameters
magneto2Click object.
Returns
Angle.

@description This function reads 14-bit data value from target register, calculates and converts to float angle value from 0� to 360�.

◆ magneto2_read_data()

uint16_t magneto2_read_data ( magneto2_t * ctx)

Generic read two bytes command function.

Parameters
magneto2Click object.
Returns
Data Value.

@description This function takes 14-bit data value from target register.