ChibiOS/EX  1.2.0
Generic Thermometer Interface

EX Generic Thermometer Interface. More...

Collaboration diagram for Generic Thermometer Interface:

Detailed Description

EX Generic Thermometer Interface.

Macros

#define _base_thermometer_methods_alone
 BaseThermometer specific methods. More...
 
#define _base_thermometer_methods
 BaseThermometer specific methods with inherited ones. More...
 
#define _base_thermometer_data   _base_sensor_data
 BaseThermometer specific data. More...
 

Macro Functions (BaseThermometer)

#define thermometerGetChannelsNumber(ip)   (ip)->vmt->get_channels_number(ip)
 Thermometer get channels number. More...
 
#define thermometerReadRaw(ip, dp)   (ip)->vmt->read_raw(ip, dp)
 Thermometer read raw data. More...
 
#define thermometerReadCooked(ip, dp)   (ip)->vmt->read_cooked(ip, dp)
 Thermometer read cooked data. More...
 
#define thermometerSetBias(ip, bp)   (ip)->vmt->set_bias(ip, bp)
 Updates thermometer bias data from received buffer. More...
 
#define thermometerResetBias(ip)   (ip)->vmt->reset_bias(ip)
 Reset thermometer bias data restoring it to zero. More...
 
#define thermometerSetSensitivity(ip, sp)   (ip)->vmt->set_sensitivity(ip, sp)
 Updates thermometer sensitivity data from received buffer. More...
 
#define thermometerResetSensitivity(ip)   (ip)->vmt->reset_sensitivity(ip)
 Reset thermometer sensitivity data restoring it to its typical value. More...
 

Data Structures

struct  BaseThermometerVMT
 BaseThermometer virtual methods table. More...
 
struct  BaseThermometer
 Base thermometer class. More...
 

Macro Definition Documentation

◆ _base_thermometer_methods_alone

#define _base_thermometer_methods_alone
Value:
/* Invoke the set bias procedure.*/ \
msg_t (*set_bias)(void *instance, float biases[]); \
/* Remove bias stored data.*/ \
msg_t (*reset_bias)(void *instance); \
/* Invoke the set sensitivity procedure.*/ \
msg_t (*set_sensitivity)(void *instance, float sensitivities[]); \
/* Restore sensitivity stored data to default.*/ \
msg_t (*reset_sensitivity)(void *instance);

BaseThermometer specific methods.

Definition at line 49 of file ex_thermometer.h.

◆ _base_thermometer_methods

#define _base_thermometer_methods
Value:
_base_sensor_methods \
_base_thermometer_methods_alone

BaseThermometer specific methods with inherited ones.

Definition at line 63 of file ex_thermometer.h.

◆ _base_thermometer_data

#define _base_thermometer_data   _base_sensor_data

BaseThermometer specific data.

Definition at line 77 of file ex_thermometer.h.

◆ thermometerGetChannelsNumber

#define thermometerGetChannelsNumber (   ip)    (ip)->vmt->get_channels_number(ip)

Thermometer get channels number.

Parameters
[in]ippointer to a BaseThermometer class.
Returns
The number of channels of the BaseThermometer
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 107 of file ex_thermometer.h.

◆ thermometerReadRaw

#define thermometerReadRaw (   ip,
  dp 
)    (ip)->vmt->read_raw(ip, dp)

Thermometer read raw data.

Parameters
[in]ippointer to a BaseThermometer class.
[in]dppointer to a data array.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
MSG_RESETif one or more errors occurred.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 122 of file ex_thermometer.h.

◆ thermometerReadCooked

#define thermometerReadCooked (   ip,
  dp 
)    (ip)->vmt->read_cooked(ip, dp)

Thermometer read cooked data.

Parameters
[in]ippointer to a BaseThermometer class.
[in]dppointer to a data array.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
MSG_RESETif one or more errors occurred.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 137 of file ex_thermometer.h.

◆ thermometerSetBias

#define thermometerSetBias (   ip,
  bp 
)    (ip)->vmt->set_bias(ip, bp)

Updates thermometer bias data from received buffer.

Note
The bias buffer must have the same length of the the thermometer channels number.
Parameters
[in]ippointer to a BaseThermometer class.
[in]bppointer to a buffer of bias values.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
MSG_RESETif one or more errors occurred.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 154 of file ex_thermometer.h.

◆ thermometerResetBias

#define thermometerResetBias (   ip)    (ip)->vmt->reset_bias(ip)

Reset thermometer bias data restoring it to zero.

Parameters
[in]ippointer to a BaseThermometer class.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
MSG_RESETif one or more errors occurred.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 168 of file ex_thermometer.h.

◆ thermometerSetSensitivity

#define thermometerSetSensitivity (   ip,
  sp 
)    (ip)->vmt->set_sensitivity(ip, sp)

Updates thermometer sensitivity data from received buffer.

Note
The sensitivity buffer must have the same length of the the thermometer channels number.
Parameters
[in]ippointer to a BaseThermometer class.
[in]sppointer to a buffer of sensitivity values.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
MSG_RESETif one or more errors occurred.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 185 of file ex_thermometer.h.

◆ thermometerResetSensitivity

#define thermometerResetSensitivity (   ip)    (ip)->vmt->reset_sensitivity(ip)

Reset thermometer sensitivity data restoring it to its typical value.

Parameters
[in]ippointer to a BaseThermometer class.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
MSG_RESETif one or more errors occurred.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 200 of file ex_thermometer.h.