mirror of
https://github.com/thelsing/knx.git
synced 2026-03-07 02:17:30 +01:00
move MAX,MIN,ABS to bits.h
This commit is contained in:
@@ -13,6 +13,18 @@
|
||||
#define ntohl(x) htonl(x)
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) ((a < b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a, b) ((a > b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef ABS
|
||||
#define ABS(x) ((x > 0) ? (x) : (-x))
|
||||
#endif
|
||||
|
||||
#if defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_STM32)
|
||||
#include <Arduino.h>
|
||||
#elif defined(ARDUINO_ARCH_ESP8266)
|
||||
@@ -106,4 +118,4 @@ enum ParameterFloatEncodings
|
||||
#undef max
|
||||
#undef min
|
||||
// end of temporary undef
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define MIN(a, b) ((a < b) ? (a) : (b))
|
||||
#define MAX(a, b) ((a > b) ? (a) : (b))
|
||||
#define ABS(x) ((x > 0) ? (x) : (-x))
|
||||
|
||||
// Table for encoding 4-bit data into a 8-bit Manchester encoding.
|
||||
const uint8_t RfPhysicalLayerCC1101::manchEncodeTab[16] = {0xAA, // 0x0 Manchester encoded
|
||||
0xA9, // 0x1 Manchester encoded
|
||||
|
||||
Reference in New Issue
Block a user