(Working) Code to interface 3 LoadCells to ADISense1000 and display values using the Labview code.

Fork of 4Bridge_ADISense1000_Example_copy by CAC_smartcushion

Embed: (wiki syntax)

« Back to documentation index

adi_sense_1000.c File Reference

adi_sense_1000.c File Reference

: ADI Sense API implementation for ADI Sense 1000 ----------------------------------------------------------------------------- More...

Go to the source code of this file.

Functions

ADI_SENSE_RESULT adi_sense_Open (unsigned const nDeviceIndex, ADI_SENSE_CONNECTION *const pConnectionInfo, ADI_SENSE_DEVICE_HANDLE *const phDevice)
 Open ADI Sense device handle and set up communication interface.
ADI_SENSE_RESULT adi_sense_GetGpioState (ADI_SENSE_DEVICE_HANDLE const hDevice, ADI_SENSE_GPIO_PIN const ePinId, bool_t *const pbAsserted)
 Get the current state of the specified GPIO input signal.
ADI_SENSE_RESULT adi_sense_RegisterGpioCallback (ADI_SENSE_DEVICE_HANDLE const hDevice, ADI_SENSE_GPIO_PIN const ePinId, ADI_SENSE_GPIO_CALLBACK const callbackFunction, void *const pCallbackParam)
 Register an application-defined callback function for GPIO interrupts.
ADI_SENSE_RESULT adi_sense_Reset (ADI_SENSE_DEVICE_HANDLE const hDevice)
 Reset the ADI Sense device.
ADI_SENSE_RESULT adi_sense_GetStatus (ADI_SENSE_DEVICE_HANDLE const hDevice, ADI_SENSE_STATUS *const pStatus)
 Get general status of ADISense module.
ADI_SENSE_RESULT adi_sense_GetCommandRunningState (ADI_SENSE_DEVICE_HANDLE hDevice, bool_t *pbCommandRunning)
 Check if a command is currently running on the device.
ADI_SENSE_RESULT adi_sense_ApplyConfigUpdates (ADI_SENSE_DEVICE_HANDLE const hDevice)
 Apply the configuration settings currently stored in device registers.
ADI_SENSE_RESULT adi_sense_StartMeasurement (ADI_SENSE_DEVICE_HANDLE const hDevice, ADI_SENSE_MEASUREMENT_MODE const eMeasurementMode)
 Start a measurement cycle.
ADI_SENSE_RESULT adi_sense_SaveConfig (ADI_SENSE_DEVICE_HANDLE const hDevice)
 Store the configuration settings to persistent memory on the device.
ADI_SENSE_RESULT adi_sense_RestoreConfig (ADI_SENSE_DEVICE_HANDLE const hDevice)
 Restore configuration settings from persistent memory on the device.
ADI_SENSE_RESULT adi_sense_SaveLutData (ADI_SENSE_DEVICE_HANDLE const hDevice)
 Store the LUT data to persistent memory on the device.
ADI_SENSE_RESULT adi_sense_RestoreLutData (ADI_SENSE_DEVICE_HANDLE const hDevice)
 Restore LUT data from persistent memory on the device.
ADI_SENSE_RESULT adi_sense_StopMeasurement (ADI_SENSE_DEVICE_HANDLE const hDevice)
 Stop the measurement cycles on the device.
ADI_SENSE_RESULT adi_sense_RunDiagnostics (ADI_SENSE_DEVICE_HANDLE const hDevice)
 Run built-in diagnostic checks on the device.
ADI_SENSE_RESULT adi_sense_RunCalibration (ADI_SENSE_DEVICE_HANDLE const hDevice)
 Run built-in calibration on the device.
ADI_SENSE_RESULT adi_sense_GetData (ADI_SENSE_DEVICE_HANDLE const hDevice, ADI_SENSE_MEASUREMENT_MODE const eMeasurementMode, ADI_SENSE_DATA_SAMPLE *const pSamples, uint32_t const nRequested, uint32_t *const pnReturned)
 Read measurement data samples from the device registers.
ADI_SENSE_RESULT adi_sense_Close (ADI_SENSE_DEVICE_HANDLE const hDevice)
 Close ADI Sense device context and free resources.
ADI_SENSE_RESULT adi_sense_1000_WriteRegister (ADI_SENSE_DEVICE_HANDLE hDevice, uint16_t nAddress, void *pData, unsigned nLength)
 Write one or more device registers at the specified register address.
ADI_SENSE_RESULT adi_sense_1000_ReadRegister (ADI_SENSE_DEVICE_HANDLE hDevice, uint16_t nAddress, void *pData, unsigned nLength)
 Read one or more device registers at the specified register address.
