angle9 2.1.0.0
Angle 9 Click Driver

API for configuring and manipulating Angle 9 Click driver. More...

Topics

 Angle 9 Registers List
 List of registers of Angle 9 Click driver.
 
 Angle 9 Registers Settings
 Settings for registers of Angle 9 Click driver.
 
 Angle 9 MikroBUS Map
 MikroBUS pin mapping of Angle 9 Click driver.
 

Functions

void angle9_cfg_setup (angle9_cfg_t *cfg)
 Angle 9 configuration object setup function.
 
err_t angle9_init (angle9_t *ctx, angle9_cfg_t *cfg)
 Angle 9 initialization function.
 
err_t angle9_write_register (angle9_t *ctx, uint8_t reg, uint16_t data_in)
 Angle 9 write register function.
 
err_t angle9_read_register (angle9_t *ctx, uint8_t reg, uint16_t *data_out)
 Angle 9 read register function.
 
uint8_t angle9_get_pwm_pin (angle9_t *ctx)
 Angle 9 get pwm pin function.
 
err_t angle9_read_angle (angle9_t *ctx, float *angle)
 Angle 9 read angle function.
 
err_t angle9_read_temperature (angle9_t *ctx, float *temperature)
 Angle 9 read temperature function.
 
err_t angle9_read_field_strength (angle9_t *ctx, uint16_t *field_str)
 Angle 9 read field strength function.
 

Detailed Description

API for configuring and manipulating Angle 9 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ angle9_cfg_setup()

void angle9_cfg_setup ( angle9_cfg_t * cfg)

Angle 9 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See angle9_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ angle9_get_pwm_pin()

uint8_t angle9_get_pwm_pin ( angle9_t * ctx)

Angle 9 get pwm pin function.

This function returns the PWM pin logic state.

Parameters
[in]ctx: Click context object. See angle9_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ angle9_init()

err_t angle9_init ( angle9_t * ctx,
angle9_cfg_t * cfg )

Angle 9 initialization function.

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

Parameters
[out]ctx: Click context object. See angle9_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See angle9_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ angle9_read_angle()

err_t angle9_read_angle ( angle9_t * ctx,
float * angle )

Angle 9 read angle function.

This function reads the magnetic angular position in degrees.

Parameters
[in]ctx: Click context object. See angle9_t object definition for detailed explanation.
[out]angle: Magnetic angular position in degrees.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ angle9_read_field_strength()

err_t angle9_read_field_strength ( angle9_t * ctx,
uint16_t * field_str )

Angle 9 read field strength function.

This function reads the magnetic field strength in gauss.

Parameters
[in]ctx: Click context object. See angle9_t object definition for detailed explanation.
[out]field_str: Magnetic field strength in gauss.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ angle9_read_register()

err_t angle9_read_register ( angle9_t * ctx,
uint8_t reg,
uint16_t * data_out )

Angle 9 read register function.

This function reads two bytes of data from the selected register by using SPI serial interface.

Parameters
[in]ctx: Click context object. See angle9_t object definition for detailed explanation.
[in]reg: Register address.
[out]data_out: Output read data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ angle9_read_temperature()

err_t angle9_read_temperature ( angle9_t * ctx,
float * temperature )

Angle 9 read temperature function.

This function reads the sensor internal temperature in degrees celsius.

Parameters
[in]ctx: Click context object. See angle9_t object definition for detailed explanation.
[out]temperature: Sensor internal temperature in degrees celsius.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ angle9_write_register()

err_t angle9_write_register ( angle9_t * ctx,
uint8_t reg,
uint16_t data_in )

Angle 9 write register function.

This function writes two bytes of data to the selected register by using SPI serial interface.

Parameters
[in]ctx: Click context object. See angle9_t object definition for detailed explanation.
[in]reg: Register address.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.