Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: measure.h
- Revision:
- 8:bd0b93e35392
- Parent:
- 5:746e78113d7d
- Child:
- 10:186e097fb1e3
--- a/measure.h Wed Oct 27 07:36:33 2021 +0000
+++ b/measure.h Wed Oct 27 21:18:12 2021 +0000
@@ -39,7 +39,7 @@
* @file: measure.h
*
* @brief: This file contains type definitions and function prototype
- * for measure.c
+ * for measure.cpp
*
* @details: Provides function definitions for impedence and admittance
* @defgroup MEASURE Measurement routines
@@ -55,104 +55,6 @@
#include <stdbool.h>
#include <stdint.h>
-/*============= D E F I N E S =============*/
-/** DC resistance frequency */
-#define DC_RESISTANCE_FREQUENCY (0.0)
-/** Min average value */
-#define MIN_AVERAGE 1
-/** Max average value */
-/* FIXME: Need to figure out the exact value */
-#define MAX_AVERAGE 65536
-/** Size of measurement buffer */
-/** FIFO Size / 2 */
-#define MEASUREMENT_BUFFER_SIZE 256
-/** Min sample count value */
-#define MIN_SAMPLE_COUNT 1
-/** Max sample count value */
-#define MAX_SAMPLE_COUNT 255
-/** Min display mode value */
-#define MIN_DISP_MODE 0
-/** Max display mode value */
-#define MAX_DISP_MODE 18
-/** Number of sweep scales */
-#define NUM_SCALES 2
-/** Number of sweep types */
-#define NUM_TYPES 4
-
-/**
- * Type of resistance modes
- */
-typedef enum
-{
- /** DC resistance mode */
- DC_RESISTANCE_MODE,
- /** AC resistance mode */
- AC_RESISTANCE_MODE
-} RESISTANCE_MODE;
-/**
- * Type of sweep type
- */
-typedef enum
-{
- SWEEP_TYPE_NONE,
- SWEEP_TYPE_FREQUENCY,
- SWEEP_TYPE_OFFSET,
- SWEEP_TYPE_MAG
-} SWEEP_TYPE;
-
-/**
- * Type of sweep scale
- */
-typedef enum
-{
- SWEEP_SCALE_LINEAR,
- SWEEP_SCALE_LOG
-} SWEEP_SCALE;
-
-/**
- * Type of measurement mode
- */
-typedef enum
-{
- MEASM_MODE_IMPEDANCE,
- MEASM_MODE_ADMITTANCE
-
-} MEASM_MODE;
-
-/**
- * Impedance correction mode
- */
-typedef enum
-{
- CORRECTION_MODE_NONE,
- CORRECTION_MODE_CAL,
- CORRECTION_MODE_COMP
-} CORRECTION_MODE;
-
-/** display types */
-typedef enum
-{
- RS_CS,
- CS_D,
- CS_Q,
- LS_RS,
- LS_D,
- LS_Q,
- R_X,
- Z_PHASE_DEG,
- Z_PHASE_RAD,
- CP_RP,
- CP_D,
- CP_Q,
- LP_RP,
- LP_D,
- LP_Q,
- G_B,
- Y_PHASE_DEG,
- Y_PHASE_RAD,
- DISPLAY_MODE_NONE
-} DISPLAY_MODE;
-
/*============= D A T A T Y P E S =============*/
/**
@@ -172,9 +74,8 @@
* @details Measures impedance based on configured attributes
* @return 0 - Success 1 - Failed
*/
- int32_t TriggerAndMeasure();
-
- void PrintMeasureStatusMessage(int32_t status);
+ int32_t MeasureAndDisplay();
+
#ifdef __cplusplus
}
#endif