ADI_SENSE_RESULT adi_sense_GetDeviceReadyState (ADI_SENSE_DEVICE_HANDLE const hDevice, bool_t *const bReady)
 Check if the device is ready, following power-up or a reset.
ADI_SENSE_RESULT adi_sense_1000_GetDataReadyModeInfo (ADI_SENSE_DEVICE_HANDLE const hDevice, ADI_SENSE_MEASUREMENT_MODE const eMeasurementMode, ADI_SENSE_1000_OPERATING_MODE *const peOperatingMode, ADI_SENSE_1000_DATAREADY_MODE *const peDataReadyMode, uint32_t *const pnSamplesPerDataready, uint32_t *const pnSamplesPerCycle)
 Get the number of samples available when DATAREADY status is asserted.
ADI_SENSE_RESULT adi_sense_GetProductID (ADI_SENSE_DEVICE_HANDLE hDevice, ADI_SENSE_PRODUCT_ID *pProductId)
 Obtain the product ID from the device.
ADI_SENSE_RESULT adi_sense_1000_SetPowerConfig (ADI_SENSE_DEVICE_HANDLE hDevice, ADI_SENSE_1000_POWER_CONFIG *pPowerConfig)
 Update power configuration settings on the device.
ADI_SENSE_RESULT adi_sense_1000_SetMeasurementConfig (ADI_SENSE_DEVICE_HANDLE hDevice, ADI_SENSE_1000_MEASUREMENT_CONFIG *pMeasConfig)
 Update measurement configuration settings on the device.
ADI_SENSE_RESULT adi_sense_1000_SetDiagnosticsConfig (ADI_SENSE_DEVICE_HANDLE hDevice, ADI_SENSE_1000_DIAGNOSTICS_CONFIG *pDiagnosticsConfig)
 Update diagnostics configuration settings on the device.
ADI_SENSE_RESULT adi_sense_1000_SetChannelCount (ADI_SENSE_DEVICE_HANDLE hDevice, ADI_SENSE_1000_CHANNEL_ID eChannelId, uint32_t nMeasurementsPerCycle)
 Update number of measurements-per-cycle for a specific channel.
ADI_SENSE_RESULT adi_sense_1000_SetChannelThresholdLimits (ADI_SENSE_DEVICE_HANDLE hDevice, ADI_SENSE_1000_CHANNEL_ID eChannelId, float32_t fHighThresholdLimit, float32_t fLowThresholdLimit)
 Update the measurement threshold limits for a specified channel.
ADI_SENSE_RESULT adi_sense_1000_SetChannelSettlingTime (ADI_SENSE_DEVICE_HANDLE hDevice, ADI_SENSE_1000_CHANNEL_ID eChannelId, uint32_t nSettlingTime)
 Update the extra settling time for a specified channel.
ADI_SENSE_RESULT adi_sense_1000_SetChannelConfig (ADI_SENSE_DEVICE_HANDLE hDevice, ADI_SENSE_1000_CHANNEL_ID eChannelId, ADI_SENSE_1000_CHANNEL_CONFIG *pChannelConfig)
 Update channel configuration settings for a specific channel.
ADI_SENSE_RESULT adi_sense_SetConfig (ADI_SENSE_DEVICE_HANDLE const hDevice, ADI_SENSE_CONFIG *const pConfig)
 Write full configuration settings to the device registers.
ADI_SENSE_RESULT adi_sense_1000_SetLutData (ADI_SENSE_DEVICE_HANDLE const hDevice, ADI_SENSE_1000_LUT *const pLutData)
 Write Look-Up Table data to the device memory.
ADI_SENSE_RESULT adi_sense_1000_SetLutDataRaw (ADI_SENSE_DEVICE_HANDLE const hDevice, ADI_SENSE_1000_LUT_RAW *const pLutData)
 Write Look-Up Table raw data to the device memory.
ADI_SENSE_RESULT adi_sense_1000_AssembleLutData (ADI_SENSE_1000_LUT *pLutBuffer, unsigned nLutBufferSize, unsigned const nNumTables, ADI_SENSE_1000_LUT_DESCRIPTOR *const ppDesc[], ADI_SENSE_1000_LUT_TABLE_DATA *const ppData[])
 Assemble a list of separate Look-Up Tables into a single buffer.
ADI_SENSE_RESULT adi_sense_1000_ReadCalTable (ADI_SENSE_DEVICE_HANDLE hDevice, float *pfBuffer, unsigned nMaxLen, unsigned *pnDataLen, unsigned *pnRows, unsigned *pnColumns)
 Read the contents of the ADI Sense internal factory calibration table.

Detailed Description

: ADI Sense API implementation for ADI Sense 1000 -----------------------------------------------------------------------------

Definition in file adi_sense_1000.c.