mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
Updating Firmata to r71.
Note that I also changed the extensions of the examples (firmwares) from .pde to .ino and removed the Makefiles (since they assume the pde extension). http://code.google.com/p/arduino/issues/detail?id=447
This commit is contained in:
@ -13,16 +13,15 @@
|
||||
#ifndef Firmata_h
|
||||
#define Firmata_h
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "Boards.h" /* Hardware Abstraction Layer + Wiring/Arduino */
|
||||
|
||||
/* Version numbers for the protocol. The protocol is still changing, so these
|
||||
* version numbers are important. This number can be queried so that host
|
||||
* software can test whether it will be compatible with the currently
|
||||
* installed firmware. */
|
||||
#define FIRMATA_MAJOR_VERSION 2 // for non-compatible changes
|
||||
#define FIRMATA_MINOR_VERSION 2 // for backwards compatible changes
|
||||
#define FIRMATA_MINOR_VERSION 3 // for backwards compatible changes
|
||||
#define FIRMATA_BUGFIX_VERSION 1 // for bugfix releases
|
||||
|
||||
#define MAX_DATA_BYTES 32 // max number of data bytes in non-Sysex messages
|
||||
|
||||
@ -66,8 +65,8 @@
|
||||
#define SYSEX_SAMPLING_INTERVAL 0x7A // same as SAMPLING_INTERVAL
|
||||
|
||||
// pin modes
|
||||
//#define INPUT 0x00 // defined in Arduino.h
|
||||
//#define OUTPUT 0x01 // defined in Arduino.h
|
||||
//#define INPUT 0x00 // defined in wiring.h
|
||||
//#define OUTPUT 0x01 // defined in wiring.h
|
||||
#define ANALOG 0x02 // analog pin in analogInput mode
|
||||
#define PWM 0x03 // digital pin in PWM output mode
|
||||
#define SERVO 0x04 // digital pin in Servo output mode
|
||||
@ -88,10 +87,11 @@ extern "C" {
|
||||
class FirmataClass
|
||||
{
|
||||
public:
|
||||
FirmataClass();
|
||||
FirmataClass(Stream &s);
|
||||
/* Arduino constructors */
|
||||
void begin();
|
||||
void begin(long);
|
||||
void begin(Stream &s);
|
||||
/* querying functions */
|
||||
void printVersion(void);
|
||||
void blinkVersion(void);
|
||||
@ -116,6 +116,7 @@ public:
|
||||
void detach(byte command);
|
||||
|
||||
private:
|
||||
Stream &FirmataSerial;
|
||||
/* firmware name and version */
|
||||
byte firmwareVersionCount;
|
||||
byte *firmwareVersionVector;
|
||||
@ -141,6 +142,9 @@ private:
|
||||
void processSysexMessage(void);
|
||||
void systemReset(void);
|
||||
void pin13strobe(int count, int onInterval, int offInterval);
|
||||
void sendValueAsTwo7bitBytes(int value);
|
||||
void startSysex(void);
|
||||
void endSysex(void);
|
||||
};
|
||||
|
||||
extern FirmataClass Firmata;
|
||||
@ -155,8 +159,5 @@ extern FirmataClass Firmata;
|
||||
*/
|
||||
#define setFirmwareVersion(x, y) setFirmwareNameAndVersion(__FILE__, x, y)
|
||||
|
||||
/* Hardware Abstraction Layer */
|
||||
#include "Boards.h"
|
||||
|
||||
#endif /* Firmata_h */
|
||||
|
||||
|
Reference in New Issue
Block a user