1616#ifndef ADAFRUITIO_DEFINITIONS_H_
1717#define ADAFRUITIO_DEFINITIONS_H_
1818
19- #define ADAFRUITIO_VERSION_MAJOR 3
20- #define ADAFRUITIO_VERSION_MINOR 2
21- #define ADAFRUITIO_VERSION_PATCH 0
19+ #define ADAFRUITIO_VERSION_MAJOR 3 // / < Adafruit IO Arduino Major Semvar
20+ #define ADAFRUITIO_VERSION_MINOR 2 // / < Adafruit IO Arduino Minor Semvar
21+ #define ADAFRUITIO_VERSION_PATCH 0 // / < Adafruit IO Arduino Patch Semvar
2222
2323// forward declaration
2424class AdafruitIO_Data ;
@@ -49,22 +49,21 @@ class AdafruitIOGroupCallback {
4949// Uncomment/comment to turn on/off error output
5050// #define AIO_ERROR
5151
52- // Where debug messages will be printed
5352// note: if you're using something like Zero or Due, change the below to
5453// SerialUSB
55- #define AIO_PRINTER Serial
54+ #define AIO_PRINTER Serial // / < Where debug messages will be printed
5655
5756// Define actual debug output functions when necessary.
5857#ifdef AIO_DEBUG
5958#define AIO_DEBUG_PRINT (...) \
60- { AIO_PRINTER.print (__VA_ARGS__); }
59+ { AIO_PRINTER.print (__VA_ARGS__); } // / < Debug output for Printer
6160#define AIO_DEBUG_PRINTLN (...) \
62- { AIO_PRINTER.println (__VA_ARGS__); }
61+ { AIO_PRINTER.println (__VA_ARGS__); } // / < Println-like debug output for Printer
6362#else
6463#define AIO_DEBUG_PRINT (...) \
65- {}
64+ {} // / < Prints if AIO_DEBUG is True
6665#define AIO_DEBUG_PRINTLN (...) \
67- {}
66+ {} // / < Prints line if AIO_DEBUG is True
6867#endif
6968
7069// Define actual error output functions when necessary.
@@ -80,49 +79,38 @@ class AdafruitIOGroupCallback {
8079 {}
8180#endif
8281
83- // Adafruit IO Ping Interval, in milliseconds
84- #define AIO_PING_INTERVAL 60000
85- // Time to wait between re-connecting to Adafruit IO after throttled
86- #define AIO_THROTTLE_RECONNECT_INTERVAL 60000
87- // Time to wait for a successful reconnection after MQTT disconnect
88- #define AIO_MQTT_CONNECTION_TIMEOUT 60000
89- // Time to wait for a successful reconnection after network disconnect
90- #define AIO_NET_CONNECTION_TIMEOUT 60000
91- // Time to wait for a net disconnect to take effect
92- #define AIO_NET_DISCONNECT_WAIT 300
82+ #define AIO_PING_INTERVAL 60000 // /< Adafruit IO Ping Interval, in milliseconds
83+ #define AIO_THROTTLE_RECONNECT_INTERVAL 60000 // /< Time to wait between re-connecting to Adafruit IO after throttled
84+ #define AIO_MQTT_CONNECTION_TIMEOUT 60000 // /< Time to wait for a successful reconnection after MQTT disconnect
85+ #define AIO_NET_CONNECTION_TIMEOUT 60000 // /< Time to wait for a successful reconnection after network disconnect
86+ #define AIO_NET_DISCONNECT_WAIT 300 // /< Time to wait for a net disconnect to take effect
9387
94- #define AIO_ERROR_TOPIC " /errors"
95- #define AIO_THROTTLE_TOPIC " /throttle"
88+ #define AIO_ERROR_TOPIC " /errors" // /< Adafruit IO Error MQTT Topic
89+ #define AIO_THROTTLE_TOPIC " /throttle" // /< Adafruit IO Throttle MQTT Topic
9690
9791// latest fingerprint can be generated with
9892// echo | openssl s_client -connect io.adafruit.com:443 | openssl x509
9993// -fingerprint -noout
10094#define AIO_SSL_FINGERPRINT \
101- " 77 00 54 2D DA E7 D8 03 27 31 23 99 EB 27 DB CB A5 4C 57 18"
95+ " 77 00 54 2D DA E7 D8 03 27 31 23 99 EB 27 DB CB A5 4C 57 18" // /< Latest Adafruit IO SSL Fingerprint
10296
103- // Maximum length of an Adafruit IO Feed name
104- #define AIO_FEED_NAME_LENGTH 20
105- // Maximum length of data sent/recieved from Adafruit IO
106- #define AIO_DATA_LENGTH 45
107- // Maximum comma-separated-value length from Adafruit IO
108- #define AIO_CSV_LENGTH 150
97+ #define AIO_FEED_NAME_LENGTH 20 // /< Maximum length of an Adafruit IO Feed name
98+ #define AIO_DATA_LENGTH 45 // /< Maximum length of data sent/recieved from Adafruit IO
99+ #define AIO_CSV_LENGTH 150 // /< Maximum comma-separated-value length from Adafruit IO
109100
110101/* * aio_status_t offers 13 status states */
111102typedef enum {
112103
113- // CONNECTING
114- AIO_IDLE = 0 ,
104+ AIO_IDLE = 0 , // Waiting for connection establishement
115105 AIO_NET_DISCONNECTED = 1 , // Network disconnected
116106 AIO_DISCONNECTED = 2 , // Disconnected from Adafruit IO
117107 AIO_FINGERPRINT_UNKOWN = 3 , // Unknown AIO_SSL_FINGERPRINT
118108
119- // FAILURE
120109 AIO_NET_CONNECT_FAILED = 10 , // Failed to connect to network
121110 AIO_CONNECT_FAILED = 11 , // Failed to connect to Adafruit IO
122111 AIO_FINGERPRINT_INVALID = 12 , // Unknown AIO_SSL_FINGERPRINT
123- AIO_AUTH_FAILED = 13 , // Invalid Adafruit IO login credentials provided.
124- AIO_SSID_INVALID =
125- 14 , // SSID is "" or otherwise invalid, connection not attempted
112+ AIO_AUTH_FAILED = 13 , // Invalid Adafruit IO login credentials provided.
113+ AIO_SSID_INVALID = 14 , // SSID is "" or otherwise invalid, connection not attempted
126114
127115 // SUCCESS
128116 AIO_NET_CONNECTED = 20 , // Connected to Adafruit IO
0 commit comments