85 lines
2.8 KiB
C
85 lines
2.8 KiB
C
/*********************************************************************************************************************************
|
|
defines.h
|
|
|
|
Library for communicating with a MySQL or MariaDB Server
|
|
|
|
Based on and modified from Dr. Charles A. Bell's MySQL_Connector_Arduino Library https://github.com/ChuckBell/MySQL_Connector_Arduino
|
|
to support nRF52, SAMD21/SAMD51, SAM DUE, STM32F/L/H/G/WB/MP1, ESP8266, ESP32, etc. boards using W5x00, ENC28J60, LAM8742A Ethernet,
|
|
WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi.
|
|
|
|
The library provides simple and easy Client interface to MySQL or MariaDB Server.
|
|
|
|
Built by Khoi Hoang https://github.com/khoih-prog/MySQL_MariaDB_Generic
|
|
Licensed under MIT license
|
|
**********************************************************************************************************************************/
|
|
|
|
#ifndef defines_h
|
|
#define defines_h
|
|
|
|
#define ETHERNET_DEBUG 4
|
|
|
|
#define MYSQL_DEBUG_PORT Serial
|
|
|
|
// Debug Level from 0 to 4
|
|
#define _MYSQL_LOGLEVEL_ 1
|
|
|
|
#if ( defined(CORE_TEENSY) || defined(ARDUINO_TEENSY41) )
|
|
#if defined(USE_NATIVE_ETHERNET)
|
|
#undef USE_NATIVE_ETHERNET
|
|
#endif
|
|
#define USE_NATIVE_ETHERNET true
|
|
#define USE_QN_ETHERNET false
|
|
|
|
#define BOARD_TYPE "Teensy 4.1"
|
|
#warning Use Teensy 4,1 with NativeEthernet library
|
|
#else
|
|
#error For Teensy 4.1 using NativeEthernet only.
|
|
#endif
|
|
|
|
|
|
#if defined(ARDUINO_BOARD)
|
|
#define BOARD_NAME ARDUINO_BOARD
|
|
#else
|
|
#ifndef BOARD_NAME
|
|
#define BOARD_NAME BOARD_TYPE
|
|
#endif
|
|
#endif
|
|
|
|
// Only one of the following to be true.
|
|
#define USE_ETHERNET_GENERIC true
|
|
#define USE_ETHERNET_ESP8266 false
|
|
#define USE_ETHERNET_ENC false
|
|
#define USE_ETHERNET_LAN8742A false
|
|
#define USE_ETHERNET_LAN8720 false
|
|
#define USE_CUSTOM_ETHERNET false
|
|
#define USE_UIP_ETHERNET false
|
|
|
|
// Enter a MAC address and IP address for your controller below.
|
|
#define NUMBER_OF_MAC 20
|
|
|
|
byte mac[][NUMBER_OF_MAC] =
|
|
{
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x01 },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x02 },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x03 },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x04 },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x05 },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x06 },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x07 },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x08 },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x09 },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x0A },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x0B },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x0C },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x0D },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x0E },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x0F },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x10 },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x11 },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x12 },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x13 },
|
|
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x14 },
|
|
};
|
|
|
|
#endif //defines_h
|