SI117XDRV
0.1
|
Driver for Si117x. More...
#include <stdint.h>
#include <stdbool.h>
#include "si117x_types.h"
#include "si117xdrv_config.h"
Go to the source code of this file.
Data Structures | |
struct | SI117XDRV_BIOZSample_t |
bioz sample data typedef More... | |
struct | SI117XDRV_ECGCfg_t |
Si117XDRV ECG configuration. More... | |
struct | SI117XDRV_ECGLDCfg_t |
Si117XDRV ECG LD configuration. More... | |
struct | SI117XDRV_ECGLDSample_t |
ECG sample data typedef. More... | |
struct | SI117XDRV_ECGSample_t |
ECG sample data typedef. More... | |
struct | SI117XDRV_GlobalCfg_t |
Si117x global configuration. More... | |
struct | SI117XDRV_PPG24bSample_t |
PPG sample data typedef. More... | |
struct | SI117XDRV_PPGCfg_t |
Si117XDRV PPG configuration. More... | |
struct | SI117XDRV_PPGChannelCfg_t |
Si117XDRV one PPG channel configuration. More... | |
struct | SI117XDRV_PPGSample_t |
PPG 16bit sample data typedef. Use this data type to save memory. More... | |
Macros | |
#define | ECODE_SI117XDRV_ALL_CB_USED -8 |
All callbacks used. | |
#define | ECODE_SI117XDRV_ALL_QUEUES_USED -3 |
No more queues left. | |
#define | ECODE_SI117XDRV_NOT_RUNNING -7 |
Si117x is not running. | |
#define | ECODE_SI117XDRV_OK 0 |
Success return value. //dlc: It is my opinion that these should be SI117XDRV_ECODE_.... | |
#define | ECODE_SI117XDRV_PARAM_ERROR -4 |
Invalid parameter. | |
#define | ECODE_SI117XDRV_QUEUE_EMPTY -2 |
Fifo queue empty. | |
#define | ECODE_SI117XDRV_QUEUE_FULL -1 |
Fifo queue full. | |
#define | ECODE_SI117XDRV_QUEUE_SIZE_ERROR -5 |
Invalid queue size. | |
#define | ECODE_SI117XDRV_RUNNING -6 |
Si117x is already running. | |
#define | ECODE_SI117XDRV_UNINITIALIZED -9 |
All callbacks used. | |
#define | NULL 0 |
#define | SI117XDRV_BIOZ_SAMPLE_SIZE_BYTES 9 |
BIOZ sample size in bytes. | |
#define | SI117XDRV_DEFAULT_ECG_CFG |
Si117x default ecg configuration. More... | |
#define | SI117XDRV_DEFAULT_ECG_LD_CFG |
Si117x default ecg ld configuration. More... | |
#define | SI117XDRV_DEFAULT_GLOBAL_CFG |
Si117x default global configuration. More... | |
#define | SI117XDRV_DEFAULT_PPG_CFG |
Si117x default ppg configuration. More... | |
#define | SI117XDRV_DEFAULT_PPG_CHANNEL_CFG |
Si117x default one channel ppg configuration. More... | |
#define | SI117XDRV_ECG_LD_SAMPLE_SIZE_BYTES 9 |
ECG LD sample size in bytes. | |
#define | SI117XDRV_ECG_SAMPLE_SIZE_BYTES 9 |
ECG sample size in bytes. | |
#define | SI117XDRV_IRQ_EN_FIFO (1<<0) |
Fifo irq enable bit. | |
#define | SI117XDRV_IRQ_EN_LD (1<<3) |
Lead detect irq enable bit. | |
#define | SI117XDRV_IRQ_EN_PPG1 (1<<1) |
Legacy PPG irq enable bit. | |
#define | SI117XDRV_IRQ_EN_WD (1<<2) |
Wrist detect irq enable bit. | |
#define | SI117XDRV_PPG_24BIT_SAMPLE_SIZE_BYTES 21 |
PPG sample size in bytes. | |
#define | SI117XDRV_PPG_SAMPLE_SIZE_BYTES 13 |
PPG 16 bit sample size in bytes. | |
#define | SI117XDRV_TASK_BIOZ1_AC_EN (1<<4) |
BIOZ AC task enable bit. | |
#define | SI117XDRV_TASK_BIOZ_DC_EN (1<<5) |
BIOZ DC task enable bit. | |
#define | SI117XDRV_TASK_ECG_EN (1<<6) |
ECG task enable bit. | |
#define | SI117XDRV_TASK_ECG_LD_EN (1<<7) |
ECG LD task enable bit. | |
#define | SI117XDRV_TASK_PPG1_EN (1<<0) |
PPG1 task enable bit. | |
#define | SI117XDRV_TASK_PPG2_EN (1<<1) |
PPG2 task enable bit. | |
#define | SI117XDRV_TASK_PPG3_EN (1<<2) |
PPG3 task enable bit. | |
#define | SI117XDRV_TASK_PPG4_EN (1<<3) |
PPG4 task enable bit. | |
#define | SI117XDRV_UNINITIALIZED_QUEUE_ID 0xffff |
Invalid queue ID for init code. | |
Typedefs | |
typedef int32_t | Si117x_Ecode_t |
SI117XDRV error code. | |
typedef void(* | SI117XDRV_AccelCallback_t) (SI117XDRV_DeviceSelect_t device, uint16_t ppgCount, void *user) |
Typedef for accel sync DLE message received event. More... | |
typedef void(* | SI117XDRV_Callback_t) (SI117XDRV_DeviceSelect_t device, void *user) |
Typedef for the user supplied callback function which is called when a specific event happens. More... | |
typedef uint32_t | SI117XDRV_DataQueueID_t |
Queue ID. | |
typedef uint32_t | SI117XDRV_DeviceSelect_t |
Device ID. | |
Enumerations | |
enum | SI117XDRV_MSPolar_t { MSPolarHighLowHigh = 0, MSPolarLowHighLow = 1 } |
MS pin polarity setting. More... | |
enum | SI117XDRV_SampleSize_t { sample16bit = 0, sample24bit = 1 } |
Sample size settings. More... | |
enum | SI117XDRV_SynchMode_t { SynchModeNone = 0, SynchModeAccel = 1, SynchModeTriggerIn = 2, SynchModeTriggerOut = 3, SynchModeSi117xMaster = 4, SynchModeSi117xSlave = 5 } |
Sync configuration settings. More... | |
Driver for Si117x.
Copyright 2017 Silicon Labs, Inc. http://www.silabs.com
This file is licensed under the Silabs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.
Definition in file si117xdrv.h.
#define SI117XDRV_DEFAULT_ECG_CFG |
Si117x default ecg configuration.
Definition at line 193 of file si117xdrv.h.
#define SI117XDRV_DEFAULT_ECG_LD_CFG |
Si117x default ecg ld configuration.
Definition at line 200 of file si117xdrv.h.
#define SI117XDRV_DEFAULT_GLOBAL_CFG |
Si117x default global configuration.
Definition at line 159 of file si117xdrv.h.
#define SI117XDRV_DEFAULT_PPG_CFG |
Si117x default ppg configuration.
Definition at line 237 of file si117xdrv.h.
#define SI117XDRV_DEFAULT_PPG_CHANNEL_CFG |
Si117x default one channel ppg configuration.
Definition at line 219 of file si117xdrv.h.
typedef void(* SI117XDRV_AccelCallback_t) (SI117XDRV_DeviceSelect_t device, uint16_t ppgCount, void *user) |
Typedef for accel sync DLE message received event.
The callback function is called when a accel sync DLE message is received in the fifo data.
[in] | device | The device |
[in] | ppgCount | Number of ppg samples received since last DLE message |
[in] | user | Extra parameter for user application |
Definition at line 281 of file si117xdrv.h.
typedef void(* SI117XDRV_Callback_t) (SI117XDRV_DeviceSelect_t device, void *user) |
Typedef for the user supplied callback function which is called when a specific event happens.
[in] | device | The device. |
[in] | user | Extra parameter for user application. |
Definition at line 262 of file si117xdrv.h.
enum SI117XDRV_MSPolar_t |
MS pin polarity setting.
Enumerator | |
---|---|
MSPolarHighLowHigh | high-low-high |
MSPolarLowHighLow | low-high-low |
Definition at line 119 of file si117xdrv.h.
Sample size settings.
Enumerator | |
---|---|
sample16bit | 16 bit data |
sample24bit | 24 bit data |
Definition at line 103 of file si117xdrv.h.
Sync configuration settings.
Enumerator | |
---|---|
SynchModeNone | None. |
SynchModeAccel | Accelerometer. |
SynchModeTriggerIn | Trigger in. |
SynchModeTriggerOut | Trigger out. |
SynchModeSi117xMaster | master |
SynchModeSi117xSlave | slave |
Definition at line 109 of file si117xdrv.h.
Si117x_Ecode_t SI117XDRV_Allocate24bPPGDataQueue | ( | SI117XDRV_DataQueueID_t * | id, |
SI117XDRV_PPG24bSample_t * | queueBuffer, | ||
int16_t | queueSizeInBytes | ||
) |
Allocate a fifo queue for PPG data.
Data Fifo Queue Functions
[in] | pointer | to queue ID |
[in] | pointer | to buffer to use for fifo queue |
[in] | queue | buffer size in bytes |
Definition at line 1357 of file si117xdrv.c.
References ECODE_SI117XDRV_ALL_QUEUES_USED.
Si117x_Ecode_t SI117XDRV_AllocateECGDataQueue | ( | SI117XDRV_DataQueueID_t * | id, |
SI117XDRV_ECGSample_t * | queueBuffer, | ||
int16_t | queueSizeInBytes | ||
) |
Allocate a fifo queue for ECG data.
[in] | pointer | to queue ID |
[in] | pointer | to buffer to use for fifo queue |
[in] | queue | buffer size in bytes |
Definition at line 1409 of file si117xdrv.c.
References ECODE_SI117XDRV_ALL_QUEUES_USED.
Si117x_Ecode_t SI117XDRV_AllocateECGLDDataQueue | ( | SI117XDRV_DataQueueID_t * | id, |
SI117XDRV_ECGLDSample_t * | queueBuffer, | ||
int16_t | queueSizeInBytes | ||
) |
Allocate a fifo queue for ECG data.
[in] | pointer | to queue ID |
[in] | pointer | to buffer to use for fifo queue |
[in] | queue | buffer size in bytes |
Definition at line 1461 of file si117xdrv.c.
References ECODE_SI117XDRV_ALL_QUEUES_USED.
Si117x_Ecode_t SI117XDRV_AllocatePPGDataQueue | ( | SI117XDRV_DataQueueID_t * | id, |
SI117XDRV_PPGSample_t * | queueBuffer, | ||
int16_t | queueSizeInBytes | ||
) |
Allocate a fifo queue for 16 bit PPG data.
[in] | pointer | to queue ID |
[in] | pointer | to buffer to use for fifo queue |
[in] | queue | buffer size in bytes |
Definition at line 1306 of file si117xdrv.c.
References ECODE_SI117XDRV_ALL_QUEUES_USED.
Si117x_Ecode_t SI117XDRV_ClearQueue | ( | SI117XDRV_DataQueueID_t | id | ) |
Empty a fifo queue.
[in] | queue | ID |
Definition at line 1543 of file si117xdrv.c.
References SI117XDRV_ClearRawQueue().
Si117x_Ecode_t SI117XDRV_ClearWristDetection | ( | SI117XDRV_DeviceSelect_t | device | ) |
wrist detection algorithm
[in] | device | select ID |
[in] | pointer | bool to indicate wrist detection status |
Definition at line 1994 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_Dequeue24bPPGSampleData | ( | SI117XDRV_DataQueueID_t | id, |
SI117XDRV_PPG24bSample_t * | sample | ||
) |
Remove a PPG sample from the queue.
[in] | queue | ID |
[in] | pointer | to sample |
Definition at line 1719 of file si117xdrv.c.
References SI117XDRV_PPG24bSample_t::ppg1, SI117XDRV_PPG24bSample_t::ppg2, SI117XDRV_PPG24bSample_t::ppg3, SI117XDRV_PPG24bSample_t::ppg4, SI117XDRV_PPG24bSample_t::sequence, SI117XDRV_DequeueRawData(), SI117XDRV_PPG_24BIT_SAMPLE_SIZE_BYTES, SI117XDRV_PPG24bSample_t::syncMessage, and SI117XDRV_PPG24bSample_t::timestamp.
Si117x_Ecode_t SI117XDRV_DequeueECGLDSampleData | ( | SI117XDRV_DataQueueID_t | id, |
SI117XDRV_ECGLDSample_t * | sample | ||
) |
Remove an ECG LD sample from the queue.
[in] | queue | ID |
[in] | pointer | to ECG LD sample |
Definition at line 1855 of file si117xdrv.c.
References SI117XDRV_ECGLDSample_t::data, SI117XDRV_ECGLDSample_t::sequence, SI117XDRV_DequeueRawData(), SI117XDRV_ECG_LD_SAMPLE_SIZE_BYTES, SI117XDRV_ECGLDSample_t::syncMessage, and SI117XDRV_ECGLDSample_t::timestamp.
Si117x_Ecode_t SI117XDRV_DequeueECGSampleData | ( | SI117XDRV_DataQueueID_t | id, |
SI117XDRV_ECGSample_t * | sample | ||
) |
Remove an ECG sample from the queue.
[in] | queue | ID |
[in] | pointer | to ECG sample |
Definition at line 1887 of file si117xdrv.c.
References SI117XDRV_ECGSample_t::ecg, SI117XDRV_ECGSample_t::sequence, SI117XDRV_DequeueRawData(), SI117XDRV_ECG_SAMPLE_SIZE_BYTES, SI117XDRV_ECGSample_t::syncMessage, and SI117XDRV_ECGSample_t::timestamp.
Si117x_Ecode_t SI117XDRV_DequeuePPGSampleData | ( | SI117XDRV_DataQueueID_t | id, |
SI117XDRV_PPGSample_t * | sample | ||
) |
Remove a 16bit PPG sample from the queue.
[in] | queue | ID |
[in] | pointer | to sample |
Definition at line 1753 of file si117xdrv.c.
References SI117XDRV_PPGSample_t::ppg1, SI117XDRV_PPGSample_t::ppg2, SI117XDRV_PPGSample_t::ppg3, SI117XDRV_PPGSample_t::ppg4, SI117XDRV_PPGSample_t::sequence, SI117XDRV_DequeueRawData(), SI117XDRV_PPG_SAMPLE_SIZE_BYTES, SI117XDRV_PPGSample_t::syncMessage, and SI117XDRV_PPGSample_t::timestamp.
Si117x_Ecode_t SI117XDRV_FifoFlush | ( | SI117XDRV_DeviceSelect_t | device | ) |
Flushes the Si117x fifo.
[in] | device | select ID |
Definition at line 231 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_FifoIntConfig | ( | SI117XDRV_DeviceSelect_t | device, |
bool | enable | ||
) |
Enable/disable fifo interrupt.
[in] | device | select ID |
[in] | Set | enable to true to enable interrupt |
Definition at line 523 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_FreeDataQueue | ( | SI117XDRV_DataQueueID_t | id | ) |
De-allocate a fifo queue.
[in] | queue | ID |
Definition at line 1509 of file si117xdrv.c.
References ECODE_SI117XDRV_OK, and ECODE_SI117XDRV_PARAM_ERROR.
Si117x_Ecode_t SI117XDRV_GetFifoIntLevel | ( | SI117XDRV_DeviceSelect_t | device, |
uint16_t * | fifo_int_level | ||
) |
Returns the current fifo interrupt level the Si117x.
[in] | device | select ID |
[in] | pointer | to uint16_t store the fifo level |
Definition at line 346 of file si117xdrv.c.
References ECODE_SI117XDRV_OK.
Si117x_Ecode_t SI117XDRV_GetPartInfo | ( | SI117XDRV_DeviceSelect_t | device, |
uint8_t * | id, | ||
uint8_t * | rev, | ||
uint8_t * | mfr_id, | ||
uint8_t * | pkg_led_cfg | ||
) |
Returns the part number read from the Si117x.
Low level control functions - use these to allow driver to keep track of current config. Device configuration functions
[in] | device | select ID |
[in] | pointer | to byte to store part id |
Definition at line 322 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_InitAPI | ( | SI117XDRV_DeviceSelect_t | device, |
HANDLE | deviceHandle | ||
) |
Initializes API memory and device handle.
[in] | device | select ID |
[in] | device | handle to pass to low level functions |
Definition at line 1067 of file si117xdrv.c.
References SI117XDRV_CallbackData_t::allocated.
Si117x_Ecode_t SI117XDRV_InitECG | ( | SI117XDRV_DeviceSelect_t | device, |
SI117XDRV_ECGCfg_t * | ecgCfg | ||
) |
Configure ECG parameters.
[in] | device | select ID |
[in] | pointer | to ECG configuration structure |
Definition at line 363 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_InitECGLD | ( | SI117XDRV_DeviceSelect_t | device, |
SI117XDRV_ECGLDCfg_t * | ecgCfg | ||
) |
Configure ECG LD parameters.
[in] | device | select ID |
[in] | pointer | to ECG LD configuration structure |
Definition at line 393 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_InitGlobal | ( | SI117XDRV_DeviceSelect_t | device, |
SI117XDRV_GlobalCfg_t * | globalCfg | ||
) |
Configure global Si117x settings.
[in] | device | select ID |
[in] | pointer | to global configuration structure |
Definition at line 887 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_InitializeSi117xFifoStateMachine | ( | SI117XDRV_DeviceSelect_t | device | ) |
Initializes the FIFO processing state machine.
[in] | device | select ID |
Definition at line 2131 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_InitPPG | ( | SI117XDRV_DeviceSelect_t | device, |
SI117XDRV_PPGCfg_t * | ppgCfg | ||
) |
Configure PPG parameters.
[in] | device | select ID |
[in] | pointer | to PPG configuration structure |
Definition at line 422 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_LDIntConfig | ( | SI117XDRV_DeviceSelect_t | device, |
bool | enable | ||
) |
Enable/disable lead detection interrupt.
[in] | device | select ID |
[in] | Set | enable to true to enable interrupt |
Definition at line 577 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_LeadDetection | ( | SI117XDRV_DeviceSelect_t | device, |
bool * | leadDetectStatus | ||
) |
Lead detection algorithm.
[in] | device | select ID |
[in] | pointer | bool to indicate lead detection status |
Definition at line 1936 of file si117xdrv.c.
uint16_t SI117XDRV_NumSamplesInQueue | ( | SI117XDRV_DataQueueID_t | id | ) |
Get number of samples in the queue.
[in] | queue | ID |
Definition at line 1620 of file si117xdrv.c.
References SI117XDRV_NumBytesInQueue().
Si117x_Ecode_t SI117XDRV_PPG1IntConfig | ( | SI117XDRV_DeviceSelect_t | device, |
bool | enable | ||
) |
Enable/disable PPG interrupt.
[in] | device | select ID |
[in] | Set | enable to true to enable interrupt |
Definition at line 550 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_ProcessFifoData | ( | SI117XDRV_DeviceSelect_t | device, |
uint8_t * | record, | ||
uint16_t | fifo_length, | ||
uint16_t | timestamp, | ||
uint16_t | irqSequence | ||
) |
FIFO interrupt handler.
[in] | device | select ID |
[in] | pointer | fifo data read from the sensor |
[in] | number | of bytes read from fifo |
[in] | 16 | bit timestamp of interrupt occurrance |
[in] | irq | sequence number |
Definition at line 2230 of file si117xdrv.c.
References ECODE_SI117XDRV_OK, and Unprocessed_DLE.
Si117x_Ecode_t SI117XDRV_ProcessLDInterrupt | ( | SI117XDRV_DeviceSelect_t | device | ) |
lead detection interrupt handler
Fifo/Interrupt Processing functions
[in] | device | select ID |
Definition at line 2009 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_ProcessPPGInterrupt | ( | SI117XDRV_DeviceSelect_t | device, |
uint8_t * | fifoData, | ||
uint16_t | timestamp, | ||
uint16_t | irqSequence | ||
) |
PPG1 interrupt handler.
[in] | device | select ID |
[in] | pointer | fifo data read from the sensor |
[in] | 16 | bit timestamp of interrupt occurance |
[in] | irq | sequence number |
Definition at line 2163 of file si117xdrv.c.
References SI117XDRV_PPG24bSample_t::ppg1, SI117XDRV_PPGSample_t::ppg1, SI117XDRV_PPG24bSample_t::ppg2, SI117XDRV_PPGSample_t::ppg2, SI117XDRV_PPG24bSample_t::ppg3, SI117XDRV_PPGSample_t::ppg3, SI117XDRV_PPG24bSample_t::ppg4, SI117XDRV_PPGSample_t::ppg4, SI117XDRV_PPG24bSample_t::sequence, SI117XDRV_PPGSample_t::sequence, SI117XDRV_EnqueuePPG16bSampleData(), SI117XDRV_EnqueuePPG24bSampleData(), SI117XDRV_PPG24bSample_t::syncMessage, SI117XDRV_PPGSample_t::syncMessage, SI117XDRV_PPG24bSample_t::timestamp, and SI117XDRV_PPGSample_t::timestamp.
Si117x_Ecode_t SI117XDRV_ProcessWDInterrupt | ( | SI117XDRV_DeviceSelect_t | device | ) |
wrist detection interrupt handler
[in] | device | select ID |
Definition at line 2024 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_RegisterAccelSyncCallback | ( | SI117XDRV_DeviceSelect_t | device, |
SI117XDRV_AccelCallback_t | callback, | ||
void * | user | ||
) |
Register an accelerometer sync message callback.
[in] | device | select ID |
[in] | callback | function pointer |
[in] | user | parameter to pass to callback function |
Definition at line 1099 of file si117xdrv.c.
References SI117XDRV_AccelCallbackData_t::allocated, SI117XDRV_AccelCallbackData_t::callback, ECODE_SI117XDRV_ALL_CB_USED, ECODE_SI117XDRV_OK, and SI117XDRV_AccelCallbackData_t::user.
Si117x_Ecode_t SI117XDRV_RegisterPostFifoFlushCallback | ( | SI117XDRV_DeviceSelect_t | device, |
SI117XDRV_Callback_t | callback, | ||
void * | user | ||
) |
Register a post fifo flush callback.
[in] | device | select ID |
[in] | callback | function pointer |
[in] | user | parameter to pass to callback function |
Definition at line 1234 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_RegisterPostStartCallback | ( | SI117XDRV_DeviceSelect_t | device, |
SI117XDRV_Callback_t | callback, | ||
void * | user | ||
) |
Register a post start callback.
[in] | device | select ID |
[in] | callback | function pointer |
[in] | user | parameter to pass to callback function |
Definition at line 1167 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_RegisterPreFifoFlushCallback | ( | SI117XDRV_DeviceSelect_t | device, |
SI117XDRV_Callback_t | callback, | ||
void * | user | ||
) |
Register a pre fifo flush callback.
[in] | device | select ID |
[in] | callback | function pointer |
[in] | user | parameter to pass to callback function |
Definition at line 1201 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_RegisterPreStartCallback | ( | SI117XDRV_DeviceSelect_t | device, |
SI117XDRV_Callback_t | callback, | ||
void * | user | ||
) |
Register a pre start callback.
API configuration functions
[in] | device | select ID |
[in] | callback | function pointer |
[in] | user | parameter to pass to callback function |
Definition at line 1133 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_Reset | ( | SI117XDRV_DeviceSelect_t | device | ) |
Resets the Si117x.
[in] | device | select ID |
Definition at line 249 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_SetECGTaskEnable | ( | SI117XDRV_DeviceSelect_t | device, |
uint8_t | ecgTasks | ||
) |
Configure ECG tasks.
[in] | device | select ID |
[in] | task | enable bits for ECG |
Definition at line 495 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_SetPPGTaskEnable | ( | SI117XDRV_DeviceSelect_t | device, |
uint8_t | ppgTasks | ||
) |
Configure PPG tasks.
[in] | device | select ID |
[in] | task | enable bits for PPG |
Definition at line 466 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_Start | ( | SI117XDRV_DeviceSelect_t | device | ) |
Start running measurements with the current configuration.
[in] | device | select ID |
Definition at line 745 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_StartLegacyPPG | ( | SI117XDRV_DeviceSelect_t | device, |
uint8_t | ppg_meascount, | ||
uint16_t | measrate | ||
) |
Start legacy PPG mode (ECG & BIOZ will be disabled before start) This function overwrites some configuration settings which are then restored in the accompanying Stop function.
Device control functions
[in] | device | select ID |
[in] | ppg_meascount | value to use (overwrites any current setting) |
[in] | measrate | value to use (overwrites any current setting) |
Definition at line 636 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_Stop | ( | SI117XDRV_DeviceSelect_t | device | ) |
Stop running measurements in the Si117x.
[in] | device | select ID |
Definition at line 719 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_StopLegacyPPG | ( | SI117XDRV_DeviceSelect_t | device | ) |
Stop legacy PPG mode (restores ECG & BIOZ tasks as previously set)
[in] | device | select ID |
Definition at line 682 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_WDIntConfig | ( | SI117XDRV_DeviceSelect_t | device, |
bool | enable | ||
) |
Enable/disable wrist detection interrupt.
[in] | device | select ID |
[in] | Set | enable to true to enable interrupt |
Definition at line 604 of file si117xdrv.c.
Si117x_Ecode_t SI117XDRV_WristDetection | ( | SI117XDRV_DeviceSelect_t | device, |
bool * | wristDetectStatus | ||
) |
wrist detection algorithm
[in] | device | select ID |
[in] | pointer | bool to indicate wrist detection status |
Definition at line 1977 of file si117xdrv.c.