CAC_smartcushion / Mbed OS ADISense1000_Smartcushion_v1_ble_reply_over_usb2ser

Fork of ADISense1000_Example_FW by Analog Devices

Committer:
nfathurr
Date:
Fri Aug 24 08:58:48 2018 +0000
Revision:
1:25a2bf666957
Parent:
0:76fed7dd9235
test

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nfathurr 1:25a2bf666957 1 #ifndef __UTILS_H__
nfathurr 1:25a2bf666957 2 #define __UTILS_H__
nfathurr 1:25a2bf666957 3
nfathurr 1:25a2bf666957 4 #include "inc/adi_sense_api.h"
nfathurr 1:25a2bf666957 5 #include "inc/adi_sense_1000/adi_sense_1000_api.h"
nfathurr 1:25a2bf666957 6
nfathurr 1:25a2bf666957 7 #ifdef __cplusplus
nfathurr 1:25a2bf666957 8 extern "C" {
nfathurr 1:25a2bf666957 9 #endif
nfathurr 1:25a2bf666957 10
nfathurr 1:25a2bf666957 11 /* Utility function to print the status read from the ADI Sense device */
nfathurr 1:25a2bf666957 12 void utils_printStatus(
nfathurr 1:25a2bf666957 13 ADI_SENSE_STATUS *pStatus);
seanwilson10 0:76fed7dd9235 14
nfathurr 1:25a2bf666957 15 /* Utility function to print data samples read from the ADI Sense device */
nfathurr 1:25a2bf666957 16 void utils_printSamples(
nfathurr 1:25a2bf666957 17 ADI_SENSE_DATA_SAMPLE *pSampleBuffer,
nfathurr 1:25a2bf666957 18 uint32_t numSamples);
nfathurr 1:25a2bf666957 19
nfathurr 1:25a2bf666957 20 /* Alternative print utility */
nfathurr 1:25a2bf666957 21 void utils_printSamples_alt(
nfathurr 1:25a2bf666957 22 ADI_SENSE_DATA_SAMPLE *pSampleBuffer,
nfathurr 1:25a2bf666957 23 uint32_t numSamples);
nfathurr 1:25a2bf666957 24
nfathurr 1:25a2bf666957 25 /* Alternative print utility */
nfathurr 1:25a2bf666957 26 void utils_printSamples_pro(
nfathurr 1:25a2bf666957 27 ADI_SENSE_DATA_SAMPLE *pSampleBuffer,
nfathurr 1:25a2bf666957 28 uint32_t numSamples);
nfathurr 1:25a2bf666957 29
nfathurr 1:25a2bf666957 30 /* Utility function to register callbacks for ADI Sense device notification signals */
nfathurr 1:25a2bf666957 31 ADI_SENSE_RESULT utils_registerCallbacks(
nfathurr 1:25a2bf666957 32 ADI_SENSE_DEVICE_HANDLE hDevice,
nfathurr 1:25a2bf666957 33 volatile bool_t *pbDataReady,
nfathurr 1:25a2bf666957 34 volatile bool_t *pbError,
nfathurr 1:25a2bf666957 35 volatile bool_t *pbAlert);
nfathurr 1:25a2bf666957 36
nfathurr 1:25a2bf666957 37 /* Utility function to de-register callbacks for ADI Sense device notification signals */
nfathurr 1:25a2bf666957 38 ADI_SENSE_RESULT utils_deregisterCallbacks(
nfathurr 1:25a2bf666957 39 ADI_SENSE_DEVICE_HANDLE hDevice);
nfathurr 1:25a2bf666957 40
nfathurr 1:25a2bf666957 41 /* Utility function to run measurements on ADI Sense device, according to its current
nfathurr 1:25a2bf666957 42 * configuration, and display data samples and device status following each cycle */
nfathurr 1:25a2bf666957 43 ADI_SENSE_RESULT utils_runMeasurement(
nfathurr 1:25a2bf666957 44 ADI_SENSE_DEVICE_HANDLE hDevice,
nfathurr 1:25a2bf666957 45 ADI_SENSE_MEASUREMENT_MODE eMeasurementMode);
nfathurr 1:25a2bf666957 46
nfathurr 1:25a2bf666957 47 /* Utility function to retrieve and print the factory calibration coefficients table from the ADI Sense device */
nfathurr 1:25a2bf666957 48 ADI_SENSE_RESULT utils_printCalTable(
nfathurr 1:25a2bf666957 49 ADI_SENSE_DEVICE_HANDLE hDevice);
nfathurr 1:25a2bf666957 50
nfathurr 1:25a2bf666957 51 #ifdef __cplusplus
nfathurr 1:25a2bf666957 52 }
nfathurr 1:25a2bf666957 53 #endif
nfathurr 1:25a2bf666957 54
nfathurr 1:25a2bf666957 55 #endif /* __UTILS_H__ */
nfathurr 1:25a2bf666957 56