|
tempalarm 2.2.0
|
API for configuring and manipulating Temp Alarm Click driver. More...
Topics | |
| Temp Alarm Registers List | |
| List of registers of Temp Alarm Click driver. | |
| Temp Alarm Registers Settings | |
| Settings for registers of Temp Alarm Click driver. | |
| Temp Alarm MikroBUS Map | |
| MikroBUS pin mapping of Temp Alarm Click driver. | |
Functions | |
| void | tempalarm_cfg_setup (tempalarm_cfg_t *cfg) |
| Temp Alarm configuration object setup function. | |
| err_t | tempalarm_init (tempalarm_t *ctx, tempalarm_cfg_t *cfg) |
| Temp Alarm initialization function. | |
| err_t | tempalarm_default_cfg (tempalarm_t *ctx) |
| Temp Alarm default configuration function. | |
| err_t | tempalarm_generic_write (tempalarm_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
| Temp Alarm I2C writing function. | |
| err_t | tempalarm_generic_read (tempalarm_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
| Temp Alarm I2C reading function. | |
| uint8_t | tempalarm_get_alr_pin (tempalarm_t *ctx) |
| Temp Alarm get alarm pin state function. | |
| uint8_t | tempalarm_get_tcr_pin (tempalarm_t *ctx) |
| Temp Alarm get critical temperature alert pin state function. | |
| err_t | tempalarm_write_reg (tempalarm_t *ctx, uint8_t reg, uint8_t data_in) |
| Temp Alarm register writing function. | |
| err_t | tempalarm_read_reg (tempalarm_t *ctx, uint8_t reg, uint8_t *data_out) |
| Temp Alarm register reading function. | |
| err_t | tempalarm_read_temperature (tempalarm_t *ctx, int8_t *temperature) |
| Temp Alarm local sensor read temperature function. | |
| err_t | tempalarm_read_remote_temp (tempalarm_t *ctx, float *temperature) |
| Temp Alarm remote sensor read temperature function. | |
| err_t | tempalarm_set_crit_thigh (tempalarm_t *ctx, int8_t max_temperature) |
| Temp Alarm local sensor set critical high temperature function. | |
| err_t | tempalarm_set_limit_thigh (tempalarm_t *ctx, int8_t max_temperature) |
| Temp Alarm local sensor set limit high temperature function. | |
| err_t | tempalarm_set_alarm_low_limit (tempalarm_t *ctx, float min_temperature) |
| Temp Alarm remote sensor set limit low temperature function. | |
| err_t | tempalarm_set_alarm_high_limit (tempalarm_t *ctx, float max_temperature) |
| Temp Alarm remote sensor set limit high temperature function. | |
| err_t | tempalarm_get_alarms (tempalarm_t *ctx, uint8_t *alarms) |
| Temp Alarm read alarms state function. | |
API for configuring and manipulating Temp Alarm Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void tempalarm_cfg_setup | ( | tempalarm_cfg_t * | cfg | ) |
Temp Alarm configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See tempalarm_cfg_t object definition for detailed explanation. |
| err_t tempalarm_default_cfg | ( | tempalarm_t * | ctx | ) |
Temp Alarm default configuration function.
This function executes a default configuration of Temp Alarm Click board.
| [in] | ctx | : Click context object. See tempalarm_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t tempalarm_generic_read | ( | tempalarm_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_out, | ||
| uint8_t | len ) |
Temp Alarm 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 tempalarm_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 tempalarm_generic_write | ( | tempalarm_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_in, | ||
| uint8_t | len ) |
Temp Alarm 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 tempalarm_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 tempalarm_get_alarms | ( | tempalarm_t * | ctx, |
| uint8_t * | alarms ) |
Temp Alarm read alarms state function.
This function is used to read alarms state.
| [in] | ctx | : Click context object. See tempalarm_t object definition for detailed explanation. |
| [in] | alarms | : Alarm state. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | uint8_t tempalarm_get_alr_pin | ( | tempalarm_t * | ctx | ) |
Temp Alarm get alarm pin state function.
This function is used to get alarm pin state.
| [in] | ctx | : Click context object. See tempalarm_t object definition for detailed explanation. |
0 - Pin state low, 1 - Pin state high. | uint8_t tempalarm_get_tcr_pin | ( | tempalarm_t * | ctx | ) |
Temp Alarm get critical temperature alert pin state function.
This function is used to get alarm critical temperature alert state.
| [in] | ctx | : Click context object. See tempalarm_t object definition for detailed explanation. |
0 - Pin state low, 1 - Pin state high. | err_t tempalarm_init | ( | tempalarm_t * | ctx, |
| tempalarm_cfg_t * | cfg ) |
Temp Alarm initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See tempalarm_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See tempalarm_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t tempalarm_read_reg | ( | tempalarm_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_out ) |
Temp Alarm register reading function.
This function reads a data byte from the selected register by using I2C serial interface.
| [in] | ctx | : Click context object. See tempalarm_t object definition for detailed explanation. |
| [in] | reg | : Start register address. |
| [out] | data_out | : Output read data. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t tempalarm_read_remote_temp | ( | tempalarm_t * | ctx, |
| float * | temperature ) |
Temp Alarm remote sensor read temperature function.
This function is used to read remote sensor in degrees of Celsius.
| [in] | ctx | : Click context object. See tempalarm_t object definition for detailed explanation. |
| [out] | temperature | : Temperature value. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t tempalarm_read_temperature | ( | tempalarm_t * | ctx, |
| int8_t * | temperature ) |
Temp Alarm local sensor read temperature function.
This function is used to read local sensor in degrees of Celsius.
| [in] | ctx | : Click context object. See tempalarm_t object definition for detailed explanation. |
| [out] | temperature | : Temperature value. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t tempalarm_set_alarm_high_limit | ( | tempalarm_t * | ctx, |
| float | max_temperature ) |
Temp Alarm remote sensor set limit high temperature function.
This function is used to set remote sensor limit high temperature.
| [in] | ctx | : Click context object. See tempalarm_t object definition for detailed explanation. |
| [in] | max_temperature | : Temperature value. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t tempalarm_set_alarm_low_limit | ( | tempalarm_t * | ctx, |
| float | min_temperature ) |
Temp Alarm remote sensor set limit low temperature function.
This function is used to set remote sensor limit low temperature.
| [in] | ctx | : Click context object. See tempalarm_t object definition for detailed explanation. |
| [in] | min_temperature | : Temperature value. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t tempalarm_set_crit_thigh | ( | tempalarm_t * | ctx, |
| int8_t | max_temperature ) |
Temp Alarm local sensor set critical high temperature function.
This function is used to set local sensor critical high temperature.
| [in] | ctx | : Click context object. See tempalarm_t object definition for detailed explanation. |
| [in] | max_temperature | : Temperature value. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t tempalarm_set_limit_thigh | ( | tempalarm_t * | ctx, |
| int8_t | max_temperature ) |
Temp Alarm local sensor set limit high temperature function.
This function is used to set local sensor limit high temperature.
| [in] | ctx | : Click context object. See tempalarm_t object definition for detailed explanation. |
| [in] | max_temperature | : Temperature value. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t tempalarm_write_reg | ( | tempalarm_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t | data_in ) |
Temp Alarm register writing function.
This function writes data byte into the selected register by using I2C serial interface.
| [in] | ctx | : Click context object. See tempalarm_t object definition for detailed explanation. |
| [in] | reg | : Start register address. |
| [in] | data_in | : Data to be written. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation.