ChibiOS/HAL  6.1.0

HAL Generic Barometer Interface. More...

Collaboration diagram for Generic Barometer Interface:

Detailed Description

HAL Generic Barometer Interface.

Macros

#define _base_barometer_methods_alone
 BaseBarometer specific methods. More...
 
#define _base_barometer_methods
 BaseBarometer specific methods with inherited ones. More...
 
#define _base_barometer_data   _base_sensor_data
 BaseBarometer specific data. More...
 

Macro Functions (BaseBarometer)

#define barometerGetChannelsNumber(ip)   (ip)->vmt->get_channels_number(ip)
 Barometer get channels number. More...
 
#define barometerReadRaw(ip, dp)   (ip)->vmt->read_raw(ip, dp)
 Barometer read raw data. More...
 
#define barometerReadCooked(ip, dp)   (ip)->vmt->read_cooked(ip, dp)
 Barometer read cooked data. More...
 
#define barometerSetBias(ip, bp)   (ip)->vmt->set_bias(ip, bp)
 Updates barometer bias data from received buffer. More...
 
#define barometerResetBias(ip)   (ip)->vmt->reset_bias(ip)
 Reset barometer bias data restoring it to zero. More...
 
#define barometerSetSensitivity(ip, sp)   (ip)->vmt->set_sensitivity(ip, sp)
 Updates barometer sensitivity data from received buffer. More...
 
#define barometerResetSensitivity(ip)   (ip)->vmt->reset_sensitivity(ip)
 Reset barometer sensitivity data restoring it to its typical value. More...
 

Data Structures

struct  BaseBarometerVMT
 BaseBarometer virtual methods table. More...
 
struct  BaseBarometer
 Base barometer class. More...
 

Macro Definition Documentation

#define _base_barometer_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);
int32_t msg_t
Type of a message.
Definition: osal.h:160

BaseBarometer specific methods.

Definition at line 49 of file hal_barometer.h.

#define _base_barometer_methods
Value:
#define _base_barometer_methods_alone
BaseBarometer specific methods.
Definition: hal_barometer.h:49

BaseBarometer specific methods with inherited ones.

Definition at line 63 of file hal_barometer.h.

#define _base_barometer_data   _base_sensor_data

BaseBarometer specific data.

Definition at line 77 of file hal_barometer.h.

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

Barometer get channels number.

Parameters
[in]ippointer to a BaseBarometer class.
Returns
The number of channels of the BaseBarometer
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 hal_barometer.h.

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

Barometer read raw data.

Parameters
[in]ippointer to a BaseBarometer 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 hal_barometer.h.

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

Barometer read cooked data.

Parameters
[in]ippointer to a BaseBarometer 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 hal_barometer.h.

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

Updates barometer bias data from received buffer.

Note
The bias buffer must have the same length of the the barometer channels number.
Parameters
[in]ippointer to a BaseBarometer 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 hal_barometer.h.

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

Reset barometer bias data restoring it to zero.

Parameters
[in]ippointer to a BaseBarometer 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 hal_barometer.h.

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

Updates barometer sensitivity data from received buffer.

Note
The sensitivity buffer must have the same length of the the barometer channels number.
Parameters
[in]ippointer to a BaseBarometer 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 hal_barometer.h.

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

Reset barometer sensitivity data restoring it to its typical value.

Parameters
[in]ippointer to a BaseBarometer 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 hal_barometer.h.