hwmonitor2 2.1.0.0
|
API for configuring and manipulating HW Monitor 2 Click driver. More...
Topics | |
HW Monitor 2 Registers List | |
List of registers of HW Monitor 2 Click driver. | |
HW Monitor 2 Registers Settings | |
Settings for registers of HW Monitor 2 Click driver. | |
HW Monitor 2 MikroBUS Map | |
MikroBUS pin mapping of HW Monitor 2 Click driver. | |
Functions | |
void | hwmonitor2_cfg_setup (hwmonitor2_cfg_t *cfg) |
HW Monitor 2 configuration object setup function. | |
err_t | hwmonitor2_init (hwmonitor2_t *ctx, hwmonitor2_cfg_t *cfg) |
HW Monitor 2 initialization function. | |
err_t | hwmonitor2_default_cfg (hwmonitor2_t *ctx) |
HW Monitor 2 default configuration function. | |
err_t | hwmonitor2_generic_write (hwmonitor2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
HW Monitor 2 I2C writing function. | |
err_t | hwmonitor2_generic_read (hwmonitor2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
HW Monitor 2 I2C reading function. | |
void | hwmonitor2_reset (hwmonitor2_t *ctx) |
HW Monitor 2 reset function. | |
err_t | hwmonitor2_get_config (hwmonitor2_t *ctx, hwmonitor2_config_t *config) |
HW Monitor 2 gets configuration function. | |
err_t | hwmonitor2_set_config (hwmonitor2_t *ctx, hwmonitor2_config_t config) |
HW Monitor 2 set the configuration function. | |
err_t | hwmonitor2_get_device_id (hwmonitor2_t *ctx, uint8_t *manufacture_id, uint8_t *revision_id) |
HW Monitor 2 gets device ID function. | |
err_t | hwmonitor2_set_temp_res (hwmonitor2_t *ctx, uint8_t temp_res) |
HW Monitor 2 set temperature resolution function. | |
err_t | hwmonitor2_set_ch_out (hwmonitor2_t *ctx, uint8_t ch_out) |
HW Monitor 2 set voltage/temperature channel function. | |
err_t | hwmonitor2_get_temperature (hwmonitor2_t *ctx, float *temperature) |
HW Monitor 2 gets temperature function. | |
err_t | hwmonitor2_get_analog_inputs (hwmonitor2_t *ctx, uint8_t ch_pos, float *voltage) |
HW Monitor 2 gets analog inputs voltage function. | |
err_t | hwmonitor2_get_fan_output (hwmonitor2_t *ctx, uint8_t fan_pos, uint8_t *fan_output) |
HW Monitor 2 gets FAN output function. | |
uint8_t | hwmonitor2_get_int_pin (hwmonitor2_t *ctx) |
HW Monitor 2 gets interrupt function. | |
API for configuring and manipulating HW Monitor 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void hwmonitor2_cfg_setup | ( | hwmonitor2_cfg_t * | cfg | ) |
HW Monitor 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See hwmonitor2_cfg_t object definition for detailed explanation. |
err_t hwmonitor2_default_cfg | ( | hwmonitor2_t * | ctx | ) |
HW Monitor 2 default configuration function.
This function executes a default configuration of HW Monitor 2 click board.
[in] | ctx | : Click context object. See hwmonitor2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hwmonitor2_generic_read | ( | hwmonitor2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
HW Monitor 2 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See hwmonitor2_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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hwmonitor2_generic_write | ( | hwmonitor2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
HW Monitor 2 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See hwmonitor2_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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hwmonitor2_get_analog_inputs | ( | hwmonitor2_t * | ctx, |
uint8_t | ch_pos, | ||
float * | voltage ) |
HW Monitor 2 gets analog inputs voltage function.
This function reads an analog inputs voltage of the AMC80 System Hardware Monitor with Two-Wire and SMBus Serial Interface on the HW Monitor 2 Click board™.
[in] | ctx | : Click context object. See hwmonitor2_t object definition for detailed explanation. |
[in] | ch_pos | : Analog inputs channel position [0-6]. |
[out] | voltage | : Analog inputs voltage [mV]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hwmonitor2_get_config | ( | hwmonitor2_t * | ctx, |
hwmonitor2_config_t * | config ) |
HW Monitor 2 gets configuration function.
This function gets the device configuration data object of the AMC80 System Hardware Monitor with Two-Wire and SMBus Serial Interface on the HW Monitor 2 Click board™.
[in] | ctx | : Click context object. See hwmonitor2_t object definition for detailed explanation. |
[out] | config | : Device configuration object. See hwmonitor2_config_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hwmonitor2_get_device_id | ( | hwmonitor2_t * | ctx, |
uint8_t * | manufacture_id, | ||
uint8_t * | revision_id ) |
HW Monitor 2 gets device ID function.
This function reads a manufacturers ID and device stepping/die revision ID of the AMC80 System Hardware Monitor with Two-Wire and SMBus Serial Interface on the HW Monitor 2 Click board™.
[in] | ctx | : Click context object. See hwmonitor2_t object definition for detailed explanation. |
[out] | manufacture_id | : Manufacturers ID. |
[out] | revision_id | : Device stepping/die revision ID. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hwmonitor2_get_fan_output | ( | hwmonitor2_t * | ctx, |
uint8_t | fan_pos, | ||
uint8_t * | fan_output ) |
HW Monitor 2 gets FAN output function.
This function reads a FAN tachometer output data of the AMC80 System Hardware Monitor with Two-Wire and SMBus Serial Interface on the HW Monitor 2 Click board™.
[in] | ctx | : Click context object. See hwmonitor2_t object definition for detailed explanation. |
[in] | fan_pos | : FAN tachometer inputs position [0-1]. |
[out] | fan_output | : FAN tachometer output data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t hwmonitor2_get_int_pin | ( | hwmonitor2_t * | ctx | ) |
HW Monitor 2 gets interrupt function.
This function gets states of the Interrupt ( INT ) pin of the AMC80 System Hardware Monitor with Two-Wire and SMBus Serial Interface on the HW Monitor 2 Click board™.
[in] | ctx | : Click context object. See hwmonitor2_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. err_t hwmonitor2_get_temperature | ( | hwmonitor2_t * | ctx, |
float * | temperature ) |
HW Monitor 2 gets temperature function.
This function reads temperature data in degrees Celsius of the AMC80 System Hardware Monitor with Two-Wire and SMBus Serial Interface on the HW Monitor 2 Click board™.
[in] | ctx | : Click context object. See hwmonitor2_t object definition for detailed explanation. |
[out] | temperature | : Temperature data [deg C]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hwmonitor2_init | ( | hwmonitor2_t * | ctx, |
hwmonitor2_cfg_t * | cfg ) |
HW Monitor 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See hwmonitor2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See hwmonitor2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void hwmonitor2_reset | ( | hwmonitor2_t * | ctx | ) |
HW Monitor 2 reset function.
This function performs a hardware reset of the AMC80 System Hardware Monitor with Two-Wire and SMBus Serial Interface on the HW Monitor 2 Click board™.
[in] | ctx | : Click context object. See hwmonitor2_t object definition for detailed explanation. |
err_t hwmonitor2_set_ch_out | ( | hwmonitor2_t * | ctx, |
uint8_t | ch_out ) |
HW Monitor 2 set voltage/temperature channel function.
This function enables or disables voltage/temperature channel of the AMC80 System Hardware Monitor with Two-Wire and SMBus Serial Interface on the HW Monitor 2 Click board™.
[in] | ctx | : Click context object. See hwmonitor2_t object definition for detailed explanation. |
[in] | ch_out | : Voltage/temperature channe data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hwmonitor2_set_config | ( | hwmonitor2_t * | ctx, |
hwmonitor2_config_t | config ) |
HW Monitor 2 set the configuration function.
This function set the device configuration data object of the AMC80 System Hardware Monitor with Two-Wire and SMBus Serial Interface on the HW Monitor 2 Click board™.
[in] | ctx | : Click context object. See hwmonitor2_t object definition for detailed explanation. |
[in] | config | : Device configuration object. See hwmonitor2_config_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hwmonitor2_set_temp_res | ( | hwmonitor2_t * | ctx, |
uint8_t | temp_res ) |
HW Monitor 2 set temperature resolution function.
This function set temperature resolution of the AMC80 System Hardware Monitor with Two-Wire and SMBus Serial Interface on the HW Monitor 2 Click board™.
[in] | ctx | : Click context object. See hwmonitor2_t object definition for detailed explanation. |
[in] | temp_res | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation.