-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathPacketizer.h
39 lines (33 loc) · 1.15 KB
/
Packetizer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#ifndef HT_SERIAL_PACKETIZER
#define HT_SERIAL_PACKETIZER
#ifdef ARDUINO
#include <Arduino.h>
#endif
#if defined(ARDUINO) || defined(OF_VERSION_MAJOR) || defined(SERIAL_H)
#define PACKETIZER_ENABLE_STREAM
#ifdef ARDUINO // TODO: support more platforms
#if defined(ESP_PLATFORM) || defined(ESP8266) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_NANO_33_IOT)
#define PACKETIZER_ENABLE_WIFI
#endif
#if defined(ESP_PLATFORM) || defined(ESP8266) || !defined(PACKETIZER_ENABLE_WIFI)
#define PACKETIZER_ENABLE_ETHER
#endif
#endif
#endif
#ifndef PACKETIZER_DISABLE_NETWORK
#if defined(PACKETIZER_ENABLE_ETHER) || defined(PACKETIZER_ENABLE_WIFI)
#define PACKETIZER_ENABLE_NETWORK
#include <Udp.h>
#include <Client.h>
#endif
#endif // PACKETIZER_DISABLE_NETWORK
#include <ArxTypeTraits.h>
#include <ArxContainer.h>
#include <ArxSmartPtr.h>
#include "Packetizer/Types.h"
#include "Packetizer/Encoding.h"
#include "Packetizer/Encoder.h"
#include "Packetizer/Decoder.h"
namespace Packetizer = arduino::packetizer;
#endif // HT_SERIAL_PACKETIZER