Rohan Gurav
/
Sean_AdiSense1000_V21
ADISense1000 Version 2.1 code base
Fork of AdiSense1000_V21 by
common/utils.h@12:97457cf77bcb, 2017-11-27 (annotated)
- Committer:
- kevin1990
- Date:
- Mon Nov 27 13:10:11 2017 +0000
- Revision:
- 12:97457cf77bcb
v1.0 release
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kevin1990 | 12:97457cf77bcb | 1 | #ifndef __UTILS_H__ |
kevin1990 | 12:97457cf77bcb | 2 | #define __UTILS_H__ |
kevin1990 | 12:97457cf77bcb | 3 | |
kevin1990 | 12:97457cf77bcb | 4 | #include "inc/adi_sense_api.h" |
kevin1990 | 12:97457cf77bcb | 5 | #include "inc/adi_sense_1000/adi_sense_1000_api.h" |
kevin1990 | 12:97457cf77bcb | 6 | |
kevin1990 | 12:97457cf77bcb | 7 | #ifdef __cplusplus |
kevin1990 | 12:97457cf77bcb | 8 | extern "C" { |
kevin1990 | 12:97457cf77bcb | 9 | #endif |
kevin1990 | 12:97457cf77bcb | 10 | |
kevin1990 | 12:97457cf77bcb | 11 | /* Utility function to print the status read from the ADI Sense device */ |
kevin1990 | 12:97457cf77bcb | 12 | void utils_printStatus( |
kevin1990 | 12:97457cf77bcb | 13 | ADI_SENSE_STATUS *pStatus); |
kevin1990 | 12:97457cf77bcb | 14 | |
kevin1990 | 12:97457cf77bcb | 15 | /* Utility function to print data samples read from the ADI Sense device */ |
kevin1990 | 12:97457cf77bcb | 16 | void utils_printSamples( |
kevin1990 | 12:97457cf77bcb | 17 | ADI_SENSE_DATA_SAMPLE *pSampleBuffer, |
kevin1990 | 12:97457cf77bcb | 18 | uint32_t numSamples); |
kevin1990 | 12:97457cf77bcb | 19 | |
kevin1990 | 12:97457cf77bcb | 20 | /* Utility function to register callbacks for ADI Sense device notification signals */ |
kevin1990 | 12:97457cf77bcb | 21 | ADI_SENSE_RESULT utils_registerCallbacks( |
kevin1990 | 12:97457cf77bcb | 22 | ADI_SENSE_DEVICE_HANDLE hDevice, |
kevin1990 | 12:97457cf77bcb | 23 | volatile bool_t *pbDataReady, |
kevin1990 | 12:97457cf77bcb | 24 | volatile bool_t *pbError, |
kevin1990 | 12:97457cf77bcb | 25 | volatile bool_t *pbAlert); |
kevin1990 | 12:97457cf77bcb | 26 | |
kevin1990 | 12:97457cf77bcb | 27 | /* Utility function to de-register callbacks for ADI Sense device notification signals */ |
kevin1990 | 12:97457cf77bcb | 28 | ADI_SENSE_RESULT utils_deregisterCallbacks( |
kevin1990 | 12:97457cf77bcb | 29 | ADI_SENSE_DEVICE_HANDLE hDevice); |
kevin1990 | 12:97457cf77bcb | 30 | |
kevin1990 | 12:97457cf77bcb | 31 | /* Utility function to run measurements on ADI Sense device, according to its current |
kevin1990 | 12:97457cf77bcb | 32 | * configuration, and display data samples and device status following each cycle */ |
kevin1990 | 12:97457cf77bcb | 33 | ADI_SENSE_RESULT utils_runMeasurement( |
kevin1990 | 12:97457cf77bcb | 34 | ADI_SENSE_DEVICE_HANDLE hDevice, |
kevin1990 | 12:97457cf77bcb | 35 | bool_t bHealthCheckMode); |
kevin1990 | 12:97457cf77bcb | 36 | |
kevin1990 | 12:97457cf77bcb | 37 | #ifdef __cplusplus |
kevin1990 | 12:97457cf77bcb | 38 | } |
kevin1990 | 12:97457cf77bcb | 39 | #endif |
kevin1990 | 12:97457cf77bcb | 40 | |
kevin1990 | 12:97457cf77bcb | 41 | #endif /* __UTILS_H__ */ |
kevin1990 | 12:97457cf77bcb | 42 |