thermoj  2.0.0.0
Functions
Public function

Functions

void thermoj_cfg_setup (thermoj_cfg_t *cfg)
 Config Object Initialization function. More...
 
THERMOJ_RETVAL thermoj_init (thermoj_t *ctx, thermoj_cfg_t *cfg)
 Initialization function. More...
 
void thermoj_generic_write (thermoj_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function. More...
 
void thermoj_generic_read (thermoj_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function. More...
 
void thermoj_write_byte (thermoj_t *ctx, uint8_t reg_address, uint8_t write_data)
 Write the byte of data function. More...
 
uint8_t thermoj_read_byte (thermoj_t *ctx, uint8_t reg_address)
 Read the byte of data function. More...
 
uint8_t thermoj_get_status (thermoj_t *ctx)
 Get the status function. More...
 
uint8_t thermoj_check_burst_complete (thermoj_t *ctx)
 Check the status of burst complete function. More...
 
uint8_t thermoj_check_data_ready (thermoj_t *ctx)
 Check the status of data ready function. More...
 
uint8_t thermoj_check_over_voltage (thermoj_t *ctx)
 Check the status of over voltage function. More...
 
void thermoj_check_alert_status (thermoj_t *ctx, uint8_t *alert_1, uint8_t *alert_2, uint8_t *alert_3, uint8_t *alert_4)
 Write the byte of data function. More...
 
void thermoj_set_sensor_config (thermoj_t *ctx, uint8_t config_val)
 Set sensor configuration function. More...
 
void thermoj_set_thermocouple_type (thermoj_t *ctx, uint8_t thermocouple_type)
 Set thermocouple type sensor configuration function. More...
 
void thermoj_set_filter_coefficient (thermoj_t *ctx, uint8_t filter_coeff)
 Set filter coefficient sensor configuration function. More...
 
uint8_t thermoj_get_sensor_config (thermoj_t *ctx)
 Get sensor configuration function. More...
 
void thermoj_set_config (thermoj_t *ctx, uint8_t config_val)
 Set configuration function. More...
 
void thermoj_set_cold_junction_resolution (thermoj_t *ctx, uint8_t cj_res)
 Set cold-junction resolution function. More...
 
void thermoj_set_adc_resolution (thermoj_t *ctx, uint8_t adc_res)
 Set ADC measurement resolution function. More...
 
void thermoj_set_number_of_temperature_samples (thermoj_t *ctx, uint8_t num_temp_samp)
 Set number of temperature samples function. More...
 
void thermoj_set_shutdown_modes (thermoj_t *ctx, uint8_t sd_mod)
 Set shutdown modes function. More...
 
void thermoj_write_data (thermoj_t *ctx, uint8_t reg_address, uint16_t write_data)
 Write data function. More...
 
uint16_t thermoj_read_data (thermoj_t *ctx, uint8_t reg_address)
 Read data function. More...
 
uint8_t thermoj_get_device_id (thermoj_t *ctx)
 Get the device ID function. More...
 
float thermoj_get_temperature (thermoj_t *ctx)
 Get temperature function. More...
 
float thermoj_get_temperature_fahrenheit (thermoj_t *ctx)
 Get temperature ( Fahrenheit ) function. More...
 
uint8_t thermoj_get_alert_1 (thermoj_t *ctx)
 Get temperature alert 1 function. More...
 
uint8_t thermoj_get_alert_2 (thermoj_t *ctx)
 Get temperature alert 2 function. More...
 
uint8_t thermoj_get_alert_3 (thermoj_t *ctx)
 Get temperature alert 3 function. More...
 
uint8_t thermoj_get_alert_4 (thermoj_t *ctx)
 Get temperature alert 4 function. More...
 
void thermoj_set_alerts_limits (thermoj_t *ctx, uint8_t pos_alert, float temp_alert_limit)
 Set temperature alert limits function. More...
 
void thermoj_set_alert_config (thermoj_t *ctx, uint8_t pos_alert, uint8_t alert_config)
 Set alert configuration function. More...
 
void thermoj_enable_alert (thermoj_t *ctx, uint8_t pos_alert)
 Enable alerts function. More...
 
void thermoj_disable_alert (thermoj_t *ctx, uint8_t pos_alert)
 Disable alerts function. More...
 

Detailed Description

Function Documentation

◆ thermoj_cfg_setup()

void thermoj_cfg_setup ( thermoj_cfg_t cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes Click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ thermoj_check_alert_status()

void thermoj_check_alert_status ( thermoj_t ctx,
uint8_t *  alert_1,
uint8_t *  alert_2,
uint8_t *  alert_3,
uint8_t *  alert_4 
)

Write the byte of data function.

Parameters
ctxClick object.
alert_1Pointer of alert 1 status.
alert_2Pointer of alert 2 status.
alert_3Pointer of alert 3 status.
alert_4Pointer of alert 4 status.

@description This function check status of alerts from the target status register of MCP9600 sensor on Thermo J Click board.

◆ thermoj_check_burst_complete()

uint8_t thermoj_check_burst_complete ( thermoj_t ctx)

Check the status of burst complete function.

Parameters
ctxClick object.

@description This function check the status of burst complete data from the target status register of MCP9600 sensor on Thermo J Click board.

◆ thermoj_check_data_ready()

uint8_t thermoj_check_data_ready ( thermoj_t ctx)

Check the status of data ready function.

Parameters
ctxClick object.

@description This function check the status of data ready data from the target status register of MCP9600 sensor on Thermo J Click board.

◆ thermoj_check_over_voltage()

uint8_t thermoj_check_over_voltage ( thermoj_t ctx)

Check the status of over voltage function.

Parameters
ctxClick object.

@description This function check the status of data ready data from the target status register of MCP9600 sensor on Thermo J Click board.

◆ thermoj_disable_alert()

void thermoj_disable_alert ( thermoj_t ctx,
uint8_t  pos_alert 
)

Disable alerts function.

Parameters
ctxClick object.
pos_alertPos alert.

@description This function disable alert by clear alert bits in the target alert 1, 2, 3 or 4 configuration registers address of MCP9600 sensor on Thermo J Click board.

◆ thermoj_enable_alert()

void thermoj_enable_alert ( thermoj_t ctx,
uint8_t  pos_alert 
)

Enable alerts function.

Parameters
ctxClick object.
pos_alertPos alert.

@description This function enable alert by set alert bits in the target alert 1, 2, 3 or 4 configuration registers address of MCP9600 sensor on Thermo J Click board.

◆ thermoj_generic_read()

void thermoj_generic_read ( thermoj_t ctx,
uint8_t  reg,
uint8_t *  data_buf,
uint8_t  len 
)

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ thermoj_generic_write()

void thermoj_generic_write ( thermoj_t ctx,
uint8_t  reg,
uint8_t *  data_buf,
uint8_t  len 
)

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ thermoj_get_alert_1()

uint8_t thermoj_get_alert_1 ( thermoj_t ctx)

Get temperature alert 1 function.

Parameters
ctxClick object.

@description This function get temperature alert 1 status of INT pin of MCP9600 sensor on Thermo J Click board.

◆ thermoj_get_alert_2()

uint8_t thermoj_get_alert_2 ( thermoj_t ctx)

Get temperature alert 2 function.

Parameters
ctxClick object.

@description This function get temperature alert 2 status of INT pin of MCP9600 sensor on Thermo J Click board.

◆ thermoj_get_alert_3()

uint8_t thermoj_get_alert_3 ( thermoj_t ctx)

Get temperature alert 3 function.

Parameters
ctxClick object.

@description This function get temperature alert 3 status of INT pin of MCP9600 sensor on Thermo J Click board.

◆ thermoj_get_alert_4()

uint8_t thermoj_get_alert_4 ( thermoj_t ctx)

Get temperature alert 4 function.

Parameters
ctxClick object.

@description This function get temperature alert 4 status of INT pin of MCP9600 sensor on Thermo J Click board.

◆ thermoj_get_device_id()

uint8_t thermoj_get_device_id ( thermoj_t ctx)

Get the device ID function.

Parameters
ctxClick object.

@description This function read the device ID data from the target 8-bit register address of MCP9600 sensor on Thermo J Click board.

◆ thermoj_get_sensor_config()

uint8_t thermoj_get_sensor_config ( thermoj_t ctx)

Get sensor configuration function.

Parameters
ctxClick object.

@description This function read sensor configuration data from the target sensor configuration register of MCP9600 sensor on Thermo J Click board.

◆ thermoj_get_status()

uint8_t thermoj_get_status ( thermoj_t ctx)

Get the status function.

Parameters
ctxClick object.

@description This function read the 8-bit status data from the target status register of MCP9600 sensor on Thermo J Click board.

◆ thermoj_get_temperature()

float thermoj_get_temperature ( thermoj_t ctx)

Get temperature function.

Parameters
ctxClick object.

@description This function get value of temperature [ �C ] from the target temperature register address of MCP9600 sensor on Thermo J Click board.

◆ thermoj_get_temperature_fahrenheit()

float thermoj_get_temperature_fahrenheit ( thermoj_t ctx)

Get temperature ( Fahrenheit ) function.

Parameters
ctxClick object.

@description This function get value of temperature [ �F ] from the target temperature register address of MCP9600 sensor on Thermo J Click board.

◆ thermoj_init()

THERMOJ_RETVAL thermoj_init ( thermoj_t ctx,
thermoj_cfg_t cfg 
)

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this Click.

◆ thermoj_read_byte()

uint8_t thermoj_read_byte ( thermoj_t ctx,
uint8_t  reg_address 
)

Read the byte of data function.

Parameters
ctxClick object.
reg_addressRegister address.

@description This function read the 8-bit of data from the target 8-bit register address of MCP9600 sensor on Thermo J Click board.

◆ thermoj_read_data()

uint16_t thermoj_read_data ( thermoj_t ctx,
uint8_t  reg_address 
)

Read data function.

Parameters
ctxClick object.
reg_addressRegister address.

@description This function read the 16-bit of data from the target 8-bit register address of MCP9600 sensor on Thermo J Click board.

◆ thermoj_set_adc_resolution()

void thermoj_set_adc_resolution ( thermoj_t ctx,
uint8_t  adc_res 
)

Set ADC measurement resolution function.

Parameters
ctxClick object.
adc_resADC measurement resolution.

@description This function write ADC measurement resolution data to the target device configuration register of MCP9600 sensor on Thermo J Click board.

◆ thermoj_set_alert_config()

void thermoj_set_alert_config ( thermoj_t ctx,
uint8_t  pos_alert,
uint8_t  alert_config 
)

Set alert configuration function.

Parameters
ctxClick object.
pos_alertPos alert.
alert_configAlert configuration value.

@description This function set temperature alert limits data to the target alert 1, 2, 3 or 4 configuration registers address of MCP9600 sensor on Thermo J Click board.

◆ thermoj_set_alerts_limits()

void thermoj_set_alerts_limits ( thermoj_t ctx,
uint8_t  pos_alert,
float  temp_alert_limit 
)

Set temperature alert limits function.

Parameters
ctxClick object.
pos_alertClick object.
temp_alert_limitClick object.

@description This function set temperature alert limits data to the target temperature alert 1, 2, 3 or 4 limits register address of MCP9600 sensor on Thermo J Click board.

◆ thermoj_set_cold_junction_resolution()

void thermoj_set_cold_junction_resolution ( thermoj_t ctx,
uint8_t  cj_res 
)

Set cold-junction resolution function.

Parameters
ctxClick object.
cj_resCold-junction resolution.

@description This function write cold-junction resolution data to the target device configuration register of MCP9600 sensor on Thermo J Click board.

◆ thermoj_set_config()

void thermoj_set_config ( thermoj_t ctx,
uint8_t  config_val 
)

Set configuration function.

Parameters
ctxClick object.
config_valConfig value.

@description This function write configuration data to the target device configuration register of MCP9600 sensor on Thermo J Click board.

◆ thermoj_set_filter_coefficient()

void thermoj_set_filter_coefficient ( thermoj_t ctx,
uint8_t  filter_coeff 
)

Set filter coefficient sensor configuration function.

Parameters
ctxClick object.
filter_coeffFilter coefficient value.

@description This function write filter coefficient sensor configuration data to the target sensor configuration register of MCP9600 sensor on Thermo J Click board.

◆ thermoj_set_number_of_temperature_samples()

void thermoj_set_number_of_temperature_samples ( thermoj_t ctx,
uint8_t  num_temp_samp 
)

Set number of temperature samples function.

Parameters
ctxClick object.
num_temp_sampNumber of Temperature Samples.

@description This function write number of temperature samples data to the target device configuration register of MCP9600 sensor on Thermo J Click board.

◆ thermoj_set_sensor_config()

void thermoj_set_sensor_config ( thermoj_t ctx,
uint8_t  config_val 
)

Set sensor configuration function.

Parameters
ctxClick object.
config_val8-bit configuration value.

@description This function write sensor configuration data to the target sensor configuration register of MCP9600 sensor on Thermo J Click board.

◆ thermoj_set_shutdown_modes()

void thermoj_set_shutdown_modes ( thermoj_t ctx,
uint8_t  sd_mod 
)

Set shutdown modes function.

Parameters
ctxClick object.
sd_modADC measurement resolution.

@description This function write shutdown modes data to the target device configuration register of MCP9600 sensor on Thermo J Click board.

◆ thermoj_set_thermocouple_type()

void thermoj_set_thermocouple_type ( thermoj_t ctx,
uint8_t  thermocouple_type 
)

Set thermocouple type sensor configuration function.

Parameters
ctxClick object.
thermocouple_typeThermocouple type value.

@description This function write thermocouple type sensor configuration data to the target sensor configuration register of MCP9600 sensor on Thermo J Click board.

◆ thermoj_write_byte()

void thermoj_write_byte ( thermoj_t ctx,
uint8_t  reg_address,
uint8_t  write_data 
)

Write the byte of data function.

Parameters
ctxClick object.
reg_addressRegister address.
write_dataByte of data to write.

@description This function write the 8-bit of data to the target 8-bit register address of MCP9600 sensor on Thermo J Click board.

◆ thermoj_write_data()

void thermoj_write_data ( thermoj_t ctx,
uint8_t  reg_address,
uint16_t  write_data 
)

Write data function.

Parameters
ctxClick object.
reg_addressRegister address.
write_data16-bit data to write.

@description This function write the 16-bit of data to the target 8-bit register address of MCP9600 sensor on Thermo J Click board.