diff options
author | Fabien Poussin <fabien.poussin@gmail.com> | 2019-01-31 17:52:13 +0100 |
---|---|---|
committer | Fabien Poussin <fabien.poussin@gmail.com> | 2019-01-31 17:52:13 +0100 |
commit | 6076bdf27d3c70675dff3b1866a3bbc82aa1eb00 (patch) | |
tree | dc3a31358975a3594ce7c59d6ec5a6afa496d13c /os/hal/include | |
parent | bdcee915863d3f4bcc561c192cef1155e1f65b02 (diff) | |
download | ChibiOS-Contrib-6076bdf27d3c70675dff3b1866a3bbc82aa1eb00.tar.gz ChibiOS-Contrib-6076bdf27d3c70675dff3b1866a3bbc82aa1eb00.tar.bz2 ChibiOS-Contrib-6076bdf27d3c70675dff3b1866a3bbc82aa1eb00.zip |
Updating OpAmp code with calibration functions, cleaning.
Diffstat (limited to 'os/hal/include')
-rw-r--r-- | os/hal/include/hal_opamp.h | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/os/hal/include/hal_opamp.h b/os/hal/include/hal_opamp.h index 383e928..b20c938 100644 --- a/os/hal/include/hal_opamp.h +++ b/os/hal/include/hal_opamp.h @@ -26,6 +26,9 @@ /* Driver constants. */ /*===========================================================================*/ +#define OPAMP_P_BELOW_M (0U) +#define OPAMP_M_BELOW_P (1U) + /*===========================================================================*/ /* Driver pre-compile time settings. */ /*===========================================================================*/ @@ -44,8 +47,8 @@ typedef enum { OPAMP_UNINIT = 0, /**< Not initialized. */ OPAMP_STOP = 1, /**< Stopped. */ - OPAMP_READY = 2, /**< Ready. */ - OPAMP_ACTIVE = 3, /**< Active cycle phase. */ + OPAMP_ACTIVE = 2, /**< Active. */ + OPAMP_CALIBRATING = 3, /**< Calibration in progress. */ } opampstate_t; /** @@ -60,29 +63,13 @@ typedef struct OPAMPDriver OPAMPDriver; /*===========================================================================*/ /** - * @name Macro Functions - * @{ - */ -/** - * @brief Enables the input capture. - * - * @param[in] opamp pointer to the @p OPAMPDriver object - * + * @brief Calibrate opamps + * * * @iclass */ -#define opampEnableI(opamp) opamp_lld_enable(opamp) - -/** - * @brief Disables the input capture. - * - * @param[in] opamp pointer to the @p OPAMPDriver object - * - * @iclass - */ -#define opampDisableI(opamp) opamp_lld_disable(opamp) +#define opampCalibrate() opamp_lld_calibrate() /** @} */ - /** * @name Low Level driver helper macros * @{ |