PebbleOS
Loading...
Searching...
No Matches
Data Structures | Macros | Enumerations | Functions
gh3x2x.h File Reference
#include <stdbool.h>
#include <pbl/drivers/exti.h>
#include <pbl/drivers/gpio.h>
#include <pbl/drivers/i2c.h>
#include <applib/app_timer.h>

Data Structures

struct  HRMDevice
 GH3x2x device. More...
 

Macros

#define HRM_PPG_CH_NUM   6
 Number of PPG channels.
 
#define HRM_PPG_FACTORY_TEST_FIFO_LEN   80
 Samples per channel averaged by the factory tests.
 

Enumerations

enum  GH3x2xFTType { HRM_FACTORY_TEST_NONE , HRM_FACTORY_TEST_CTR , HRM_FACTORY_TEST_LIGHT_LEAK , HRM_FACTORY_TEST_HSM }
 Factory test type. More...
 

Functions

bool gh3x2x_ble_data_recv (void *context)
 Queue tuning protocol data received over BLE for processing on the system task.
 
void gh3x2x_wear_evt_notify (bool is_wear)
 Report the wear detection state.
 
void gh3x2x_rawdata_notify (uint32_t *p_rawdata, uint32_t data_count)
 Feed raw PPG data to the factory tests.
 
void gh3x2x_start_ft_ctr (void)
 Start the CTR factory test on the system task.
 
void gh3x2x_start_ft_leakage (void)
 Start the light leakage factory test on the system task.
 
void gh3x2x_factory_test_disable ()
 Stop the running factory test on the system task.
 
void gh3x2x_set_work_mode (int32_t mode)
 Set the sampling functions used when the sensor is next enabled.