diff options
author | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-03-11 15:53:20 +0000 |
---|---|---|
committer | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-03-11 15:53:20 +0000 |
commit | 8b95f8629b2884fffc64dc3a64c6a372d566551e (patch) | |
tree | 7c200fa71e27655a3826dba2168047adce9fe5a2 /os/hal/lib/peripherals/include/hal_compass.h | |
parent | d6dd34c381e8e7631cb04032f01d83ff272afdcc (diff) | |
download | ChibiOS-8b95f8629b2884fffc64dc3a64c6a372d566551e.tar.gz ChibiOS-8b95f8629b2884fffc64dc3a64c6a372d566551e.tar.bz2 ChibiOS-8b95f8629b2884fffc64dc3a64c6a372d566551e.zip |
Updated peripheral interfaces
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9077 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/lib/peripherals/include/hal_compass.h')
-rw-r--r-- | os/hal/lib/peripherals/include/hal_compass.h | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/os/hal/lib/peripherals/include/hal_compass.h b/os/hal/lib/peripherals/include/hal_compass.h index 9d4678878..67e1ca9a9 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 *vmt;
+ const struct BaseCompassVMT *vmtco;
_base_compass_data
} BaseCompass;
@@ -93,7 +93,7 @@ typedef struct { *
* @api
*/
-#define compassGetAxesNumber(ip) sensorGetAxesNumber(ip)
+#define compassGetAxesNumber(ip) ((ip)->vmtco->get_axes_number(ip))
/**
* @brief Compass read raw data.
@@ -107,7 +107,7 @@ typedef struct { *
* @api
*/
-#define compassReadRaw(ip, dp) sensorReadRaw(ip, dp)
+#define compassReadRaw(ip, dp) ((ip)->vmtco->read_raw(ip, dp))
/**
* @brief Compass read cooked data.
@@ -121,33 +121,7 @@ typedef struct { *
* @api
*/
-#define compassReadCooked(ip, dp) sensorReadCooked(ip, dp)
-
-/**
- * @brief Delete calibration data.
- *
- * @param[in] ip pointer to a @p BaseCompass class.
- *
- * @return The operation status.
- * @retval MSG_OK if the function succeeded.
- * @retval MSG_RESET if one or more errors occurred.
- *
- * @api
- */
-#define compassResetCalibration(ip) ((ip)->vmt->reset_calibration(ip))
-
-/**
- * @brief Compass calibration procedure.
- *
- * @param[in] ip pointer to a @p BaseCompass class.
- *
- * @return The operation status.
- * @retval MSG_OK if the function succeeded.
- * @retval MSG_RESET if one or more errors occurred.
- *
- * @api
- */
-#define compassCalibrate(ip) ((ip)->vmt->calibrate(ip))
+#define compassReadCooked(ip, dp) ((ip)->vmtco->read_cooked(ip, dp))
/** @} */
/*===========================================================================*/
|