Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Maxim Integrated MAX32664C biometric sensor hub. More...

Files

file  max32664c.h
 Header file for extended sensor API of MAX32664C sensor.

Data Structures

struct  max32664c_acc_data_t
 Data structure for external accelerometer data. More...

Macros

#define MAX32664C_MOTION_TIME(ms)
 Converts a motion time in milli-seconds to the corresponding value for the MAX32664C sensor.
#define MAX32664C_MOTION_THRESHOLD(mg)
 Converts a motion threshold in milli-g (Acceleration) to the corresponding value for the MAX32664C sensor.

Enumerations

enum  sensor_channel_max32664c {
  SENSOR_CHAN_MAX32664C_HEARTRATE = SENSOR_CHAN_PRIV_START , SENSOR_CHAN_MAX32664C_BLOOD_OXYGEN_SATURATION , SENSOR_CHAN_MAX32664C_RESPIRATION_RATE , SENSOR_CHAN_MAX32664C_SKIN_CONTACT ,
  SENSOR_CHAN_MAX32664C_ACTIVITY , SENSOR_CHAN_MAX32664C_STEP_COUNTER
}
enum  sensor_attribute_max32664c {
  SENSOR_ATTR_MAX32664C_GENDER = SENSOR_ATTR_PRIV_START , SENSOR_ATTR_MAX32664C_AGE , SENSOR_ATTR_MAX32664C_WEIGHT , SENSOR_ATTR_MAX32664C_HEIGHT ,
  SENSOR_ATTR_MAX32664C_OP_MODE
}
enum  max32664c_device_mode {
  MAX32664C_OP_MODE_IDLE , MAX32664C_OP_MODE_RAW , MAX32664C_OP_MODE_ALGO_AEC , MAX32664C_OP_MODE_ALGO_AEC_EXT ,
  MAX32664C_OP_MODE_ALGO_AGC , MAX32664C_OP_MODE_ALGO_AGC_EXT , MAX32664C_OP_MODE_SCD , MAX32664C_OP_MODE_WAKE_ON_MOTION ,
  MAX32664C_OP_MODE_EXIT_WAKE_ON_MOTION , MAX32664C_OP_MODE_STOP_ALGO
}
 Device operating modes. More...
enum  max32664c_algo_mode { MAX32664C_ALGO_MODE_CONT_HR_CONT_SPO2 , MAX32664C_ALGO_MODE_CONT_HR_SHOT_SPO2 , MAX32664C_ALGO_MODE_CONT_HRM }
 Algorithm modes. More...
enum  max32664c_algo_gender { MAX32664_ALGO_GENDER_MALE , MAX32664_ALGO_GENDER_FEMALE }
 Gender settings. More...
enum  max32664c_algo_activity {
  MAX32664C_ALGO_ACTIVITY_REST , MAX32664C_ALGO_ACTIVITY_OTHER , MAX32664C_ALGO_ACTIVITY_WALK , MAX32664C_ALGO_ACTIVITY_RUN ,
  MAX32664C_ALGO_ACTIVITY_BIKE
}
 Activity classes. More...

Functions

int max32664c_bl_enter (const struct device *dev, const uint8_t *firmware, uint32_t size)
 Enter the bootloader mode and run a firmware update.
int max32664c_bl_leave (const struct device *dev)
 Leave the bootloader and enter the application mode.
int max32664c_acc_fill_fifo (const struct device *dev, struct max32664c_acc_data_t *data, uint8_t length)
 Fill the FIFO buffer with accelerometer data.

Detailed Description

Maxim Integrated MAX32664C biometric sensor hub.

Macro Definition Documentation

◆ MAX32664C_MOTION_THRESHOLD

#define MAX32664C_MOTION_THRESHOLD ( mg)

#include <zephyr/drivers/sensor/max32664c.h>

Value:
((uint8_t)((mg * 16UL) / 1000))
__UINT8_TYPE__ uint8_t
Definition stdint.h:88

Converts a motion threshold in milli-g (Acceleration) to the corresponding value for the MAX32664C sensor.

This macro should be used when configuring the motion based wake up settings for the sensor.

◆ MAX32664C_MOTION_TIME

#define MAX32664C_MOTION_TIME ( ms)

#include <zephyr/drivers/sensor/max32664c.h>

Value:
((uint8_t)((ms * 25UL) / 1000))

Converts a motion time in milli-seconds to the corresponding value for the MAX32664C sensor.

This macro should be used when configuring the motion based wake up settings for the sensor.

Enumeration Type Documentation

◆ max32664c_algo_activity

#include <zephyr/drivers/sensor/max32664c.h>

Activity classes.

This enum defines the supported activity classes for the MAX32664C sensor.

Enumerator
MAX32664C_ALGO_ACTIVITY_REST 

Rest activity.

MAX32664C_ALGO_ACTIVITY_OTHER 

Other activity.

MAX32664C_ALGO_ACTIVITY_WALK 

Walk activity.

MAX32664C_ALGO_ACTIVITY_RUN 

Run activity.

MAX32664C_ALGO_ACTIVITY_BIKE 

Bike activity.

◆ max32664c_algo_gender

