diff options
author | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-03-14 16:42:49 +0000 |
---|---|---|
committer | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-03-14 16:42:49 +0000 |
commit | f04e169af85bdb7f6a9177069f9f7a134c06b492 (patch) | |
tree | 6d21c29f6f1b247a2098c9d8ed3b3bc7f6a1f902 /os | |
parent | 17e084724fa5788b2c5939c573fbec11b3278a9e (diff) | |
download | ChibiOS-f04e169af85bdb7f6a9177069f9f7a134c06b492.tar.gz ChibiOS-f04e169af85bdb7f6a9177069f9f7a134c06b492.tar.bz2 ChibiOS-f04e169af85bdb7f6a9177069f9f7a134c06b492.zip |
Fixed vmt names and related macros
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9101 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/lib/peripherals/include/hal_accelerometer.h | 11 | ||||
-rw-r--r-- | os/hal/lib/peripherals/include/hal_compass.h | 11 | ||||
-rw-r--r-- | os/hal/lib/peripherals/include/hal_gyroscope.h | 17 | ||||
-rw-r--r-- | os/hal/lib/peripherals/include/hal_sensors.h | 8 |
4 files changed, 29 insertions, 18 deletions
diff --git a/os/hal/lib/peripherals/include/hal_accelerometer.h b/os/hal/lib/peripherals/include/hal_accelerometer.h index 37927f37e..7cd296e2f 100644 --- a/os/hal/lib/peripherals/include/hal_accelerometer.h +++ b/os/hal/lib/peripherals/include/hal_accelerometer.h @@ -74,7 +74,7 @@ struct BaseAccelerometerVMT { */
typedef struct {
/** @brief Virtual Methods Table.*/
- const struct BaseAccelerometerVMT *vmtac;
+ const struct BaseAccelerometerVMT *vmt_baseaccelerometer;
_base_sensor_data
} BaseAccelerometer;
@@ -94,7 +94,8 @@ typedef struct { *
* @api
*/
-#define accelerometerGetAxesNumber(ip) ((ip)->vmtac->get_axes_number(ip))
+#define accelerometerGetAxesNumber(ip) \
+ (ip)->vmt_baseaccelerometer->get_axes_number(ip)
/**
* @brief Accelerometer read raw data.
@@ -108,7 +109,8 @@ typedef struct { *
* @api
*/
-#define accelerometerReadRaw(ip, dp) ((ip)->vmtac->read_raw(ip, dp))
+#define accelerometerReadRaw(ip, dp) \
+ (ip)->vmt_baseaccelerometer->read_raw(ip, dp)
/**
* @brief Accelerometer read cooked data.
@@ -122,7 +124,8 @@ typedef struct { *
* @api
*/
-#define accelerometerReadCooked(ip, dp) ((ip)->vmtac->read_cooked(ip, dp))
+#define accelerometerReadCooked(ip, dp) \
+ (ip)->vmt_baseaccelerometer->read_cooked(ip, dp)
/** @} */
/*===========================================================================*/
diff --git a/os/hal/lib/peripherals/include/hal_compass.h b/os/hal/lib/peripherals/include/hal_compass.h index 67e1ca9a9..6ae9a9735 100644 --- a/os/hal/lib/peripherals/include/hal_compass.h +++ b/os/hal/lib/peripherals/include/hal_compass.h @@ -74,7 +74,7 @@ struct BaseCompassVMT { */
typedef struct {
/** @brief Virtual Methods Table.*/
- const struct BaseCompassVMT *vmtco;
+ const struct BaseCompassVMT *vmt_basecompass;
_base_compass_data
} BaseCompass;
@@ -93,7 +93,8 @@ typedef struct { *
* @api
*/
-#define compassGetAxesNumber(ip) ((ip)->vmtco->get_axes_number(ip))
+#define compassGetAxesNumber(ip) \
+ (ip)->vmt_basecompass->get_axes_number(ip)
/**
* @brief Compass read raw data.
@@ -107,7 +108,8 @@ typedef struct { *
* @api
*/
-#define compassReadRaw(ip, dp) ((ip)->vmtco->read_raw(ip, dp))
+#define compassReadRaw(ip, dp) \
+ (ip)->vmt_basecompass->read_raw(ip, dp)
/**
* @brief Compass read cooked data.
@@ -121,7 +123,8 @@ typedef struct { *
* @api
*/
-#define compassReadCooked(ip, dp) ((ip)->vmtco->read_cooked(ip, dp))
+#define compassReadCooked(ip, dp) \
+ (ip)->vmt_basecompass->read_cooked(ip, dp)
/** @} */
/*===========================================================================*/
diff --git a/os/hal/lib/peripherals/include/hal_gyroscope.h b/os/hal/lib/peripherals/include/hal_gyroscope.h index f2b162f15..06ec8644a 100644 --- a/os/hal/lib/peripherals/include/hal_gyroscope.h +++ b/os/hal/lib/peripherals/include/hal_gyroscope.h @@ -78,7 +78,7 @@ struct BaseGyroscopeVMT { */
typedef struct {
/** @brief Virtual Methods Table.*/
- const struct BaseGyroscopeVMT *vmtgy;
+ const struct BaseGyroscopeVMT *vmt_basegyroscope;
_base_gyroscope_data
} BaseGyroscope;
@@ -98,7 +98,8 @@ typedef struct { *
* @api
*/
-#define gyroscopeGetAxesNumber(ip) ((ip)->vmtgy->get_axes_number(ip))
+#define gyroscopeGetAxesNumber(ip) \
+ (ip)->vmt_basegyroscope->get_axes_number(ip)
/**
* @brief Gyroscope read raw data.
@@ -112,7 +113,8 @@ typedef struct { *
* @api
*/
-#define gyroscopeReadRaw(ip, dp) ((ip)->vmtgy->read_raw(ip, dp))
+#define gyroscopeReadRaw(ip, dp) \
+ (ip)->vmt_basegyroscope->read_raw(ip, dp)
/**
* @brief Gyroscope read cooked data.
@@ -126,7 +128,8 @@ typedef struct { *
* @api
*/
-#define gyroscopeReadCooked(ip, dp) ((ip)->vmtgy->read_cooked(ip, dp))
+#define gyroscopeReadCooked(ip, dp) \
+ (ip)->vmt_basegyroscope->read_cooked(ip, dp)
/**
* @brief Delete calibration data.
@@ -139,7 +142,8 @@ typedef struct { *
* @api
*/
-#define gyroscopeResetCalibration(ip) ((ip)->vmtgy->reset_calibration(ip))
+#define gyroscopeResetCalibration(ip) \
+ (ip)->vmt_basegyroscope->reset_calibration(ip)
/**
* @brief Gyroscope calibration procedure.
@@ -152,7 +156,8 @@ typedef struct { *
* @api
*/
-#define gyroscopeCalibrate(ip) ((ip)->vmtgy->calibrate(ip))
+#define gyroscopeCalibrate(ip) \
+ (ip)->vmt_basegyroscope->calibrate(ip)
/** @} */
/*===========================================================================*/
diff --git a/os/hal/lib/peripherals/include/hal_sensors.h b/os/hal/lib/peripherals/include/hal_sensors.h index ee65e98b2..fc2766d64 100644 --- a/os/hal/lib/peripherals/include/hal_sensors.h +++ b/os/hal/lib/peripherals/include/hal_sensors.h @@ -79,7 +79,7 @@ struct BaseSensorVMT { */
typedef struct {
/** @brief Virtual Methods Table.*/
- const struct BaseSensorVMT *vmtse;
+ const struct BaseSensorVMT *vmt_basesensor;
_base_sensor_data
} BaseSensor;
@@ -99,7 +99,7 @@ typedef struct { *
* @api
*/
-#define sensorGetAxesNumber(ip) ((ip)->vmtse->get_axes_number(ip))
+#define sensorGetAxesNumber(ip) (ip)->vmt_basesensor->get_axes_number(ip)
/**
* @brief Sensors read raw data.
@@ -113,7 +113,7 @@ typedef struct { *
* @api
*/
-#define sensorReadRaw(ip, dp) ((ip)->vmtse->read_raw(ip, dp))
+#define sensorReadRaw(ip, dp) (ip)->vmt_basesensor->read_raw(ip, dp)
/**
* @brief Sensors read cooked data.
@@ -127,7 +127,7 @@ typedef struct { *
* @api
*/
-#define sensorReadCooked(ip, dp) ((ip)->vmtse->read_cooked(ip, dp))
+#define sensorReadCooked(ip, dp) (ip)->vmt_basesensor->read_cooked(ip, dp)
/** @} */
/*===========================================================================*/
|