hwmonitor 2.1.0.0
HW Monitor Click Driver

API for configuring and manipulating HW Monitor Click driver. More...

Topics

 HW Monitor Registers List
 List of registers of HW Monitor Click driver.
 
 HW Monitor Registers Settings
 Settings for registers of HW Monitor Click driver.
 
 HW Monitor MikroBUS Map
 MikroBUS pin mapping of HW Monitor Click driver.
 

Functions

void hwmonitor_cfg_setup (hwmonitor_cfg_t *cfg)
 HW Monitor configuration object setup function.
 
err_t hwmonitor_init (hwmonitor_t *ctx, hwmonitor_cfg_t *cfg)
 HW Monitor initialization function.
 
err_t hwmonitor_default_cfg (hwmonitor_t *ctx)
 HW Monitor default configuration function.
 
err_t hwmonitor_generic_write (hwmonitor_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 HW Monitor I2C writing function.
 
err_t hwmonitor_generic_read (hwmonitor_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 HW Monitor I2C reading function.
 
void hwmonitor_reset (hwmonitor_t *ctx)
 HW Monitor reset function.
 
err_t hwmonitor_get_config (hwmonitor_t *ctx, hwmonitor_config_t *config)
 HW Monitor gets configuration function.
 
err_t hwmonitor_set_config (hwmonitor_t *ctx, hwmonitor_config_t config)
 HW Monitor set the configuration function.
 
err_t hwmonitor_get_device_id (hwmonitor_t *ctx, uint8_t *manufacture_id, uint8_t *revision_id)
 HW Monitor gets device ID function.
 
err_t hwmonitor_set_temp_res (hwmonitor_t *ctx, uint8_t temp_res)
 HW Monitor set temperature resolution function.
 
err_t hwmonitor_set_ch_out (hwmonitor_t *ctx, uint8_t ch_out)
 HW Monitor set voltage/temperature channel function.
 
err_t hwmonitor_get_temperature (hwmonitor_t *ctx, float *temperature)
 HW Monitor gets temperature function.
 
err_t hwmonitor_get_analog_inputs (hwmonitor_t *ctx, uint8_t in_pos, float *voltage)
 HW Monitor gets analog inputs voltage function.
 
err_t hwmonitor_get_fan_output (hwmonitor_t *ctx, uint8_t fan_pos, uint8_t *fan_output)
 HW Monitor gets FAN output function.
 
err_t hwmonitor_set_analog_in_limit (hwmonitor_t *ctx, uint8_t in_pos, uint16_t upper_limit, uint16_t lower_limit)
 HW Monitor set analog inputs voltage limits function.
 
uint8_t hwmonitor_get_int_pin (hwmonitor_t *ctx)
 HW Monitor gets interrupt function.
 

Detailed Description

API for configuring and manipulating HW Monitor 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

◆ hwmonitor_cfg_setup()

void hwmonitor_cfg_setup ( hwmonitor_cfg_t * cfg)

HW Monitor configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ hwmonitor_default_cfg()

err_t hwmonitor_default_cfg ( hwmonitor_t * ctx)

HW Monitor default configuration function.

This function executes a default configuration of HW Monitor click board.

Parameters
[in]ctx: Click context object. See hwmonitor_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ hwmonitor_generic_read()

err_t hwmonitor_generic_read ( hwmonitor_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

HW Monitor I2C reading function.

This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See hwmonitor_t object definition for detailed explanation.
[in]reg: Start register address.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ hwmonitor_generic_write()

err_t hwmonitor_generic_write ( hwmonitor_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

HW Monitor I2C writing function.

This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See hwmonitor_t object definition for detailed explanation.
[in]reg: Start register address.
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ hwmonitor_get_analog_inputs()

err_t hwmonitor_get_analog_inputs ( hwmonitor_t * ctx,
uint8_t in_pos,
float * voltage )

HW Monitor gets analog inputs voltage function.

This function reads an analog inputs voltage of the LM96080 System Hardware Monitor with 2-Wire Serial Interface on the HW Monitor Click board™.

Parameters
[in]ctx: Click context object. See hwmonitor_t object definition for detailed explanation.
[in]in_pos: Analog inputs position [0-6].
[out]voltage: Analog inputs voltage [mV].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ hwmonitor_get_config()

err_t hwmonitor_get_config ( hwmonitor_t * ctx,
hwmonitor_config_t * config )

HW Monitor gets configuration function.

This function gets the device configuration data object of the LM96080 System Hardware Monitor with 2-Wire Serial Interface on the HW Monitor Click board™.

Parameters
[in]ctx: Click context object. See hwmonitor_t object definition for detailed explanation.
[out]config: Device configuration object. See hwmonitor_config_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ hwmonitor_get_device_id()

err_t hwmonitor_get_device_id ( hwmonitor_t * ctx,
uint8_t * manufacture_id,
uint8_t * revision_id )

HW Monitor gets device ID function.

This function reads a manufacturers ID and device stepping/die revision ID of the LM96080 System Hardware Monitor with 2-Wire Serial Interface on the HW Monitor Click board™.

Parameters
[in]ctx: Click context object. See hwmonitor_t object definition for detailed explanation.
[out]manufacture_id: Manufacturers ID.
[out]revision_id: Device stepping/die revision ID.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ hwmonitor_get_fan_output()

err_t hwmonitor_get_fan_output ( hwmonitor_t * ctx,
uint8_t fan_pos,
uint8_t * fan_output )

HW Monitor gets FAN output function.

This function reads a FAN tachometer output data of the LM96080 System Hardware Monitor with 2-Wire Serial Interface on the HW Monitor Click board™.

Parameters
[in]ctx: Click context object. See hwmonitor_t object definition for detailed explanation.
[in]fan_pos: FAN tachometer inputs position [0-1].
[out]fan_output: FAN tachometer output data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ hwmonitor_get_int_pin()

uint8_t hwmonitor_get_int_pin ( hwmonitor_t * ctx)

HW Monitor gets interrupt function.

This function gets states of the Interrupt ( INT ) pin of the LM96080 System Hardware Monitor with 2-Wire Serial Interface on the HW Monitor Click board™.

Parameters
[in]ctx: Click context object. See hwmonitor_t object definition for detailed explanation.
Returns
  • 0 - Low pin state,
  • 1 - High pin state.
Note
None.

◆ hwmonitor_get_temperature()

err_t hwmonitor_get_temperature ( hwmonitor_t * ctx,
float * temperature )

HW Monitor gets temperature function.

This function reads temperature data in degrees Celsius of the LM96080 System Hardware Monitor with 2-Wire Serial Interface on the HW Monitor Click board™.

Parameters
[in]ctx: Click context object. See hwmonitor_t object definition for detailed explanation.
[out]temperature: Temperature data [deg C].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ hwmonitor_init()

err_t hwmonitor_init ( hwmonitor_t * ctx,
hwmonitor_cfg_t * cfg )

HW Monitor initialization function.

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

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

◆ hwmonitor_reset()

void hwmonitor_reset ( hwmonitor_t * ctx)

HW Monitor reset function.

This function performs hardware reset of the LM96080 System Hardware Monitor with 2-Wire Serial Interface on the HW Monitor Click board™.

Parameters
[in]ctx: Click context object. See hwmonitor_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ hwmonitor_set_analog_in_limit()

err_t hwmonitor_set_analog_in_limit ( hwmonitor_t * ctx,
uint8_t in_pos,
uint16_t upper_limit,
uint16_t lower_limit )

HW Monitor set analog inputs voltage limits function.

This function set analog inputs voltage limits of the LM96080 System Hardware Monitor with 2-Wire Serial Interface on the HW Monitor Click board™.

Parameters
[in]ctx: Click context object. See hwmonitor_t object definition for detailed explanation.
[in]in_pos: Analog inputs position [0-6].
[in]upper_limit: High analog inputs voltage limit.
[in]lower_limit: Low analog inputs voltage limit.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ hwmonitor_set_ch_out()

err_t hwmonitor_set_ch_out ( hwmonitor_t * ctx,
uint8_t ch_out )

HW Monitor set voltage/temperature channel function.

This function enables or disables voltage/temperature channel of the LM96080 System Hardware Monitor with 2-Wire Serial Interface on the HW Monitor Click board™.

Parameters
[in]ctx: Click context object. See hwmonitor_t object definition for detailed explanation.
[in]ch_out: Voltage/temperature channe data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ hwmonitor_set_config()

err_t hwmonitor_set_config ( hwmonitor_t * ctx,
hwmonitor_config_t config )

HW Monitor set the configuration function.

This function set the device configuration data object of the LM96080 System Hardware Monitor with 2-Wire Serial Interface on the HW Monitor Click board™.

Parameters
[in]ctx: Click context object. See hwmonitor_t object definition for detailed explanation.
[in]config: Device configuration object. See hwmonitor_config_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ hwmonitor_set_temp_res()

err_t hwmonitor_set_temp_res ( hwmonitor_t * ctx,
uint8_t temp_res )

HW Monitor set temperature resolution function.

This function set temperature resolution of the LM96080 System Hardware Monitor with 2-Wire Serial Interface on the HW Monitor Click board™.

Parameters
[in]ctx: Click context object. See hwmonitor_t object definition for detailed explanation.
[in]temp_res:
  • 0x00 (HWMONITOR_SET_TEMP_RES_8_bit) - 8-bit temperature resolution,
  • 0x01 (HWMONITOR_SET_TEMP_RES_11_bit) - 11-bit temperature resolution.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.