MAX32620HSP (MAXREFDES100) RPC Example for Graphical User Interface
Dependencies: USBDevice
Fork of HSP_Release by
This is an example program for the MAX32620HSP (MAXREFDES100 Health Sensor Platform). It demonstrates all the features of the platform and works with a companion graphical user interface (GUI) to help evaluate/configure/monitor the board. Go to the MAXREFDES100 product page and click on "design resources" to download the companion software. The GUI connects to the board through an RPC interface on a virtual serial port over the USB interface.
The RPC interface provides access to all the features of the board and is available to interface with other development environments such Matlab. This firmware provides realtime data streaming through the RPC interface over USB, and also provides the ability to log the data to flash for untethered battery operation. The data logging settings are configured through the GUI, and the GUI also provides the interface to download logged data.
Details on the RPC interface can be found here: HSP RPC Interface Documentation
Windows
With this program loaded, the MAX32620HSP will appear on your computer as a serial port. On Mac and Linux, this will happen by default. For Windows, you need to install a driver: HSP serial port windows driver
For more details about this platform and how to use it, see the MAXREFDES100 product page.
Diff: HSP/Devices/HspLed/HspLed/HspLed.h
- Revision:
- 1:9490836294ea
- Parent:
- 0:e4a10ed6eb92
--- a/HSP/Devices/HspLed/HspLed/HspLed.h Tue Oct 25 15:22:11 2016 +0000
+++ b/HSP/Devices/HspLed/HspLed/HspLed.h Fri Apr 21 12:12:30 2017 -0500
@@ -38,32 +38,6 @@
/**
* Driver for the HSP Led, supports different blink rates and patterns
*
- * @code
- * #include <stdio.h>
- * #include "mbed.h"
- * #include "xxx.h"
- *
- * I2C i2c(I2C_SDA, I2C_SCL);
- * xxx xxx(&i2c);
- *
- * int main(void) {
- * printf("Initialized xxx\n");
- * while(1) {
- * if (xxx.init() != 0) {
- * printf("Error communicating with xxx\n");
- * } else {
- * printf("Initialized xxx\n");
- * break;
- * }
- * wait(1);
- * }
- *
- * while(1) {
- * printf("");
- * wait(1);
- * }
- * }
- * @endcode
*/
class HspLed {
@@ -77,7 +51,7 @@
eLedOff,
eLedPeriod,
eLedPattern
- } eMode;
+ } eMode_t;
/// define the values that turn the LED on or off at the pin
#define HSP_LED_ON 0
#define HSP_LED_OFF 1
@@ -88,7 +62,7 @@
HspLed(PinName ledPin);
/**
- * Blink the HSP LED at a set time interval
+ * @brief Blink the HSP LED at a set time interval
* @param mSeconds Number of seconds to set the timer interval
*/
void blink(uint32_t mSeconds);
@@ -118,51 +92,71 @@
private:
/**
- * Set the mode of the LED, the mode include blinking at a set rate or blinking
- * according to a pattern
+ * @brief Set the mode of the LED, the mode include blinking at a set rate or blinking
+ * @brief according to a pattern
* @param mode Mode to set the LED to
*/
- void setMode(eMode state);
+ void setMode(eMode_t state);
/**
- * Toggle the state of the LED
+ * @brief Toggle the state of the LED
*/
void toggle(void);
/**
- * Start the LED blinking or rotating through a pattern
+ * @brief Start the LED blinking or rotating through a pattern
*/
void start(void);
/**
- * Stop blinking or rotating through a pattern
+ * @brief Stop blinking or rotating through a pattern
*/
void stop(void);
/**
- * Write the LED pin to a state
+ * @brief Write the LED pin to a state
* @param state A one or zero value to write to the LED pin
*/
void state(int state);
- /*
+ /**
* @brief Single step through the pattern and output to the LED
*/
void patternToLed(void);
- /// timer interval in mS
+ /**
+ * @brief timer interval in mS
+ */
float timerInterval;
- /// last timer interval set to... used to prevent resetting the timer to the same value
+
+ /**
+ * @brief last timer interval set to... used to prevent resetting the timer to the same value
+ */
float timerIntervalLast;
- /// local state of the pattern to rotate through
+
+ /**
+ * @brief local state of the pattern to rotate through
+ */
uint32_t bitPattern;
- /// current mode of the LED
- eMode mode;
- /// the LED digital output
+
+ /**
+ * @brief current mode of the LED
+ */
+ eMode_t mode;
+
+ /**
+ * @brief the LED digital output
+ */
DigitalOut redLed;
- /// Timer service used to update the LED
+
+ /**
+ * @brief Timer service used to update the LED
+ */
Ticker ticker;
- /// Flag to indicate if the timer has been started
+
+ /**
+ * @brief Flag to indicate if the timer has been started
+ */
bool isStarted;
};
