Pegasus implementation of SmartSensor Host
Dependencies: USBDevice max32630fthr
Fork of MAXREFDES220# by
Finger Heart Rate Monitor and SpO2 Monitor
The MAXREFDES220 Smart Sensor FeatherWing board is a integrated solution for providing finger-based heart rate measurements and SpO2 (blood oxygen saturation). This evaluation board interfaces to the host computer using the I2C interface. Heart rate outpu is available in beats per minute (BPM) and SpO2 is reported in percentages.; the PPG (photoplethysmography) raw data is also available. The board has an MAX30101 chip which is a low power heart rate monitor with adjustable sample rates and adjustable LED currents. The low cost MAX32664 microcontroller is pre-flashed with C code for finger-based pulse rate and SpO2 monitoring. Bootloader software is included to allow for future algorithms or updates to the algorithm from Maxim Integrated.
Ordering information will be available soon.
Note: SpO2 values are not calibrated. Calibration should be performed using the final end product.
MAXREFDES220 FeatherWing Pinout Connections
Makefile@3:28fb38fe73c4, 2018-04-11 (annotated)
- Committer:
- Shaun Kelsey
- Date:
- Wed Apr 11 16:55:26 2018 -0700
- Revision:
- 3:28fb38fe73c4
- Parent:
- 1:7a55c0c7d6d9
Define MAXIM_PLATFORM_NAME
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Shaun Kelsey |
0:da5f5b56060a | 1 | STACK_SIZE=0x30000 |
Shaun Kelsey |
0:da5f5b56060a | 2 | HEAP_SIZE=0x30000 |
Shaun Kelsey |
0:da5f5b56060a | 3 | |
Shaun Kelsey |
0:da5f5b56060a | 4 | PROJECT_PATH=$(realpath ./) |
Shaun Kelsey |
0:da5f5b56060a | 5 | PROJECT_NAME=$(shell basename $(realpath ./)) |
Shaun Kelsey |
0:da5f5b56060a | 6 | PROJECT_BUILD_PATH=$(realpath BUILD/) |
Shaun Kelsey |
0:da5f5b56060a | 7 | PROJECT_TOOLS_PATH=$(realpath tools/) |
Shaun Kelsey |
0:da5f5b56060a | 8 | PROJECT_CONFIGS_PATH=$(realpath configs/) |
Shaun Kelsey |
0:da5f5b56060a | 9 | PROJECT_TOOLCHAIN=GCC_ARM |
Shaun Kelsey |
0:da5f5b56060a | 10 | PROJECT_SCM_BRANCH=$(shell git rev-parse --abbrev-ref HEAD) |
Shaun Kelsey |
0:da5f5b56060a | 11 | PROJECT_SCM_HASH=$(shell git rev-parse HEAD) |
Shaun Kelsey |
0:da5f5b56060a | 12 | -include .config |
Shaun Kelsey |
0:da5f5b56060a | 13 | |
Shaun Kelsey |
0:da5f5b56060a | 14 | ALGO_DIR = Algorithms/ |
Shaun Kelsey |
0:da5f5b56060a | 15 | DRIVERS_DIR = Drivers/ |
Shaun Kelsey |
0:da5f5b56060a | 16 | INTERFACES_DIR = Interfaces/ |
Shaun Kelsey |
0:da5f5b56060a | 17 | SCOMMS_DIR = $(INTERFACES_DIR)/SensorComm/ |
Shaun Kelsey |
0:da5f5b56060a | 18 | DSINT_DIR = $(INTERFACES_DIR)/DeviceStudio/ |
Shaun Kelsey |
0:da5f5b56060a | 19 | SSCOMMS_DIR = $(SCOMMS_DIR)/SmartSensorComm/ |
Shaun Kelsey |
0:da5f5b56060a | 20 | SSINT_DIR = $(INTERFACES_DIR)/SmartSensor/ |
Shaun Kelsey |
0:da5f5b56060a | 21 | PLATFORMS_DIR = Platforms/ |
Shaun Kelsey |
0:da5f5b56060a | 22 | |
Shaun Kelsey |
0:da5f5b56060a | 23 | EXTERNAL_SOURCES += mbed-os |
Shaun Kelsey |
0:da5f5b56060a | 24 | EXTERNAL_SOURCES += $(DRIVERS_DIR)USBDevice |
Shaun Kelsey |
0:da5f5b56060a | 25 | PROJECT_SOURCES += $(wildcard *.cpp) |
Shaun Kelsey |
0:da5f5b56060a | 26 | PROJECT_SOURCES += $(wildcard *.h) |
Shaun Kelsey |
0:da5f5b56060a | 27 | PROJECT_SOURCES += $(SCOMMS_DIR)/SensorComm |
Shaun Kelsey |
0:da5f5b56060a | 28 | PROJECT_SOURCES += $(DSINT_DIR) |
Shaun Kelsey |
0:da5f5b56060a | 29 | PROJECT_SOURCES += $(DRIVERS_DIR)MaximSensor |
Shaun Kelsey |
0:da5f5b56060a | 30 | PROJECT_SOURCES += Utilities |
Shaun Kelsey |
0:da5f5b56060a | 31 | |
Shaun Kelsey |
0:da5f5b56060a | 32 | CONFIG_FLAGS += PLATFORM_MAX32630FTHR |
Shaun Kelsey |
0:da5f5b56060a | 33 | CONFIG_PLATFORM_NAME=MAX32630FTHR |
Shaun Kelsey |
0:da5f5b56060a | 34 | EXTERNAL_SOURCES += $(PLATFORMS_DIR)max32630fthr |
Shaun Kelsey |
0:da5f5b56060a | 35 | CONFIG_FLAGS += MAXIM_PLATFORM_NAME=\"$(CONFIG_MAXIM_PLATFORM_NAME)\" |
Shaun Kelsey |
0:da5f5b56060a | 36 | |
Shaun Kelsey |
0:da5f5b56060a | 37 | |
Shaun Kelsey |
0:da5f5b56060a | 38 | ifeq ($(CONFIG_ENABLE_LED_STATUS), y) |
Shaun Kelsey |
0:da5f5b56060a | 39 | CONFIG_FLAGS += ENABLE_LED_STATUS |
Shaun Kelsey |
0:da5f5b56060a | 40 | endif |
Shaun Kelsey |
0:da5f5b56060a | 41 | |
Shaun Kelsey |
0:da5f5b56060a | 42 | CONFIG_FLAGS += ENABLE_SMARTSENSOR |
Shaun Kelsey |
0:da5f5b56060a | 43 | PROJECT_SOURCES += $(SSINT_DIR) |
Shaun Kelsey |
0:da5f5b56060a | 44 | |
Shaun Kelsey |
0:da5f5b56060a | 45 | CONFIG_FLAGS += ENABLE_SS_BOOTLOADER |
Shaun Kelsey |
0:da5f5b56060a | 46 | PROJECT_SOURCES += $(SSCOMMS_DIR)SSBootloader |
Shaun Kelsey |
0:da5f5b56060a | 47 | |
Shaun Kelsey |
0:da5f5b56060a | 48 | CONFIG_FLAGS += ENABLE_SS_MAX30101 |
Shaun Kelsey |
0:da5f5b56060a | 49 | PROJECT_SOURCES += $(SSCOMMS_DIR)SSMAX30101 |
Shaun Kelsey |
0:da5f5b56060a | 50 | |
Shaun Kelsey |
0:da5f5b56060a | 51 | ifeq ($(CONFIG_ASCII_COMM), y) |
Shaun Kelsey |
0:da5f5b56060a | 52 | CONFIG_FLAGS += ASCII_COMM |
Shaun Kelsey |
0:da5f5b56060a | 53 | endif |
Shaun Kelsey |
0:da5f5b56060a | 54 | |
Shaun Kelsey |
0:da5f5b56060a | 55 | ifeq ($(CONFIG_SHOW_DEBUG_MSGS), y) |
Shaun Kelsey |
0:da5f5b56060a | 56 | CONFIG_FLAGS += SHOW_DEBUG_MSGS |
Shaun Kelsey |
0:da5f5b56060a | 57 | endif |
Shaun Kelsey |
0:da5f5b56060a | 58 | ifeq ($(CONFIG_SHOW_INFO_MSGS), y) |
Shaun Kelsey |
0:da5f5b56060a | 59 | CONFIG_FLAGS += SHOW_INFO_MSGS |
Shaun Kelsey |
0:da5f5b56060a | 60 | endif |
Shaun Kelsey |
0:da5f5b56060a | 61 | |
Shaun Kelsey |
0:da5f5b56060a | 62 | ifeq ($(V), 1) |
Shaun Kelsey |
0:da5f5b56060a | 63 | BUILD_VERBOSE = -v |
Shaun Kelsey |
0:da5f5b56060a | 64 | endif |
Shaun Kelsey |
0:da5f5b56060a | 65 | |
Shaun Kelsey |
0:da5f5b56060a | 66 | SRC_ARGS += $(addprefix --source $(PROJECT_PATH)/, $(EXTERNAL_SOURCES)) |
Shaun Kelsey |
0:da5f5b56060a | 67 | SRC_ARGS += $(addprefix --source $(PROJECT_PATH)/, $(PROJECT_SOURCES)) |
Shaun Kelsey |
0:da5f5b56060a | 68 | CFG_ARGS = $(addprefix -D, $(CONFIG_FLAGS)) |
Shaun Kelsey |
0:da5f5b56060a | 69 | |
Shaun Kelsey |
0:da5f5b56060a | 70 | $(info SELECTED_CONFIG=$(CONFIG_CONFIG_NAME)) |
Shaun Kelsey |
0:da5f5b56060a | 71 | $(info CONFIG_PLATFORM_NAME=$(CONFIG_PLATFORM_NAME) CONFIG_MAXIM_PLATFORM_NAME=$(CONFIG_MAXIM_PLATFORM_NAME) CONFIG_FLAGS=$(CONFIG_FLAGS)) |
Shaun Kelsey |
0:da5f5b56060a | 72 | $(info PROJECT_SOURCES=$(PROJECT_SOURCES)) |
Shaun Kelsey |
0:da5f5b56060a | 73 | $(info EXTERNAL_SOURCES=$(EXTERNAL_SOURCES)) |
Shaun Kelsey |
0:da5f5b56060a | 74 | |
Shaun Kelsey |
0:da5f5b56060a | 75 | |
Shaun Kelsey |
0:da5f5b56060a | 76 | ## BEGIN MAKEFILE RULES ## |
Shaun Kelsey |
1:7a55c0c7d6d9 | 77 | all: |
Shaun Kelsey |
0:da5f5b56060a | 78 | @if [ -f $(CONFIG_CONFIG_NAME) ]; then \ |
Shaun Kelsey |
0:da5f5b56060a | 79 | printf "NO CONFIG SELECTED!\n"; \ |
Shaun Kelsey |
0:da5f5b56060a | 80 | exit 1; \ |
Shaun Kelsey |
0:da5f5b56060a | 81 | fi; |
Shaun Kelsey |
0:da5f5b56060a | 82 | @if [ ! -f .checkout ]; then \ |
Shaun Kelsey |
0:da5f5b56060a | 83 | $(MAKE) checkout ; \ |
Shaun Kelsey |
0:da5f5b56060a | 84 | fi; |
Shaun Kelsey |
0:da5f5b56060a | 85 | mbed compile -t $(PROJECT_TOOLCHAIN) -m $(CONFIG_PLATFORM_NAME) -D__STACK_SIZE=$(STACK_SIZE) -D__HEAP_SIZE=$(HEAP_SIZE) $(BUILD_VERBOSE) $(CFG_ARGS) $(SRC_ARGS) |
Shaun Kelsey |
0:da5f5b56060a | 86 | debug_build: |
Shaun Kelsey |
0:da5f5b56060a | 87 | mbed compile -t $(PROJECT_TOOLCHAIN) -m $(CONFIG_PLATFORM_NAME) -D__STACK_SIZE=$(STACK_SIZE) -D__HEAP_SIZE=$(HEAP_SIZE) $(BUILD_VERBOSE) $(CFG_ARGS) $(SRC_ARGS) --profile $(PROJECT_PATH)/debug_oldmbedos.json |
Shaun Kelsey |
0:da5f5b56060a | 88 | |
Shaun Kelsey |
0:da5f5b56060a | 89 | clean_build: |
Shaun Kelsey |
0:da5f5b56060a | 90 | mbed compile -t $(PROJECT_TOOLCHAIN) -m $(CONFIG_PLATFORM_NAME) -D__STACK_SIZE=$(STACK_SIZE) -D__HEAP_SIZE=$(HEAP_SIZE) -c $(BUILD_VERBOSE) $(CFG_ARGS) $(SRC_ARGS) |
Shaun Kelsey |
0:da5f5b56060a | 91 | |
Shaun Kelsey |
0:da5f5b56060a | 92 | werror_build: |
Shaun Kelsey |
0:da5f5b56060a | 93 | mbed compile -t $(PROJECT_TOOLCHAIN) -m $(CONFIG_PLATFORM_NAME) -D__STACK_SIZE=$(STACK_SIZE) -D__HEAP_SIZE=$(HEAP_SIZE) -c $(BUILD_VERBOSE) $(CFG_ARGS) $(SRC_ARGS) --profile $(PROJECT_PATH)/werror_build_profile.json |
Shaun Kelsey |
0:da5f5b56060a | 94 | |
Shaun Kelsey |
0:da5f5b56060a | 95 | clean: |
Shaun Kelsey |
0:da5f5b56060a | 96 | rm -rf $(PROJECT_BUILD_PATH) |
Shaun Kelsey |
0:da5f5b56060a | 97 | |
Shaun Kelsey |
0:da5f5b56060a | 98 | co: checkout |
Shaun Kelsey |
0:da5f5b56060a | 99 | |
Shaun Kelsey |
0:da5f5b56060a | 100 | checkout: |
Shaun Kelsey |
0:da5f5b56060a | 101 | @echo "Downloading libraries" |
Shaun Kelsey |
0:da5f5b56060a | 102 | mbed deploy |
Shaun Kelsey |
0:da5f5b56060a | 103 | @touch .$@ |
Shaun Kelsey |
0:da5f5b56060a | 104 | |
Shaun Kelsey |
0:da5f5b56060a | 105 | doxygen: |
Shaun Kelsey |
0:da5f5b56060a | 106 | mkdir -p $(PROJECT_BUILD_PATH) |
Shaun Kelsey |
0:da5f5b56060a | 107 | export PROJECT_SOURCES="$(PROJECT_SOURCES)"; \ |
Shaun Kelsey |
0:da5f5b56060a | 108 | export PROJECT_SCM_HASH="$(PROJECT_SCM_HASH)"; \ |
Shaun Kelsey |
0:da5f5b56060a | 109 | doxygen doxygen.conf |
Shaun Kelsey |
0:da5f5b56060a | 110 | start $(PROJECT_BUILD_PATH)/doc/html/index.html |
Shaun Kelsey |
0:da5f5b56060a | 111 | |
Shaun Kelsey |
0:da5f5b56060a | 112 | ## END MAKEFILE RULES ## |
Shaun Kelsey |
0:da5f5b56060a | 113 |