EnigmaIOT  0.9.3
Secure sensor and gateway platform based on ESP8266 and ESP32
helperFunctions.h
Go to the documentation of this file.
1 
9 #ifndef _HELPERFUNCTIONS_h
10 #define _HELPERFUNCTIONS_h
11 
12 
13 #if defined(ARDUINO) && ARDUINO >= 100
14 #include "Arduino.h"
15 #else
16 #include "WProgram.h"
17 #endif
18 #if defined(ESP8266)
19 #include <ESP8266WiFi.h>
20 #elif defined(ESP32)
21 #include <WiFi.h>
22 #endif
23 #include "EnigmaIoTconfig.h"
24 #include "debug.h"
25 
35 char* printHexBuffer (const uint8_t* buffer, uint16_t len);
36 
43 char* mac2str (const uint8_t* mac, char* buffer);
44 
51 uint8_t* str2mac (const char* mac, uint8_t* values);
52 
59 void initWiFi (uint8_t channel, const char* networkName, const char* networkKey = NULL, uint8_t role = 0);
60 
67 uint32_t calculateCRC32 (const uint8_t* data, size_t length);
68 
69 #endif
70 
EnigmaIoTconfig.h
Parameter configuration.
initWiFi
void initWiFi(uint8_t channel, const char *networkName, const char *networkKey=NULL, uint8_t role=0)
Initalizes WiFi interfaces on ESP8266 or ESP32.
Definition: helperFunctions.cpp:31
calculateCRC32
uint32_t calculateCRC32(const uint8_t *data, size_t length)
Calculates CRC32 of a buffer.
Definition: helperFunctions.cpp:63
printHexBuffer
char * printHexBuffer(const uint8_t *buffer, uint16_t len)
Debug helper function that generates a string that represent a buffer hexadecimal values.
Definition: helperFunctions.cpp:17
str2mac
uint8_t * str2mac(const char *mac, uint8_t *values)
Debug helper function that creates MAC address byte array from text representation.
Definition: helperFunctions.cpp:94
data
@ data
Definition: GwOutput_generic.h:23
mac2str
char * mac2str(const uint8_t *mac, char *buffer)
Debug helper function that generates a string that represent a MAC address.
Definition: helperFunctions.cpp:84
debug.h
Auxiliary functions for debugging over Serial.