git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9020 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
roccomarco 2016-03-05 11:07:52 +00:00
parent ffed4a0266
commit 00775f65fe
1 changed files with 11 additions and 12 deletions

View File

@ -42,22 +42,21 @@
/*===========================================================================*/
/**
* @brief @p BaseSensor virtual methods table.
* @brief @p BaseGyroscope virtual methods table.
*/
struct BaseSensorVMT {
_base_sensor_methods
struct BaseGyroscopeVMT {
_base_gyroscope_methods
};
/**
* @brief Base stream class.
* @details This class represents a generic blocking unbuffered sequential
* data stream.
* @brief Base gyroscope class.
* @details This class represents a generic gyroscope MEMS.
*/
typedef struct {
/** @brief Virtual Methods Table.*/
const struct BaseSensorVMT *vmt;
_base_sensor_data
} BaseSensor;
const struct BaseGyroscopeVMT *vmt;
_base_gyroscope_data
} BaseGyroscope;
/*===========================================================================*/
/* Driver macros. */
@ -68,14 +67,14 @@ typedef struct {
*/
#define _base_gyroscope_methods \
_base_sensor_methods \
/* Reads the sensor raw data.*/ \
/* Remove the calibration data.*/ \
msg_t (*reset_calibration)(void); \
/* Invokes the calibration procedure.*/ \
msg_t (*calibrate)(void);
/**
* @brief @p BaseSensor specific data.
* @note It is empty because @p BaseSensor is only an interface
* @brief @p BaseGyroscope specific data.
* @note It is empty because @p BaseGyroscope is only an interface
* without implementation.
*/
#define _base_gyroscope_data