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

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