This commit is contained in:
Thomas Kunze 2019-06-12 22:09:05 +02:00
parent ce190a44e4
commit ac24e1206a
2 changed files with 17 additions and 12 deletions

View File

@ -52,10 +52,12 @@ script:
- if [ "$MODE" = "LINUX" ]; then cd build; fi
- if [ "$MODE" = "LINUX" ]; then cmake ..; fi
- if [ "$MODE" = "LINUX" ]; then make; fi
- if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-demo; fi
- if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-sonoffS20; fi
- if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-bme680; fi
- if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-hdc1008; fi
# - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-demo; fi
# - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-sonoffS20; fi
# - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-bme680; fi
# - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-hdc1008; fi
- if [ "$MODE" = "ARDUINO" ]; then build_platform zero; fi
notifications:
email:

View File

@ -5,17 +5,6 @@
#ifdef __linux__
#include <arpa/inet.h>
#elif ARDUINO_ARCH_SAMD
#define htons(x) ( (((x)<<8)&0xFF00) | (((x)>>8)&0xFF) )
#define ntohs(x) htons(x)
#define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \
((x)<< 8 & 0x00FF0000UL) | \
((x)>> 8 & 0x0000FF00UL) | \
((x)>>24 & 0x000000FFUL) )
#define ntohl(x) htonl(x)
#elif ARDUINO_ARCH_ESP8266
#include <user_interface.h>
#endif
#define lowByte(val) ((val)&255)
#define highByte(val) (((val) >> ((sizeof(val) - 1) << 3)) & 255)
@ -25,6 +14,20 @@
#define DEC 10
#define HEX 16
#elif ARDUINO_ARCH_SAMD
#include <Arduino.h>
#define htons(x) ( (((x)<<8)&0xFF00) | (((x)>>8)&0xFF) )
#define ntohs(x) htons(x)
#define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \
((x)<< 8 & 0x00FF0000UL) | \
((x)>> 8 & 0x0000FF00UL) | \
((x)>>24 & 0x000000FFUL) )
#define ntohl(x) htonl(x)
#elif ARDUINO_ARCH_ESP8266
#include <Arduino.h>
#include <user_interface.h>
#endif
void print(const char[]);
void print(char);
void print(unsigned char, int = DEC);