Heart rate monitor (HRM) driver interface.
More...
Heart rate monitor (HRM) driver interface.
Used by the HRM manager service; the driver reports readings back to it with hrm_manager_new_data_cb(). The per-implementation HRMDevice definitions live in the HRM driver subgroups.
...
}
bool hrm_enable(HRMDevice *dev, HRMFeature features, bool low_latency)
Enable the HRM.
void hrm_init(HRMDevice *dev)
Initialize the HRM.
void hrm_disable(HRMDevice *dev)
Disable the HRM.
@ HRMFeature_BPM
Heart rate, in beats per minute.
Definition hrm_manager.h:90
◆ hrm_disable()
Disable the HRM.
- Parameters
-
◆ hrm_enable()
Enable the HRM.
Samples the PPG functions needed for the requested features.
- Parameters
-
| dev | HRM device. |
| features | Bitmask of HRMFeature values to collect. |
| low_latency | True for live sessions that need prompt updates (workout, foreground app); false for background logging, where the FIFO can be drained less often to save wakeups since only the final reading matters. |
- Returns
- True if enabled, false if initialization failed.
◆ hrm_init()
Initialize the HRM.
- Parameters
-
◆ hrm_is_enabled()
Check whether the HRM is enabled.
- Parameters
-
- Returns
- True if enabled.
◆ hrm_set_activity_scene()
Tell the HRM which activity is in progress.
Lets the algorithm use a motion-appropriate mode. Safe to call at any time and idempotent.
- Parameters
-
| dev | HRM device. |
| scene | Current activity. |