mirror of
https://github.com/thelsing/knx.git
synced 2024-12-18 19:08:18 +01:00
add defines for samd (maybe wrong)
This commit is contained in:
parent
d710ec327b
commit
3f0016a0bd
10
bits.h
10
bits.h
@ -7,6 +7,16 @@
|
||||
#define lowByte(val) ((val) & 255)
|
||||
#define highByte(val) (((val) >> ((sizeof(val) - 1) << 3)) & 255)
|
||||
#define bitRead(val, bitno) (((val) >> (bitno)) & 1)
|
||||
#elif ARDUINO_ARCH_SAMD
|
||||
#include <Arduino.h>
|
||||
#define htons(x) ( ((x)<<8) | (((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)
|
||||
#define printf
|
||||
#else
|
||||
#include <Arduino.h>
|
||||
#include <user_interface.h>
|
||||
|
Loading…
Reference in New Issue
Block a user