cooler
2.1.0.0
|
API for configuring and manipulating Cooler Click driver. More...
Modules | |
Cooler Registers List | |
List of registers of Cooler Click driver. | |
Cooler Registers Settings | |
Settings for registers of Cooler Click driver. | |
Cooler MikroBUS Map | |
MikroBUS pin mapping of Cooler Click driver. | |
Functions | |
void | cooler_cfg_setup (cooler_cfg_t *cfg) |
Cooler configuration object setup function. More... | |
err_t | cooler_init (cooler_t *ctx, cooler_cfg_t *cfg) |
Cooler initialization function. More... | |
err_t | cooler_default_cfg (cooler_t *ctx) |
Cooler default configuration function. More... | |
err_t | cooler_generic_write (cooler_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Cooler data writing function. More... | |
err_t | cooler_generic_read (cooler_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Cooler data reading function. More... | |
err_t | cooler_data_write (cooler_t *ctx, uint8_t reg, uint16_t data_in) |
Cooler 16-bit data writing function. More... | |
err_t | cooler_data_read (cooler_t *ctx, uint8_t reg, uint16_t *data_out) |
Cooler 16-bit data reading function. More... | |
err_t | cooler_get_device_id (cooler_t *ctx, uint16_t *device_id) |
Cooler get device ID function. More... | |
err_t | cooler_sensor_voltage (cooler_t *ctx, float *voltage) |
Cooler get sensor voltage result function. More... | |
err_t | cooler_get_object_temperature (cooler_t *ctx, float *temperature) |
Cooler get object temperature function. More... | |
uint8_t | cooler_get_alert (cooler_t *ctx) |
Cooler fault indication function. More... | |
err_t | cooler_read_raw_adc (cooler_t *ctx, uint16_t *raw_adc) |
Cooler read raw ADC value function. More... | |
err_t | cooler_read_voltage (cooler_t *ctx, float *voltage) |
Cooler read voltage level function. More... | |
err_t | cooler_set_vref (cooler_t *ctx, float vref) |
Cooler set vref function. More... | |
void | cooler_set_in1_pin (cooler_t *ctx) |
Cooler set IN1 pin state function. More... | |
void | cooler_clear_in1_pin (cooler_t *ctx) |
Cooler IN1 pin clearing function. More... | |
void | cooler_set_in2_pin (cooler_t *ctx) |
Cooler set IN2 pin state function. More... | |
void | cooler_clear_in2_pin (cooler_t *ctx) |
Cooler IN2 pin clearing function. More... | |
err_t | cooler_set_out_state (cooler_t *ctx, cooler_out_state_t out_state) |
Cooler set output function. More... | |
API for configuring and manipulating Cooler Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void cooler_cfg_setup | ( | cooler_cfg_t * | cfg | ) |
Cooler configuration object setup function.
This function initializes Click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See cooler_cfg_t object definition for detailed explanation. |
void cooler_clear_in1_pin | ( | cooler_t * | ctx | ) |
Cooler IN1 pin clearing function.
This function clears the IN1 (PWM) pin on the low level of the DRV8213 4-A Brushed DC Motor Driver with Integrated Current Sense, Current Regulation and Stall Detection on the Cooler Click board.
[in] | ctx | : Click context object. See cooler_t object definition for detailed explanation. |
void cooler_clear_in2_pin | ( | cooler_t * | ctx | ) |
Cooler IN2 pin clearing function.
This function clears the IN2 (RST) pin on the low level of the DRV8213 4-A Brushed DC Motor Driver with Integrated Current Sense, Current Regulation and Stall Detection on the Cooler Click board.
[in] | ctx | : Click context object. See cooler_t object definition for detailed explanation. |
err_t cooler_data_read | ( | cooler_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_out | ||
) |
Cooler 16-bit data reading function.
This function reads a 16-bit data from the selected register of the TMP007 Infrared Thermopile Sensor with Integrated Math Engine on the Cooler Click board.
[in] | ctx | : Click context object. See cooler_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 cooler_data_write | ( | cooler_t * | ctx, |
uint8_t | reg, | ||
uint16_t | data_in | ||
) |
Cooler 16-bit data writing function.
This function writes a 16-bit data to the selected register of the TMP007 Infrared Thermopile Sensor with Integrated Math Engine on the Cooler Click board.
[in] | ctx | : Click context object. See cooler_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 cooler_default_cfg | ( | cooler_t * | ctx | ) |
Cooler default configuration function.
This function executes a default configuration of Cooler Click board.
[in] | ctx | : Click context object. See cooler_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t cooler_generic_read | ( | cooler_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
Cooler data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See cooler_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 cooler_generic_write | ( | cooler_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
Cooler data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See cooler_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. uint8_t cooler_get_alert | ( | cooler_t * | ctx | ) |
Cooler fault indication function.
This function reads the state of the ALR (INT) pin of Cooler Click board.
[in] | ctx | : Click context object. See cooler_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. err_t cooler_get_device_id | ( | cooler_t * | ctx, |
uint16_t * | device_id | ||
) |
Cooler get device ID function.
This function reads a device ID value of the TMP007 Infrared Thermopile Sensor with Integrated Math Engine on the Cooler Click board.
[in] | ctx | : Click context object. See cooler_t object definition for detailed explanation. |
[out] | device_id | : Device ID. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t cooler_get_object_temperature | ( | cooler_t * | ctx, |
float * | temperature | ||
) |
Cooler get object temperature function.
This function reads the object's temperature data in degrees Celsius of the TMP007 Infrared Thermopile Sensor with Integrated Math Engine on the Cooler Click board.
[in] | ctx | : Click context object. See cooler_t object definition for detailed explanation. |
[out] | temperature | : Temperature (degrees Celsius). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t cooler_init | ( | cooler_t * | ctx, |
cooler_cfg_t * | cfg | ||
) |
Cooler initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
[out] | ctx | : Click context object. See cooler_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See cooler_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t cooler_read_raw_adc | ( | cooler_t * | ctx, |
uint16_t * | raw_adc | ||
) |
Cooler read raw ADC value function.
This function reads raw ADC value.
[in] | ctx | : Click context object. See cooler_t object definition for detailed explanation. |
[out] | raw_adc | : Output ADC result. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t cooler_read_voltage | ( | cooler_t * | ctx, |
float * | voltage | ||
) |
Cooler read voltage level function.
This function reads raw ADC value and converts it to proportional voltage level.
[in] | ctx | : Click context object. See cooler_t object definition for detailed explanation. |
[out] | voltage | : Output voltage level [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t cooler_sensor_voltage | ( | cooler_t * | ctx, |
float * | voltage | ||
) |
Cooler get sensor voltage result function.
This function reads the sensor voltage result of the TMP007 Infrared Thermopile Sensor with Integrated Math Engine on the Cooler Click board.
[in] | ctx | : Click context object. See cooler_t object definition for detailed explanation. |
[out] | voltage | : Sensor voltage result [+-5.12mV]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void cooler_set_in1_pin | ( | cooler_t * | ctx | ) |
Cooler set IN1 pin state function.
This function sets the IN1 (PWM) pin on the high level of the DRV8213 4-A Brushed DC Motor Driver with Integrated Current Sense, Current Regulation and Stall Detection on the Cooler Click board.
[in] | ctx | : Click context object. See cooler_t object definition for detailed explanation. |
void cooler_set_in2_pin | ( | cooler_t * | ctx | ) |
Cooler set IN2 pin state function.
This function sets the IN2 (RST) pin on the high level of the DRV8213 4-A Brushed DC Motor Driver with Integrated Current Sense, Current Regulation and Stall Detection on the Cooler Click board.
[in] | ctx | : Click context object. See cooler_t object definition for detailed explanation. |
err_t cooler_set_out_state | ( | cooler_t * | ctx, |
cooler_out_state_t | out_state | ||
) |
Cooler set output function.
This function controls the operation of the cooler - on/off of the DRV8213 4-A Brushed DC Motor Driver with Integrated Current Sense, Current Regulation and Stall Detection on the Cooler Click board.
[in] | ctx | : Click context object. See cooler_t object definition for detailed explanation. |
[in] | out_state | : Motor states selection. See cooler_out_state_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t cooler_set_vref | ( | cooler_t * | ctx, |
float | vref | ||
) |
Cooler set vref function.
This function sets the voltage reference for Cooler Click driver.
[in] | ctx | : Click context object. See cooler_t object definition for detailed explanation. |
[in] | vref | : Reference voltage (volts). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.