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 cd build; fi
- if [ "$MODE" = "LINUX" ]; then cmake ..; fi - if [ "$MODE" = "LINUX" ]; then cmake ..; fi
- if [ "$MODE" = "LINUX" ]; then make; fi - if [ "$MODE" = "LINUX" ]; then make; fi
- if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-demo; fi # - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-demo; fi
- if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-sonoffS20; fi # - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-sonoffS20; fi
- if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-bme680; fi # - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-bme680; fi
- if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-hdc1008; fi # - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-hdc1008; fi
- if [ "$MODE" = "ARDUINO" ]; then build_platform zero; fi
notifications: notifications:
email: email:

View File

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