Skip to content

Add support for Particle devices (www.particle.io) #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions hmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
*/
#ifndef __HMI_H__
#define __HMI_H__

// To also support the growing community of Particle devices (www.particle.io)
#if defined(SPARK) || defined(PLATFORM_ID)
#include "application.h"

typedef USARTSerial HMISerial;

extern char* itoa(int a, char* buffer, unsigned char radix);
#else // not a Particle device
#include "arduino.h"

/**
Expand All @@ -20,6 +29,9 @@ typedef SoftwareSerial HMISerial;
typedef HardwareSerial HMISerial;
#endif /* #ifdef HMI_SOFTWARE_SERIAL */

#endif // Arduino


/**
* HMI class.
*
Expand Down