Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: USBDevice max32630fthr
Fork of MAXREFDES220# by
SSMAX30101Comm Class Reference
SSMAX30101Comm Command handler class for communication with MAX30101 on SmartSensor board. More...
#include <SSMAX30101Comm.h>
Inherits SensorComm.
Public Member Functions | |
SSMAX30101Comm (USBSerial *USB, SSInterface *ssInterface, DSInterface *dsInterface) | |
SSMAX30101Comm constructor. | |
bool | parse_command (const char *cmd) |
Parses DeviceStudio-style commands. | |
int | data_report_execute (char *buf, int size) |
Fill in buffer with sensor data. | |
void | stop () |
Stop collecting data and disable sensor. | |
const char * | get_part_name () |
Get the maxim part number of the device. | |
int | selftest_max30101 () |
Execute the smart sensor self test routine. | |
int | selftest_accelerometer () |
Execute the accelerometer self test routine. | |
bool | self_test_result_evaluate (const char *message, uint8_t value) |
Evaluate the accelerometer self test routine. | |
void | comm_init (MaximSensor *s) |
Initializer for SensorComm. | |
const char * | get_type () |
Get the type of the sensor. | |
int | get_part_info (uint8_t *part_id, uint8_t *part_rev) |
Get the id and revision of the part. | |
bool | is_visible () |
Returns whether the sensor should be visible to users in DeviceStudio. | |
bool | is_enabled () |
Get whether or not the sensor is enabled. |
Detailed Description
SSMAX30101Comm Command handler class for communication with MAX30101 on SmartSensor board.
Definition at line 47 of file SSMAX30101Comm.h.
Constructor & Destructor Documentation
SSMAX30101Comm | ( | USBSerial * | USB, |
SSInterface * | ssInterface, | ||
DSInterface * | dsInterface | ||
) |
SSMAX30101Comm constructor.
Definition at line 55 of file SSMAX30101Comm.cpp.
Member Function Documentation
void comm_init | ( | MaximSensor * | s ) | [inherited] |
Initializer for SensorComm.
- Parameters:
-
[in] s MaximSensor instance to handle sensor commands.
Definition at line 49 of file SensorComm.cpp.
int data_report_execute | ( | char * | buf, |
int | size | ||
) | [virtual] |
Fill in buffer with sensor data.
- Parameters:
-
[in] buf Buffer to fill data into [in] size Maximum size of buffer [out] Number of bytes written to buffer
Reimplemented from SensorComm.
Definition at line 290 of file SSMAX30101Comm.cpp.
int get_part_info | ( | uint8_t * | part_id, |
uint8_t * | part_rev | ||
) | [inherited] |
Get the id and revision of the part.
Definition at line 71 of file SensorComm.cpp.
const char* get_part_name | ( | ) | [virtual] |
Get the maxim part number of the device.
Reimplemented from SensorComm.
Definition at line 82 of file SSMAX30101Comm.h.
const char * get_type | ( | ) | [inherited] |
Get the type of the sensor.
- Parameters:
-
[out] char* to name of type (ie "ppg")
Definition at line 54 of file SensorComm.cpp.
bool is_enabled | ( | ) | [inherited] |
Get whether or not the sensor is enabled.
- Parameters:
-
[out] true if the sensor is enabled
Definition at line 82 of file SensorComm.cpp.
bool is_visible | ( | ) | [inherited] |
Returns whether the sensor should be visible to users in DeviceStudio.
Definition at line 98 of file SensorComm.h.
bool parse_command | ( | const char * | cmd ) | [virtual] |
Parses DeviceStudio-style commands.
Parses and executes commands. Prints return code to i/o device.
- Returns:
- true if sensor acted upon the command, false if command was unknown
Reimplemented from SensorComm.
Definition at line 85 of file SSMAX30101Comm.cpp.
bool self_test_result_evaluate | ( | const char * | message, |
uint8_t | value | ||
) |
Evaluate the accelerometer self test routine.
- Parameters:
-
message - message to be printed in the failure cases value - result of the self test passed as parameter
- Returns:
- true if result is SUCCESSFULL false otherwise
Definition at line 430 of file SSMAX30101Comm.cpp.
int selftest_accelerometer | ( | ) |
Execute the accelerometer self test routine.
- Returns:
- SS_SUCCESS or error code
Definition at line 407 of file SSMAX30101Comm.cpp.
int selftest_max30101 | ( | ) |
Execute the smart sensor self test routine.
- Returns:
- SS_SUCCESS or error code
Definition at line 381 of file SSMAX30101Comm.cpp.
void stop | ( | ) | [virtual] |
Stop collecting data and disable sensor.
Reimplemented from SensorComm.
Definition at line 72 of file SSMAX30101Comm.cpp.
Generated on Mon Jul 18 2022 23:37:28 by
