Pegasus implementation of SmartSensor Host

Dependencies:   USBDevice max32630fthr

Fork of MAXREFDES220# by Maxim Integrated

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

/media/uploads/phonemacro/maxrefdes220_pinouts_heart_rate_monitor3.jpg

Committer:
Shaun Kelsey
Date:
Wed Apr 11 16:55:26 2018 -0700
Revision:
3:28fb38fe73c4
Parent:
0:da5f5b56060a
Define MAXIM_PLATFORM_NAME

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Shaun Kelsey 0:da5f5b56060a 1 /***************************************************************************
Shaun Kelsey 0:da5f5b56060a 2 * Copyright (C) 2017 Maxim Integrated Products, Inc., All Rights Reserved.
Shaun Kelsey 0:da5f5b56060a 3 *
Shaun Kelsey 0:da5f5b56060a 4 * Permission is hereby granted, free of charge, to any person obtaining a
Shaun Kelsey 0:da5f5b56060a 5 * copy of this software and associated documentation files (the "Software"),
Shaun Kelsey 0:da5f5b56060a 6 * to deal in the Software without restriction, including without limitation
Shaun Kelsey 0:da5f5b56060a 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
Shaun Kelsey 0:da5f5b56060a 8 * and/or sell copies of the Software, and to permit persons to whom the
Shaun Kelsey 0:da5f5b56060a 9 * Software is furnished to do so, subject to the following conditions:
Shaun Kelsey 0:da5f5b56060a 10 *
Shaun Kelsey 0:da5f5b56060a 11 * The above copyright notice and this permission notice shall be included
Shaun Kelsey 0:da5f5b56060a 12 * in all copies or substantial portions of the Software.
Shaun Kelsey 0:da5f5b56060a 13 *
Shaun Kelsey 0:da5f5b56060a 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
Shaun Kelsey 0:da5f5b56060a 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Shaun Kelsey 0:da5f5b56060a 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Shaun Kelsey 0:da5f5b56060a 17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
Shaun Kelsey 0:da5f5b56060a 18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
Shaun Kelsey 0:da5f5b56060a 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
Shaun Kelsey 0:da5f5b56060a 20 * OTHER DEALINGS IN THE SOFTWARE.
Shaun Kelsey 0:da5f5b56060a 21 *
Shaun Kelsey 0:da5f5b56060a 22 * Except as contained in this notice, the name of Maxim Integrated
Shaun Kelsey 0:da5f5b56060a 23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
Shaun Kelsey 0:da5f5b56060a 24 * Products, Inc. Branding Policy.
Shaun Kelsey 0:da5f5b56060a 25 *
Shaun Kelsey 0:da5f5b56060a 26 * The mere transfer of this software does not imply any licenses
Shaun Kelsey 0:da5f5b56060a 27 * of trade secrets, proprietary technology, copyrights, patents,
Shaun Kelsey 0:da5f5b56060a 28 * trademarks, maskwork rights, or any other form of intellectual
Shaun Kelsey 0:da5f5b56060a 29 * property whatsoever. Maxim Integrated Products, Inc. retains all
Shaun Kelsey 0:da5f5b56060a 30 * ownership rights.
Shaun Kelsey 0:da5f5b56060a 31 ****************************************************************************
Shaun Kelsey 0:da5f5b56060a 32 */
Shaun Kelsey 0:da5f5b56060a 33
Shaun Kelsey 0:da5f5b56060a 34 #include <ctype.h>
Shaun Kelsey 0:da5f5b56060a 35 #include <string.h>
Shaun Kelsey 0:da5f5b56060a 36 #include "DSInterface.h"
Shaun Kelsey 0:da5f5b56060a 37 #include "../version.h"
Shaun Kelsey 0:da5f5b56060a 38 #include "Peripherals.h"
Shaun Kelsey 0:da5f5b56060a 39 #include "assert.h"
Shaun Kelsey 0:da5f5b56060a 40
Shaun Kelsey 0:da5f5b56060a 41 static const char *glbl_cmds[] = {
Shaun Kelsey 0:da5f5b56060a 42 "stop",
Shaun Kelsey 0:da5f5b56060a 43 "get_device_info",
Shaun Kelsey 0:da5f5b56060a 44 "silent_mode 0",
Shaun Kelsey 0:da5f5b56060a 45 "silent_mode 1",
Shaun Kelsey 0:da5f5b56060a 46 "pause 0",
Shaun Kelsey 0:da5f5b56060a 47 "pause 1",
Shaun Kelsey 0:da5f5b56060a 48 "enable console",
Shaun Kelsey 0:da5f5b56060a 49 "disable console",
Shaun Kelsey 0:da5f5b56060a 50 };
Shaun Kelsey 0:da5f5b56060a 51
Shaun Kelsey 0:da5f5b56060a 52 typedef enum {
Shaun Kelsey 0:da5f5b56060a 53 stop=0,
Shaun Kelsey 0:da5f5b56060a 54 get_device_info,
Shaun Kelsey 0:da5f5b56060a 55 silent0_mode,
Shaun Kelsey 0:da5f5b56060a 56 silent1_mode,
Shaun Kelsey 0:da5f5b56060a 57 pause0_mode,
Shaun Kelsey 0:da5f5b56060a 58 pause1_mode,
Shaun Kelsey 0:da5f5b56060a 59 enable_console,
Shaun Kelsey 0:da5f5b56060a 60 disable_console,
Shaun Kelsey 0:da5f5b56060a 61 NUM_CMDS,
Shaun Kelsey 0:da5f5b56060a 62 } glbl_cmd_state;
Shaun Kelsey 0:da5f5b56060a 63
Shaun Kelsey 0:da5f5b56060a 64
Shaun Kelsey 0:da5f5b56060a 65 DSInterface::DSInterface(USBSerial* USB)
Shaun Kelsey 0:da5f5b56060a 66 {
Shaun Kelsey 0:da5f5b56060a 67 cmd_idx = 0;
Shaun Kelsey 0:da5f5b56060a 68 silent_mode = false;
Shaun Kelsey 0:da5f5b56060a 69 pause_mode = false;
Shaun Kelsey 0:da5f5b56060a 70
Shaun Kelsey 0:da5f5b56060a 71 memset(sensor_list, 0, DS_MAX_NUM_SENSORCOMMS * sizeof(SensorComm*));
Shaun Kelsey 0:da5f5b56060a 72 num_sensors = 0;
Shaun Kelsey 0:da5f5b56060a 73
Shaun Kelsey 0:da5f5b56060a 74 m_USB = USB;
Shaun Kelsey 0:da5f5b56060a 75
Shaun Kelsey 0:da5f5b56060a 76 data_report_mode = 0;
Shaun Kelsey 0:da5f5b56060a 77 console_interface_exists = false;
Shaun Kelsey 0:da5f5b56060a 78 }
Shaun Kelsey 0:da5f5b56060a 79
Shaun Kelsey 0:da5f5b56060a 80 DSInterface::~DSInterface()
Shaun Kelsey 0:da5f5b56060a 81 {
Shaun Kelsey 0:da5f5b56060a 82 }
Shaun Kelsey 0:da5f5b56060a 83
Shaun Kelsey 0:da5f5b56060a 84 void DSInterface::add_sensor_comm(SensorComm *s)
Shaun Kelsey 0:da5f5b56060a 85 {
Shaun Kelsey 0:da5f5b56060a 86 assert_msg(num_sensors < DS_MAX_NUM_SENSORCOMMS, "Too many sensors added to DSInterface. Increase DS_MAX_NUM_SENSORCOMMS.");
Shaun Kelsey 0:da5f5b56060a 87 sensor_list[num_sensors++] = s;
Shaun Kelsey 0:da5f5b56060a 88 }
Shaun Kelsey 0:da5f5b56060a 89
Shaun Kelsey 0:da5f5b56060a 90 void DSInterface::enable_console_interface()
Shaun Kelsey 0:da5f5b56060a 91 {
Shaun Kelsey 0:da5f5b56060a 92 console_interface_exists = true;
Shaun Kelsey 0:da5f5b56060a 93 }
Shaun Kelsey 0:da5f5b56060a 94
Shaun Kelsey 0:da5f5b56060a 95 void DSInterface::build_command(char ch)
Shaun Kelsey 0:da5f5b56060a 96 {
Shaun Kelsey 0:da5f5b56060a 97 if (!this->silent_mode) /* BUG: POTENTIAL BUG, what uart port to echo, not only console */
Shaun Kelsey 0:da5f5b56060a 98 m_USB->printf("%c", ch);
Shaun Kelsey 0:da5f5b56060a 99
Shaun Kelsey 0:da5f5b56060a 100 if (ch == 0x00) {
Shaun Kelsey 0:da5f5b56060a 101 pr_err("Ignored char 0x00");
Shaun Kelsey 0:da5f5b56060a 102 return;
Shaun Kelsey 0:da5f5b56060a 103 }
Shaun Kelsey 0:da5f5b56060a 104
Shaun Kelsey 0:da5f5b56060a 105 if ((ch == '\n') || (ch == '\r')) {
Shaun Kelsey 0:da5f5b56060a 106 if (cmd_idx < (int) SENSOR_STR_BUF_SZ)
Shaun Kelsey 0:da5f5b56060a 107 cmd_str[cmd_idx++] = '\0';
Shaun Kelsey 0:da5f5b56060a 108 m_USB->printf("\r\n");
Shaun Kelsey 0:da5f5b56060a 109 parse_command();
Shaun Kelsey 0:da5f5b56060a 110
Shaun Kelsey 0:da5f5b56060a 111 //Clear cmd_str
Shaun Kelsey 0:da5f5b56060a 112 while (cmd_idx > 0) /* BUG: POTENTIAL BUG for multiple port access */
Shaun Kelsey 0:da5f5b56060a 113 cmd_str[--cmd_idx] = '\0';
Shaun Kelsey 0:da5f5b56060a 114
Shaun Kelsey 0:da5f5b56060a 115 } else if ((ch == 0x08 || ch == 0x7F) && cmd_idx > 0) {
Shaun Kelsey 0:da5f5b56060a 116 //Backspace character
Shaun Kelsey 0:da5f5b56060a 117 if (cmd_idx > 0)
Shaun Kelsey 0:da5f5b56060a 118 cmd_str[--cmd_idx] = '\0';
Shaun Kelsey 0:da5f5b56060a 119 } else {
Shaun Kelsey 0:da5f5b56060a 120 /* BUG: POTENTIAL BUG for multiple port access */
Shaun Kelsey 0:da5f5b56060a 121 if (cmd_idx < (int) SENSOR_STR_BUF_SZ)
Shaun Kelsey 0:da5f5b56060a 122 cmd_str[cmd_idx++] = ch;
Shaun Kelsey 0:da5f5b56060a 123 }
Shaun Kelsey 0:da5f5b56060a 124
Shaun Kelsey 0:da5f5b56060a 125 }
Shaun Kelsey 0:da5f5b56060a 126
Shaun Kelsey 0:da5f5b56060a 127 void DSInterface::parse_command()
Shaun Kelsey 0:da5f5b56060a 128 {
Shaun Kelsey 0:da5f5b56060a 129 char *ptr_ch;
Shaun Kelsey 0:da5f5b56060a 130 int i;
Shaun Kelsey 0:da5f5b56060a 131 glbl_cmd_state cmd;
Shaun Kelsey 0:da5f5b56060a 132 char charbuf[512];
Shaun Kelsey 0:da5f5b56060a 133 int data_len = 0;
Shaun Kelsey 0:da5f5b56060a 134 int ret;
Shaun Kelsey 0:da5f5b56060a 135
Shaun Kelsey 0:da5f5b56060a 136
Shaun Kelsey 0:da5f5b56060a 137
Shaun Kelsey 0:da5f5b56060a 138 //If top level command, then handle it
Shaun Kelsey 0:da5f5b56060a 139 for (i = 0; i < NUM_CMDS; i++) {
Shaun Kelsey 0:da5f5b56060a 140 ptr_ch = strstr(cmd_str, glbl_cmds[i]);
Shaun Kelsey 0:da5f5b56060a 141 if (*ptr_ch) {
Shaun Kelsey 0:da5f5b56060a 142 cmd = (glbl_cmd_state)i;
Shaun Kelsey 0:da5f5b56060a 143
Shaun Kelsey 0:da5f5b56060a 144 switch (cmd) {
Shaun Kelsey 0:da5f5b56060a 145 case (stop): {
Shaun Kelsey 0:da5f5b56060a 146 for (int i = 0; i < num_sensors; i++) {
Shaun Kelsey 0:da5f5b56060a 147 sensor_list[i]->stop();
Shaun Kelsey 0:da5f5b56060a 148 }
Shaun Kelsey 0:da5f5b56060a 149
Shaun Kelsey 0:da5f5b56060a 150 m_USB->printf("\r\n%s err=0\r\n", ptr_ch);
Shaun Kelsey 0:da5f5b56060a 151 } break;
Shaun Kelsey 0:da5f5b56060a 152 case (get_device_info): {
Shaun Kelsey 0:da5f5b56060a 153 data_len = snprintf(charbuf, sizeof(charbuf),
Shaun Kelsey 0:da5f5b56060a 154 "\r\n%s platform=%s firmware_ver=%s sensors=", ptr_ch, platform_name, firmware_version);
Shaun Kelsey 0:da5f5b56060a 155
Shaun Kelsey 0:da5f5b56060a 156 //Add list of sensors
Shaun Kelsey 0:da5f5b56060a 157 for (int i = 0; i < num_sensors; i++) {
Shaun Kelsey 0:da5f5b56060a 158 if (sensor_list[i]->is_visible()) {
Shaun Kelsey 0:da5f5b56060a 159 data_len += snprintf(charbuf + data_len, sizeof(charbuf) - data_len,
Shaun Kelsey 0:da5f5b56060a 160 "%s", sensor_list[i]->get_type());
Shaun Kelsey 0:da5f5b56060a 161 if (i < (num_sensors - 1))
Shaun Kelsey 0:da5f5b56060a 162 data_len += snprintf(charbuf + data_len, sizeof(charbuf) - data_len, ",");
Shaun Kelsey 0:da5f5b56060a 163 }
Shaun Kelsey 0:da5f5b56060a 164 }
Shaun Kelsey 0:da5f5b56060a 165
Shaun Kelsey 0:da5f5b56060a 166
Shaun Kelsey 0:da5f5b56060a 167 for (int i = 0; i < num_sensors; i++) {
Shaun Kelsey 0:da5f5b56060a 168 SensorComm *s = sensor_list[i];
Shaun Kelsey 0:da5f5b56060a 169 if (!s->is_visible())
Shaun Kelsey 0:da5f5b56060a 170 continue;
Shaun Kelsey 0:da5f5b56060a 171
Shaun Kelsey 0:da5f5b56060a 172 //Add part name
Shaun Kelsey 0:da5f5b56060a 173 data_len += snprintf(charbuf + data_len, sizeof(charbuf) - data_len,
Shaun Kelsey 0:da5f5b56060a 174 " part_name_%s=%s", s->get_type(), s->get_part_name());
Shaun Kelsey 0:da5f5b56060a 175
Shaun Kelsey 0:da5f5b56060a 176 uint8_t part_id, part_rev;
Shaun Kelsey 0:da5f5b56060a 177 ret = s->get_part_info(&part_id, &part_rev);
Shaun Kelsey 0:da5f5b56060a 178
Shaun Kelsey 0:da5f5b56060a 179 if (ret == 0) {
Shaun Kelsey 0:da5f5b56060a 180 //Add part id
Shaun Kelsey 0:da5f5b56060a 181 data_len += snprintf(charbuf + data_len, sizeof(charbuf) - data_len,
Shaun Kelsey 0:da5f5b56060a 182 " part_id_%s=%d", s->get_type(), part_id);
Shaun Kelsey 0:da5f5b56060a 183
Shaun Kelsey 0:da5f5b56060a 184 //Add rev id
Shaun Kelsey 0:da5f5b56060a 185 data_len += snprintf(charbuf + data_len, sizeof(charbuf) - data_len,
Shaun Kelsey 0:da5f5b56060a 186 " part_rev_%s=%d", s->get_type(), part_rev);
Shaun Kelsey 0:da5f5b56060a 187 }
Shaun Kelsey 0:da5f5b56060a 188 }
Shaun Kelsey 0:da5f5b56060a 189
Shaun Kelsey 0:da5f5b56060a 190
Shaun Kelsey 0:da5f5b56060a 191 snprintf(charbuf + data_len, sizeof(charbuf) - data_len, " err=0\r\n");
Shaun Kelsey 0:da5f5b56060a 192 m_USB->printf(charbuf);
Shaun Kelsey 0:da5f5b56060a 193
Shaun Kelsey 0:da5f5b56060a 194 } break;
Shaun Kelsey 0:da5f5b56060a 195 case (silent0_mode): {
Shaun Kelsey 0:da5f5b56060a 196 silent_mode = false;
Shaun Kelsey 0:da5f5b56060a 197 m_USB->printf("\r\n%s err=0\r\n", ptr_ch);
Shaun Kelsey 0:da5f5b56060a 198 } break;
Shaun Kelsey 0:da5f5b56060a 199 case (silent1_mode): {
Shaun Kelsey 0:da5f5b56060a 200 silent_mode = true;
Shaun Kelsey 0:da5f5b56060a 201 m_USB->printf("\r\n%s err=0\r\n", ptr_ch);
Shaun Kelsey 0:da5f5b56060a 202 } break;
Shaun Kelsey 0:da5f5b56060a 203 case (pause0_mode): {
Shaun Kelsey 0:da5f5b56060a 204 pause_mode = false;
Shaun Kelsey 0:da5f5b56060a 205 m_USB->printf("\r\n%s err=0\r\n", ptr_ch);
Shaun Kelsey 0:da5f5b56060a 206 } break;
Shaun Kelsey 0:da5f5b56060a 207 case (pause1_mode): {
Shaun Kelsey 0:da5f5b56060a 208 pause_mode = true;
Shaun Kelsey 0:da5f5b56060a 209 m_USB->printf("\r\n%s err=0\r\n", ptr_ch);
Shaun Kelsey 0:da5f5b56060a 210 } break;
Shaun Kelsey 0:da5f5b56060a 211 case (enable_console): {
Shaun Kelsey 0:da5f5b56060a 212 console_interface_exists = true;
Shaun Kelsey 0:da5f5b56060a 213 m_USB->printf("\r\n%s err=0\r\n", ptr_ch);
Shaun Kelsey 0:da5f5b56060a 214 } break;
Shaun Kelsey 0:da5f5b56060a 215 case (disable_console): {
Shaun Kelsey 0:da5f5b56060a 216 console_interface_exists = false;
Shaun Kelsey 0:da5f5b56060a 217 m_USB->printf("\r\n%s err=0\r\n", ptr_ch);
Shaun Kelsey 0:da5f5b56060a 218 } break;
Shaun Kelsey 0:da5f5b56060a 219 default:
Shaun Kelsey 0:da5f5b56060a 220 break;
Shaun Kelsey 0:da5f5b56060a 221 }
Shaun Kelsey 0:da5f5b56060a 222
Shaun Kelsey 0:da5f5b56060a 223 return;
Shaun Kelsey 0:da5f5b56060a 224 }
Shaun Kelsey 0:da5f5b56060a 225 }
Shaun Kelsey 0:da5f5b56060a 226
Shaun Kelsey 0:da5f5b56060a 227 //Loop through each sensor in sensorList
Shaun Kelsey 0:da5f5b56060a 228 //If sensor.get_type() is contained in cmd_str, pass cmd_str to that sensor's parser
Shaun Kelsey 0:da5f5b56060a 229 for (int i = 0; i < num_sensors; i++) {
Shaun Kelsey 0:da5f5b56060a 230 if (strstr(&cmd_str[0], sensor_list[i]->get_type())) {
Shaun Kelsey 0:da5f5b56060a 231 if (sensor_list[i]->parse_command(cmd_str))
Shaun Kelsey 0:da5f5b56060a 232 return;
Shaun Kelsey 0:da5f5b56060a 233 break;
Shaun Kelsey 0:da5f5b56060a 234 }
Shaun Kelsey 0:da5f5b56060a 235 }
Shaun Kelsey 0:da5f5b56060a 236
Shaun Kelsey 0:da5f5b56060a 237 //If we still haven't found a way to parse the command,
Shaun Kelsey 0:da5f5b56060a 238 //send it to every sensor until one handles it
Shaun Kelsey 0:da5f5b56060a 239 for (int i = 0; i < num_sensors; i++) {
Shaun Kelsey 0:da5f5b56060a 240 if (sensor_list[i]->parse_command(cmd_str))
Shaun Kelsey 0:da5f5b56060a 241 return;
Shaun Kelsey 0:da5f5b56060a 242 }
Shaun Kelsey 0:da5f5b56060a 243
Shaun Kelsey 0:da5f5b56060a 244
Shaun Kelsey 0:da5f5b56060a 245 //No one could handle the command, print cmd not recognized string
Shaun Kelsey 0:da5f5b56060a 246 m_USB->printf("\r\n%s err=-255\r\n", cmd_str);
Shaun Kelsey 0:da5f5b56060a 247 }
Shaun Kelsey 0:da5f5b56060a 248
Shaun Kelsey 0:da5f5b56060a 249 void DSInterface::data_report_execute()
Shaun Kelsey 0:da5f5b56060a 250 {
Shaun Kelsey 0:da5f5b56060a 251 char buffer[256];
Shaun Kelsey 0:da5f5b56060a 252 int data_len = 0;
Shaun Kelsey 0:da5f5b56060a 253
Shaun Kelsey 0:da5f5b56060a 254 buffer[0] = '\0';
Shaun Kelsey 0:da5f5b56060a 255
Shaun Kelsey 0:da5f5b56060a 256 for (int i = 0; i < num_sensors; i++) {
Shaun Kelsey 0:da5f5b56060a 257 //if ((*it)->is_enabled()) {
Shaun Kelsey 0:da5f5b56060a 258 data_len = sensor_list[i]->data_report_execute(buffer, sizeof(buffer));
Shaun Kelsey 0:da5f5b56060a 259 if (!this->pause_mode && (data_len > 0)) {
Shaun Kelsey 0:da5f5b56060a 260 if(console_interface_exists){
Shaun Kelsey 0:da5f5b56060a 261 #ifdef ASCII_COMM
Shaun Kelsey 0:da5f5b56060a 262 m_USB->printf(buffer);
Shaun Kelsey 0:da5f5b56060a 263 #else
Shaun Kelsey 0:da5f5b56060a 264 m_USB->writeBlock((uint8_t*)buffer, data_len);
Shaun Kelsey 0:da5f5b56060a 265 #endif
Shaun Kelsey 0:da5f5b56060a 266 }
Shaun Kelsey 0:da5f5b56060a 267 data_len = 0;
Shaun Kelsey 0:da5f5b56060a 268 }
Shaun Kelsey 0:da5f5b56060a 269 //We only support streaming from one device at a time, so break here
Shaun Kelsey 0:da5f5b56060a 270 // break;
Shaun Kelsey 0:da5f5b56060a 271 //}
Shaun Kelsey 0:da5f5b56060a 272 }
Shaun Kelsey 0:da5f5b56060a 273 }
Shaun Kelsey 0:da5f5b56060a 274
Shaun Kelsey 0:da5f5b56060a 275 void DSInterface::set_fw_version(const char* version)
Shaun Kelsey 0:da5f5b56060a 276 {
Shaun Kelsey 0:da5f5b56060a 277 if (version && *version)
Shaun Kelsey 0:da5f5b56060a 278 firmware_version = version;
Shaun Kelsey 0:da5f5b56060a 279 }
Shaun Kelsey 0:da5f5b56060a 280
Shaun Kelsey 0:da5f5b56060a 281 void DSInterface::set_fw_platform(const char* platform)
Shaun Kelsey 0:da5f5b56060a 282 {
Shaun Kelsey 0:da5f5b56060a 283 if (platform && *platform)
Shaun Kelsey 0:da5f5b56060a 284 platform_name = platform;
Shaun Kelsey 0:da5f5b56060a 285 }