|
PebbleOS
|
Heart rate monitor implementation for the Goodix GH3x2x sensors. More...
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. | |
Heart rate monitor implementation for the Goodix GH3x2x sensors.
Also exposes the hooks used by the vendor library and the manufacturing tests.
| struct HRMDevice |
GH3x2x device.
QEMU HRM device.
| Data Fields | ||
|---|---|---|
| I2CSlavePort * | i2c | Sensor I2C port. |
| ExtiConfig | int_exti | Sensor interrupt line. |
| InputConfig | int_input | Sensor interrupt line, as an input. |
| OutputConfig | reset_gpio | Sensor reset line. |
| HRMDeviceState * | state | Driver runtime state. |
| #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.
| enum GH3x2xFTType |
| bool gh3x2x_ble_data_recv | ( | void * | context | ) |
Queue tuning protocol data received over BLE for processing on the system task.
Only with CONFIG_BT_GH3X2X_TUNING_SERVICE.
| context | Heap buffer holding a 32-bit length followed by the data; freed once processed. |
| void gh3x2x_factory_test_disable | ( | ) |
Stop the running factory test on the system task.
MFG builds only.
| void gh3x2x_rawdata_notify | ( | uint32_t * | p_rawdata, |
| uint32_t | data_count | ||
| ) |
Feed raw PPG data to the factory tests.
Does nothing unless a factory test is running (MFG builds only).
| p_rawdata | Raw samples, interleaved over HRM_PPG_CH_NUM channels. |
| data_count | Number of values in p_rawdata. |
| void gh3x2x_set_work_mode | ( | int32_t | mode | ) |
Set the sampling functions used when the sensor is next enabled.
Soft wear detection is always added. MFG builds only.
| mode | Bitmask of GH3X2X_FUNCTION_* values. |
| void gh3x2x_start_ft_ctr | ( | void | ) |
Start the CTR factory test on the system task.
Results are reported through the HRM manager as HRMFeature_CTR data. MFG builds only.
| void gh3x2x_start_ft_leakage | ( | void | ) |
Start the light leakage factory test on the system task.
Results are reported through the HRM manager as HRMFeature_Leakage data. MFG builds only.
| void gh3x2x_wear_evt_notify | ( | bool | is_wear | ) |
Report the wear detection state.
| is_wear | True if the watch is worn. |