add hardware serial1 to use with arduino api

This commit is contained in:
Harald Pichler 2016-11-09 15:14:45 +01:00
parent d2a1f8937e
commit c666b18a12
4 changed files with 5 additions and 2 deletions

View file

@ -145,7 +145,7 @@ extern const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[];
// look at this again when considering implementing serial
#include "WCharacter.h"
#include "WString.h"
//#include "HardwareSerial.h"
#include "HardwareSerial.h"
uint16_t makeWord(uint16_t w);
uint16_t makeWord(byte h, byte l);

View file

@ -85,7 +85,7 @@
#if defined (__AVR_ATmega128__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega128RFA1__) || defined(__AVR_ATmega128RFR2__) || defined(__AVR_ATmega256RFR2__)
#ifndef NUMPORTS
#define NUMPORTS 2
#define NUMPORTS 1 // we use the second serial for arduino api HardwareSerial1.cpp
#elif NUMPORTS > 2
#error Only two serial ports are defined for this processor!
#endif

View file

@ -31,6 +31,8 @@ CONTIKI_TARGET_SOURCEFILES += wiring_digital.c
CONTIKI_TARGET_SOURCEFILES += new.cpp twi.c Wire.cpp WMath.cpp
CONTIKI_TARGET_SOURCEFILES += Print.cpp Stream.cpp WString.cpp
CONTIKI_TARGET_SOURCEFILES += SPI.cpp
CONTIKI_TARGET_SOURCEFILES += HardwareSerial.cpp HardwareSerial1.cpp
# guh Source Files
# Smart Grid Ready Interface
CONTIKI_TARGET_SOURCEFILES += sg-ready.c

View file

@ -30,6 +30,7 @@ CONTIKI_TARGET_SOURCEFILES += relay.c relay-sensor.c
CONTIKI_TARGET_SOURCEFILES += wiring_digital.c
CONTIKI_TARGET_SOURCEFILES += new.cpp twi.c Wire.cpp WMath.cpp
CONTIKI_TARGET_SOURCEFILES += Print.cpp Stream.cpp WString.cpp
CONTIKI_TARGET_SOURCEFILES += HardwareSerial.cpp HardwareSerial1.cpp
# guh Source Files
# Smart Grid Ready Interface
CONTIKI_TARGET_SOURCEFILES += sg-ready.c