magneto8 2.0.0.0
Public function

Functions

void magneto8_cfg_setup (magneto8_cfg_t *cfg)
 Config Object Initialization function.
 
err_t magneto8_init (magneto8_t *ctx, magneto8_cfg_t *cfg)
 Initialization function.
 
void magneto8_default_cfg (magneto8_t *ctx)
 Click Default Configuration function.
 
void magneto8_generic_write (magneto8_t *ctx, uint8_t reg, uint8_t tx_data)
 Generic write function.
 
uint8_t magneto8_generic_read (magneto8_t *ctx, uint8_t reg)
 Generic read function.
 
uint16_t magneto8_get_raw_angle (magneto8_t *ctx)
 Gets Angle raw data.
 
float magneto8_get_angle_data (magneto8_t *ctx)
 Gets Angle data.
 
uint8_t magneto8_get_status (magneto8_t *ctx)
 Gets status data.
 
uint16_t magneto8_get_magnitude (magneto8_t *ctx)
 Gets magnitude data.
 
uint8_t magneto8_get_agc (magneto8_t *ctx)
 Gets AGC data.
 
uint8_t magneto8_get_zmco (magneto8_t *ctx)
 Gets ZMCO data.
 
uint8_t magneto8_a_pin_state (magneto8_t *ctx)
 Gets A pin state.
 
uint8_t magneto8_b_pin_state (magneto8_t *ctx)
 Gets B pin state.
 
uint8_t magneto8_psh_pin_state (magneto8_t *ctx)
 Gets PSH pin state.
 

Detailed Description

Function Documentation

◆ magneto8_a_pin_state()

uint8_t magneto8_a_pin_state ( magneto8_t * ctx)

Gets A pin state.

Parameters
ctxClick object.
Returns
RST ( A ) pin state

◆ magneto8_b_pin_state()

uint8_t magneto8_b_pin_state ( magneto8_t * ctx)

Gets B pin state.

Parameters
ctxClick object.
Returns
CS ( B ) pin state

◆ magneto8_cfg_setup()

void magneto8_cfg_setup ( magneto8_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ magneto8_default_cfg()

void magneto8_default_cfg ( magneto8_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.
Note
: Config contains -
  - CONFIGURATION REG:
      - MAGNETO8_CFG_MODE_NOM
      - MAGNETO8_CFG_HYST_OFF
      - MAGNETO8_CFG_SF_2x
      - MAGNETO8_CFG_FTH_SLOW
      - MAGNETO8_CFG_WD_ON
  - ABN REG:
      - MAGNETO8_ABN_64

This function executes default configuration for Magneto8 click.

◆ magneto8_generic_read()

uint8_t magneto8_generic_read ( magneto8_t * ctx,
uint8_t reg )

Generic read function.

Parameters
ctxClick object.
regRegister address.

This function reads data from the desired register.

◆ magneto8_generic_write()

void magneto8_generic_write ( magneto8_t * ctx,
uint8_t reg,
uint8_t tx_data )

Generic write function.

Parameters
ctxClick object.
regRegister address.
tx_dataData buf to be written.

This function writes data to the desired register.

◆ magneto8_get_agc()

uint8_t magneto8_get_agc ( magneto8_t * ctx)

Gets AGC data.

Parameters
ctxClick object.
Returns
(uint8_t) AGC data

◆ magneto8_get_angle_data()

float magneto8_get_angle_data ( magneto8_t * ctx)

Gets Angle data.

Parameters
ctxClick object.
Returns
(float) Angle data

◆ magneto8_get_magnitude()

uint16_t magneto8_get_magnitude ( magneto8_t * ctx)

Gets magnitude data.

Parameters
ctxClick object.
Returns
(uint16_t) Magnitude data

◆ magneto8_get_raw_angle()

uint16_t magneto8_get_raw_angle ( magneto8_t * ctx)

Gets Angle raw data.

Parameters
ctxClick object.
Returns
(uint16_t) Angle raw data

◆ magneto8_get_status()

uint8_t magneto8_get_status ( magneto8_t * ctx)

Gets status data.

Parameters
ctxClick object.
Returns
(uint8_t) Status data

◆ magneto8_get_zmco()

uint8_t magneto8_get_zmco ( magneto8_t * ctx)

Gets ZMCO data.

Parameters
ctxClick object.
Returns
(uint8_t) ZMCO data

◆ magneto8_init()

err_t magneto8_init ( magneto8_t * ctx,
magneto8_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ magneto8_psh_pin_state()

uint8_t magneto8_psh_pin_state ( magneto8_t * ctx)

Gets PSH pin state.

Parameters
ctxClick object.
Returns
INT ( PSH ) pin state