#include <zephyr/drivers/sensor/max32664c.h>

Gender settings.

This enum defines the supported gender settings for the MAX32664C sensor.

Enumerator
MAX32664_ALGO_GENDER_MALE 

Male.

MAX32664_ALGO_GENDER_FEMALE 

Female.

◆ max32664c_algo_mode

#include <zephyr/drivers/sensor/max32664c.h>

Algorithm modes.

This enum defines the various algorithm modes supported by the MAX32664C sensor. These modes determine the type of data processing performed by the sensor, such as continuous heart rate monitoring, SpO2 calculation, or activity tracking.

Enumerator
MAX32664C_ALGO_MODE_CONT_HR_CONT_SPO2 

Continuous heart rate and continuous SpO2.

MAX32664C_ALGO_MODE_CONT_HR_SHOT_SPO2 

Continuous heart rate and shot SpO2.

MAX32664C_ALGO_MODE_CONT_HRM 

◆ max32664c_device_mode

#include <zephyr/drivers/sensor/max32664c.h>

Device operating modes.

This enum defines the various operating modes that the MAX32664C sensor can be configured to. These modes control the sensor's behavior and functionality, such as calibration, idle state, raw data output, and algorithm-based operations.

Enumerator
MAX32664C_OP_MODE_IDLE 

Idle mode, no algorithm, sensors or wake on motion running.

MAX32664C_OP_MODE_RAW 

Raw output mode.

MAX32664C_OP_MODE_ALGO_AEC 

Algorithm AEC mode.

MAX32664C_OP_MODE_ALGO_AEC_EXT 

Algorithm with extended reports.

MAX32664C_OP_MODE_ALGO_AGC 

Algorithm AGC mode.

MAX32664C_OP_MODE_ALGO_AGC_EXT 

Algorithm AGC with extended reports.

MAX32664C_OP_MODE_SCD 

SCD only mode.

MAX32664C_OP_MODE_WAKE_ON_MOTION 

Wake on motion mode.

MAX32664C_OP_MODE_EXIT_WAKE_ON_MOTION 

Exit wake on motion mode.

MAX32664C_OP_MODE_STOP_ALGO 

Stop the current algorithm.

◆ sensor_attribute_max32664c

#include <zephyr/drivers/sensor/max32664c.h>

Enumerator
SENSOR_ATTR_MAX32664C_GENDER 

Gender of the subject being monitored.

SENSOR_ATTR_MAX32664C_AGE 

Age of the subject being monitored.

SENSOR_ATTR_MAX32664C_WEIGHT 

Weight of the subject being monitored.

SENSOR_ATTR_MAX32664C_HEIGHT 

Height of the subject being monitored.

SENSOR_ATTR_MAX32664C_OP_MODE 

Get / Set the operation mode of a sensor.

This can be used to switch between different measurement modes when a sensor supports them.

◆ sensor_channel_max32664c

#include <zephyr/drivers/sensor/max32664c.h>

Enumerator
SENSOR_CHAN_MAX32664C_HEARTRATE 

Heart rate value (bpm)

SENSOR_CHAN_MAX32664C_BLOOD_OXYGEN_SATURATION 

SpO2 value (%)

SENSOR_CHAN_MAX32664C_RESPIRATION_RATE 

Respiration rate (breaths per minute)

SENSOR_CHAN_MAX32664C_SKIN_CONTACT 

Skin contact (1 -> Skin contact, 0, no contact)

SENSOR_CHAN_MAX32664C_ACTIVITY 

Activity class (index).

The reported index is vendor specific.

SENSOR_CHAN_MAX32664C_STEP_COUNTER 

Step counter.

Function Documentation

◆ max32664c_acc_fill_fifo()

int max32664c_acc_fill_fifo ( const struct device * dev,
struct max32664c_acc_data_t * data,
uint8_t length )

#include <zephyr/drivers/sensor/max32664c.h>

Fill the FIFO buffer with accelerometer data.

NOTE: This function supports up to 16 samples and it must be called periodically to provide accelerometer data to the MAX32664C!

Parameters
devPointer to device
dataPointer to the accelerometer data structure
lengthNumber of samples to fill
Returns
0 when successful
Attention
Available only when the following Kconfig option is enabled: CONFIG_MAX32664C_USE_EXTERNAL_ACC.

◆ max32664c_bl_enter()

int max32664c_bl_enter ( const struct device * dev,
const uint8_t * firmware,
uint32_t size )

#include <zephyr/drivers/sensor/max32664c.h>

Enter the bootloader mode and run a firmware update.

Parameters
devPointer to device
firmwarePointer to firmware data
sizeSize of the firmware
Returns
0 when successful
Attention
Available only when the following Kconfig option is enabled: CONFIG_MAX32664C_USE_FIRMWARE_LOADER.

◆ max32664c_bl_leave()

int max32664c_bl_leave ( const struct device * dev)

#include <zephyr/drivers/sensor/max32664c.h>

Leave the bootloader and enter the application mode.

Parameters
devPointer to device
Returns
0 when successful
Attention
Available only when the following Kconfig option is enabled: CONFIG_MAX32664C_USE_FIRMWARE_LOADER.