heater  2.0.0.0
Data Structures | Macros | Functions
heater.h File Reference

This file contains API for heater Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
#include "drv_pwm.h"

Go to the source code of this file.

Data Structures

struct  heater_t
 Click ctx object definition. More...
 
struct  heater_cfg_t
 Click configuration structure definition. More...
 
struct  heater_config_t
 

Macros

#define HEATER_MAP_MIKROBUS(cfg, mikrobus)
 
#define HEATER_RETVAL   uint8_t
 
#define HEATER_OK   0x00
 
#define HEATER_INIT_ERROR   0xFF
 
#define HEATER_SLAVE_ADDRESS   0x4D
 
#define HEATER_LED_ON   1
 
#define HEATER_LED_OFF   0
 
#define HEATER_SHIFT_DATA   8
 
#define HEATER_ADC_VREF   3300.00f
 
#define HEATER_MV_RESOLUTION   4096.00f
 
#define HEATER_TEMP_RESOLUTION   10.0f
 
#define HEATER_TEMP_0   500.0
 
#define HEATER_DEF_FREQ   500
 

Functions

void heater_cfg_setup (heater_cfg_t *cfg, heater_config_t *cfg1)
 Config Object Initialization function. More...
 
HEATER_RETVAL heater_init (heater_t *ctx, heater_cfg_t *cfg, heater_config_t *cfg1)
 Initialization function. More...
 
void heater_set_led1_status (heater_t *ctx, uint8_t status)
 Sets state of the rst pin. More...
 
void heater_set_led2_status (heater_t *ctx, uint8_t status)
 Sets state of the cs pin. More...
 
uint16_t heater_read_data (heater_t *ctx)
 Generic function for reading data from device. More...
 
float heater_read_mv (heater_t *ctx)
 Function reads data from device and converts it to mV value. More...
 
float heater_read_temp (heater_t *ctx)
 Function reads data and converts it to temperature data in degree C. More...
 
void heater_set_duty_cycle (heater_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle. More...
 
void heater_pwm_stop (heater_t *ctx)
 Stop PWM module. More...
 
void heater_pwm_start (heater_t *ctx)
 Start PWM module. More...
 

Detailed Description

This file contains API for heater Click driver.