hwmonitor3
2.1.0.0
|
API for configuring and manipulating HW Monitor 3 Click driver. More...
Modules | |
HW Monitor 3 Registers List | |
List of registers of HW Monitor 3 Click driver. | |
HW Monitor 3 Registers Settings | |
Settings for registers of HW Monitor 3 Click driver. | |
HW Monitor 3 MikroBUS Map | |
MikroBUS pin mapping of HW Monitor 3 Click driver. | |
Functions | |
void | hwmonitor3_cfg_setup (hwmonitor3_cfg_t *cfg) |
HW Monitor 3 configuration object setup function. More... | |
err_t | hwmonitor3_init (hwmonitor3_t *ctx, hwmonitor3_cfg_t *cfg) |
HW Monitor 3 initialization function. More... | |
err_t | hwmonitor3_default_cfg (hwmonitor3_t *ctx) |
HW Monitor 3 default configuration function. More... | |
err_t | hwmonitor3_write_reg (hwmonitor3_t *ctx, uint8_t reg, uint8_t data_in) |
HW Monitor 3 write reg function. More... | |
err_t | hwmonitor3_write_regs (hwmonitor3_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
HW Monitor 3 write regs function. More... | |
err_t | hwmonitor3_read_reg (hwmonitor3_t *ctx, uint8_t reg, uint8_t *data_out) |
HW Monitor 3 read reg function. More... | |
err_t | hwmonitor3_read_regs (hwmonitor3_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
HW Monitor 3 read regs function. More... | |
void | hwmonitor3_set_en_pin (hwmonitor3_t *ctx, uint8_t state) |
HW Monitor 3 set en pin function. More... | |
void | hwmonitor3_set_sleep_pin (hwmonitor3_t *ctx, uint8_t state) |
HW Monitor 3 set sleep pin function. More... | |
uint8_t | hwmonitor3_get_sync_pin (hwmonitor3_t *ctx) |
HW Monitor 3 get sync pin function. More... | |
uint8_t | hwmonitor3_get_irq_pin (hwmonitor3_t *ctx) |
HW Monitor 3 get irq pin function. More... | |
err_t | hwmonitor3_select_bank0 (hwmonitor3_t *ctx) |
HW Monitor 3 select bank0 function. More... | |
err_t | hwmonitor3_select_bank1 (hwmonitor3_t *ctx) |
HW Monitor 3 select bank1 function. More... | |
err_t | hwmonitor3_check_communication (hwmonitor3_t *ctx) |
HW Monitor 3 check communication function. More... | |
err_t | hwmonitor3_enable_channel (hwmonitor3_t *ctx, uint8_t ch_mask) |
HW Monitor 3 enable channel function. More... | |
err_t | hwmonitor3_disable_channel (hwmonitor3_t *ctx, uint8_t ch_mask) |
HW Monitor 3 disable channel function. More... | |
err_t | hwmonitor3_set_scaling (hwmonitor3_t *ctx, uint8_t scaling, uint8_t ch_mask) |
HW Monitor 3 set scaling function. More... | |
err_t | hwmonitor3_read_voltage (hwmonitor3_t *ctx, hwmonitor3_ch_mon_t *ch_mon) |
HW Monitor 3 read voltage function. More... | |
API for configuring and manipulating HW Monitor 3 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void hwmonitor3_cfg_setup | ( | hwmonitor3_cfg_t * | cfg | ) |
HW Monitor 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See hwmonitor3_cfg_t object definition for detailed explanation. |
err_t hwmonitor3_check_communication | ( | hwmonitor3_t * | ctx | ) |
HW Monitor 3 check communication function.
This function checks the communication by reading and verifying the I2C address register.
[in] | ctx | : Click context object. See hwmonitor3_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hwmonitor3_default_cfg | ( | hwmonitor3_t * | ctx | ) |
HW Monitor 3 default configuration function.
This function executes a default configuration of HW Monitor 3 click board.
[in] | ctx | : Click context object. See hwmonitor3_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hwmonitor3_disable_channel | ( | hwmonitor3_t * | ctx, |
uint8_t | ch_mask | ||
) |
HW Monitor 3 disable channel function.
This function disables the selected monitoring channels.
[in] | ctx | : Click context object. See hwmonitor3_t object definition for detailed explanation. |
[in] | ch_mask | : Bit mask of channels to disable [5:0]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hwmonitor3_enable_channel | ( | hwmonitor3_t * | ctx, |
uint8_t | ch_mask | ||
) |
HW Monitor 3 enable channel function.
This function enables the selected monitoring channels.
[in] | ctx | : Click context object. See hwmonitor3_t object definition for detailed explanation. |
[in] | ch_mask | : Bit mask of channels to enable [5:0]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t hwmonitor3_get_irq_pin | ( | hwmonitor3_t * | ctx | ) |
HW Monitor 3 get irq pin function.
This function returns the interrupt pin logic state.
[in] | ctx | : Click context object. See hwmonitor3_t object definition for detailed explanation. |
uint8_t hwmonitor3_get_sync_pin | ( | hwmonitor3_t * | ctx | ) |
HW Monitor 3 get sync pin function.
This function returns the sequence logging synchronization pin logic state.
[in] | ctx | : Click context object. See hwmonitor3_t object definition for detailed explanation. |
err_t hwmonitor3_init | ( | hwmonitor3_t * | ctx, |
hwmonitor3_cfg_t * | cfg | ||
) |
HW Monitor 3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See hwmonitor3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See hwmonitor3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hwmonitor3_read_reg | ( | hwmonitor3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
HW Monitor 3 read reg function.
This function reads a data byte from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See hwmonitor3_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hwmonitor3_read_regs | ( | hwmonitor3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
HW Monitor 3 read regs 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 hwmonitor3_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 hwmonitor3_read_voltage | ( | hwmonitor3_t * | ctx, |
hwmonitor3_ch_mon_t * | ch_mon | ||
) |
HW Monitor 3 read voltage function.
This function reads the voltage level from all 6 monitoring analog input channels.
[in] | ctx | : Click context object. See hwmonitor3_t object definition for detailed explanation. |
[out] | ch_mon | : Monitoring channels object. See hwmonitor3_ch_mon_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hwmonitor3_select_bank0 | ( | hwmonitor3_t * | ctx | ) |
HW Monitor 3 select bank0 function.
This function selects bank 0 register map active.
[in] | ctx | : Click context object. See hwmonitor3_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hwmonitor3_select_bank1 | ( | hwmonitor3_t * | ctx | ) |
HW Monitor 3 select bank1 function.
This function selects bank 1 register map active.
[in] | ctx | : Click context object. See hwmonitor3_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void hwmonitor3_set_en_pin | ( | hwmonitor3_t * | ctx, |
uint8_t | state | ||
) |
HW Monitor 3 set en pin function.
This function sets the enable pin logic state.
[in] | ctx | : Click context object. See hwmonitor3_t object definition for detailed explanation. |
[in] | state | : 0 - enable, 1 - disable. |
err_t hwmonitor3_set_scaling | ( | hwmonitor3_t * | ctx, |
uint8_t | scaling, | ||
uint8_t | ch_mask | ||
) |
HW Monitor 3 set scaling function.
This function sets the scaling level for the selected monitoring channels.
[in] | ctx | : Click context object. See hwmonitor3_t object definition for detailed explanation. |
[in] | scaling | : 0 - 1x scaling, 1 - 4x scaling. |
[in] | ch_mask | : Bit mask of channels to set scaling [5:0]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void hwmonitor3_set_sleep_pin | ( | hwmonitor3_t * | ctx, |
uint8_t | state | ||
) |
HW Monitor 3 set sleep pin function.
This function sets the sleep pin logic state.
[in] | ctx | : Click context object. See hwmonitor3_t object definition for detailed explanation. |
[in] | state | : 0 - sleep enable, 1 - sleep disable. |
err_t hwmonitor3_write_reg | ( | hwmonitor3_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
HW Monitor 3 write reg function.
This function writes a data byte to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See hwmonitor3_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hwmonitor3_write_regs | ( | hwmonitor3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
HW Monitor 3 write regs 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 hwmonitor3_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.