magneto2  2.0.0.0
Functions
Public function

Functions

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

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.