From 501164811b809eb90a48dd9390917a2fb6ef1d39 Mon Sep 17 00:00:00 2001 From: ClemensFritze Date: Wed, 7 Feb 2024 11:25:05 +0100 Subject: [PATCH] update --- Dokumentation.odt | Bin 0 -> 71993 bytes Dokumentation.pdf | Bin 0 -> 95427 bytes ESP32DatabaseInsert_SetUp/Credentials.h | 24 + .../ESP32DatabaseInsert_SetUp.ino | 192 ++ ESP32DatabaseInsert_SetUp/defines.h | 381 ++++ .../ESP32QRCodeReader_Page.ino | 583 +++++ ESP32QRCodeReader_Page/LICENSE | 16 + ESP32QRCodeReader_Page/README.md | 193 ++ ESP32QRCodeReader_Page/collections.c | 85 + ESP32QRCodeReader_Page/collections.h | 33 + ESP32QRCodeReader_Page/decode.c | 983 +++++++++ ESP32QRCodeReader_Page/fmath.h | 70 + ESP32QRCodeReader_Page/identify.c | 1286 +++++++++++ ESP32QRCodeReader_Page/quirc.c | 104 + ESP32QRCodeReader_Page/quirc.h | 178 ++ ESP32QRCodeReader_Page/quirc_internal.h | 121 + ESP32QRCodeReader_Page/version_db.c | 184 ++ ESP32QRReaderDBWriter/Credentials.h | 24 + .../ESP32QRReaderDBWriter.ino | 413 ++++ ESP32QRReaderDBWriter/LICENSE | 16 + ESP32QRReaderDBWriter/README.md | 193 ++ ESP32QRReaderDBWriter/collections.c | 85 + ESP32QRReaderDBWriter/collections.h | 33 + ESP32QRReaderDBWriter/decode.c | 983 +++++++++ ESP32QRReaderDBWriter/defines.h | 381 ++++ ESP32QRReaderDBWriter/fmath.h | 70 + ESP32QRReaderDBWriter/identify.c | 1286 +++++++++++ ESP32QRReaderDBWriter/quirc.c | 104 + ESP32QRReaderDBWriter/quirc.h | 178 ++ ESP32QRReaderDBWriter/quirc_internal.h | 121 + ESP32QRReaderDBWriter/version_db.c | 184 ++ .../Credentials.h | 24 + .../ESP32QRReaderDBWriterVideoStreamer.ino | 740 +++++++ ESP32QRReaderDBWriterVideoStreamer/LICENSE | 16 + ESP32QRReaderDBWriterVideoStreamer/README.md | 193 ++ .../collections.c | 85 + .../collections.h | 33 + ESP32QRReaderDBWriterVideoStreamer/decode.c | 983 +++++++++ ESP32QRReaderDBWriterVideoStreamer/defines.h | 381 ++++ ESP32QRReaderDBWriterVideoStreamer/fmath.h | 70 + ESP32QRReaderDBWriterVideoStreamer/identify.c | 1286 +++++++++++ ESP32QRReaderDBWriterVideoStreamer/quirc.c | 104 + ESP32QRReaderDBWriterVideoStreamer/quirc.h | 178 ++ .../quirc_internal.h | 121 + .../version_db.c | 184 ++ ESP32_VideoStreamer/ESP32_VideoStreamer.ino | 266 +++ .../ESP32QRCodeReader_Page.ino | 583 +++++ .../ESP32QRCodeReader_Page_original/LICENSE | 16 + .../ESP32QRCodeReader_Page_original/README.md | 193 ++ .../collections.c | 85 + .../collections.h | 33 + .../ESP32QRCodeReader_Page_original/decode.c | 983 +++++++++ .../ESP32QRCodeReader_Page_original/fmath.h | 70 + .../identify.c | 1286 +++++++++++ .../ESP32QRCodeReader_Page_original/quirc.c | 104 + .../ESP32QRCodeReader_Page_original/quirc.h | 178 ++ .../quirc_internal.h | 121 + .../version_db.c | 184 ++ .../CONTRIBUTING.md | 54 + libraries/MySQL_MariaDB_Generic-1.7.2/LICENSE | 22 + .../LibraryPatches/Ethernet/src/Ethernet.cpp | 320 +++ .../LibraryPatches/Ethernet/src/Ethernet.h | 366 +++ .../Ethernet/src/EthernetServer.cpp | 244 ++ .../Ethernet/src/utility/w5100.cpp | 711 ++++++ .../Ethernet/src/utility/w5100.h | 642 ++++++ .../Ethernet2/src/Ethernet2.cpp | 262 +++ .../LibraryPatches/Ethernet2/src/Ethernet2.h | 92 + .../Ethernet2/src/EthernetUdp2.cpp | 290 +++ .../Ethernet2/src/EthernetUdp2.h | 110 + .../Ethernet3/src/Ethernet3.cpp | 431 ++++ .../LibraryPatches/Ethernet3/src/Ethernet3.h | 127 ++ .../EthernetLarge/src/EthernetLarge.cpp | 318 +++ .../EthernetLarge/src/EthernetLarge.h | 362 +++ .../EthernetLarge/src/EthernetServer.cpp | 240 ++ .../EthernetLarge/src/utility/w5100.cpp | 703 ++++++ .../EthernetLarge/src/utility/w5100.h | 632 ++++++ .../UIPEthernet-2.0.9/UIPEthernet.cpp | 625 ++++++ .../UIPEthernet-2.0.9/UIPEthernet.h | 166 ++ .../utility/Enc28J60Network.cpp | 1216 ++++++++++ .../utility/Enc28J60Network.h | 337 +++ .../UIPEthernet/UIPEthernet.cpp | 641 ++++++ .../LibraryPatches/UIPEthernet/UIPEthernet.h | 158 ++ .../UIPEthernet/utility/Enc28J60Network.cpp | 1244 +++++++++++ .../UIPEthernet/utility/Enc28J60Network.h | 331 +++ .../LibraryPatches/esp32/cores/esp32/Server.h | 35 + .../hardware/samd/1.6.18-alpha2/boards.txt | 1730 +++++++++++++++ .../k210/0.3.10/cores/arduino/Stream.h | 129 ++ .../k210/0.3.11/cores/arduino/Stream.h | 129 ++ .../STM32F4xx/stm32f4xx_hal_conf_default.h | 513 +++++ .../STM32F7xx/stm32f7xx_hal_conf_default.h | 511 +++++ .../1.9.0/variants/NUCLEO_F767ZI/variant.h | 185 ++ .../1.9.0/variants/NUCLEO_L053R8/variant.h | 145 ++ .../STM32F4xx/stm32f4xx_hal_conf_default.h | 519 +++++ .../STM32F7xx/stm32f7xx_hal_conf_default.h | 511 +++++ .../variant_NUCLEO_F767ZI.h | 274 +++ .../L052R(6-8)H_L053R(6-8)H/variant_generic.h | 173 ++ .../variant_NUCLEO_F767ZI.h | 274 +++ .../variant_generic.h | 173 ++ .../STM32F4xx/stm32f4xx_hal_conf_default.h | 519 +++++ .../STM32F7xx/stm32f7xx_hal_conf_default.h | 511 +++++ .../variant_NUCLEO_F767ZI.h | 274 +++ .../variant_generic.h | 173 ++ .../STM32F4xx/stm32f4xx_hal_conf_default.h | 519 +++++ .../STM32F7xx/stm32f7xx_hal_conf_default.h | 511 +++++ .../variant_NUCLEO_F767ZI.h | 274 +++ .../variant_generic.h | 173 ++ .../1.9.3/variants/rpipico/pins_arduino.h | 81 + .../hardware/rp2040/2.7.2/boards.txt | 84 + .../variants/Seeed_XIAO_RP2040/pins_arduino.h | 123 ++ .../samd/1.7.7/cores/arduino/Arduino.h | 181 ++ .../samd/1.7.7/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.7.7/cores/arduino/Print.h | 108 + .../hardware/samd/1.7.7/platform.txt | 234 ++ .../samd/1.7.8/cores/arduino/Arduino.h | 181 ++ .../samd/1.7.8/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.7.8/cores/arduino/Print.h | 108 + .../hardware/samd/1.7.8/platform.txt | 230 ++ .../samd/1.7.9/cores/arduino/Arduino.h | 181 ++ .../samd/1.7.9/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.7.9/cores/arduino/Print.h | 108 + .../hardware/samd/1.7.9/platform.txt | 227 ++ .../samd/1.8.1/cores/arduino/Arduino.h | 181 ++ .../samd/1.8.1/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.8.1/cores/arduino/Print.h | 108 + .../hardware/samd/1.8.1/platform.txt | 204 ++ .../samd/1.8.2/cores/arduino/Arduino.h | 181 ++ .../samd/1.8.2/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.8.2/cores/arduino/Print.h | 108 + .../hardware/samd/1.8.2/platform.txt | 204 ++ .../samd/1.8.3/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.8.3/cores/arduino/Print.h | 107 + .../samd/1.8.3/cores/arduino51/Print.cpp | 420 ++++ .../samd/1.8.3/cores/arduino51/Print.h | 107 + .../adafruit/hardware/nrf52/0.19.0/boards.txt | 649 ++++++ .../nrf52/0.19.0/cores/nRF5/Print.cpp | 420 ++++ .../hardware/nrf52/0.19.0/cores/nRF5/Print.h | 107 + .../hardware/nrf52/0.19.0/cores/nRF5/Udp.h | 92 + .../hardware/nrf52/0.19.0/platform.txt | 164 ++ .../variants/NINA_B112_ublox/pins_arduino.h | 17 + .../variants/NINA_B112_ublox/variant.cpp | 59 + .../0.19.0/variants/NINA_B112_ublox/variant.h | 172 ++ .../variants/NINA_B302_ublox/pins_arduino.h | 17 + .../variants/NINA_B302_ublox/variant.cpp | 87 + .../0.19.0/variants/NINA_B302_ublox/variant.h | 149 ++ .../adafruit/hardware/nrf52/0.20.1/boards.txt | 649 ++++++ .../nrf52/0.20.1/cores/nRF5/Print.cpp | 420 ++++ .../hardware/nrf52/0.20.1/cores/nRF5/Print.h | 107 + .../hardware/nrf52/0.20.1/cores/nRF5/Udp.h | 92 + .../hardware/nrf52/0.20.1/platform.txt | 164 ++ .../variants/NINA_B112_ublox/pins_arduino.h | 17 + .../variants/NINA_B112_ublox/variant.cpp | 59 + .../0.20.1/variants/NINA_B112_ublox/variant.h | 172 ++ .../variants/NINA_B302_ublox/pins_arduino.h | 17 + .../variants/NINA_B302_ublox/variant.cpp | 87 + .../0.20.1/variants/NINA_B302_ublox/variant.h | 149 ++ .../adafruit/hardware/nrf52/0.20.5/boards.txt | 649 ++++++ .../nrf52/0.20.5/cores/nRF5/Print.cpp | 420 ++++ .../hardware/nrf52/0.20.5/cores/nRF5/Print.h | 107 + .../hardware/nrf52/0.20.5/cores/nRF5/Udp.h | 92 + .../hardware/nrf52/0.20.5/platform.txt | 164 ++ .../variants/NINA_B112_ublox/pins_arduino.h | 17 + .../variants/NINA_B112_ublox/variant.cpp | 59 + .../0.20.5/variants/NINA_B112_ublox/variant.h | 172 ++ .../variants/NINA_B302_ublox/pins_arduino.h | 17 + .../variants/NINA_B302_ublox/variant.cpp | 87 + .../0.20.5/variants/NINA_B302_ublox/variant.h | 149 ++ .../adafruit/hardware/nrf52/0.21.0/boards.txt | 649 ++++++ .../nrf52/0.21.0/cores/nRF5/Print.cpp | 420 ++++ .../hardware/nrf52/0.21.0/cores/nRF5/Print.h | 107 + .../hardware/nrf52/0.21.0/cores/nRF5/Udp.h | 92 + .../hardware/nrf52/0.21.0/platform.txt | 164 ++ .../variants/NINA_B112_ublox/pins_arduino.h | 17 + .../variants/NINA_B112_ublox/variant.cpp | 59 + .../0.21.0/variants/NINA_B112_ublox/variant.h | 172 ++ .../variants/NINA_B302_ublox/pins_arduino.h | 17 + .../variants/NINA_B302_ublox/variant.cpp | 87 + .../0.21.0/variants/NINA_B302_ublox/variant.h | 149 ++ .../adafruit/hardware/nrf52/0.22.0/boards.txt | 650 ++++++ .../nrf52/0.22.0/cores/nRF5/Print.cpp | 420 ++++ .../hardware/nrf52/0.22.0/cores/nRF5/Print.h | 107 + .../hardware/nrf52/0.22.0/cores/nRF5/Udp.h | 92 + .../hardware/nrf52/0.22.0/platform.txt | 165 ++ .../variants/NINA_B112_ublox/pins_arduino.h | 17 + .../variants/NINA_B112_ublox/variant.cpp | 59 + .../0.22.0/variants/NINA_B112_ublox/variant.h | 172 ++ .../variants/NINA_B302_ublox/pins_arduino.h | 17 + .../variants/NINA_B302_ublox/variant.cpp | 87 + .../0.22.0/variants/NINA_B302_ublox/variant.h | 149 ++ .../adafruit/hardware/nrf52/0.22.1/boards.txt | 596 +++++ .../nrf52/0.22.1/cores/nRF5/Print.cpp | 420 ++++ .../hardware/nrf52/0.22.1/cores/nRF5/Print.h | 107 + .../hardware/nrf52/0.22.1/cores/nRF5/Udp.h | 92 + .../hardware/nrf52/0.22.1/platform.txt | 169 ++ .../variants/NINA_B112_ublox/pins_arduino.h | 17 + .../variants/NINA_B112_ublox/variant.cpp | 59 + .../0.22.1/variants/NINA_B112_ublox/variant.h | 172 ++ .../variants/NINA_B302_ublox/pins_arduino.h | 17 + .../variants/NINA_B302_ublox/variant.cpp | 87 + .../0.22.1/variants/NINA_B302_ublox/variant.h | 149 ++ .../adafruit/hardware/nrf52/0.23.0/boards.txt | 648 ++++++ .../nrf52/0.23.0/cores/nRF5/Print.cpp | 420 ++++ .../hardware/nrf52/0.23.0/cores/nRF5/Print.h | 107 + .../hardware/nrf52/0.23.0/cores/nRF5/Udp.h | 92 + .../hardware/nrf52/0.23.0/platform.txt | 168 ++ .../variants/NINA_B112_ublox/pins_arduino.h | 17 + .../variants/NINA_B112_ublox/variant.cpp | 59 + .../0.23.0/variants/NINA_B112_ublox/variant.h | 172 ++ .../variants/NINA_B302_ublox/pins_arduino.h | 17 + .../variants/NINA_B302_ublox/variant.cpp | 87 + .../0.23.0/variants/NINA_B302_ublox/variant.h | 149 ++ .../adafruit/hardware/nrf52/0.24.0/boards.txt | 649 ++++++ .../nrf52/0.24.0/cores/nRF5/Print.cpp | 420 ++++ .../hardware/nrf52/0.24.0/cores/nRF5/Print.h | 107 + .../hardware/nrf52/0.24.0/cores/nRF5/Udp.h | 92 + .../hardware/nrf52/0.24.0/platform.txt | 167 ++ .../variants/NINA_B112_ublox/pins_arduino.h | 17 + .../variants/NINA_B112_ublox/variant.cpp | 59 + .../0.24.0/variants/NINA_B112_ublox/variant.h | 172 ++ .../variants/NINA_B302_ublox/pins_arduino.h | 17 + .../variants/NINA_B302_ublox/variant.cpp | 87 + .../0.24.0/variants/NINA_B302_ublox/variant.h | 149 ++ .../adafruit/hardware/nrf52/1.0.0/boards.txt | 716 ++++++ .../hardware/nrf52/1.0.0/cores/nRF5/Print.cpp | 420 ++++ .../hardware/nrf52/1.0.0/cores/nRF5/Print.h | 107 + .../hardware/nrf52/1.0.0/cores/nRF5/Udp.h | 92 + .../hardware/nrf52/1.0.0/platform.txt | 167 ++ .../variants/NINA_B112_ublox/pins_arduino.h | 17 + .../variants/NINA_B112_ublox/variant.cpp | 59 + .../1.0.0/variants/NINA_B112_ublox/variant.h | 172 ++ .../variants/NINA_B302_ublox/pins_arduino.h | 17 + .../variants/NINA_B302_ublox/variant.cpp | 87 + .../1.0.0/variants/NINA_B302_ublox/variant.h | 149 ++ .../sparkfun_nrf52840_mini/variant.cpp | 49 + .../variants/sparkfun_nrf52840_mini/variant.h | 152 ++ .../adafruit/hardware/nrf52/1.1.0/boards.txt | 716 ++++++ .../hardware/nrf52/1.1.0/cores/nRF5/Print.cpp | 420 ++++ .../hardware/nrf52/1.1.0/cores/nRF5/Print.h | 107 + .../hardware/nrf52/1.1.0/cores/nRF5/Udp.h | 92 + .../hardware/nrf52/1.1.0/platform.txt | 167 ++ .../variants/NINA_B112_ublox/pins_arduino.h | 17 + .../variants/NINA_B112_ublox/variant.cpp | 59 + .../1.1.0/variants/NINA_B112_ublox/variant.h | 172 ++ .../variants/NINA_B302_ublox/pins_arduino.h | 17 + .../variants/NINA_B302_ublox/variant.cpp | 87 + .../1.1.0/variants/NINA_B302_ublox/variant.h | 149 ++ .../sparkfun_nrf52840_mini/variant.cpp | 49 + .../variants/sparkfun_nrf52840_mini/variant.h | 152 ++ .../adafruit/hardware/nrf52/1.2.0/boards.txt | 834 +++++++ .../hardware/nrf52/1.2.0/cores/nRF5/Print.cpp | 420 ++++ .../hardware/nrf52/1.2.0/cores/nRF5/Print.h | 107 + .../hardware/nrf52/1.2.0/cores/nRF5/Udp.h | 92 + .../hardware/nrf52/1.2.0/platform.txt | 166 ++ .../variants/NINA_B112_ublox/pins_arduino.h | 17 + .../variants/NINA_B112_ublox/variant.cpp | 59 + .../1.2.0/variants/NINA_B112_ublox/variant.h | 172 ++ .../variants/NINA_B302_ublox/pins_arduino.h | 17 + .../variants/NINA_B302_ublox/variant.cpp | 87 + .../1.2.0/variants/NINA_B302_ublox/variant.h | 149 ++ .../sparkfun_nrf52840_mini/variant.cpp | 49 + .../variants/sparkfun_nrf52840_mini/variant.h | 152 ++ .../adafruit/hardware/nrf52/1.3.0/boards.txt | 834 +++++++ .../hardware/nrf52/1.3.0/cores/nRF5/Print.cpp | 420 ++++ .../hardware/nrf52/1.3.0/cores/nRF5/Print.h | 107 + .../hardware/nrf52/1.3.0/cores/nRF5/Udp.h | 92 + .../hardware/nrf52/1.3.0/platform.txt | 166 ++ .../variants/NINA_B112_ublox/pins_arduino.h | 17 + .../variants/NINA_B112_ublox/variant.cpp | 59 + .../1.3.0/variants/NINA_B112_ublox/variant.h | 172 ++ .../variants/NINA_B302_ublox/pins_arduino.h | 17 + .../variants/NINA_B302_ublox/variant.cpp | 87 + .../1.3.0/variants/NINA_B302_ublox/variant.h | 149 ++ .../sparkfun_nrf52840_mini/variant.cpp | 49 + .../variants/sparkfun_nrf52840_mini/variant.h | 152 ++ .../samd/1.5.14/cores/arduino/Print.cpp | 420 ++++ .../samd/1.5.14/cores/arduino/Print.h | 107 + .../hardware/samd/1.5.14/platform.txt | 232 ++ .../samd/1.6.0/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.6.0/cores/arduino/Print.h | 107 + .../adafruit/hardware/samd/1.6.0/platform.txt | 232 ++ .../samd/1.6.3/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.6.3/cores/arduino/Print.h | 107 + .../adafruit/hardware/samd/1.6.3/platform.txt | 226 ++ .../samd/1.6.4/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.6.4/cores/arduino/Print.h | 107 + .../adafruit/hardware/samd/1.6.4/platform.txt | 226 ++ .../samd/1.6.5/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.6.5/cores/arduino/Print.h | 107 + .../adafruit/hardware/samd/1.6.5/platform.txt | 227 ++ .../samd/1.6.6/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.6.6/cores/arduino/Print.h | 107 + .../adafruit/hardware/samd/1.6.6/platform.txt | 226 ++ .../samd/1.6.7/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.6.7/cores/arduino/Print.h | 107 + .../adafruit/hardware/samd/1.6.7/platform.txt | 226 ++ .../samd/1.6.8/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.6.8/cores/arduino/Print.h | 107 + .../adafruit/hardware/samd/1.6.8/platform.txt | 226 ++ .../samd/1.7.0/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.7.0/cores/arduino/Print.h | 107 + .../adafruit/hardware/samd/1.7.0/platform.txt | 226 ++ .../samd/1.7.1/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.7.1/cores/arduino/Print.h | 107 + .../adafruit/hardware/samd/1.7.1/platform.txt | 226 ++ .../samd/1.7.10/cores/arduino/Print.cpp | 420 ++++ .../samd/1.7.10/cores/arduino/Print.h | 107 + .../hardware/samd/1.7.10/platform.txt | 226 ++ .../samd/1.7.2/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.7.2/cores/arduino/Print.h | 107 + .../adafruit/hardware/samd/1.7.2/platform.txt | 226 ++ .../samd/1.7.3/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.7.3/cores/arduino/Print.h | 107 + .../adafruit/hardware/samd/1.7.3/platform.txt | 226 ++ .../samd/1.7.4/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.7.4/cores/arduino/Print.h | 107 + .../adafruit/hardware/samd/1.7.4/platform.txt | 226 ++ .../samd/1.7.5/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.7.5/cores/arduino/Print.h | 107 + .../adafruit/hardware/samd/1.7.5/platform.txt | 226 ++ .../samd/1.7.6/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.7.6/cores/arduino/Print.h | 107 + .../adafruit/hardware/samd/1.7.6/platform.txt | 226 ++ .../samd/1.7.7/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.7.7/cores/arduino/Print.h | 107 + .../adafruit/hardware/samd/1.7.7/platform.txt | 226 ++ .../samd/1.7.8/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.7.8/cores/arduino/Print.h | 107 + .../adafruit/hardware/samd/1.7.8/platform.txt | 238 ++ .../samd/1.7.9/cores/arduino/Print.cpp | 420 ++++ .../hardware/samd/1.7.9/cores/arduino/Print.h | 107 + .../adafruit/hardware/samd/1.7.9/platform.txt | 238 ++ .../lwipstack/include/lwipstack/lwipopts.h | 347 +++ .../libraries/SocketWrapper/src/MbedUdp.cpp | 217 ++ .../libraries/SocketWrapper/src/MbedUdp.h | 105 + .../2.4.1/portenta_post_install.sh | 22 + .../lwipstack/include/lwipstack/lwipopts.h | 347 +++ .../libraries/SocketWrapper/src/MbedUdp.cpp | 217 ++ .../libraries/SocketWrapper/src/MbedUdp.h | 105 + .../2.5.2/portenta_post_install.sh | 22 + .../lwipstack/include/lwipstack/lwipopts.h | 347 +++ .../libraries/SocketWrapper/src/MbedUdp.cpp | 217 ++ .../libraries/SocketWrapper/src/MbedUdp.h | 105 + .../2.6.1/portenta_post_install.sh | 22 + .../lwipstack/include/lwipstack/lwipopts.h | 347 +++ .../2.7.2/portenta_post_install.sh | 22 + .../lwipstack/include/lwipstack/lwipopts.h | 347 +++ .../2.8.0/portenta_post_install.sh | 22 + .../lwipstack/include/lwipstack/lwipopts.h | 347 +++ .../3.0.0/portenta_post_install.sh | 22 + .../lwipstack/include/lwipstack/lwipopts.h | 347 +++ .../3.0.1/portenta_post_install.sh | 22 + .../arduino/hardware/sam/1.6.12/platform.txt | 110 + .../arduino/hardware/samd/1.8.10/platform.txt | 246 +++ .../arduino/hardware/samd/1.8.11/platform.txt | 246 +++ .../arduino/hardware/samd/1.8.12/platform.txt | 258 +++ .../arduino/hardware/samd/1.8.13/platform.txt | 266 +++ .../samd/1.8.6/cores/arduino/Arduino.h | 160 ++ .../arduino/hardware/samd/1.8.6/platform.txt | 248 +++ .../samd/1.8.7/cores/arduino/Arduino.h | 160 ++ .../arduino/hardware/samd/1.8.7/platform.txt | 248 +++ .../hardware/samd/1.8.8/cores/Arduino.h | 165 ++ .../samd/1.8.8/cores/arduino/Arduino.h | 165 ++ .../arduino/hardware/samd/1.8.8/platform.txt | 248 +++ .../samd/1.8.9/cores/arduino/Arduino.h | 165 ++ .../arduino/hardware/samd/1.8.9/platform.txt | 242 ++ .../hardware/teensy/avr/boards.txt | 1798 +++++++++++++++ .../teensy/avr/cores/teensy/Stream.cpp | 446 ++++ .../hardware/teensy/avr/cores/teensy/Stream.h | 149 ++ .../teensy/avr/cores/teensy3/Stream.cpp | 446 ++++ .../teensy/avr/cores/teensy3/Stream.h | 149 ++ .../teensy/avr/cores/teensy4/Stream.cpp | 446 ++++ .../teensy/avr/cores/teensy4/Stream.h | 149 ++ .../avr/1.1.36/cores/industrialshields/Udp.h | 89 + .../avr/1.1.37/cores/industrialshields/Udp.h | 89 + .../3.0.10/cores/arduino/avr/pgmspace.h | 122 + .../AmebaD/3.0.8/cores/arduino/avr/pgmspace.h | 122 + .../AmebaD/3.1.0/cores/arduino/avr/pgmspace.h | 122 + .../AmebaD/3.1.1/cores/arduino/avr/pgmspace.h | 122 + .../AmebaD/3.1.2/cores/arduino/avr/pgmspace.h | 122 + .../rp2040/hardware/rp2040/1.2.1/platform.txt | 146 ++ .../rp2040/hardware/rp2040/1.2.2/platform.txt | 145 ++ .../rp2040/hardware/rp2040/1.3.0/platform.txt | 145 ++ .../rp2040/1.3.1/cores/rp2040/Arduino.h | 115 + .../rp2040/hardware/rp2040/1.3.1/platform.txt | 145 ++ .../rp2040/1.4.0/cores/rp2040/Arduino.h | 115 + .../rp2040/hardware/rp2040/1.4.0/platform.txt | 145 ++ .../MySQL_MariaDB_Generic-1.7.2/README.md | 1966 +++++++++++++++++ .../MySQL_MariaDB_Generic-1.7.2/changelog.md | 155 ++ .../Ethernet/Basic_Insert/Basic_Insert.ino | 292 +++ .../examples/Ethernet/Basic_Insert/defines.h | 463 ++++ .../Ethernet/Basic_Select/Basic_Select.ino | 326 +++ .../examples/Ethernet/Basic_Select/defines.h | 463 ++++ .../Complex_Insert/Complex_Insert.ino | 317 +++ .../Ethernet/Complex_Insert/defines.h | 463 ++++ .../Complex_Select/Complex_Select.ino | 323 +++ .../Ethernet/Complex_Select/defines.h | 467 ++++ .../examples/Ethernet/Connect/Connect.ino | 244 ++ .../examples/Ethernet/Connect/defines.h | 463 ++++ .../Connect_By_Hostname.ino | 243 ++ .../Ethernet/Connect_By_Hostname/defines.h | 463 ++++ .../Connect_Default_Database.ino | 241 ++ .../Connect_Default_Database/defines.h | 463 ++++ .../Connect_Disconnect/Connect_Disconnect.ino | 256 +++ .../Ethernet/Connect_Disconnect/defines.h | 463 ++++ .../Ethernet/Query_Progmem/Query_Progmem.ino | 270 +++ .../examples/Ethernet/Query_Progmem/defines.h | 463 ++++ .../Ethernet/Query_Results/Query_Results.ino | 300 +++ .../examples/Ethernet/Query_Results/defines.h | 463 ++++ .../multiFileProject_Ethernet/defines.h | 463 ++++ .../multiFileProject.cpp | 17 + .../multiFileProject.h | 20 + .../multiFileProject_Ethernet.ino | 188 ++ .../Basic_Insert/Basic_Insert.ino | 159 ++ .../NativeEthernet/Basic_Insert/defines.h | 84 + .../Basic_Select/Basic_Select.ino | 193 ++ .../NativeEthernet/Basic_Select/defines.h | 84 + .../Complex_Insert/Complex_Insert.ino | 184 ++ .../NativeEthernet/Complex_Insert/defines.h | 84 + .../Complex_Select/Complex_Select.ino | 190 ++ .../NativeEthernet/Complex_Select/defines.h | 84 + .../NativeEthernet/Connect/Connect.ino | 111 + .../examples/NativeEthernet/Connect/defines.h | 84 + .../Connect_By_Hostname.ino | 109 + .../Connect_By_Hostname/defines.h | 84 + .../Connect_Default_Database.ino | 107 + .../Connect_Default_Database/defines.h | 84 + .../Connect_Disconnect/Connect_Disconnect.ino | 123 ++ .../Connect_Disconnect/defines.h | 84 + .../Query_Progmem/Query_Progmem.ino | 134 ++ .../NativeEthernet/Query_Progmem/defines.h | 84 + .../Query_Results/Query_Results.ino | 167 ++ .../NativeEthernet/Query_Results/defines.h | 84 + .../multiFileProject_NativeEthernet/defines.h | 84 + .../multiFileProject.cpp | 17 + .../multiFileProject.h | 20 + .../multiFileProject_NativeEthernet.ino | 47 + .../Ethernet/Basic_Insert/Basic_Insert.ino | 313 +++ .../Ethernet/Basic_Insert/defines.h | 443 ++++ .../Ethernet/Basic_Select/Basic_Select.ino | 347 +++ .../Ethernet/Basic_Select/defines.h | 443 ++++ .../Complex_Insert/Complex_Insert.ino | 338 +++ .../Ethernet/Complex_Insert/defines.h | 443 ++++ .../Portenta_H7/Ethernet/Connect/Connect.ino | 265 +++ .../Portenta_H7/Ethernet/Connect/defines.h | 443 ++++ .../Connect_By_Hostname.ino | 264 +++ .../Ethernet/Connect_By_Hostname/defines.h | 443 ++++ .../Connect_Default_Database.ino | 262 +++ .../Connect_Default_Database/defines.h | 443 ++++ .../defines.h | 443 ++++ .../multiFileProject.cpp | 17 + .../multiFileProject.h | 20 + .../multiFileProject_Portenta_H7_Ethernet.ino | 47 + .../Basic_Insert_WiFi/Basic_Insert_WiFi.ino | 159 ++ .../WiFi/Basic_Insert_WiFi/Credentials.h | 24 + .../WiFi/Basic_Insert_WiFi/defines.h | 52 + .../Basic_Select_WiFi/Basic_Select_WiFi.ino | 192 ++ .../WiFi/Basic_Select_WiFi/Credentials.h | 24 + .../WiFi/Basic_Select_WiFi/defines.h | 52 + .../Complex_Insert_WiFi.ino | 182 ++ .../WiFi/Complex_Insert_WiFi/Credentials.h | 24 + .../WiFi/Complex_Insert_WiFi/defines.h | 52 + .../Complex_Select_WiFi.ino | 190 ++ .../WiFi/Complex_Select_WiFi/Credentials.h | 24 + .../WiFi/Complex_Select_WiFi/defines.h | 52 + .../Connect_Default_Database_WiFi.ino | 108 + .../Credentials.h | 24 + .../Connect_Default_Database_WiFi/defines.h | 52 + .../Connect_Disconnect_WiFi.ino | 122 + .../Connect_Disconnect_WiFi/Credentials.h | 24 + .../WiFi/Connect_Disconnect_WiFi/defines.h | 52 + .../WiFi/Connect_WiFi/Connect_WiFi.ino | 108 + .../WiFi/Connect_WiFi/Credentials.h | 24 + .../Portenta_H7/WiFi/Connect_WiFi/defines.h | 52 + .../WiFi/Reboot_WiFi/Credentials.h | 24 + .../WiFi/Reboot_WiFi/Reboot_WiFi.ino | 193 ++ .../Portenta_H7/WiFi/Reboot_WiFi/defines.h | 52 + .../Credentials.h | 24 + .../defines.h | 52 + .../multiFileProject.cpp | 17 + .../multiFileProject.h | 20 + .../multiFileProject_Portenta_H7_WiFi.ino | 48 + .../QNEthernet/Basic_Insert/Basic_Insert.ino | 215 ++ .../QNEthernet/Basic_Insert/defines.h | 103 + .../QNEthernet/Basic_Select/Basic_Select.ino | 249 +++ .../QNEthernet/Basic_Select/defines.h | 103 + .../Complex_Insert/Complex_Insert.ino | 240 ++ .../QNEthernet/Complex_Insert/defines.h | 103 + .../Complex_Select/Complex_Select.ino | 246 +++ .../QNEthernet/Complex_Select/defines.h | 103 + .../examples/QNEthernet/Connect/Connect.ino | 167 ++ .../examples/QNEthernet/Connect/defines.h | 103 + .../Connect_By_Hostname.ino | 172 ++ .../QNEthernet/Connect_By_Hostname/defines.h | 103 + .../Connect_Default_Database.ino | 164 ++ .../Connect_Default_Database/defines.h | 103 + .../Connect_Disconnect/Connect_Disconnect.ino | 179 ++ .../QNEthernet/Connect_Disconnect/defines.h | 103 + .../Query_Progmem/Query_Progmem.ino | 190 ++ .../QNEthernet/Query_Progmem/defines.h | 103 + .../Query_Results/Query_Results.ino | 224 ++ .../QNEthernet/Query_Results/defines.h | 103 + .../multiFileProject_QNEthernet/defines.h | 103 + .../multiFileProject.cpp | 17 + .../multiFileProject.h | 20 + .../multiFileProject_QNEthernet.ino | 47 + .../Basic_Insert_WT32_ETH01.ino | 168 ++ .../Basic_Select_WT32_ETH01.ino | 215 ++ .../Complex_Insert_WT32_ETH01.ino | 205 ++ .../Complex_Select_WT32_ETH01.ino | 212 ++ .../Connect_Default_Database_WT32_ETH01.ino | 130 ++ .../Connect_Disconnect_WT32_ETH01.ino | 144 ++ .../Connect_WT32_ETH01/Connect_WT32_ETH01.ino | 130 ++ .../Query_Progmem_WT32_ETH01.ino | 155 ++ .../Query_Results_WT32_ETH01.ino | 190 ++ .../Reboot_WT32_ETH01/Reboot_WT32_ETH01.ino | 216 ++ .../multiFileProject.cpp | 17 + .../multiFileProject.h | 20 + .../multiFileProject_WT32_ETH01.ino | 56 + .../Basic_Insert_ESP/Basic_Insert_ESP.ino | 152 ++ .../WiFi/Basic_Insert_ESP/Credentials.h | 24 + .../Basic_Insert_WiFi/Basic_Insert_WiFi.ino | 183 ++ .../WiFi/Basic_Insert_WiFi/Credentials.h | 24 + .../examples/WiFi/Basic_Insert_WiFi/defines.h | 381 ++++ .../Basic_Select_WiFi/Basic_Select_WiFi.ino | 216 ++ .../WiFi/Basic_Select_WiFi/Credentials.h | 24 + .../examples/WiFi/Basic_Select_WiFi/defines.h | 381 ++++ .../Complex_Insert_WiFi.ino | 206 ++ .../WiFi/Complex_Insert_WiFi/Credentials.h | 24 + .../WiFi/Complex_Insert_WiFi/defines.h | 381 ++++ .../Complex_Select_WiFi.ino | 213 ++ .../WiFi/Complex_Select_WiFi/Credentials.h | 24 + .../WiFi/Complex_Select_WiFi/defines.h | 381 ++++ .../Connect_Default_Database_WiFi.ino | 132 ++ .../Credentials.h | 24 + .../Connect_Default_Database_WiFi/defines.h | 381 ++++ .../Connect_Disconnect_WiFi.ino | 145 ++ .../Connect_Disconnect_WiFi/Credentials.h | 24 + .../WiFi/Connect_Disconnect_WiFi/defines.h | 381 ++++ .../WiFi/Connect_WiFi/Connect_WiFi.ino | 131 ++ .../examples/WiFi/Connect_WiFi/Credentials.h | 24 + .../examples/WiFi/Connect_WiFi/defines.h | 381 ++++ .../WiFi/Query_Progmem_WiFi/Credentials.h | 24 + .../Query_Progmem_WiFi/Query_Progmem_WiFi.ino | 160 ++ .../WiFi/Query_Progmem_WiFi/defines.h | 381 ++++ .../WiFi/Query_Results_WiFi/Credentials.h | 24 + .../Query_Results_WiFi/Query_Results_WiFi.ino | 191 ++ .../WiFi/Query_Results_WiFi/defines.h | 381 ++++ .../examples/WiFi/Reboot_WiFi/Credentials.h | 24 + .../examples/WiFi/Reboot_WiFi/Reboot_WiFi.ino | 217 ++ .../examples/WiFi/Reboot_WiFi/defines.h | 381 ++++ .../WiFi/multiFileProject_WiFi/Credentials.h | 24 + .../WiFi/multiFileProject_WiFi/defines.h | 381 ++++ .../multiFileProject.cpp | 17 + .../multiFileProject_WiFi/multiFileProject.h | 20 + .../multiFileProject_WiFi.ino | 48 + .../Basic_Insert_WiFiNINA.ino | 184 ++ .../Basic_Insert_WiFiNINA/Credentials.h | 24 + .../WiFiNINA/Basic_Insert_WiFiNINA/defines.h | 356 +++ .../Basic_Select_WiFiNINA.ino | 219 ++ .../Basic_Select_WiFiNINA/Credentials.h | 24 + .../WiFiNINA/Basic_Select_WiFiNINA/defines.h | 356 +++ .../Complex_Insert_WiFiNINA.ino | 209 ++ .../Complex_Insert_WiFiNINA/Credentials.h | 24 + .../Complex_Insert_WiFiNINA/defines.h | 356 +++ .../Complex_Select_WiFiNINA.ino | 215 ++ .../Complex_Select_WiFiNINA/Credentials.h | 24 + .../Complex_Select_WiFiNINA/defines.h | 356 +++ .../Connect_Default_Database_WiFiNINA.ino | 134 ++ .../Credentials.h | 24 + .../defines.h | 356 +++ .../Connect_Disconnect_WiFiNINA.ino | 151 ++ .../Connect_Disconnect_WiFiNINA/Credentials.h | 24 + .../Connect_Disconnect_WiFiNINA/defines.h | 356 +++ .../Connect_WiFiNINA/Connect_WiFiNINA.ino | 134 ++ .../WiFiNINA/Connect_WiFiNINA/Credentials.h | 24 + .../WiFiNINA/Connect_WiFiNINA/defines.h | 356 +++ .../Query_Progmem_WiFiNINA/Credentials.h | 24 + .../Query_Progmem_WiFiNINA.ino | 162 ++ .../WiFiNINA/Query_Progmem_WiFiNINA/defines.h | 356 +++ .../Query_Results_WiFiNINA/Credentials.h | 24 + .../Query_Results_WiFiNINA.ino | 193 ++ .../WiFiNINA/Query_Results_WiFiNINA/defines.h | 356 +++ .../WiFiNINA/Reboot_WiFiNINA/Credentials.h | 24 + .../Reboot_WiFiNINA/Reboot_WiFiNINA.ino | 231 ++ .../WiFiNINA/Reboot_WiFiNINA/defines.h | 356 +++ .../multiFileProject_WiFiNINA/Credentials.h | 24 + .../multiFileProject_WiFiNINA/defines.h | 356 +++ .../multiFileProject.cpp | 17 + .../multiFileProject.h | 20 + .../multiFileProject_WiFiNINA.ino | 48 + .../MySQL_MariaDB_Generic-1.7.2/keywords.txt | 120 + .../MySQL_MariaDB_Generic-1.7.2/library.json | 99 + .../library.properties | 11 + .../pics/Basic_Insert_ESP32_S2.png | Bin 0 -> 78271 bytes .../pics/ENC28J60.jpg | Bin 0 -> 23212 bytes .../pics/ICSP_connector.jpg | Bin 0 -> 9748 bytes .../pics/MySQL_MariaDB_Generic_v.1.0.2.png | Bin 0 -> 47436 bytes .../pics/Portenta_Vision.jpg | Bin 0 -> 54733 bytes .../pics/RP2040-Pinout.png | Bin 0 -> 60562 bytes .../pics/W5100.jpg | Bin 0 -> 334198 bytes .../pics/W5500.jpg | Bin 0 -> 170351 bytes .../pics/W5500_1.jpg | Bin 0 -> 281369 bytes .../platformio/platformio.ini | 503 +++++ .../src/MySQL_Generic.h | 67 + .../src/MySQL_Generic.hpp | 55 + .../src/MySQL_Generic_Connection.h | 99 + .../src/MySQL_Generic_Connection_Impl.h | 284 +++ .../src/MySQL_Generic_Debug.h | 151 ++ .../src/MySQL_Generic_Encrypt_Sha1.h | 88 + .../src/MySQL_Generic_Encrypt_Sha1_Impl.h | 208 ++ .../src/MySQL_Generic_Ethernet.h | 176 ++ .../src/MySQL_Generic_Packet.h | 119 + .../src/MySQL_Generic_Packet_Impl.h | 778 +++++++ .../src/MySQL_Generic_Query.h | 146 ++ .../src/MySQL_Generic_Query_Impl.h | 773 +++++++ .../src/MySQL_Generic_WiFi.h | 93 + .../src/MySQL_Generic_WiFiNINA.h | 56 + libraries/esp32cam-main/.clang-format | 12 + .../esp32cam-main/.github/workflows/build.yml | 73 + libraries/esp32cam-main/.gitignore | 3 + libraries/esp32cam-main/LICENSE | 15 + libraries/esp32cam-main/README.md | 20 + libraries/esp32cam-main/docs/Doxyfile | 20 + libraries/esp32cam-main/docs/_redirects | 1 + libraries/esp32cam-main/docs/build.sh | 8 + .../docs/filter-Doxygen-warning.awk | 14 + libraries/esp32cam-main/docs/logo.svg | 21 + .../examples/AsyncCam/AsyncCam.hpp | 16 + .../examples/AsyncCam/AsyncCam.ino | 64 + .../esp32cam-main/examples/AsyncCam/README.md | 6 + .../examples/AsyncCam/handlers.cpp | 127 ++ .../examples/GoDisplay/GoDisplay.ino | 51 + .../examples/GoDisplay/README.md | 8 + .../examples/GoDisplay/SpiRamOStream.hpp | 67 + .../esp32cam-main/examples/WifiCam/README.md | 11 + .../examples/WifiCam/WifiCam.hpp | 15 + .../examples/WifiCam/WifiCam.ino | 59 + .../examples/WifiCam/handlers.cpp | 137 ++ libraries/esp32cam-main/library.properties | 9 + libraries/esp32cam-main/mk/format-code.sh | 6 + .../esp32cam-main/src/esp32cam-asyncweb.h | 288 +++ libraries/esp32cam-main/src/esp32cam.cpp | 110 + libraries/esp32cam-main/src/esp32cam.h | 73 + .../esp32cam-main/src/internal/config.cpp | 104 + .../esp32cam-main/src/internal/config.hpp | 58 + .../esp32cam-main/src/internal/frame.cpp | 115 + .../esp32cam-main/src/internal/frame.hpp | 93 + .../esp32cam-main/src/internal/mjpeg.cpp | 103 + .../esp32cam-main/src/internal/mjpeg.hpp | 121 + libraries/esp32cam-main/src/internal/pins.hpp | 136 ++ .../esp32cam-main/src/internal/resolution.cpp | 86 + .../esp32cam-main/src/internal/resolution.hpp | 159 ++ libraries/readme.txt | 1 + 652 files changed, 136011 insertions(+) create mode 100644 Dokumentation.odt create mode 100644 Dokumentation.pdf create mode 100644 ESP32DatabaseInsert_SetUp/Credentials.h create mode 100644 ESP32DatabaseInsert_SetUp/ESP32DatabaseInsert_SetUp.ino create mode 100644 ESP32DatabaseInsert_SetUp/defines.h create mode 100644 ESP32QRCodeReader_Page/ESP32QRCodeReader_Page.ino create mode 100644 ESP32QRCodeReader_Page/LICENSE create mode 100644 ESP32QRCodeReader_Page/README.md create mode 100644 ESP32QRCodeReader_Page/collections.c create mode 100644 ESP32QRCodeReader_Page/collections.h create mode 100644 ESP32QRCodeReader_Page/decode.c create mode 100644 ESP32QRCodeReader_Page/fmath.h create mode 100644 ESP32QRCodeReader_Page/identify.c create mode 100644 ESP32QRCodeReader_Page/quirc.c create mode 100644 ESP32QRCodeReader_Page/quirc.h create mode 100644 ESP32QRCodeReader_Page/quirc_internal.h create mode 100644 ESP32QRCodeReader_Page/version_db.c create mode 100644 ESP32QRReaderDBWriter/Credentials.h create mode 100644 ESP32QRReaderDBWriter/ESP32QRReaderDBWriter.ino create mode 100644 ESP32QRReaderDBWriter/LICENSE create mode 100644 ESP32QRReaderDBWriter/README.md create mode 100644 ESP32QRReaderDBWriter/collections.c create mode 100644 ESP32QRReaderDBWriter/collections.h create mode 100644 ESP32QRReaderDBWriter/decode.c create mode 100644 ESP32QRReaderDBWriter/defines.h create mode 100644 ESP32QRReaderDBWriter/fmath.h create mode 100644 ESP32QRReaderDBWriter/identify.c create mode 100644 ESP32QRReaderDBWriter/quirc.c create mode 100644 ESP32QRReaderDBWriter/quirc.h create mode 100644 ESP32QRReaderDBWriter/quirc_internal.h create mode 100644 ESP32QRReaderDBWriter/version_db.c create mode 100644 ESP32QRReaderDBWriterVideoStreamer/Credentials.h create mode 100644 ESP32QRReaderDBWriterVideoStreamer/ESP32QRReaderDBWriterVideoStreamer.ino create mode 100644 ESP32QRReaderDBWriterVideoStreamer/LICENSE create mode 100644 ESP32QRReaderDBWriterVideoStreamer/README.md create mode 100644 ESP32QRReaderDBWriterVideoStreamer/collections.c create mode 100644 ESP32QRReaderDBWriterVideoStreamer/collections.h create mode 100644 ESP32QRReaderDBWriterVideoStreamer/decode.c create mode 100644 ESP32QRReaderDBWriterVideoStreamer/defines.h create mode 100644 ESP32QRReaderDBWriterVideoStreamer/fmath.h create mode 100644 ESP32QRReaderDBWriterVideoStreamer/identify.c create mode 100644 ESP32QRReaderDBWriterVideoStreamer/quirc.c create mode 100644 ESP32QRReaderDBWriterVideoStreamer/quirc.h create mode 100644 ESP32QRReaderDBWriterVideoStreamer/quirc_internal.h create mode 100644 ESP32QRReaderDBWriterVideoStreamer/version_db.c create mode 100644 ESP32_VideoStreamer/ESP32_VideoStreamer.ino create mode 100644 libraries/ESP32QRCodeReader_Page_original/ESP32QRCodeReader_Page.ino create mode 100644 libraries/ESP32QRCodeReader_Page_original/LICENSE create mode 100644 libraries/ESP32QRCodeReader_Page_original/README.md create mode 100644 libraries/ESP32QRCodeReader_Page_original/collections.c create mode 100644 libraries/ESP32QRCodeReader_Page_original/collections.h create mode 100644 libraries/ESP32QRCodeReader_Page_original/decode.c create mode 100644 libraries/ESP32QRCodeReader_Page_original/fmath.h create mode 100644 libraries/ESP32QRCodeReader_Page_original/identify.c create mode 100644 libraries/ESP32QRCodeReader_Page_original/quirc.c create mode 100644 libraries/ESP32QRCodeReader_Page_original/quirc.h create mode 100644 libraries/ESP32QRCodeReader_Page_original/quirc_internal.h create mode 100644 libraries/ESP32QRCodeReader_Page_original/version_db.c create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/CONTRIBUTING.md create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LICENSE create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/Ethernet.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/Ethernet.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/EthernetServer.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/utility/w5100.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/utility/w5100.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet2/src/Ethernet2.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet2/src/Ethernet2.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet2/src/EthernetUdp2.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet2/src/EthernetUdp2.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet3/src/Ethernet3.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet3/src/Ethernet3.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/EthernetLarge.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/EthernetLarge.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/EthernetServer.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/utility/w5100.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/utility/w5100.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet-2.0.9/UIPEthernet.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet-2.0.9/UIPEthernet.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet-2.0.9/utility/Enc28J60Network.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet-2.0.9/utility/Enc28J60Network.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet/UIPEthernet.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet/UIPEthernet.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet/utility/Enc28J60Network.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet/utility/Enc28J60Network.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/esp32/cores/esp32/Server.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Fab_SAM_Arduino/hardware/samd/1.6.18-alpha2/boards.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Maixduino/hardware/k210/0.3.10/cores/arduino/Stream.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Maixduino/hardware/k210/0.3.11/cores/arduino/Stream.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/1.9.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/1.9.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/1.9.0/variants/NUCLEO_F767ZI/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/1.9.0/variants/NUCLEO_L053R8/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/variants/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/variants/L052R(6-8)H_L053R(6-8)H/variant_generic.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/variant_generic.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.1.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.1.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.1.0/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.1.0/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/variant_generic.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.2.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.2.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.2.0/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.2.0/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/variant_generic.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/rp2040/1.9.3/variants/rpipico/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/rp2040/2.7.2/boards.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/rp2040/2.7.2/variants/Seeed_XIAO_RP2040/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.7/cores/arduino/Arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.7/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.7/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.7/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.8/cores/arduino/Arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.8/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.8/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.8/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.9/cores/arduino/Arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.9/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.9/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.9/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.1/cores/arduino/Arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.1/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.1/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.1/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.2/cores/arduino/Arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.2/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.2/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.2/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/SparkFun/hardware/samd/1.8.3/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/SparkFun/hardware/samd/1.8.3/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/SparkFun/hardware/samd/1.8.3/cores/arduino51/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/SparkFun/hardware/samd/1.8.3/cores/arduino51/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/boards.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/cores/nRF5/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/cores/nRF5/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/cores/nRF5/Udp.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B112_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B112_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B112_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B302_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B302_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B302_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/boards.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/cores/nRF5/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/cores/nRF5/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/cores/nRF5/Udp.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B112_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B112_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B112_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B302_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B302_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B302_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/boards.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/cores/nRF5/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/cores/nRF5/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/cores/nRF5/Udp.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B112_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B112_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B112_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B302_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B302_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B302_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/boards.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/cores/nRF5/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/cores/nRF5/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/cores/nRF5/Udp.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/boards.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/cores/nRF5/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/cores/nRF5/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/cores/nRF5/Udp.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B112_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B112_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B112_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B302_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B302_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B302_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/boards.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/cores/nRF5/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/cores/nRF5/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/cores/nRF5/Udp.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B112_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B112_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B112_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B302_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B302_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B302_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/boards.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/cores/nRF5/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/cores/nRF5/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/cores/nRF5/Udp.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B112_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B112_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B112_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B302_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B302_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B302_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/boards.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/cores/nRF5/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/cores/nRF5/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/cores/nRF5/Udp.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B112_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B112_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B112_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B302_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B302_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B302_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/boards.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/cores/nRF5/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/cores/nRF5/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/cores/nRF5/Udp.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B112_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B112_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B112_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B302_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B302_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B302_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/sparkfun_nrf52840_mini/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/sparkfun_nrf52840_mini/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/boards.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/cores/nRF5/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/cores/nRF5/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/cores/nRF5/Udp.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B112_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B112_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B112_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B302_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B302_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B302_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/sparkfun_nrf52840_mini/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/sparkfun_nrf52840_mini/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/boards.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/cores/nRF5/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/cores/nRF5/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/cores/nRF5/Udp.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B112_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B112_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B112_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B302_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B302_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B302_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/sparkfun_nrf52840_mini/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/sparkfun_nrf52840_mini/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/boards.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Udp.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/pins_arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/sparkfun_nrf52840_mini/variant.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/sparkfun_nrf52840_mini/variant.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.5.14/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.5.14/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.5.14/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.0/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.0/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.0/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.3/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.3/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.3/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.4/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.4/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.4/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.5/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.5/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.5/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.6/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.6/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.6/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.7/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.7/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.7/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.8/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.8/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.8/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.0/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.0/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.0/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.1/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.1/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.1/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.10/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.10/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.10/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.2/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.2/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.2/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.3/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.3/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.3/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.4/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.4/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.4/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.5/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.5/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.5/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.6/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.6/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.6/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.7/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.7/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.7/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.8/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.8/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.8/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.9/cores/arduino/Print.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.9/cores/arduino/Print.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.9/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/libraries/SocketWrapper/src/MbedUdp.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/libraries/SocketWrapper/src/MbedUdp.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/portenta_post_install.sh create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/libraries/SocketWrapper/src/MbedUdp.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/libraries/SocketWrapper/src/MbedUdp.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/portenta_post_install.sh create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/libraries/SocketWrapper/src/MbedUdp.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/libraries/SocketWrapper/src/MbedUdp.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/portenta_post_install.sh create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.7.2/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.7.2/portenta_post_install.sh create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.8.0/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.8.0/portenta_post_install.sh create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/3.0.0/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/3.0.0/portenta_post_install.sh create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/3.0.1/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/3.0.1/portenta_post_install.sh create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/sam/1.6.12/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.10/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.11/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.12/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.13/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.6/cores/arduino/Arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.6/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.7/cores/arduino/Arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.7/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.8/cores/Arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.8/cores/arduino/Arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.8/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.9/cores/arduino/Arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.9/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/boards.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy/Stream.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy/Stream.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy3/Stream.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy3/Stream.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy4/Stream.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy4/Stream.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/industrialshields/hardware/avr/1.1.36/cores/industrialshields/Udp.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/industrialshields/hardware/avr/1.1.37/cores/industrialshields/Udp.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.0.10/cores/arduino/avr/pgmspace.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.0.8/cores/arduino/avr/pgmspace.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.1.0/cores/arduino/avr/pgmspace.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.1.1/cores/arduino/avr/pgmspace.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.1.2/cores/arduino/avr/pgmspace.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.2.1/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.2.2/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.3.0/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.3.1/cores/rp2040/Arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.3.1/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.4.0/cores/rp2040/Arduino.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.4.0/platform.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/README.md create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/changelog.md create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Basic_Insert/Basic_Insert.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Basic_Insert/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Basic_Select/Basic_Select.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Basic_Select/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Complex_Insert/Complex_Insert.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Complex_Insert/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Complex_Select/Complex_Select.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Complex_Select/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect/Connect.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_By_Hostname/Connect_By_Hostname.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_By_Hostname/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_Default_Database/Connect_Default_Database.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_Default_Database/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_Disconnect/Connect_Disconnect.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_Disconnect/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Query_Progmem/Query_Progmem.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Query_Progmem/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Query_Results/Query_Results.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Query_Results/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/multiFileProject_Ethernet/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/multiFileProject_Ethernet/multiFileProject.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/multiFileProject_Ethernet/multiFileProject.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/multiFileProject_Ethernet/multiFileProject_Ethernet.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Basic_Insert/Basic_Insert.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Basic_Insert/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Basic_Select/Basic_Select.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Basic_Select/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Complex_Insert/Complex_Insert.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Complex_Insert/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Complex_Select/Complex_Select.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Complex_Select/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect/Connect.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_By_Hostname/Connect_By_Hostname.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_By_Hostname/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_Default_Database/Connect_Default_Database.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_Default_Database/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_Disconnect/Connect_Disconnect.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_Disconnect/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Query_Progmem/Query_Progmem.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Query_Progmem/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Query_Results/Query_Results.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Query_Results/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/multiFileProject_NativeEthernet/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/multiFileProject_NativeEthernet/multiFileProject.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/multiFileProject_NativeEthernet/multiFileProject.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/multiFileProject_NativeEthernet/multiFileProject_NativeEthernet.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Basic_Insert/Basic_Insert.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Basic_Insert/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Basic_Select/Basic_Select.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Basic_Select/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Complex_Insert/Complex_Insert.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Complex_Insert/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect/Connect.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect_By_Hostname/Connect_By_Hostname.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect_By_Hostname/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect_Default_Database/Connect_Default_Database.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect_Default_Database/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/multiFileProject_Portenta_H7_Ethernet/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/multiFileProject_Portenta_H7_Ethernet/multiFileProject.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/multiFileProject_Portenta_H7_Ethernet/multiFileProject.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/multiFileProject_Portenta_H7_Ethernet/multiFileProject_Portenta_H7_Ethernet.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Insert_WiFi/Basic_Insert_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Insert_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Insert_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Select_WiFi/Basic_Select_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Select_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Select_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Insert_WiFi/Complex_Insert_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Insert_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Insert_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Select_WiFi/Complex_Select_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Select_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Select_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Default_Database_WiFi/Connect_Default_Database_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Default_Database_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Default_Database_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Disconnect_WiFi/Connect_Disconnect_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Disconnect_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Disconnect_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_WiFi/Connect_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Reboot_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Reboot_WiFi/Reboot_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Reboot_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/multiFileProject.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/multiFileProject.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/multiFileProject_Portenta_H7_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Basic_Insert/Basic_Insert.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Basic_Insert/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Basic_Select/Basic_Select.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Basic_Select/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Complex_Insert/Complex_Insert.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Complex_Insert/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Complex_Select/Complex_Select.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Complex_Select/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect/Connect.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_By_Hostname/Connect_By_Hostname.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_By_Hostname/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_Default_Database/Connect_Default_Database.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_Default_Database/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_Disconnect/Connect_Disconnect.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_Disconnect/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Query_Progmem/Query_Progmem.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Query_Progmem/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Query_Results/Query_Results.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Query_Results/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/multiFileProject_QNEthernet/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/multiFileProject_QNEthernet/multiFileProject.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/multiFileProject_QNEthernet/multiFileProject.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/multiFileProject_QNEthernet/multiFileProject_QNEthernet.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Basic_Insert_WT32_ETH01/Basic_Insert_WT32_ETH01.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Basic_Select_WT32_ETH01/Basic_Select_WT32_ETH01.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Complex_Insert_WT32_ETH01/Complex_Insert_WT32_ETH01.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Complex_Select_WT32_ETH01/Complex_Select_WT32_ETH01.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Connect_Default_Database_WT32_ETH01/Connect_Default_Database_WT32_ETH01.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Connect_Disconnect_WT32_ETH01/Connect_Disconnect_WT32_ETH01.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Connect_WT32_ETH01/Connect_WT32_ETH01.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Query_Progmem_WT32_ETH01/Query_Progmem_WT32_ETH01.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Query_Results_WT32_ETH01/Query_Results_WT32_ETH01.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Reboot_WT32_ETH01/Reboot_WT32_ETH01.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/multiFileProject_WT32_ETH01/multiFileProject.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/multiFileProject_WT32_ETH01/multiFileProject.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/multiFileProject_WT32_ETH01/multiFileProject_WT32_ETH01.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_ESP/Basic_Insert_ESP.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_ESP/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_WiFi/Basic_Insert_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Select_WiFi/Basic_Select_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Select_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Select_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Insert_WiFi/Complex_Insert_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Insert_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Insert_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Select_WiFi/Complex_Select_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Select_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Select_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Default_Database_WiFi/Connect_Default_Database_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Default_Database_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Default_Database_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Disconnect_WiFi/Connect_Disconnect_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Disconnect_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Disconnect_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_WiFi/Connect_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Progmem_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Progmem_WiFi/Query_Progmem_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Progmem_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Results_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Results_WiFi/Query_Results_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Results_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Reboot_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Reboot_WiFi/Reboot_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Reboot_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/multiFileProject.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/multiFileProject.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/multiFileProject_WiFi.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Insert_WiFiNINA/Basic_Insert_WiFiNINA.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Insert_WiFiNINA/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Insert_WiFiNINA/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Select_WiFiNINA/Basic_Select_WiFiNINA.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Select_WiFiNINA/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Select_WiFiNINA/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Insert_WiFiNINA/Complex_Insert_WiFiNINA.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Insert_WiFiNINA/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Insert_WiFiNINA/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Select_WiFiNINA/Complex_Select_WiFiNINA.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Select_WiFiNINA/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Select_WiFiNINA/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Default_Database_WiFiNINA/Connect_Default_Database_WiFiNINA.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Default_Database_WiFiNINA/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Default_Database_WiFiNINA/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Disconnect_WiFiNINA/Connect_Disconnect_WiFiNINA.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Disconnect_WiFiNINA/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Disconnect_WiFiNINA/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_WiFiNINA/Connect_WiFiNINA.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_WiFiNINA/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_WiFiNINA/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Progmem_WiFiNINA/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Progmem_WiFiNINA/Query_Progmem_WiFiNINA.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Progmem_WiFiNINA/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Results_WiFiNINA/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Results_WiFiNINA/Query_Results_WiFiNINA.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Results_WiFiNINA/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Reboot_WiFiNINA/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Reboot_WiFiNINA/Reboot_WiFiNINA.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Reboot_WiFiNINA/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/Credentials.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/defines.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/multiFileProject.cpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/multiFileProject.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/multiFileProject_WiFiNINA.ino create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/keywords.txt create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/library.json create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/library.properties create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/pics/Basic_Insert_ESP32_S2.png create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/pics/ENC28J60.jpg create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/pics/ICSP_connector.jpg create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/pics/MySQL_MariaDB_Generic_v.1.0.2.png create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/pics/Portenta_Vision.jpg create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/pics/RP2040-Pinout.png create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/pics/W5100.jpg create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/pics/W5500.jpg create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/pics/W5500_1.jpg create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/platformio/platformio.ini create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic.hpp create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Connection.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Connection_Impl.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Debug.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Encrypt_Sha1.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Encrypt_Sha1_Impl.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Ethernet.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Packet.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Packet_Impl.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Query.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Query_Impl.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_WiFi.h create mode 100644 libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_WiFiNINA.h create mode 100644 libraries/esp32cam-main/.clang-format create mode 100644 libraries/esp32cam-main/.github/workflows/build.yml create mode 100644 libraries/esp32cam-main/.gitignore create mode 100644 libraries/esp32cam-main/LICENSE create mode 100644 libraries/esp32cam-main/README.md create mode 100644 libraries/esp32cam-main/docs/Doxyfile create mode 100644 libraries/esp32cam-main/docs/_redirects create mode 100644 libraries/esp32cam-main/docs/build.sh create mode 100644 libraries/esp32cam-main/docs/filter-Doxygen-warning.awk create mode 100644 libraries/esp32cam-main/docs/logo.svg create mode 100644 libraries/esp32cam-main/examples/AsyncCam/AsyncCam.hpp create mode 100644 libraries/esp32cam-main/examples/AsyncCam/AsyncCam.ino create mode 100644 libraries/esp32cam-main/examples/AsyncCam/README.md create mode 100644 libraries/esp32cam-main/examples/AsyncCam/handlers.cpp create mode 100644 libraries/esp32cam-main/examples/GoDisplay/GoDisplay.ino create mode 100644 libraries/esp32cam-main/examples/GoDisplay/README.md create mode 100644 libraries/esp32cam-main/examples/GoDisplay/SpiRamOStream.hpp create mode 100644 libraries/esp32cam-main/examples/WifiCam/README.md create mode 100644 libraries/esp32cam-main/examples/WifiCam/WifiCam.hpp create mode 100644 libraries/esp32cam-main/examples/WifiCam/WifiCam.ino create mode 100644 libraries/esp32cam-main/examples/WifiCam/handlers.cpp create mode 100644 libraries/esp32cam-main/library.properties create mode 100644 libraries/esp32cam-main/mk/format-code.sh create mode 100644 libraries/esp32cam-main/src/esp32cam-asyncweb.h create mode 100644 libraries/esp32cam-main/src/esp32cam.cpp create mode 100644 libraries/esp32cam-main/src/esp32cam.h create mode 100644 libraries/esp32cam-main/src/internal/config.cpp create mode 100644 libraries/esp32cam-main/src/internal/config.hpp create mode 100644 libraries/esp32cam-main/src/internal/frame.cpp create mode 100644 libraries/esp32cam-main/src/internal/frame.hpp create mode 100644 libraries/esp32cam-main/src/internal/mjpeg.cpp create mode 100644 libraries/esp32cam-main/src/internal/mjpeg.hpp create mode 100644 libraries/esp32cam-main/src/internal/pins.hpp create mode 100644 libraries/esp32cam-main/src/internal/resolution.cpp create mode 100644 libraries/esp32cam-main/src/internal/resolution.hpp create mode 100644 libraries/readme.txt diff --git a/Dokumentation.odt b/Dokumentation.odt new file mode 100644 index 0000000000000000000000000000000000000000..7bd05a9f6c392483d69db1b6b87b3bf7c03efbc8 GIT binary patch literal 71993 zcmb4q1CXXoli=Itw2f)owrykDwr!i!wr$(CZQIs#_s#d;?!{ije|xbRQBfIHm6cif zWIm-Vc_|Q36aWAc0C3P0Ro5A2ge3z20RN=FMF4AaYhx#OJ7ax2J1cWTeJ68U8#)&o zBU)R1M{`G7TRUSLBU?jfYhxQHS|?*SC;9)Yv%mEJ2QdC(Lbf(0=BCaL|LVq(k)%LdXKUwd_YdiRBO}hgq0=`sG`2GSJ5byI zPR@VF@gJSo>Dw4v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r^pUh``1gtyh=p@0FL2pb!QHBMf4u`PXrym=g zJ(S5e(jCC;-g5Hr8J~SUCFub2rxj z!{bMQ^y0AAco#2ENn2}M2b8VdMY{tsHWx3tMzH@Lx@q^twx>^ItZrX@sup%NMKkj1 zo+}YouLi}iHHNPTZKl1RW2QuqA_)?a2cLh=h8O%*=akV2Nljf1X`Hn)#vbM2Ddmg9 z=0;v{s+Qpio?7M=p`>b>_qSh+YAIk`C>7p9qY0dexW`@aB>+<}vEz@RQBfnq{_NR0E|25)rs?+De#bTgUGT5^kwk>-Rpe=MA3>Nbv90iXFK0W^K3E>zA)w zo+c_>)Qr1!S7bS|*(7;6A-ChBBjv++sllRJIz!6zAm?YHYDc$ zuD=GalRvJ5x++Uv-`WAJ0~^;tUB&hr4-AO+0);1NOjy>zH$j69`aq&jzXluzhw{X` zqW&K1=c{)7`~yq}{G{gMY>z>Exm$Z;T%0}N(w;6ZSQ~41>Hj>Hz*SPQ$GTX1qW+sy z9BX1TqNFqV^-40f~KIa@_6gzYV`{G56Nm z9zVzYHr4tS zd2F;LU@++O>!e8s2^l$f;cT3(F<1|2&u?F)T%FN>&tLxZ0cCHn)%QLOgF!-?Kf(bZ zF6ZHi$D)48{abBc^~^_y1354Ua2tTs34esHlQ5XAi?b)nnYA*1%kW#VHNB1N1S?=L z=mYZnDI^<#^#o(<=>-Oiw5$vWa2eKrG6*Gg=tmj2k}N_=P41+k;t9B%{9!d2IoZ|f z^z*&s*EZ$;o$Z&~)VIQYtJTj-8+5Pv5xhanRqs6d+Ur2~!C>3Kzu!QY?co7q0QNub Cu-sw* literal 0 HcmV?d00001 diff --git a/Dokumentation.pdf b/Dokumentation.pdf new file mode 100644 index 0000000000000000000000000000000000000000..46b190fb3e1fe0b1544cebcfb85ba4248750dd65 GIT binary patch literal 95427 zcma%jcRba5{QpTw5tW8bMFVj{Hc>*9WFK2b;@C5rO2|&4tjY=p9US|h$R1h8UfFw- z{d=A6y^ni;-{0@?`2Fr*Ih@aUkJszD-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Jc8@4M&x&hyp$z;y=KG5iSd`QP}4_kjYshR?|r??Aub zZSU$C!}6C8aI*jD1HbD0O3y#|zY6TX^8d?{@1OX;(m8zI;d=j}*PndBZ455cPhYu` z51{>Q_tP%_J~u!-0LJ^r*a6qi4_p5kE3RS*e4gR+_=ATly~1rD9%JCP{KKB%JpF3N zK=Z%*wg6nO01rQX3T{{M@!>N5xCeZkzwG4?eY3NIm_h&EUaoB9hrX{u=CAsO6aJIm z19GqfOv7b{>x~^S7zkWffSeHE8eBL3@@KfraNgnb1GM{>{(ss$oDP=@X!n;aSI;x~ z|FQA>X)sqSjvoU2>sfA#%JSzD1of{q2q5v*A_TtffIpWdjrDBRD6TA&;!3j=-+6*x z`)-5aUo>{LB>DA*S8J7j)jp6iwlHN8u(Z+Bx4ByE0P$BISa+!b4+jnym;%BHW`+S% z1%^VH!R$aW0~nMU3WfnI9w5kE@z1YoXKZN!EN~R%#o-@1BRe}QTP_wBLt{H5dmUz7 zOLG=&GY4%OOGisH11AKIb z>1o><=~!yp=-IM>4D{i~&2A^v%pzq@5KW1MlWpT37%xZE5q2-$u{g z*uwG;rXhc>It8`uw9PCHfpvl*uu}fMbVg;7wbHlvZUf(!78F;mVPS7(Msf9r6|hQK zdpk2@3!u~YwFN4$j}y!fLXI~(w9|D6VgZzX@H!N6dSKl{SK?CgKa0c^1Tfd*p# zlNSh>ll@O!0eduf5d4i7fChg}?++Rj{(j$YG!9_){~V8lm6H{)|KHm|VIUwB|4D&wXsDD_Vo z3fdgMdI_RBCErSrOF#17CF+;{X5v literal 0 HcmV?d00001 diff --git a/ESP32DatabaseInsert_SetUp/Credentials.h b/ESP32DatabaseInsert_SetUp/Credentials.h new file mode 100644 index 0000000..3398734 --- /dev/null +++ b/ESP32DatabaseInsert_SetUp/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "cpsNUCwifi"; // your network SSID (name) +char pass[] = "ips999CPS"; // your network password + +char user[] = "db_user"; // MySQL user login username - db_user - DoItLabUser +char password[] = "db_password"; // MySQL user login password - db_password - DoItLabDBPasswd + +#endif //Credentials_h diff --git a/ESP32DatabaseInsert_SetUp/ESP32DatabaseInsert_SetUp.ino b/ESP32DatabaseInsert_SetUp/ESP32DatabaseInsert_SetUp.ino new file mode 100644 index 0000000..e58d17b --- /dev/null +++ b/ESP32DatabaseInsert_SetUp/ESP32DatabaseInsert_SetUp.ino @@ -0,0 +1,192 @@ +/********************************************************************************************************************************* + Basic_Insert_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : basic insert + + This example demonstrates how to issue an INSERT query to store data in a + table. For this, we will create a special database and table for testing. + The following are the SQL commands you will need to run in order to setup + your database for running this sketch. + + CREATE DATABASE test_arduino; + CREATE TABLE test_arduino.hello_arduino ( + num integer primary key auto_increment, + message char(40), + recorded timestamp + ); + + Here we see one database and a table with three fields; a primary key that + is an auto_increment, a string, and a timestamp. This will demonstrate how + to save a date and time of when the row was inserted, which can help you + determine when data was recorded or updated. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Create the database and table as shown above. + 2) Change the address of the server to the IP address of the MySQL server + 3) Change the user and password to a valid MySQL user and password + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + 8) After the sketch has run for some time, open a mysql client and issue + the command: "SELECT * FROM test_arduino.hello_arduino" to see the data + recorded. Note the field values and how the database handles both the + auto_increment and timestamp fields for us. You can clear the data with + "DELETE FROM test_arduino.hello_arduino". + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME false + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(10, 42, 0, 1); +#endif + +uint16_t server_port = 3306; //5698; + +char default_database[] = "myTestDb"; //DoItLabDB +char default_table[] = "myTestTable"; //QRCodeTable + +String default_value = "ESP32_TestString"; + +// Sample query +String INSERT_SQL = String("INSERT INTO ") + default_database + "." + default_table + + " (qrCodeText) VALUES ('" + default_value + "')"; + + + + +MySQL_Connection conn((Client *)&client); + +MySQL_Query *query_mem; + +//################################################################################### +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Basic_Insert_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Remember to initialize your WiFi module +#if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #if ( USING_WIFI_ESP8266_AT ) + MYSQL_DISPLAY("Using ESP8266_AT/ESP8266_AT_WebServer Library"); + #elif ( USING_WIFIESPAT_LIB ) + MYSQL_DISPLAY("Using WiFiEspAT Library"); + #endif + + // initialize serial for ESP module + EspSerial.begin(115200); + // initialize ESP module + WiFi.init(&EspSerial); + + MYSQL_DISPLAY(F("WiFi shield init done")); + + // check for the presence of the shield + if (WiFi.status() == WL_NO_SHIELD) + { + MYSQL_DISPLAY(F("WiFi shield not present")); + // don't continue + while (true); + } +#endif + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +//################################################################################### +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + MYSQL_DISPLAY(INSERT_SQL); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(INSERT_SQL.c_str()) ) + { + MYSQL_DISPLAY("Insert error"); + } + else + { + MYSQL_DISPLAY("Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + + +//################################################################################### +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/ESP32DatabaseInsert_SetUp/defines.h b/ESP32DatabaseInsert_SetUp/defines.h new file mode 100644 index 0000000..ed63a72 --- /dev/null +++ b/ESP32DatabaseInsert_SetUp/defines.h @@ -0,0 +1,381 @@ +/**************************************************************************************************************************** + 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 DEBUG_ESP8266_AT_WEBSERVER_PORT Serial + +// Debug Level from 0 to 4 +#define _ESP_AT_LOGLEVEL_ 1 + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ! (ESP8266 || ESP32 ) + // Select only one of these libraries, only for boards other than ESP8266/ESP32 + #define USING_WIFI_ESP8266_AT false + #define USING_WIFININA_GENERIC false + #define USING_WIFININA false + #define USING_WIFIESPAT_LIB true + #define USING_WIFI_CUSTOM false +#endif + +#if defined(ARDUINO_SAMD_MKR1000) + #if defined(USE_WIFI_NINA) + #undef USE_WIFI_NINA + #endif + #define USE_WIFI_NINA false + #define USE_WIFI101 true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFI_USE_NRF528XX) + #undef WIFI_USE_NRF528XX + #endif + #define WIFI_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFI_USE_SAMD) + #undef WIFI_USE_SAMD + #endif + #define WIFI_USE_SAMD true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFI_USE_SAM_DUE) + #undef WIFI_USE_SAM_DUE + #endif + #define WIFI_USE_SAM_DUE true + #warning Use SAM_DUE architecture +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFI_USE_STM32) + #undef WIFI_USE_STM32 + #endif + #define WIFI_USE_STM32 true +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFI_USE_RP2040) + #undef WIFI_USE_RP2040 + #endif + #define WIFI_USE_RP2040 true +#endif + +#ifdef CORE_TEENSY + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For Teensy 4.1/4.0 + #define EspSerial Serial2 //Serial2, Pin RX2 : 7, TX2 : 8 + #endif + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" +#endif + +#elif defined(WIFI_USE_NRF528XX) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif defined(WIFI_USE_SAMD) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For SAMD + #define EspSerial Serial1 + #endif + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif defined(WIFI_USE_STM32) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For STM32 + #if defined(ARDUINO_NUCLEO_F767ZI) + #warning Nucleo-144 NUCLEO_F767ZI board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); + #elif defined(ARDUINO_NUCLEO_L053R8) + #warning Nucleo-64 NUCLEO_L053R8 board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); // (PA3, PA2); + #endif + + #warning EspSerial using SERIAL_PORT_HARDWARE, can be Serial or Serial1. See your board variant.h + #define EspSerial SERIAL_PORT_HARDWARE //Serial1 + #endif + + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif (ESP8266) + #warning ESP8266 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif (ESP32) + #warning ESP32 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif defined(WIFI_USE_RP2040) && !defined(ARDUINO_ARCH_MBED) + + // For RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + +#elif defined(WIFI_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + // For MBED RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#else + // For Mega + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #define BOARD_TYPE "AVR Mega" +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#endif + +#endif //defines_h diff --git a/ESP32QRCodeReader_Page/ESP32QRCodeReader_Page.ino b/ESP32QRCodeReader_Page/ESP32QRCodeReader_Page.ino new file mode 100644 index 0000000..696b21b --- /dev/null +++ b/ESP32QRCodeReader_Page/ESP32QRCodeReader_Page.ino @@ -0,0 +1,583 @@ +/* +ESP32-CAM QR code Reader +Author : ChungYi Fu (Kaohsiung, Taiwan) 2021-8-13 20:00 +https://www.facebook.com/francefu + +Refer to the code +https://github.com/alvarowolfx/ESP32QRCodeReader + +自訂指令格式 http://192.168.xxx.xxx/control?cmd=P1;P2;P3;P4;P5;P6;P7;P8;P9 + +http://192.168.xxx.xxx/?ip //取得APIP, STAIP +http://192.168.xxx.xxx/?mac //取得MAC位址 +http://192.168.xxx.xxx/?digitalwrite=pin;value //數位輸出 +http://192.168.xxx.xxx/?analogwrite=pin;value //類比輸出 +http://192.168.xxx.xxx/?digitalread=pin //數位讀取 +http://192.168.xxx.xxx/?analogread=pin //類比讀取 +http://192.168.xxx.xxx/?touchread=pin //觸碰讀取 +http://192.168.xxx.xxx/?restart //重啟電源 +http://192.168.xxx.xxx/?flash=value //閃光燈 value= 0~255 +http://192.168.xxx.xxx/?servo=pin;value //伺服馬達 value= 0~180 +http://192.168.xxx.xxx/?relay=pin;value //繼電器 value = 0, 1 +http://192.168.xxx.xxx/?uart=value //序列埠 +*/ + +//輸入WIFI連線帳號密碼 +const char* ssid = "cpsNUCwifi"; +const char* password = "ips999CPS"; + +//輸入AP端連線帳號密碼 http://192.168.4.1 +const char* apssid = "esp32-cam"; +const char* appassword = "12345678"; //AP密碼至少要8個字元以上 + +String Feedback=""; //回傳客戶端訊息 +//指令參數值 +String Command="",cmd="",P1="",P2="",P3="",P4="",P5="",P6="",P7="",P8="",P9=""; +//指令拆解狀態值 +byte ReceiveState=0,cmdState=1,strState=1,questionstate=0,equalstate=0,semicolonstate=0; + +#include +#include "esp_camera.h" //視訊函式 +#include "soc/soc.h" //用於電源不穩不重開機 +#include "soc/rtc_cntl_reg.h" //用於電源不穩不重開機 +#include "quirc.h" + +TaskHandle_t Task; + +//ESP32-CAM 安信可模組腳位設定 +#define PWDN_GPIO_NUM 32 +#define RESET_GPIO_NUM -1 +#define XCLK_GPIO_NUM 0 +#define SIOD_GPIO_NUM 26 +#define SIOC_GPIO_NUM 27 +#define Y9_GPIO_NUM 35 +#define Y8_GPIO_NUM 34 +#define Y7_GPIO_NUM 39 +#define Y6_GPIO_NUM 36 +#define Y5_GPIO_NUM 21 +#define Y4_GPIO_NUM 19 +#define Y3_GPIO_NUM 18 +#define Y2_GPIO_NUM 5 +#define VSYNC_GPIO_NUM 25 +#define HREF_GPIO_NUM 23 +#define PCLK_GPIO_NUM 22 + +struct QRCodeData +{ + bool valid; + int dataType; + uint8_t payload[1024]; + int payloadLen; +}; + +struct quirc *q = NULL; +uint8_t *image = NULL; +camera_fb_t * fb = NULL; +struct quirc_code code; +struct quirc_data data; +quirc_decode_error_t err; +struct QRCodeData qrCodeData; +String QRCodeResult = ""; + +WiFiServer server(80); +WiFiClient client; + +camera_config_t config; + +void setup() { + WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //關閉電源不穩就重開機的設定 + + Serial.begin(115200); + Serial.setDebugOutput(true); //開啟診斷輸出 + Serial.println(); + +//視訊組態設定 https://github.com/espressif/esp32-camera/blob/master/driver/include/esp_camera.h + config.ledc_channel = LEDC_CHANNEL_0; + config.ledc_timer = LEDC_TIMER_0; + config.pin_d0 = Y2_GPIO_NUM; + config.pin_d1 = Y3_GPIO_NUM; + config.pin_d2 = Y4_GPIO_NUM; + config.pin_d3 = Y5_GPIO_NUM; + config.pin_d4 = Y6_GPIO_NUM; + config.pin_d5 = Y7_GPIO_NUM; + config.pin_d6 = Y8_GPIO_NUM; + config.pin_d7 = Y9_GPIO_NUM; + config.pin_xclk = XCLK_GPIO_NUM; + config.pin_pclk = PCLK_GPIO_NUM; + config.pin_vsync = VSYNC_GPIO_NUM; + config.pin_href = HREF_GPIO_NUM; + config.pin_sscb_sda = SIOD_GPIO_NUM; + config.pin_sscb_scl = SIOC_GPIO_NUM; + config.pin_pwdn = PWDN_GPIO_NUM; + config.pin_reset = RESET_GPIO_NUM; + config.xclk_freq_hz = 10000000; + config.pixel_format = PIXFORMAT_GRAYSCALE; + config.frame_size = FRAMESIZE_QVGA; + config.jpeg_quality = 15; + config.fb_count = 1; + + //視訊初始化 + esp_err_t err = esp_camera_init(&config); + if (err != ESP_OK) { + Serial.printf("Camera init failed with error 0x%x", err); + ESP.restart(); + } + + sensor_t * s = esp_camera_sensor_get(); + s->set_framesize(s, FRAMESIZE_QVGA); + + //s->set_vflip(s, 1); //垂直翻轉 + //s->set_hmirror(s, 1); //水平鏡像 + + //閃光燈(GPIO4) + ledcAttachPin(4, 4); + ledcSetup(4, 5000, 8); + + WiFi.mode(WIFI_AP_STA); //其他模式 WiFi.mode(WIFI_AP); WiFi.mode(WIFI_STA); + + //指定Client端靜態IP + //WiFi.config(IPAddress(192, 168, 201, 100), IPAddress(192, 168, 201, 2), IPAddress(255, 255, 255, 0)); + + for (int i=0;i<2;i++) { + WiFi.begin(ssid, password); //執行網路連線 + + delay(1000); + Serial.println(""); + Serial.print("Connecting to "); + Serial.println(ssid); + + long int StartTime=millis(); + while (WiFi.status() != WL_CONNECTED) { + delay(500); + if ((StartTime+5000) < millis()) break; //等待10秒連線 + } + + if (WiFi.status() == WL_CONNECTED) { //若連線成功 + WiFi.softAP((WiFi.localIP().toString()+"_"+(String)apssid).c_str(), appassword); //設定SSID顯示客戶端IP + Serial.println(""); + Serial.println("STAIP address: "); + Serial.println(WiFi.localIP()); + Serial.println(""); + + for (int i=0;i<5;i++) { //若連上WIFI設定閃光燈快速閃爍 + ledcWrite(4,10); + delay(200); + ledcWrite(4,0); + delay(200); + } + break; + } + } + + if (WiFi.status() != WL_CONNECTED) { //若連線失敗 + WiFi.softAP((WiFi.softAPIP().toString()+"_"+(String)apssid).c_str(), appassword); + + for (int i=0;i<2;i++) { //若連不上WIFI設定閃光燈慢速閃爍 + ledcWrite(4,10); + delay(1000); + ledcWrite(4,0); + delay(1000); + } + } + + //指定AP端IP + //WiFi.softAPConfig(IPAddress(192, 168, 4, 1), IPAddress(192, 168, 4, 1), IPAddress(255, 255, 255, 0)); + Serial.println(""); + Serial.println("APIP address: "); + Serial.println(WiFi.softAPIP()); + Serial.println(""); + + //設定閃光燈為低電位 + pinMode(4, OUTPUT); + digitalWrite(4, LOW); + + server.begin(); + + xTaskCreatePinnedToCore( + QRCodeReader, /* Task function. */ + "Task", /* name of task. */ + 10000, /* Stack size of task */ + NULL, /* parameter of the task */ + 1, /* priority of the task */ + &Task, /* Task handle to keep track of created task */ + 0); /* pin task to core 0 */ + + Serial.print("listenConnection running on core "); + Serial.println(xPortGetCoreID()); +} + +void loop() { + listenConnection(); +} + +void QRCodeReader( void * pvParameters ){ + Serial.print("QRCodeReader running on core "); + Serial.println(xPortGetCoreID()); + + while(1){ + q = quirc_new(); + if (q == NULL){ + Serial.print("can't create quirc object\r\n"); + continue; + } + + fb = esp_camera_fb_get(); + if (!fb) + { + Serial.println("Camera capture failed"); + continue; + } + + //Serial.printf("quirc_begin\r\n"); + quirc_resize(q, fb->width, fb->height); + image = quirc_begin(q, NULL, NULL); + //Serial.printf("Frame w h len: %d, %d, %d \r\n", fb->width, fb->height, fb->len); + memcpy(image, fb->buf, fb->len); + quirc_end(q); + //Serial.printf("quirc_end\r\n"); + + int count = quirc_count(q); + if (count > 0) { + Serial.println(count); + quirc_extract(q, 0, &code); + err = quirc_decode(&code, &data); + + if (err){ + Serial.println("Decoding FAILED"); + QRCodeResult = "Decoding FAILED"; + } else { + Serial.printf("Decoding successful:\n"); + dumpData(&data); + /* + qrCodeData.dataType = data.data_type; + for (int j = 0; j < data.payload_len; j++) + { + qrCodeData.payload[j] = data.payload[j]; + } + qrCodeData.valid = true; + qrCodeData.payload[data.payload_len] = '\0'; + qrCodeData.payloadLen = data.payload_len; + */ + //vTaskDelay(3000/portTICK_RATE_MS); + } + Serial.println(); + } + + esp_camera_fb_return(fb); + fb = NULL; + image = NULL; + quirc_destroy(q); + } +} + +void dumpData(const struct quirc_data *data) +{ + Serial.printf("Version: %d\n", data->version); + Serial.printf("ECC level: %c\n", "MLHQ"[data->ecc_level]); + Serial.printf("Mask: %d\n", data->mask); + Serial.printf("Length: %d\n", data->payload_len); + Serial.printf("Payload: %s\n", data->payload); + + QRCodeResult = (const char *)data->payload; +} + +//執行自訂指令 +void ExecuteCommand() { + //Serial.println(""); + //Serial.println("Command: "+Command); + if (cmd!="getstill") { + Serial.println("cmd= "+cmd+" ,P1= "+P1+" ,P2= "+P2+" ,P3= "+P3+" ,P4= "+P4+" ,P5= "+P5+" ,P6= "+P6+" ,P7= "+P7+" ,P8= "+P8+" ,P9= "+P9); + Serial.println(""); + } + + //自訂指令區塊 http://192.168.xxx.xxx?cmd=P1;P2;P3;P4;P5;P6;P7;P8;P9 + if (cmd=="your cmd") { + // You can do anything + // Feedback="Hello World"; //可為一般文字或HTML語法 + } + else if (cmd=="ip") { //查詢APIP, STAIP + Feedback="AP IP: "+WiFi.softAPIP().toString(); + Feedback+="
"; + Feedback+="STA IP: "+WiFi.localIP().toString(); + } + else if (cmd=="mac") { //查詢MAC位址 + Feedback="STA MAC: "+WiFi.macAddress(); + } + else if (cmd=="restart") { //重設WIFI連線 + ESP.restart(); + } + else if (cmd=="digitalwrite") { //數位輸出 + ledcDetachPin(P1.toInt()); + pinMode(P1.toInt(), OUTPUT); + digitalWrite(P1.toInt(), P2.toInt()); + } + else if (cmd=="digitalread") { //數位輸入 + Feedback=String(digitalRead(P1.toInt())); + } + else if (cmd=="analogwrite") { //類比輸出 + if (P1=="4") { + ledcAttachPin(4, 4); + ledcSetup(4, 5000, 8); + ledcWrite(4,P2.toInt()); + } + else { + ledcAttachPin(P1.toInt(), 9); + ledcSetup(9, 5000, 8); + ledcWrite(9,P2.toInt()); + } + } + else if (cmd=="analogread") { //類比讀取 + Feedback=String(analogRead(P1.toInt())); + } + else if (cmd=="touchread") { //觸碰讀取 + Feedback=String(touchRead(P1.toInt())); + } + else if (cmd=="framesize") { //解析度 + sensor_t * s = esp_camera_sensor_get(); + int val = P1.toInt(); + s->set_framesize(s, (framesize_t)val); + } + else if (cmd=="quality") { //畫質 + sensor_t * s = esp_camera_sensor_get(); + int val = P1.toInt(); + s->set_quality(s, val); + } + else if (cmd=="contrast") { //對比 + sensor_t * s = esp_camera_sensor_get(); + int val = P1.toInt(); + s->set_contrast(s, val); + } + else if (cmd=="brightness") { //亮度 + sensor_t * s = esp_camera_sensor_get(); + int val = P1.toInt(); + s->set_brightness(s, val); + } + else if (cmd=="hmirror") { //水平鏡像 + sensor_t * s = esp_camera_sensor_get(); + int val = P1.toInt(); + s->set_hmirror(s, val); + } + else if (cmd=="vflip") { //垂直翻轉 + sensor_t * s = esp_camera_sensor_get(); + int val = P1.toInt(); + s->set_vflip(s, val); + } + else if (cmd=="serial") { //序列埠 + Serial.print(P1); + } + else if (cmd=="restart") { //重啟電源 + ESP.restart(); + } + else if (cmd=="flash") { //閃光燈 + ledcAttachPin(4, 4); + ledcSetup(4, 5000, 8); + int val = P1.toInt(); + ledcWrite(4,val); + } + else if(cmd=="servo") { //伺服馬達 (0-180) + ledcAttachPin(P1.toInt(), 3); + ledcSetup(3, 50, 16); + + int val = 7864-P2.toInt()*34.59; + if (val > 7864) + val = 7864; + else if (val < 1638) + val = 1638; + ledcWrite(3, val); + } + else if (cmd=="relay") { //繼電器 + pinMode(P1.toInt(), OUTPUT); + digitalWrite(13, P2.toInt()); + } + else { + Feedback="Command is not defined."; + } + + if (Feedback=="") Feedback=Command; +} + + +//自訂網頁首頁管理介面 +static const char PROGMEM INDEX_HTML[] = R"rawliteral( + + + + + + + +
+Flash +
+
+ + + + +)rawliteral"; + +void listenConnection() { + Feedback="";Command="";cmd="";P1="";P2="";P3="";P4="";P5="";P6="";P7="";P8="";P9=""; + ReceiveState=0,cmdState=1,strState=1,questionstate=0,equalstate=0,semicolonstate=0; + + client = server.available(); + + if (client) { + String currentLine = ""; + + while (client.connected()) { + if (client.available()) { + char c = client.read(); + getCommand(c); //將緩衝區取得的字元拆解出指令參數 + if (c == '\n') { + if (currentLine.length() == 0) { + if (cmd=="getstill") { + getStill(); + } else { + mainPage(); + } + Feedback=""; + break; + } else { + currentLine = ""; + } + } else if (c != '\r') { + currentLine += c; + } + + if ((currentLine.indexOf("?")!=-1)&&(currentLine.indexOf(" HTTP")!=-1)) { + if (Command.indexOf("stop")!=-1) { //若指令中含關鍵字stop立即斷線 -> http://192.168.xxx.xxx?cmd=aaa;bbb;ccc;stop + client.println(); + client.println(); + client.stop(); + } + currentLine=""; + Feedback=""; + ExecuteCommand(); + } + } + } + delay(1); + client.stop(); + } +} + +void mainPage() { + //回傳HTML首頁或Feedback + client.println("HTTP/1.1 200 OK"); + client.println("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept"); + client.println("Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS"); + client.println("Content-Type: text/html; charset=utf-8"); + client.println("Access-Control-Allow-Origin: *"); + client.println("Connection: close"); + client.println(); + + String Data=""; + if (cmd!="") + Data = Feedback; + else { + Data = String((const char *)INDEX_HTML); + } + int Index; + for (Index = 0; Index < Data.length(); Index = Index+1024) { + client.print(Data.substring(Index, Index+1024)); + } +} + +void getStill() { + camera_fb_t * fb = NULL; + fb = esp_camera_fb_get(); + if(!fb) { + Serial.println("Camera capture failed"); + return; + } + uint8_t *fbBuf = fb->buf; + size_t fbLen = fb->len; + + client.println("HTTP/1.1 200 OK"); + client.println("Access-Control-Allow-Origin: *"); + client.println("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept"); + client.println("Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS"); + client.println("Content-Type: application/octet-stream"); + client.println(); + + for (size_t n=0;n0) { + size_t remainder = fbLen%1024; + client.write(fbBuf, remainder); + } + } + esp_camera_fb_return(fb); + + pinMode(4, OUTPUT); + digitalWrite(4, LOW); +} + +//拆解命令字串置入變數 +void getCommand(char c) { + if (c=='?') ReceiveState=1; + if ((c==' ')||(c=='\r')||(c=='\n')) ReceiveState=0; + + if (ReceiveState==1) + { + Command=Command+String(c); + + if (c=='=') cmdState=0; + if (c==';') strState++; + + if ((cmdState==1)&&((c!='?')||(questionstate==1))) cmd=cmd+String(c); + if ((cmdState==0)&&(strState==1)&&((c!='=')||(equalstate==1))) P1=P1+String(c); + if ((cmdState==0)&&(strState==2)&&(c!=';')) P2=P2+String(c); + if ((cmdState==0)&&(strState==3)&&(c!=';')) P3=P3+String(c); + if ((cmdState==0)&&(strState==4)&&(c!=';')) P4=P4+String(c); + if ((cmdState==0)&&(strState==5)&&(c!=';')) P5=P5+String(c); + if ((cmdState==0)&&(strState==6)&&(c!=';')) P6=P6+String(c); + if ((cmdState==0)&&(strState==7)&&(c!=';')) P7=P7+String(c); + if ((cmdState==0)&&(strState==8)&&(c!=';')) P8=P8+String(c); + if ((cmdState==0)&&(strState>=9)&&((c!=';')||(semicolonstate==1))) P9=P9+String(c); + + if (c=='?') questionstate=1; + if (c=='=') equalstate=1; + if ((strState>=9)&&(c==';')) semicolonstate=1; + } +} diff --git a/ESP32QRCodeReader_Page/LICENSE b/ESP32QRCodeReader_Page/LICENSE new file mode 100644 index 0000000..d47c026 --- /dev/null +++ b/ESP32QRCodeReader_Page/LICENSE @@ -0,0 +1,16 @@ +quirc -- QR-code recognition library +Copyright (C) 2010-2012 Daniel Beer + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all +copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/ESP32QRCodeReader_Page/README.md b/ESP32QRCodeReader_Page/README.md new file mode 100644 index 0000000..d70c5c3 --- /dev/null +++ b/ESP32QRCodeReader_Page/README.md @@ -0,0 +1,193 @@ +Quirc +===== + +QR codes are a type of high-density matrix barcodes, and quirc is a library for +extracting and decoding them from images. It has several features which make it +a good choice for this purpose: + +* It is fast enough to be used with realtime video: extracting and decoding + from VGA frame takes about 50 ms on a modern x86 core. + +* It has a robust and tolerant recognition algorithm. It can correctly + recognise and decode QR codes which are rotated and/or oblique to the camera. + It can also distinguish and decode multiple codes within the same image. + +* It is easy to use, with a simple API described in a single commented header + file (see below for an overview). + +* It is small and easily embeddable, with no dependencies other than standard C + functions. + +* It has a very small memory footprint: one byte per image pixel, plus a few kB + per decoder object. + +* It uses no global mutable state, and is safe to use in a multithreaded + application. + +* BSD-licensed, with almost no restrictions regarding use and/or modification. + +The distribution comes with, in addition to the library, several test programs. +While the core library is very portable, these programs have some additional +dependencies. All of them require libjpeg, and two (`quirc-demo` and `inspect`) +require SDL. The camera demos use Linux-specific APIs: + +### quirc-demo + +This is an real-time demo which requires a camera and a graphical display. The +video stream is displayed on screen as it's received, and any QR codes +recognised are highlighted in the image, with the decoded information both +displayed on the image and printed on stdout. + +### quirc-scanner + +This program turns your camera into a barcode scanner. It's almost the same as +the `demo` application, but it doesn't display the video stream, and thus +doesn't require a graphical display. + +### qrtest + +This test is used to evaluate the performance of library. Given a directory +tree containing a bunch of JPEG images, it will attempt to locate and decode QR +codes in each image. Speed and success statistics are collected and printed on +stdout. + +### inspect + +This test is used for debugging. Given a single JPEG image, it will display a +diagram showing the internal state of the decoder as well as printing +additional information on stdout. + +Installation +------------ +To build the library and associated demos/tests, type `make`. If you need to +decode "large" image files build with `CFLAGS="-DQUIRC_MAX_REGIONS=65534" make` +instead. Note that this will increase the memory usage, it is discouraged for +low resource devices (i.e. embedded). + +Type `make install` to install the library, header file and camera demos. + +You can specify one or several of the following targets if you don't want, or +are unable to build everything: + +* libquirc.a +* libquirc.so +* qrtest +* inspect +* quirc-scanner +* quirc-demo + +Library use +----------- +All of the library's functionality is exposed through a single header file, +which you should include: + +```C +#include +``` + +To decode images, you'll need to instantiate a `struct quirc` object, which is +done with the `quirc_new` function. Later, when you no longer need to decode +anything, you should release the allocated memory with `quirc_destroy`: + +```C +struct quirc *qr; + +qr = quirc_new(); +if (!qr) { + perror("Failed to allocate memory"); + abort(); +} + +/* ... */ + +quirc_destroy(qr); +``` + +Having obtained a decoder object, you need to set the image size that you'll be +working with, which is done using `quirc_resize`: + +```C +if (quirc_resize(qr, 640, 480) < 0) { + perror("Failed to allocate video memory"); + abort(); +} +``` + +`quirc_resize` and `quirc_new` are the only library functions which allocate +memory. If you plan to process a series of frames (or a video stream), you +probably want to allocate and size a single decoder and hold onto it to process +each frame. + +Processing frames is done in two stages. The first stage is an +image-recognition stage called identification, which takes a grayscale image +and searches for QR codes. Using `quirc_begin` and `quirc_end`, you can feed a +grayscale image directly into the buffer that `quirc` uses for image +processing: + +```C +uint8_t *image; +int w, h; + +image = quirc_begin(qr, &w, &h); + +/* Fill out the image buffer here. + * image is a pointer to a w*h bytes. + * One byte per pixel, w pixels per line, h lines in the buffer. + */ + +quirc_end(qr); +``` + +Note that `quirc_begin` simply returns a pointer to a previously allocated +buffer. The buffer will contain uninitialized data. After the call to +`quirc_end`, the decoder holds a list of detected QR codes which can be queried +via `quirc_count` and `quirc_extract`. + +At this point, the second stage of processing occurs -- decoding. This is done +via the call to `quirc_decode`, which is not associated with a decoder object. + +```C +int num_codes; +int i; + +/* We've previously fed an image to the decoder via +* quirc_begin/quirc_end. +*/ + +num_codes = quirc_count(qr); +for (i = 0; i < num_codes; i++) { + struct quirc_code code; + struct quirc_data data; + quirc_decode_error_t err; + + quirc_extract(qr, i, &code); + + /* Decoding stage */ + err = quirc_decode(&code, &data); + if (err) + printf("DECODE FAILED: %s\n", quirc_strerror(err)); + else + printf("Data: %s\n", data.payload); +} +``` + +`quirc_code` and `quirc_data` are flat structures which don't need to be +initialized or freed after use. + +Copyright +--------- +Copyright (C) 2010-2012 Daniel Beer <> + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all +copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/ESP32QRCodeReader_Page/collections.c b/ESP32QRCodeReader_Page/collections.c new file mode 100644 index 0000000..ea0073d --- /dev/null +++ b/ESP32QRCodeReader_Page/collections.c @@ -0,0 +1,85 @@ +/* This file is part of the OpenMV project. + * Copyright (c) 2013-2017 Ibrahim Abdelkader & Kwabena W. Agyeman + * This work is licensed under the MIT license, see the file LICENSE for details. + */ + +#include "collections.h" +#define CHAR_BITS (sizeof(char) * 8) +#define CHAR_MASK (CHAR_BITS - 1) +#define CHAR_SHIFT IM_LOG2(CHAR_MASK) + +////////// +// lifo // +////////// + +void lifo_alloc(lifo_t *ptr, size_t size, size_t data_len) +{ + ptr->len = 0; + ptr->size = size; + ptr->data_len = data_len; + ptr->data = (char *)ps_malloc(size * data_len); +} + +void lifo_alloc_all(lifo_t *ptr, size_t *size, size_t data_len) +{ + ptr->data = (char *)ps_malloc(255); + ptr->data_len = data_len; + ptr->size = 255 / data_len; + ptr->len = 0; + *size = ptr->size; +} + +void lifo_free(lifo_t *ptr) +{ + if (ptr->data) + { + free(ptr->data); + } +} + +void lifo_clear(lifo_t *ptr) +{ + ptr->len = 0; +} + +size_t lifo_size(lifo_t *ptr) +{ + return ptr->len; +} + +bool lifo_is_not_empty(lifo_t *ptr) +{ + return ptr->len; +} + +bool lifo_is_not_full(lifo_t *ptr) +{ + return ptr->len != ptr->size; +} + +void lifo_enqueue(lifo_t *ptr, void *data) +{ + memcpy(ptr->data + (ptr->len * ptr->data_len), data, ptr->data_len); + + ptr->len += 1; +} + +void lifo_dequeue(lifo_t *ptr, void *data) +{ + if (data) + { + memcpy(data, ptr->data + ((ptr->len - 1) * ptr->data_len), ptr->data_len); + } + + ptr->len -= 1; +} + +void lifo_poke(lifo_t *ptr, void *data) +{ + memcpy(ptr->data + (ptr->len * ptr->data_len), data, ptr->data_len); +} + +void lifo_peek(lifo_t *ptr, void *data) +{ + memcpy(data, ptr->data + ((ptr->len - 1) * ptr->data_len), ptr->data_len); +} diff --git a/ESP32QRCodeReader_Page/collections.h b/ESP32QRCodeReader_Page/collections.h new file mode 100644 index 0000000..711cafa --- /dev/null +++ b/ESP32QRCodeReader_Page/collections.h @@ -0,0 +1,33 @@ +/* This file is part of the OpenMV project. + * Copyright (c) 2013-2017 Ibrahim Abdelkader & Kwabena W. Agyeman + * This work is licensed under the MIT license, see the file LICENSE for details. + */ + +#ifndef __COLLECTIONS_H__ +#define __COLLECTIONS_H__ +#include +#include +////////// +// lifo // +////////// + +typedef struct lifo +{ + size_t len, size, data_len; + char *data; +} +__attribute__((aligned(8))) lifo_t; + +void lifo_alloc(lifo_t *ptr, size_t size, size_t data_len); +void lifo_alloc_all(lifo_t *ptr, size_t *size, size_t data_len); +void lifo_free(lifo_t *ptr); +void lifo_clear(lifo_t *ptr); +size_t lifo_size(lifo_t *ptr); +bool lifo_is_not_empty(lifo_t *ptr); +bool lifo_is_not_full(lifo_t *ptr); +void lifo_enqueue(lifo_t *ptr, void *data); +void lifo_dequeue(lifo_t *ptr, void *data); +void lifo_poke(lifo_t *ptr, void *data); +void lifo_peek(lifo_t *ptr, void *data); + +#endif /* __COLLECTIONS_H__ */ \ No newline at end of file diff --git a/ESP32QRCodeReader_Page/decode.c b/ESP32QRCodeReader_Page/decode.c new file mode 100644 index 0000000..67c8ed5 --- /dev/null +++ b/ESP32QRCodeReader_Page/decode.c @@ -0,0 +1,983 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "quirc_internal.h" + +#include +#include + +#define MAX_POLY 64 + +/************************************************************************ + * Galois fields + */ + +struct galois_field +{ + int p; + const uint8_t *log; + const uint8_t *exp; +} __attribute__((aligned(8))); + +static const uint8_t gf16_exp[16] = { + 0x01, 0x02, 0x04, 0x08, 0x03, 0x06, 0x0c, 0x0b, + 0x05, 0x0a, 0x07, 0x0e, 0x0f, 0x0d, 0x09, 0x01}; + +static const uint8_t gf16_log[16] = { + 0x00, 0x0f, 0x01, 0x04, 0x02, 0x08, 0x05, 0x0a, + 0x03, 0x0e, 0x09, 0x07, 0x06, 0x0d, 0x0b, 0x0c}; + +static const struct galois_field gf16 = { + .p = 15, + .log = gf16_log, + .exp = gf16_exp}; + +static const uint8_t gf256_exp[256] = { + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, + 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26, + 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, + 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, + 0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, + 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23, + 0x46, 0x8c, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, + 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1, + 0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f, 0x5e, 0xbc, + 0x65, 0xca, 0x89, 0x0f, 0x1e, 0x3c, 0x78, 0xf0, + 0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, + 0xfe, 0xe1, 0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2, + 0xd9, 0xaf, 0x43, 0x86, 0x11, 0x22, 0x44, 0x88, + 0x0d, 0x1a, 0x34, 0x68, 0xd0, 0xbd, 0x67, 0xce, + 0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93, + 0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc, + 0x85, 0x17, 0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, + 0x4f, 0x9e, 0x21, 0x42, 0x84, 0x15, 0x2a, 0x54, + 0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4, 0x55, 0xaa, + 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73, + 0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, + 0xfc, 0xe5, 0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff, + 0xe3, 0xdb, 0xab, 0x4b, 0x96, 0x31, 0x62, 0xc4, + 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41, + 0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x07, 0x0e, + 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6, + 0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, + 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09, + 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, + 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16, + 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, + 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x01}; + +static const uint8_t gf256_log[256] = { + 0x00, 0xff, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, + 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b, + 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, + 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71, + 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, + 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45, + 0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27, 0xf9, 0xb9, + 0xc9, 0x9a, 0x09, 0x78, 0x4d, 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 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, + 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf}; + +const static struct galois_field gf256 = { + .p = 255, + .log = gf256_log, + .exp = gf256_exp}; + +/************************************************************************ + * Polynomial operations + */ + +static void poly_add(uint8_t *dst, const uint8_t *src, uint8_t c, + int shift, const struct galois_field *gf) +{ + int i; + int log_c = gf->log[c]; + + if (!c) + return; + + for (i = 0; i < MAX_POLY; i++) + { + int p = i + shift; + uint8_t v = src[i]; + + if (p < 0 || p >= MAX_POLY) + continue; + if (!v) + continue; + + dst[p] ^= gf->exp[(gf->log[v] + log_c) % gf->p]; + } +} + +static uint8_t poly_eval(const uint8_t *s, uint8_t x, + const struct galois_field *gf) +{ + int i; + uint8_t sum = 0; + uint8_t log_x = gf->log[x]; + + if (!x) + return s[0]; + + for (i = 0; i < MAX_POLY; i++) + { + uint8_t c = s[i]; + + if (!c) + continue; + + sum ^= gf->exp[(gf->log[c] + log_x * i) % gf->p]; + } + + return sum; +} + +/************************************************************************ + * Berlekamp-Massey algorithm for finding error locator polynomials. + */ + +static void berlekamp_massey(const uint8_t *s, int N, + const struct galois_field *gf, + uint8_t *sigma) +{ + uint8_t C[MAX_POLY]; + uint8_t B[MAX_POLY]; + int L = 0; + int m = 1; + uint8_t b = 1; + int n; + + memset(B, 0, sizeof(B)); + memset(C, 0, sizeof(C)); + B[0] = 1; + C[0] = 1; + + for (n = 0; n < N; n++) + { + uint8_t d = s[n]; + uint8_t mult; + int i; + + for (i = 1; i <= L; i++) + { + if (!(C[i] && s[n - i])) + continue; + + d ^= gf->exp[(gf->log[C[i]] + + gf->log[s[n - i]]) % + gf->p]; + } + + mult = gf->exp[(gf->p - gf->log[b] + gf->log[d]) % gf->p]; + + if (!d) + { + m++; + } + else if (L * 2 <= n) + { + uint8_t T[MAX_POLY]; + + memcpy(T, C, sizeof(T)); + poly_add(C, B, mult, m, gf); + memcpy(B, T, sizeof(B)); + L = n + 1 - L; + b = d; + m = 1; + } + else + { + poly_add(C, B, mult, m, gf); + m++; + } + } + + memcpy(sigma, C, MAX_POLY); +} + +/************************************************************************ + * Code stream error correction + * + * Generator polynomial for GF(2^8) is x^8 + x^4 + x^3 + x^2 + 1 + */ + +static int block_syndromes(const uint8_t *data, int bs, int npar, uint8_t *s) +{ + int nonzero = 0; + int i; + + memset(s, 0, MAX_POLY); + + for (i = 0; i < npar; i++) + { + int j; + + for (j = 0; j < bs; j++) + { + uint8_t c = data[bs - j - 1]; + + if (!c) + continue; + + s[i] ^= gf256_exp[((int)gf256_log[c] + + i * j) % + 255]; + } + + if (s[i]) + nonzero = 1; + } + + return nonzero; +} + +static void eloc_poly(uint8_t *omega, + const uint8_t *s, const uint8_t *sigma, + int npar) +{ + int i; + + memset(omega, 0, MAX_POLY); + + for (i = 0; i < npar; i++) + { + const uint8_t a = sigma[i]; + const uint8_t log_a = gf256_log[a]; + int j; + + if (!a) + continue; + + for (j = 0; j + 1 < MAX_POLY; j++) + { + const uint8_t b = s[j + 1]; + + if (i + j >= npar) + break; + + if (!b) + continue; + + omega[i + j] ^= + gf256_exp[(log_a + gf256_log[b]) % 255]; + } + } +} + +static quirc_decode_error_t correct_block(uint8_t *data, + const struct quirc_rs_params *ecc) +{ + int npar = ecc->bs - ecc->dw; + uint8_t s[MAX_POLY]; + uint8_t sigma[MAX_POLY]; + uint8_t sigma_deriv[MAX_POLY]; + uint8_t omega[MAX_POLY]; + int i; + + /* Compute syndrome vector */ + if (!block_syndromes(data, ecc->bs, npar, s)) + return QUIRC_SUCCESS; + + berlekamp_massey(s, npar, &gf256, sigma); + + /* Compute derivative of sigma */ + memset(sigma_deriv, 0, MAX_POLY); + for (i = 0; i + 1 < MAX_POLY; i += 2) + sigma_deriv[i] = sigma[i + 1]; + + /* Compute error evaluator polynomial */ + eloc_poly(omega, s, sigma, npar - 1); + + /* Find error locations and magnitudes */ + for (i = 0; i < ecc->bs; i++) + { + uint8_t xinv = gf256_exp[255 - i]; + + if (!poly_eval(sigma, xinv, &gf256)) + { + uint8_t sd_x = poly_eval(sigma_deriv, xinv, &gf256); + uint8_t omega_x = poly_eval(omega, xinv, &gf256); + uint8_t error = gf256_exp[(255 - gf256_log[sd_x] + + gf256_log[omega_x]) % + 255]; + + data[ecc->bs - i - 1] ^= error; + } + } + + if (block_syndromes(data, ecc->bs, npar, s)) + return QUIRC_ERROR_DATA_ECC; + + return QUIRC_SUCCESS; +} + +/************************************************************************ + * Format value error correction + * + * Generator polynomial for GF(2^4) is x^4 + x + 1 + */ + +#define FORMAT_MAX_ERROR 3 +#define FORMAT_SYNDROMES (FORMAT_MAX_ERROR * 2) +#define FORMAT_BITS 15 + +static int format_syndromes(uint16_t u, uint8_t *s) +{ + int i; + int nonzero = 0; + + memset(s, 0, MAX_POLY); + + for (i = 0; i < FORMAT_SYNDROMES; i++) + { + int j; + + s[i] = 0; + for (j = 0; j < FORMAT_BITS; j++) + if (u & (1 << j)) + s[i] ^= gf16_exp[((i + 1) * j) % 15]; + + if (s[i]) + nonzero = 1; + } + + return nonzero; +} + +static quirc_decode_error_t correct_format(uint16_t *f_ret) +{ + uint16_t u = *f_ret; + int i; + uint8_t s[MAX_POLY]; + uint8_t sigma[MAX_POLY]; + + /* Evaluate U (received codeword) at each of alpha_1 .. alpha_6 + * to get S_1 .. S_6 (but we index them from 0). + */ + if (!format_syndromes(u, s)) + return QUIRC_SUCCESS; + + berlekamp_massey(s, FORMAT_SYNDROMES, &gf16, sigma); + + /* Now, find the roots of the polynomial */ + for (i = 0; i < 15; i++) + if (!poly_eval(sigma, gf16_exp[15 - i], &gf16)) + u ^= (1 << i); + + if (format_syndromes(u, s)) + return QUIRC_ERROR_FORMAT_ECC; + + *f_ret = u; + return QUIRC_SUCCESS; +} + +/************************************************************************ + * Decoder algorithm + */ + +struct datastream +{ + uint8_t raw[QUIRC_MAX_PAYLOAD]; + int data_bits; + int ptr; + + uint8_t data[QUIRC_MAX_PAYLOAD]; +} __attribute__((aligned(8))); + +static inline int grid_bit(const struct quirc_code *code, int x, int y) +{ + int p = y * code->size + x; + + return (code->cell_bitmap[p >> 3] >> (p & 7)) & 1; +} + +static quirc_decode_error_t read_format(const struct quirc_code *code, + struct quirc_data *data, int which) +{ + int i; + uint16_t format = 0; + uint16_t fdata; + quirc_decode_error_t err; + + if (which) + { + for (i = 0; i < 7; i++) + format = (format << 1) | + grid_bit(code, 8, code->size - 1 - i); + for (i = 0; i < 8; i++) + format = (format << 1) | + grid_bit(code, code->size - 8 + i, 8); + } + else + { + static const int xs[15] = { + 8, 8, 8, 8, 8, 8, 8, 8, 7, 5, 4, 3, 2, 1, 0}; + static const int ys[15] = { + 0, 1, 2, 3, 4, 5, 7, 8, 8, 8, 8, 8, 8, 8, 8}; + + for (i = 14; i >= 0; i--) + format = (format << 1) | grid_bit(code, xs[i], ys[i]); + } + + format ^= 0x5412; + + err = correct_format(&format); + if (err) + return err; + + fdata = format >> 10; + data->ecc_level = fdata >> 3; + data->mask = fdata & 7; + + return QUIRC_SUCCESS; +} + +static int mask_bit(int mask, int i, int j) +{ + switch (mask) + { + case 0: + return !((i + j) % 2); + case 1: + return !(i % 2); + case 2: + return !(j % 3); + case 3: + return !((i + j) % 3); + case 4: + return !(((i / 2) + (j / 3)) % 2); + case 5: + return !((i * j) % 2 + (i * j) % 3); + case 6: + return !(((i * j) % 2 + (i * j) % 3) % 2); + case 7: + return !(((i * j) % 3 + (i + j) % 2) % 2); + } + + return 0; +} + +static int reserved_cell(int version, int i, int j) +{ + const struct quirc_version_info *ver = &quirc_version_db[version]; + int size = version * 4 + 17; + int ai = -1, aj = -1, a; + + /* Finder + format: top left */ + if (i < 9 && j < 9) + return 1; + + /* Finder + format: bottom left */ + if (i + 8 >= size && j < 9) + return 1; + + /* Finder + format: top right */ + if (i < 9 && j + 8 >= size) + return 1; + + /* Exclude timing patterns */ + if (i == 6 || j == 6) + return 1; + + /* Exclude version info, if it exists. Version info sits adjacent to + * the top-right and bottom-left finders in three rows, bounded by + * the timing pattern. + */ + if (version >= 7) + { + if (i < 6 && j + 11 >= size) + return 1; + if (i + 11 >= size && j < 6) + return 1; + } + + /* Exclude alignment patterns */ + for (a = 0; a < QUIRC_MAX_ALIGNMENT && ver->apat[a]; a++) + { + int p = ver->apat[a]; + + if (abs(p - i) < 3) + ai = a; + if (abs(p - j) < 3) + aj = a; + } + + if (ai >= 0 && aj >= 0) + { + a--; + if (ai > 0 && ai < a) + return 1; + if (aj > 0 && aj < a) + return 1; + if (aj == a && ai == a) + return 1; + } + + return 0; +} + +static void read_bit(const struct quirc_code *code, + struct quirc_data *data, + struct datastream *ds, int i, int j) +{ + int bitpos = ds->data_bits & 7; + int bytepos = ds->data_bits >> 3; + int v = grid_bit(code, j, i); + + if (mask_bit(data->mask, i, j)) + v ^= 1; + + if (v) + ds->raw[bytepos] |= (0x80 >> bitpos); + + ds->data_bits++; +} + +static void read_data(const struct quirc_code *code, + struct quirc_data *data, + struct datastream *ds) +{ + int y = code->size - 1; + int x = code->size - 1; + int dir = -1; + + while (x > 0) + { + if (x == 6) + x--; + + if (!reserved_cell(data->version, y, x)) + read_bit(code, data, ds, y, x); + + if (!reserved_cell(data->version, y, x - 1)) + read_bit(code, data, ds, y, x - 1); + + y += dir; + if (y < 0 || y >= code->size) + { + dir = -dir; + x -= 2; + y += dir; + } + } +} + +static quirc_decode_error_t codestream_ecc(struct quirc_data *data, + struct datastream *ds) +{ + const struct quirc_version_info *ver = + &quirc_version_db[data->version]; + const struct quirc_rs_params *sb_ecc = &ver->ecc[data->ecc_level]; + struct quirc_rs_params lb_ecc; + const int lb_count = + (ver->data_bytes - sb_ecc->bs * sb_ecc->ns) / (sb_ecc->bs + 1); + const int bc = lb_count + sb_ecc->ns; + const int ecc_offset = sb_ecc->dw * bc + lb_count; + int dst_offset = 0; + int i; + + memcpy(&lb_ecc, sb_ecc, sizeof(lb_ecc)); + lb_ecc.dw++; + lb_ecc.bs++; + + for (i = 0; i < bc; i++) + { + uint8_t *dst = ds->data + dst_offset; + const struct quirc_rs_params *ecc = + (i < sb_ecc->ns) ? sb_ecc : &lb_ecc; + const int num_ec = ecc->bs - ecc->dw; + quirc_decode_error_t err; + int j; + + for (j = 0; j < ecc->dw; j++) + dst[j] = ds->raw[j * bc + i]; + for (j = 0; j < num_ec; j++) + dst[ecc->dw + j] = ds->raw[ecc_offset + j * bc + i]; + + err = correct_block(dst, ecc); + if (err) + return err; + + dst_offset += ecc->dw; + } + + ds->data_bits = dst_offset * 8; + + return QUIRC_SUCCESS; +} + +static inline int bits_remaining(const struct datastream *ds) +{ + return ds->data_bits - ds->ptr; +} + +static int take_bits(struct datastream *ds, int len) +{ + int ret = 0; + + while (len && (ds->ptr < ds->data_bits)) + { + uint8_t b = ds->data[ds->ptr >> 3]; + int bitpos = ds->ptr & 7; + + ret <<= 1; + if ((b << bitpos) & 0x80) + ret |= 1; + + ds->ptr++; + len--; + } + + return ret; +} + +static int numeric_tuple(struct quirc_data *data, + struct datastream *ds, + int bits, int digits) +{ + int tuple; + int i; + + if (bits_remaining(ds) < bits) + return -1; + + tuple = take_bits(ds, bits); + + for (i = digits - 1; i >= 0; i--) + { + data->payload[data->payload_len + i] = tuple % 10 + '0'; + tuple /= 10; + } + + data->payload_len += digits; + return 0; +} + +static quirc_decode_error_t decode_numeric(struct quirc_data *data, + struct datastream *ds) +{ + int bits = 14; + int count; + + if (data->version < 10) + bits = 10; + else if (data->version < 27) + bits = 12; + + count = take_bits(ds, bits); + if (data->payload_len + count + 1 > QUIRC_MAX_PAYLOAD) + return QUIRC_ERROR_DATA_OVERFLOW; + + while (count >= 3) + { + if (numeric_tuple(data, ds, 10, 3) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count -= 3; + } + + if (count >= 2) + { + if (numeric_tuple(data, ds, 7, 2) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count -= 2; + } + + if (count) + { + if (numeric_tuple(data, ds, 4, 1) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count--; + } + + return QUIRC_SUCCESS; +} + +static int alpha_tuple(struct quirc_data *data, + struct datastream *ds, + int bits, int digits) +{ + int tuple; + int i; + + if (bits_remaining(ds) < bits) + return -1; + + tuple = take_bits(ds, bits); + + for (i = 0; i < digits; i++) + { + static const char *alpha_map = + "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"; + + data->payload[data->payload_len + digits - i - 1] = + alpha_map[tuple % 45]; + tuple /= 45; + } + + data->payload_len += digits; + return 0; +} + +static quirc_decode_error_t decode_alpha(struct quirc_data *data, + struct datastream *ds) +{ + int bits = 13; + int count; + + if (data->version < 10) + bits = 9; + else if (data->version < 27) + bits = 11; + + count = take_bits(ds, bits); + if (data->payload_len + count + 1 > QUIRC_MAX_PAYLOAD) + return QUIRC_ERROR_DATA_OVERFLOW; + + while (count >= 2) + { + if (alpha_tuple(data, ds, 11, 2) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count -= 2; + } + + if (count) + { + if (alpha_tuple(data, ds, 6, 1) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count--; + } + + return QUIRC_SUCCESS; +} + +static quirc_decode_error_t decode_byte(struct quirc_data *data, + struct datastream *ds) +{ + int bits = 16; + int count; + int i; + + if (data->version < 10) + bits = 8; + + count = take_bits(ds, bits); + if (data->payload_len + count + 1 > QUIRC_MAX_PAYLOAD) + return QUIRC_ERROR_DATA_OVERFLOW; + if (bits_remaining(ds) < count * 8) + return QUIRC_ERROR_DATA_UNDERFLOW; + + for (i = 0; i < count; i++) + data->payload[data->payload_len++] = take_bits(ds, 8); + + return QUIRC_SUCCESS; +} + +static quirc_decode_error_t decode_kanji(struct quirc_data *data, + struct datastream *ds) +{ + int bits = 12; + int count; + int i; + + if (data->version < 10) + bits = 8; + else if (data->version < 27) + bits = 10; + + count = take_bits(ds, bits); + if (data->payload_len + count * 2 + 1 > QUIRC_MAX_PAYLOAD) + return QUIRC_ERROR_DATA_OVERFLOW; + if (bits_remaining(ds) < count * 13) + return QUIRC_ERROR_DATA_UNDERFLOW; + + for (i = 0; i < count; i++) + { + int d = take_bits(ds, 13); + int msB = d / 0xc0; + int lsB = d % 0xc0; + int intermediate = (msB << 8) | lsB; + uint16_t sjw; + + if (intermediate + 0x8140 <= 0x9ffc) + { + /* bytes are in the range 0x8140 to 0x9FFC */ + sjw = intermediate + 0x8140; + } + else + { + /* bytes are in the range 0xE040 to 0xEBBF */ + sjw = intermediate + 0xc140; + } + + data->payload[data->payload_len++] = sjw >> 8; + data->payload[data->payload_len++] = sjw & 0xff; + } + + return QUIRC_SUCCESS; +} + +static quirc_decode_error_t decode_eci(struct quirc_data *data, + struct datastream *ds) +{ + if (bits_remaining(ds) < 8) + return QUIRC_ERROR_DATA_UNDERFLOW; + + data->eci = take_bits(ds, 8); + + if ((data->eci & 0xc0) == 0x80) + { + if (bits_remaining(ds) < 8) + return QUIRC_ERROR_DATA_UNDERFLOW; + + data->eci = (data->eci << 8) | take_bits(ds, 8); + } + else if ((data->eci & 0xe0) == 0xc0) + { + if (bits_remaining(ds) < 16) + return QUIRC_ERROR_DATA_UNDERFLOW; + + data->eci = (data->eci << 16) | take_bits(ds, 16); + } + + return QUIRC_SUCCESS; +} + +static quirc_decode_error_t decode_payload(struct quirc_data *data, + struct datastream *ds) +{ + while (bits_remaining(ds) >= 4) + { + quirc_decode_error_t err = QUIRC_SUCCESS; + int type = take_bits(ds, 4); + + switch (type) + { + case QUIRC_DATA_TYPE_NUMERIC: + err = decode_numeric(data, ds); + break; + + case QUIRC_DATA_TYPE_ALPHA: + err = decode_alpha(data, ds); + break; + + case QUIRC_DATA_TYPE_BYTE: + err = decode_byte(data, ds); + break; + + case QUIRC_DATA_TYPE_KANJI: + err = decode_kanji(data, ds); + break; + + case 7: + err = decode_eci(data, ds); + break; + + default: + goto done; + } + + if (err) + return err; + + if (!(type & (type - 1)) && (type > data->data_type)) + data->data_type = type; + } + +done: + + /* Add nul terminator to all payloads */ + if (data->payload_len >= sizeof(data->payload)) + data->payload_len--; + data->payload[data->payload_len] = 0; + + return QUIRC_SUCCESS; +} + +quirc_decode_error_t quirc_decode(const struct quirc_code *code, + struct quirc_data *data) +{ + quirc_decode_error_t err; + struct datastream *ds = ps_malloc(sizeof(struct datastream)); + + if ((code->size - 17) % 4) + { + free(ds); + return QUIRC_ERROR_INVALID_GRID_SIZE; + } + + memset(data, 0, sizeof(*data)); + memset(ds, 0, sizeof(*ds)); + + data->version = (code->size - 17) / 4; + + if (data->version < 1 || + data->version > QUIRC_MAX_VERSION) + { + free(ds); + return QUIRC_ERROR_INVALID_VERSION; + } + + /* Read format information -- try both locations */ + err = read_format(code, data, 0); + if (err) + err = read_format(code, data, 1); + if (err) + { + free(ds); + return err; + } + + read_data(code, data, ds); + err = codestream_ecc(data, ds); + if (err) + { + free(ds); + return err; + } + + err = decode_payload(data, ds); + if (err) + { + free(ds); + return err; + } + + free(ds); + return QUIRC_SUCCESS; +} \ No newline at end of file diff --git a/ESP32QRCodeReader_Page/fmath.h b/ESP32QRCodeReader_Page/fmath.h new file mode 100644 index 0000000..76c3b93 --- /dev/null +++ b/ESP32QRCodeReader_Page/fmath.h @@ -0,0 +1,70 @@ +/* + * This file is part of the OpenMV project. + * Copyright (c) 2013/2014 Ibrahim Abdelkader + * This work is licensed under the MIT license, see the file LICENSE for details. + * + * Fast approximate math functions. + * + */ +#ifndef __FMATH_H +#define __FMATH_H +#include +#include + +static inline float fast_sqrtf(float x) +{ + //return sqrtf(x); + asm("fsqrt.s %0, %1" + : "=f"(x) + : "f"(x)); + return x; +} +static inline int fast_floorf(float x) +{ + return (int)(x); +} + +static inline int fast_ceilf(float x) +{ + return (int)(x + 0.9999f); +} + +static inline int fast_roundf(float x) +{ + return (int)(x); +} + +static inline float fast_fabsf(float d) +{ + return fabsf(d); +} + +extern int fast_floorf(float x); +extern int fast_ceilf(float x); +extern int fast_roundf(float x); +extern float fast_atanf(float x); +extern float fast_atan2f(float y, float x); +extern float fast_expf(float x); +extern float fast_cbrtf(float d); +extern float fast_fabsf(float d); +extern float fast_log(float x); +extern float fast_log2(float x); +extern float fast_powf(float a, float b); + +/*#define fast_sqrtf(x) (sqrtf(x)) +#define fast_floorf(x) ((int)floorf(x)) +#define fast_ceilf(x) ((int)ceilf(x)) +#define fast_roundf(x) ((int)roundf(x)) +#define fast_atanf(x) (atanf(x)) +#define fast_atan2f(x,y) (atan2f((x),(y))) +#define fast_expf(x) (expf(x)) +#define fast_cbrtf(x) (cbrtf(x)) +#define fast_fabsf(x) (fabsf(x)) +#define fast_log(x) (log(x)) +#define fast_log2(x) (log2(x)) +#define fast_powf(x,y) (powf((x),(y))) +*/ + +extern const float cos_table[360]; +extern const float sin_table[360]; +#endif // __FMATH_H \ No newline at end of file diff --git a/ESP32QRCodeReader_Page/identify.c b/ESP32QRCodeReader_Page/identify.c new file mode 100644 index 0000000..d0d0316 --- /dev/null +++ b/ESP32QRCodeReader_Page/identify.c @@ -0,0 +1,1286 @@ +/* quirc - QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include +#include + +#include "fmath.h" +#include "collections.h" +#include "quirc_internal.h" + +/************************************************************************ + * Linear algebra routines + */ + +static int line_intersect(const struct quirc_point *p0, + const struct quirc_point *p1, + const struct quirc_point *q0, + const struct quirc_point *q1, + struct quirc_point *r) +{ + /* (a, b) is perpendicular to line p */ + int a = -(p1->y - p0->y); + int b = p1->x - p0->x; + + /* (c, d) is perpendicular to line q */ + int c = -(q1->y - q0->y); + int d = q1->x - q0->x; + + /* e and f are dot products of the respective vectors with p and q */ + int e = a * p1->x + b * p1->y; + int f = c * q1->x + d * q1->y; + + /* Now we need to solve: + * [a b] [rx] [e] + * [c d] [ry] = [f] + * + * We do this by inverting the matrix and applying it to (e, f): + * [ d -b] [e] [rx] + * 1/det [-c a] [f] = [ry] + */ + int det = (a * d) - (b * c); + + if (!det) + return 0; + + r->x = (d * e - b * f) / det; + r->y = (-c * e + a * f) / det; + + return 1; +} + +static void perspective_setup(float *c, + const struct quirc_point *rect, + float w, float h) +{ + float x0 = rect[0].x; + float y0 = rect[0].y; + float x1 = rect[1].x; + float y1 = rect[1].y; + float x2 = rect[2].x; + float y2 = rect[2].y; + float x3 = rect[3].x; + float y3 = rect[3].y; + + float wden = w * (x2 * y3 - x3 * y2 + (x3 - x2) * y1 + x1 * (y2 - y3)); + float hden = h * (x2 * y3 + x1 * (y2 - y3) - x3 * y2 + (x3 - x2) * y1); + + c[0] = (x1 * (x2 * y3 - x3 * y2) + x0 * (-x2 * y3 + x3 * y2 + (x2 - x3) * y1) + + x1 * (x3 - x2) * y0) / + wden; + c[1] = -(x0 * (x2 * y3 + x1 * (y2 - y3) - x2 * y1) - x1 * x3 * y2 + x2 * x3 * y1 + (x1 * x3 - x2 * x3) * y0) / hden; + c[2] = x0; + c[3] = (y0 * (x1 * (y3 - y2) - x2 * y3 + x3 * y2) + y1 * (x2 * y3 - x3 * y2) + + x0 * y1 * (y2 - y3)) / + wden; + c[4] = (x0 * (y1 * y3 - y2 * y3) + x1 * y2 * y3 - x2 * y1 * y3 + + y0 * (x3 * y2 - x1 * y2 + (x2 - x3) * y1)) / + hden; + c[5] = y0; + c[6] = (x1 * (y3 - y2) + x0 * (y2 - y3) + (x2 - x3) * y1 + (x3 - x2) * y0) / wden; + c[7] = (-x2 * y3 + x1 * y3 + x3 * y2 + x0 * (y1 - y2) - x3 * y1 + (x2 - x1) * y0) / + hden; +} + +static void perspective_map(const float *c, + float u, float v, struct quirc_point *ret) +{ + float den = c[6] * u + c[7] * v + 1.0; + float x = (c[0] * u + c[1] * v + c[2]) / den; + float y = (c[3] * u + c[4] * v + c[5]) / den; + + ret->x = fast_roundf(x); + ret->y = fast_roundf(y); +} + +static void perspective_unmap(const float *c, + const struct quirc_point *in, + float *u, float *v) +{ + float x = in->x; + float y = in->y; + float den = -c[0] * c[7] * y + c[1] * c[6] * y + (c[3] * c[7] - c[4] * c[6]) * x + + c[0] * c[4] - c[1] * c[3]; + + *u = -(c[1] * (y - c[5]) - c[2] * c[7] * y + (c[5] * c[7] - c[4]) * x + c[2] * c[4]) / + den; + *v = (c[0] * (y - c[5]) - c[2] * c[6] * y + (c[5] * c[6] - c[3]) * x + c[2] * c[3]) / + den; +} + +/************************************************************************ + * Span-based floodfill routine + */ + +typedef void (*span_func_t)(void *user_data, int y, int left, int right); + +typedef struct xylf +{ + int16_t x, y, l, r; +} __attribute__((aligned(8))) +xylf_t; + +//计算该区域的面积,from是像素颜色,to是区块标号,user_data是申请的区块结构体,func是计算面积的函数 +static void flood_fill_seed(struct quirc *q, int x, int y, int from, int to, + span_func_t func, void *user_data, + int depth) +{ + (void)depth; // unused + + lifo_t lifo; + size_t lifo_len; + lifo_alloc_all(&lifo, &lifo_len, sizeof(xylf_t)); + //late in first out. 申请xylf_t的lifo,一次申请完,长度存储在lifo_len中 + + for (;;) + { + int left = x; + int right = x; + int i; + quirc_pixel_t *row = q->pixels + y * q->w; //行起始地址 + //查找左右边界 + while (left > 0 && row[left - 1] == from) + left--; + + while (right < q->w - 1 && row[right + 1] == from) + right++; + + /* Fill the extent 对应像素标记为区块号*/ + for (i = left; i <= right; i++) + row[i] = to; + //累加区域内的像素点数作为面积 + if (func) + func(user_data, y, left, right); + + for (;;) + { + if (lifo_size(&lifo) < lifo_len) + { //栈中的数量 + /* Seed new flood-fills */ + if (y > 0) + { //查找上一行有没有在同一区域的点 + row = q->pixels + (y - 1) * q->w; + + bool recurse = false; + for (i = left; i <= right; i++) + if (row[i] == from) + { //相同区域,则入栈原来的区块 + xylf_t context; + context.x = x; + context.y = y; + context.l = left; + context.r = right; + lifo_enqueue(&lifo, &context); + //mp_printf(&mp_plat_print, "#x=%x,y=%d;x1=%d,y1=%d\n",x,y,i,y-1); + x = i; + y = y - 1; + recurse = true; + break; + } + if (recurse) + break; + } + //查找下一行有没有在同一区域的点 + if (y < q->h - 1) + { + row = q->pixels + (y + 1) * q->w; + + bool recurse = false; + for (i = left; i <= right; i++) + if (row[i] == from) + { + xylf_t context; + context.x = x; + context.y = y; + context.l = left; + context.r = right; + lifo_enqueue(&lifo, &context); + //mp_printf(&mp_plat_print, "#x=%x,y=%d;x1=%d,y1=%d\n",x,y,i,y+1); + x = i; + y = y + 1; + recurse = true; + break; + } + if (recurse) + break; + } + } + + if (!lifo_size(&lifo)) + { + lifo_free(&lifo); //如果最起始为止就没找到,那么返回 + return; + } + //本次迭代,往上,往下找边界(相同颜色像素点),直到找不到为止 + //找到边界后,出栈上层像素点,回退回去 + xylf_t context; + lifo_dequeue(&lifo, &context); //这里存疑,如果都没有的话,dequeue就会反向溢出吧。。 + x = context.x; + y = context.y; + left = context.l; + right = context.r; + //mp_printf(&mp_plat_print, "#deq: x=%x,y=%d\n",x,y); + } //找到相同from,break到这外面 + } +} + +/************************************************************************ + * Adaptive thresholding + */ + +#define THRESHOLD_S_MIN 1 +#define THRESHOLD_S_DEN 8 +#define THRESHOLD_T 5 + +static void threshold(struct quirc *q) +{ + int x, y; + int avg_w = 0; + int avg_u = 0; + int threshold_s = q->w / THRESHOLD_S_DEN; + quirc_pixel_t *row = q->pixels; + + /* + * Ensure a sane, non-zero value for threshold_s. + * + * threshold_s can be zero if the image width is small. We need to avoid + * SIGFPE as it will be used as divisor. + */ + if (threshold_s < THRESHOLD_S_MIN) + threshold_s = THRESHOLD_S_MIN; + + for (y = 0; y < q->h; y++) + { + int row_average[q->w]; + + memset(row_average, 0, sizeof(row_average)); + + for (x = 0; x < q->w; x++) + { + int w, u; + + if (y & 1) + { + w = x; + u = q->w - 1 - x; + } + else + { + w = q->w - 1 - x; + u = x; + } + + avg_w = (avg_w * (threshold_s - 1)) / + threshold_s + + row[w]; + avg_u = (avg_u * (threshold_s - 1)) / + threshold_s + + row[u]; + + row_average[w] += avg_w; + row_average[u] += avg_u; + } + + for (x = 0; x < q->w; x++) + { + if (row[x] < row_average[x] * + (100 - THRESHOLD_T) / (200 * threshold_s)) + row[x] = QUIRC_PIXEL_BLACK; + else + row[x] = QUIRC_PIXEL_WHITE; + } + + row += q->w; + } +} + +static void area_count(void *user_data, int y, int left, int right) +{ + ((struct quirc_region *)user_data)->count += right - left + 1; +} + +static int region_code(struct quirc *q, int x, int y) +{ //region指的是QRcode的区域,成员为区域的坐标,像素面积,是否顶点 + int pixel; + struct quirc_region *box; + int region; + + if (x < 0 || y < 0 || x >= q->w || y >= q->h) + return -1; + + pixel = q->pixels[y * q->w + x]; + //预先判断非正常的像素情况,退出 + if (pixel >= QUIRC_PIXEL_REGION) + return pixel; + + if (pixel == QUIRC_PIXEL_WHITE) + return -1; + + if (q->num_regions >= QUIRC_MAX_REGIONS) + return -1; + //新建一个区域 + region = q->num_regions; + box = &q->regions[q->num_regions++]; + + memset(box, 0, sizeof(*box)); + + box->seed.x = x; + box->seed.y = y; + box->capstone = -1; + //计算该区域的面积 + flood_fill_seed(q, x, y, pixel, region, area_count, box, 0); + + return region; +} + +struct polygon_score_data +{ + struct quirc_point ref; + + int scores[4]; + struct quirc_point *corners; +} __attribute__((aligned(8))); + +static void find_one_corner(void *user_data, int y, int left, int right) +{ + struct polygon_score_data *psd = + (struct polygon_score_data *)user_data; + int xs[2] = {left, right}; + int dy = y - psd->ref.y; + int i; + + for (i = 0; i < 2; i++) + { + int dx = xs[i] - psd->ref.x; + int d = dx * dx + dy * dy; + + if (d > psd->scores[0]) + { + psd->scores[0] = d; + psd->corners[0].x = xs[i]; + psd->corners[0].y = y; + } + } +} + +static void find_other_corners(void *user_data, int y, int left, int right) +{ + struct polygon_score_data *psd = + (struct polygon_score_data *)user_data; + int xs[2] = {left, right}; + int i; + + for (i = 0; i < 2; i++) + { + int up = xs[i] * psd->ref.x + y * psd->ref.y; + int right = xs[i] * -psd->ref.y + y * psd->ref.x; + int scores[4] = {up, right, -up, -right}; + int j; + + for (j = 0; j < 4; j++) + { + if (scores[j] > psd->scores[j]) + { + psd->scores[j] = scores[j]; + psd->corners[j].x = xs[i]; + psd->corners[j].y = y; + } + } + } +} + +static void find_region_corners(struct quirc *q, + int rcode, const struct quirc_point *ref, + struct quirc_point *corners) +{ + struct quirc_region *region = &q->regions[rcode]; + struct polygon_score_data psd; + int i; + + memset(&psd, 0, sizeof(psd)); + psd.corners = corners; + + memcpy(&psd.ref, ref, sizeof(psd.ref)); + psd.scores[0] = -1; + flood_fill_seed(q, region->seed.x, region->seed.y, + rcode, QUIRC_PIXEL_BLACK, + find_one_corner, &psd, 0); + + psd.ref.x = psd.corners[0].x - psd.ref.x; + psd.ref.y = psd.corners[0].y - psd.ref.y; + + for (i = 0; i < 4; i++) + memcpy(&psd.corners[i], ®ion->seed, + sizeof(psd.corners[i])); + + i = region->seed.x * psd.ref.x + region->seed.y * psd.ref.y; + psd.scores[0] = i; + psd.scores[2] = -i; + i = region->seed.x * -psd.ref.y + region->seed.y * psd.ref.x; + psd.scores[1] = i; + psd.scores[3] = -i; + + flood_fill_seed(q, region->seed.x, region->seed.y, + QUIRC_PIXEL_BLACK, rcode, + find_other_corners, &psd, 0); +} + +static void record_capstone(struct quirc *q, int ring, int stone) +{ + struct quirc_region *stone_reg = &q->regions[stone]; + struct quirc_region *ring_reg = &q->regions[ring]; + struct quirc_capstone *capstone; + int cs_index; + + if (q->num_capstones >= QUIRC_MAX_CAPSTONES) + return; + + cs_index = q->num_capstones; + capstone = &q->capstones[q->num_capstones++]; + + memset(capstone, 0, sizeof(*capstone)); + + capstone->qr_grid = -1; + capstone->ring = ring; + capstone->stone = stone; + stone_reg->capstone = cs_index; + ring_reg->capstone = cs_index; + + /* Find the corners of the ring */ + find_region_corners(q, ring, &stone_reg->seed, capstone->corners); + + /* Set up the perspective transform and find the center */ + perspective_setup(capstone->c, capstone->corners, 7.0, 7.0); + perspective_map(capstone->c, 3.5, 3.5, &capstone->center); +} + +static void test_capstone(struct quirc *q, int x, int y, int *pb) +{ + int ring_right = region_code(q, x - pb[4], y); //x-pb[4]是标记环右边的左侧 + int stone = region_code(q, x - pb[4] - pb[3] - pb[2], y); //实心点左侧 + int ring_left = region_code(q, x - pb[4] - pb[3] - pb[2] - pb[1] - pb[0], y); //环左侧 + struct quirc_region *stone_reg; + struct quirc_region *ring_reg; + int ratio; + //以下检测顶点标记是否符合规范,环称为ring,中间称为stone + if (ring_left < 0 || ring_right < 0 || stone < 0) + return; + + /* Left and ring of ring should be connected */ + if (ring_left != ring_right) + return; + + /* Ring should be disconnected from stone */ + if (ring_left == stone) + return; + + stone_reg = &q->regions[stone]; + ring_reg = &q->regions[ring_left]; + + /* Already detected */ + if (stone_reg->capstone >= 0 || ring_reg->capstone >= 0) + return; + + /* Ratio should ideally be 37.5 中间实心点占面积比例应该在37.5%左右*/ + ratio = stone_reg->count * 100 / ring_reg->count; + if (ratio < 10 || ratio > 70) + return; + + record_capstone(q, ring_left, stone); +} + +static void finder_scan(struct quirc *q, int y) +{ + quirc_pixel_t *row = q->pixels + y * q->w; + int x; + int last_color = 0; + int run_length = 0; + int run_count = 0; + int pb[5]; //means QRcode's pixel width + + memset(pb, 0, sizeof(pb)); + for (x = 0; x < q->w; x++) + { + int color = row[x] ? 1 : 0; + + if (x && color != last_color) + { // color is different + memmove(pb, pb + 1, sizeof(pb[0]) * 4); //left move in one data + pb[4] = run_length; //run how many pix to get different color + run_length = 0; + run_count++; //get more than 5 time color jump + + if (!color && run_count >= 5) + { // find the marker of QRcode(three corner's marker) + static int check[5] = {1, 1, 3, 1, 1}; + int avg, err; + int i; + int ok = 1; + + avg = (pb[0] + pb[1] + pb[3] + pb[4]) / 4; + err = avg * 3 / 4; + + for (i = 0; i < 5; i++) + if (pb[i] < check[i] * avg - err || + pb[i] > check[i] * avg + err) + ok = 0; + + if (ok) + test_capstone(q, x, y, pb); + } + } + + run_length++; + last_color = color; + } +} + +static void find_alignment_pattern(struct quirc *q, int index) +{ + struct quirc_grid *qr = &q->grids[index]; + struct quirc_capstone *c0 = &q->capstones[qr->caps[0]]; + struct quirc_capstone *c2 = &q->capstones[qr->caps[2]]; + struct quirc_point a; + struct quirc_point b; + struct quirc_point c; + int size_estimate; + int step_size = 1; + int dir = 0; + float u, v; + + /* Grab our previous estimate of the alignment pattern corner */ + memcpy(&b, &qr->align, sizeof(b)); + + /* Guess another two corners of the alignment pattern so that we + * can estimate its size. + */ + perspective_unmap(c0->c, &b, &u, &v); + perspective_map(c0->c, u, v + 1.0, &a); + perspective_unmap(c2->c, &b, &u, &v); + perspective_map(c2->c, u + 1.0, v, &c); + + size_estimate = abs((a.x - b.x) * -(c.y - b.y) + + (a.y - b.y) * (c.x - b.x)); + + /* Spiral outwards from the estimate point until we find something + * roughly the right size. Don't look too far from the estimate + * point. + */ + while (step_size * step_size < size_estimate * 100) + { + static const int dx_map[] = {1, 0, -1, 0}; + static const int dy_map[] = {0, -1, 0, 1}; + int i; + + for (i = 0; i < step_size; i++) + { + int code = region_code(q, b.x, b.y); + + if (code >= 0) + { + struct quirc_region *reg = &q->regions[code]; + + if (reg->count >= size_estimate / 2 && + reg->count <= size_estimate * 2) + { + qr->align_region = code; + return; + } + } + + b.x += dx_map[dir]; + b.y += dy_map[dir]; + } + + dir = (dir + 1) % 4; + if (!(dir & 1)) + step_size++; + } +} + +static void find_leftmost_to_line(void *user_data, int y, int left, int right) +{ + struct polygon_score_data *psd = + (struct polygon_score_data *)user_data; + int xs[2] = {left, right}; + int i; + + for (i = 0; i < 2; i++) + { + int d = -psd->ref.y * xs[i] + psd->ref.x * y; + + if (d < psd->scores[0]) + { + psd->scores[0] = d; + psd->corners[0].x = xs[i]; + psd->corners[0].y = y; + } + } +} + +/* Do a Bresenham scan from one point to another and count the number + * of black/white transitions. + */ +static int timing_scan(const struct quirc *q, + const struct quirc_point *p0, + const struct quirc_point *p1) +{ + int n = p1->x - p0->x; + int d = p1->y - p0->y; + int x = p0->x; + int y = p0->y; + int *dom, *nondom; + int dom_step; + int nondom_step; + int a = 0; + int i; + int run_length = 0; + int count = 0; + + if (p0->x < 0 || p0->y < 0 || p0->x >= q->w || p0->y >= q->h) + return -1; + if (p1->x < 0 || p1->y < 0 || p1->x >= q->w || p1->y >= q->h) + return -1; + + if (abs(n) > abs(d)) + { + int swap = n; + + n = d; + d = swap; + + dom = &x; + nondom = &y; + } + else + { + dom = &y; + nondom = &x; + } + + if (n < 0) + { + n = -n; + nondom_step = -1; + } + else + { + nondom_step = 1; + } + + if (d < 0) + { + d = -d; + dom_step = -1; + } + else + { + dom_step = 1; + } + + x = p0->x; + y = p0->y; + for (i = 0; i <= d; i++) + { + int pixel; + + if (y < 0 || y >= q->h || x < 0 || x >= q->w) + break; + + pixel = q->pixels[y * q->w + x]; + + if (pixel) + { + if (run_length >= 2) + count++; + run_length = 0; + } + else + { + run_length++; + } + + a += n; + *dom += dom_step; + if (a >= d) + { + *nondom += nondom_step; + a -= d; + } + } + + return count; +} + +/* Try the measure the timing pattern for a given QR code. This does + * not require the global perspective to have been set up, but it + * does require that the capstone corners have been set to their + * canonical rotation. + * + * For each capstone, we find a point in the middle of the ring band + * which is nearest the centre of the code. Using these points, we do + * a horizontal and a vertical timing scan. + */ +static int measure_timing_pattern(struct quirc *q, int index) +{ + struct quirc_grid *qr = &q->grids[index]; + int i; + int scan; + int ver; + int size; + + for (i = 0; i < 3; i++) + { + static const float us[] = {6.5, 6.5, 0.5}; + static const float vs[] = {0.5, 6.5, 6.5}; + struct quirc_capstone *cap = &q->capstones[qr->caps[i]]; + + perspective_map(cap->c, us[i], vs[i], &qr->tpep[i]); + } + + qr->hscan = timing_scan(q, &qr->tpep[1], &qr->tpep[2]); + qr->vscan = timing_scan(q, &qr->tpep[1], &qr->tpep[0]); + + scan = qr->hscan; + if (qr->vscan > scan) + scan = qr->vscan; + + /* If neither scan worked, we can't go any further. */ + if (scan < 0) + return -1; + + /* Choose the nearest allowable grid size */ + size = scan * 2 + 13; + ver = (size - 15) / 4; + qr->grid_size = ver * 4 + 17; + + return 0; +} + +/* Read a cell from a grid using the currently set perspective + * transform. Returns +/- 1 for black/white, 0 for cells which are + * out of image bounds. + */ +static int read_cell(const struct quirc *q, int index, int x, int y) +{ + const struct quirc_grid *qr = &q->grids[index]; + struct quirc_point p; + + perspective_map(qr->c, x + 0.5, y + 0.5, &p); + if (p.y < 0 || p.y >= q->h || p.x < 0 || p.x >= q->w) + return 0; + + return q->pixels[p.y * q->w + p.x] ? 1 : -1; +} + +static int fitness_cell(const struct quirc *q, int index, int x, int y) +{ + const struct quirc_grid *qr = &q->grids[index]; + int score = 0; + int u, v; + + for (v = 0; v < 3; v++) + for (u = 0; u < 3; u++) + { + static const float offsets[] = {0.3, 0.5, 0.7}; + struct quirc_point p; + + perspective_map(qr->c, x + offsets[u], + y + offsets[v], &p); + if (p.y < 0 || p.y >= q->h || p.x < 0 || p.x >= q->w) + continue; + + if (q->pixels[p.y * q->w + p.x]) + score++; + else + score--; + } + + return score; +} + +static int fitness_ring(const struct quirc *q, int index, int cx, int cy, + int radius) +{ + int i; + int score = 0; + + for (i = 0; i < radius * 2; i++) + { + score += fitness_cell(q, index, cx - radius + i, cy - radius); + score += fitness_cell(q, index, cx - radius, cy + radius - i); + score += fitness_cell(q, index, cx + radius, cy - radius + i); + score += fitness_cell(q, index, cx + radius - i, cy + radius); + } + + return score; +} + +static int fitness_apat(const struct quirc *q, int index, int cx, int cy) +{ + return fitness_cell(q, index, cx, cy) - + fitness_ring(q, index, cx, cy, 1) + + fitness_ring(q, index, cx, cy, 2); +} + +static int fitness_capstone(const struct quirc *q, int index, int x, int y) +{ + x += 3; + y += 3; + + return fitness_cell(q, index, x, y) + + fitness_ring(q, index, x, y, 1) - + fitness_ring(q, index, x, y, 2) + + fitness_ring(q, index, x, y, 3); +} + +/* Compute a fitness score for the currently configured perspective + * transform, using the features we expect to find by scanning the + * grid. + */ +static int fitness_all(const struct quirc *q, int index) +{ + const struct quirc_grid *qr = &q->grids[index]; + int version = (qr->grid_size - 17) / 4; + const struct quirc_version_info *info = &quirc_version_db[version]; + int score = 0; + int i, j; + int ap_count; + + /* Check the timing pattern */ + for (i = 0; i < qr->grid_size - 14; i++) + { + int expect = (i & 1) ? 1 : -1; + + score += fitness_cell(q, index, i + 7, 6) * expect; + score += fitness_cell(q, index, 6, i + 7) * expect; + } + + /* Check capstones */ + score += fitness_capstone(q, index, 0, 0); + score += fitness_capstone(q, index, qr->grid_size - 7, 0); + score += fitness_capstone(q, index, 0, qr->grid_size - 7); + + if (version < 0 || version > QUIRC_MAX_VERSION) + return score; + + /* Check alignment patterns */ + ap_count = 0; + while ((ap_count < QUIRC_MAX_ALIGNMENT) && info->apat[ap_count]) + ap_count++; + + for (i = 1; i + 1 < ap_count; i++) + { + score += fitness_apat(q, index, 6, info->apat[i]); + score += fitness_apat(q, index, info->apat[i], 6); + } + + for (i = 1; i < ap_count; i++) + for (j = 1; j < ap_count; j++) + score += fitness_apat(q, index, + info->apat[i], info->apat[j]); + //mp_printf(&mp_plat_print, "##score=%d\n",score); + return score; +} + +static void jiggle_perspective(struct quirc *q, int index) +{ + struct quirc_grid *qr = &q->grids[index]; + int best = fitness_all(q, index); + int pass; + float adjustments[8]; + int i; + + for (i = 0; i < 8; i++) + adjustments[i] = qr->c[i] * 0.02; + + for (pass = 0; pass < 5; pass++) + { + for (i = 0; i < 16; i++) + { + int j = i >> 1; + int test; + float old = qr->c[j]; + float step = adjustments[j]; + float new; + + if (i & 1) + new = old + step; + else + new = old - step; + + qr->c[j] = new; + test = fitness_all(q, index); + + if (test > best) + best = test; + else + qr->c[j] = old; + } + + for (i = 0; i < 8; i++) + adjustments[i] *= 0.5; + } +} + +/* Once the capstones are in place and an alignment point has been + * chosen, we call this function to set up a grid-reading perspective + * transform. + */ +static void setup_qr_perspective(struct quirc *q, int index) +{ + struct quirc_grid *qr = &q->grids[index]; + struct quirc_point rect[4]; + + /* Set up the perspective map for reading the grid */ + memcpy(&rect[0], &q->capstones[qr->caps[1]].corners[0], + sizeof(rect[0])); + memcpy(&rect[1], &q->capstones[qr->caps[2]].corners[0], + sizeof(rect[0])); + memcpy(&rect[2], &qr->align, sizeof(rect[0])); + memcpy(&rect[3], &q->capstones[qr->caps[0]].corners[0], + sizeof(rect[0])); + perspective_setup(qr->c, rect, qr->grid_size - 7, qr->grid_size - 7); + + jiggle_perspective(q, index); +} + +/* Rotate the capstone with so that corner 0 is the leftmost with respect + * to the given reference line. + */ +static void rotate_capstone(struct quirc_capstone *cap, + const struct quirc_point *h0, + const struct quirc_point *hd) +{ + struct quirc_point copy[4]; + int j; + int best = 0; + int best_score = 0; + + for (j = 0; j < 4; j++) + { + struct quirc_point *p = &cap->corners[j]; + int score = (p->x - h0->x) * -hd->y + + (p->y - h0->y) * hd->x; + + if (!j || score < best_score) + { + best = j; + best_score = score; + } + } + + /* Rotate the capstone */ + for (j = 0; j < 4; j++) + memcpy(©[j], &cap->corners[(j + best) % 4], + sizeof(copy[j])); + memcpy(cap->corners, copy, sizeof(cap->corners)); + perspective_setup(cap->c, cap->corners, 7.0, 7.0); +} + +static void record_qr_grid(struct quirc *q, int a, int b, int c) +{ + struct quirc_point h0, hd; + int i; + int qr_index; + struct quirc_grid *qr; + + if (q->num_grids >= QUIRC_MAX_GRIDS) + return; + + /* Construct the hypotenuse line from A to C. B should be to + * the left of this line. + */ + memcpy(&h0, &q->capstones[a].center, sizeof(h0)); + hd.x = q->capstones[c].center.x - q->capstones[a].center.x; + hd.y = q->capstones[c].center.y - q->capstones[a].center.y; + + /* Make sure A-B-C is clockwise */ + if ((q->capstones[b].center.x - h0.x) * -hd.y + + (q->capstones[b].center.y - h0.y) * hd.x > + 0) + { + int swap = a; + + a = c; + c = swap; + hd.x = -hd.x; + hd.y = -hd.y; + } + + /* Record the grid and its components */ + qr_index = q->num_grids; + qr = &q->grids[q->num_grids++]; + + memset(qr, 0, sizeof(*qr)); + qr->caps[0] = a; + qr->caps[1] = b; + qr->caps[2] = c; + qr->align_region = -1; + + /* Rotate each capstone so that corner 0 is top-left with respect + * to the grid. + */ + for (i = 0; i < 3; i++) + { + struct quirc_capstone *cap = &q->capstones[qr->caps[i]]; + + rotate_capstone(cap, &h0, &hd); + cap->qr_grid = qr_index; + } + + /* Check the timing pattern. This doesn't require a perspective + * transform. + */ + if (measure_timing_pattern(q, qr_index) < 0) + goto fail; + + /* Make an estimate based for the alignment pattern based on extending + * lines from capstones A and C. + */ + if (!line_intersect(&q->capstones[a].corners[0], + &q->capstones[a].corners[1], + &q->capstones[c].corners[0], + &q->capstones[c].corners[3], + &qr->align)) + goto fail; + + /* On V2+ grids, we should use the alignment pattern. */ + if (qr->grid_size > 21) + { + /* Try to find the actual location of the alignment pattern. */ + find_alignment_pattern(q, qr_index); + + /* Find the point of the alignment pattern closest to the + * top-left of the QR grid. + */ + if (qr->align_region >= 0) + { + struct polygon_score_data psd; + struct quirc_region *reg = + &q->regions[qr->align_region]; + + /* Start from some point inside the alignment pattern */ + memcpy(&qr->align, ®->seed, sizeof(qr->align)); + + memcpy(&psd.ref, &hd, sizeof(psd.ref)); + psd.corners = &qr->align; + psd.scores[0] = -hd.y * qr->align.x + + hd.x * qr->align.y; + + flood_fill_seed(q, reg->seed.x, reg->seed.y, + qr->align_region, QUIRC_PIXEL_BLACK, + NULL, NULL, 0); + flood_fill_seed(q, reg->seed.x, reg->seed.y, + QUIRC_PIXEL_BLACK, qr->align_region, + find_leftmost_to_line, &psd, 0); + } + } + + setup_qr_perspective(q, qr_index); + return; + +fail: + /* We've been unable to complete setup for this grid. Undo what we've + * recorded and pretend it never happened. + */ + for (i = 0; i < 3; i++) + q->capstones[qr->caps[i]].qr_grid = -1; + q->num_grids--; +} + +struct neighbour +{ + int index; + float distance; +} __attribute__((aligned(8))); + +struct neighbour_list +{ + struct neighbour n[QUIRC_MAX_CAPSTONES]; + int count; +} __attribute__((aligned(8))); + +static void test_neighbours(struct quirc *q, int i, + const struct neighbour_list *hlist, + const struct neighbour_list *vlist) +{ + int j, k; + float best_score = 0.0; + int best_h = -1, best_v = -1; + + /* Test each possible grouping */ + for (j = 0; j < hlist->count; j++) + for (k = 0; k < vlist->count; k++) + { + const struct neighbour *hn = &hlist->n[j]; + const struct neighbour *vn = &vlist->n[k]; + float score = fast_fabsf(1.0 - hn->distance / vn->distance); + + if (score > 2.5) + continue; + + if (best_h < 0 || score < best_score) + { + best_h = hn->index; + best_v = vn->index; + best_score = score; + } + } + + if (best_h < 0 || best_v < 0) + return; + + record_qr_grid(q, best_h, i, best_v); +} + +static void test_grouping(struct quirc *q, int i) +{ + struct quirc_capstone *c1 = &q->capstones[i]; + int j; + struct neighbour_list hlist; + struct neighbour_list vlist; + + if (c1->qr_grid >= 0) + return; + + hlist.count = 0; + vlist.count = 0; + + /* Look for potential neighbours by examining the relative gradients + * from this capstone to others. + */ + for (j = 0; j < q->num_capstones; j++) + { + struct quirc_capstone *c2 = &q->capstones[j]; + float u, v; + + if (i == j || c2->qr_grid >= 0) + continue; + + perspective_unmap(c1->c, &c2->center, &u, &v); + + u = fast_fabsf(u - 3.5); + v = fast_fabsf(v - 3.5); + + if (u < 0.2 * v) + { + struct neighbour *n = &hlist.n[hlist.count++]; + + n->index = j; + n->distance = v; + } + + if (v < 0.2 * u) + { + struct neighbour *n = &vlist.n[vlist.count++]; + + n->index = j; + n->distance = u; + } + } + + if (!(hlist.count && vlist.count)) + return; + + test_neighbours(q, i, &hlist, &vlist); +} + +static void pixels_setup(struct quirc *q) +{ + if (sizeof(*q->image) == sizeof(*q->pixels)) + { + q->pixels = (quirc_pixel_t *)q->image; + } + else + { + int x, y; + for (y = 0; y < q->h; y++) + { + for (x = 0; x < q->w; x++) + { + q->pixels[y * q->w + x] = q->image[y * q->w + x]; + } + } + } +} + +uint8_t *quirc_begin(struct quirc *q, int *w, int *h) +{ + q->num_regions = QUIRC_PIXEL_REGION; + q->num_capstones = 0; + q->num_grids = 0; + + if (w) + *w = q->w; + if (h) + *h = q->h; + + return q->image; +} + +void quirc_end(struct quirc *q) +{ + int i; + pixels_setup(q); + threshold(q); + + for (i = 0; i < q->h; i++) + { + finder_scan(q, i); + } + + for (i = 0; i < q->num_capstones; i++) + { + test_grouping(q, i); + } +} + +void quirc_extract(const struct quirc *q, int index, + struct quirc_code *code) +{ + const struct quirc_grid *qr = &q->grids[index]; + int y; + int i = 0; + + if (index < 0 || index > q->num_grids) + return; + + memset(code, 0, sizeof(*code)); + + perspective_map(qr->c, 0.0, 0.0, &code->corners[0]); + perspective_map(qr->c, qr->grid_size, 0.0, &code->corners[1]); + perspective_map(qr->c, qr->grid_size, qr->grid_size, + &code->corners[2]); + perspective_map(qr->c, 0.0, qr->grid_size, &code->corners[3]); + + code->size = qr->grid_size; + + for (y = 0; y < qr->grid_size; y++) + { + int x; + + for (x = 0; x < qr->grid_size; x++) + { + if (read_cell(q, index, x, y) > 0) + code->cell_bitmap[i >> 3] |= (1 << (i & 7)); + + i++; + } + } +} diff --git a/ESP32QRCodeReader_Page/quirc.c b/ESP32QRCodeReader_Page/quirc.c new file mode 100644 index 0000000..e5a30fb --- /dev/null +++ b/ESP32QRCodeReader_Page/quirc.c @@ -0,0 +1,104 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include "quirc_internal.h" +#include + +const char *quirc_version(void) +{ + return "1.0"; +} + +//static struct quirc _q; +struct quirc *quirc_new(void) +{ + struct quirc *q = ps_malloc(sizeof(*q)); + + if (!q) + return NULL; + + memset(q, 0, sizeof(*q)); + return q; +} + +void quirc_destroy(struct quirc *q) +{ + if (q->image) + if (q->image) + free(q->image); + if (sizeof(*q->image) != sizeof(*q->pixels)) + if (q->pixels) + free(q->pixels); + + if (q) + free(q); +} + +//static quirc_pixel_t img_buf[320*240]; +int quirc_resize(struct quirc *q, int w, int h) +{ + if (q->image) + { + free(q->image); + } + uint8_t *new_image = ps_malloc(w * h); + + if (!new_image) + return -1; + + if (sizeof(*q->image) != sizeof(*q->pixels)) + { //should gray, 1==1 + size_t new_size = w * h * sizeof(quirc_pixel_t); + if (q->pixels) + free(q->pixels); + quirc_pixel_t *new_pixels = ps_malloc(new_size); + if (!new_pixels) + { + free(new_image); + return -1; + } + q->pixels = new_pixels; + } + q->image = new_image; + q->w = w; + q->h = h; + return 0; +} + +int quirc_count(const struct quirc *q) +{ + return q->num_grids; +} + +static const char *const error_table[] = { + [QUIRC_SUCCESS] = "Success", + [QUIRC_ERROR_INVALID_GRID_SIZE] = "Invalid grid size", + [QUIRC_ERROR_INVALID_VERSION] = "Invalid version", + [QUIRC_ERROR_FORMAT_ECC] = "Format data ECC failure", + [QUIRC_ERROR_DATA_ECC] = "ECC failure", + [QUIRC_ERROR_UNKNOWN_DATA_TYPE] = "Unknown data type", + [QUIRC_ERROR_DATA_OVERFLOW] = "Data overflow", + [QUIRC_ERROR_DATA_UNDERFLOW] = "Data underflow"}; + +const char *quirc_strerror(quirc_decode_error_t err) +{ + if (err >= 0 && err < sizeof(error_table) / sizeof(error_table[0])) + return error_table[err]; + + return "Unknown error"; +} diff --git a/ESP32QRCodeReader_Page/quirc.h b/ESP32QRCodeReader_Page/quirc.h new file mode 100644 index 0000000..ecdc172 --- /dev/null +++ b/ESP32QRCodeReader_Page/quirc.h @@ -0,0 +1,178 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef QUIRC_H_ +#define QUIRC_H_ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + + struct quirc; + + /* Obtain the library version string. */ + const char *quirc_version(void); + + /* Construct a new QR-code recognizer. This function will return NULL + * if sufficient memory could not be allocated. + */ + struct quirc *quirc_new(void); + + /* Destroy a QR-code recognizer. */ + void quirc_destroy(struct quirc *q); + + /* Resize the QR-code recognizer. The size of an image must be + * specified before codes can be analyzed. + * + * This function returns 0 on success, or -1 if sufficient memory could + * not be allocated. + */ + int quirc_resize(struct quirc *q, int w, int h); + + /* These functions are used to process images for QR-code recognition. + * quirc_begin() must first be called to obtain access to a buffer into + * which the input image should be placed. Optionally, the current + * width and height may be returned. + * + * After filling the buffer, quirc_end() should be called to process + * the image for QR-code recognition. The locations and content of each + * code may be obtained using accessor functions described below. + */ + uint8_t *quirc_begin(struct quirc *q, int *w, int *h); + void quirc_end(struct quirc *q); + + /* This structure describes a location in the input image buffer. */ + struct quirc_point + { + int x; + int y; + } __attribute__((aligned(8))); + + /* This enum describes the various decoder errors which may occur. */ + typedef enum + { + QUIRC_SUCCESS = 0, + QUIRC_ERROR_INVALID_GRID_SIZE, + QUIRC_ERROR_INVALID_VERSION, + QUIRC_ERROR_FORMAT_ECC, + QUIRC_ERROR_DATA_ECC, + QUIRC_ERROR_UNKNOWN_DATA_TYPE, + QUIRC_ERROR_DATA_OVERFLOW, + QUIRC_ERROR_DATA_UNDERFLOW + } quirc_decode_error_t; + + /* Return a string error message for an error code. */ + const char *quirc_strerror(quirc_decode_error_t err); + +/* Limits on the maximum size of QR-codes and their content. */ +#define QUIRC_MAX_BITMAP 3917 +#define QUIRC_MAX_PAYLOAD 8896 + +/* QR-code ECC types. */ +#define QUIRC_ECC_LEVEL_M 0 +#define QUIRC_ECC_LEVEL_L 1 +#define QUIRC_ECC_LEVEL_H 2 +#define QUIRC_ECC_LEVEL_Q 3 + +/* QR-code data types. */ +#define QUIRC_DATA_TYPE_NUMERIC 1 +#define QUIRC_DATA_TYPE_ALPHA 2 +#define QUIRC_DATA_TYPE_BYTE 4 +#define QUIRC_DATA_TYPE_KANJI 8 + +/* Common character encodings */ +#define QUIRC_ECI_ISO_8859_1 1 +#define QUIRC_ECI_IBM437 2 +#define QUIRC_ECI_ISO_8859_2 4 +#define QUIRC_ECI_ISO_8859_3 5 +#define QUIRC_ECI_ISO_8859_4 6 +#define QUIRC_ECI_ISO_8859_5 7 +#define QUIRC_ECI_ISO_8859_6 8 +#define QUIRC_ECI_ISO_8859_7 9 +#define QUIRC_ECI_ISO_8859_8 10 +#define QUIRC_ECI_ISO_8859_9 11 +#define QUIRC_ECI_WINDOWS_874 13 +#define QUIRC_ECI_ISO_8859_13 15 +#define QUIRC_ECI_ISO_8859_15 17 +#define QUIRC_ECI_SHIFT_JIS 20 +#define QUIRC_ECI_UTF_8 26 + + /* This structure is used to return information about detected QR codes + * in the input image. + */ + struct quirc_code + { + /* The four corners of the QR-code, from top left, clockwise */ + struct quirc_point corners[4]; + + /* The number of cells across in the QR-code. The cell bitmap + * is a bitmask giving the actual values of cells. If the cell + * at (x, y) is black, then the following bit is set: + * + * cell_bitmap[i >> 3] & (1 << (i & 7)) + * + * where i = (y * size) + x. + */ + int size; + uint8_t cell_bitmap[QUIRC_MAX_BITMAP]; + } __attribute__((aligned(8))); + + /* This structure holds the decoded QR-code data */ + struct quirc_data + { + /* Various parameters of the QR-code. These can mostly be + * ignored if you only care about the data. + */ + int version; + int ecc_level; + int mask; + + /* This field is the highest-valued data type found in the QR + * code. + */ + int data_type; + + /* Data payload. For the Kanji datatype, payload is encoded as + * Shift-JIS. For all other datatypes, payload is ASCII text. + */ + uint8_t payload[QUIRC_MAX_PAYLOAD]; + int payload_len; + + /* ECI assignment number */ + uint32_t eci; + } __attribute__((aligned(8))); + + /* Return the number of QR-codes identified in the last processed + * image. + */ + int quirc_count(const struct quirc *q); + + /* Extract the QR-code specified by the given index. */ + void quirc_extract(const struct quirc *q, int index, + struct quirc_code *code); + + /* Decode a QR-code, returning the payload data. */ + quirc_decode_error_t quirc_decode(const struct quirc_code *code, + struct quirc_data *data); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/ESP32QRCodeReader_Page/quirc_internal.h b/ESP32QRCodeReader_Page/quirc_internal.h new file mode 100644 index 0000000..3fa075c --- /dev/null +++ b/ESP32QRCodeReader_Page/quirc_internal.h @@ -0,0 +1,121 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef QUIRC_INTERNAL_H_ +#define QUIRC_INTERNAL_H_ + +#include "quirc.h" + +#define QUIRC_PIXEL_WHITE 0 +#define QUIRC_PIXEL_BLACK 1 +#define QUIRC_PIXEL_REGION 2 + +#ifndef QUIRC_MAX_REGIONS +#define QUIRC_MAX_REGIONS 254 +#endif + +#define QUIRC_MAX_CAPSTONES 32 +#define QUIRC_MAX_GRIDS 8 + +#define QUIRC_PERSPECTIVE_PARAMS 8 + +#if QUIRC_MAX_REGIONS < UINT8_MAX +typedef uint8_t quirc_pixel_t; +#elif QUIRC_MAX_REGIONS < UINT16_MAX +typedef uint16_t quirc_pixel_t; +#else +#error "QUIRC_MAX_REGIONS > 65534 is not supported" +#endif + +struct quirc_region +{ + struct quirc_point seed; + int count; + int capstone; +} __attribute__((aligned(8))); + +struct quirc_capstone +{ + int ring; + int stone; + + struct quirc_point corners[4]; + struct quirc_point center; + float c[QUIRC_PERSPECTIVE_PARAMS]; + + int qr_grid; +} __attribute__((aligned(8))); + +struct quirc_grid +{ + /* Capstone indices */ + int caps[3]; + + /* Alignment pattern region and corner */ + int align_region; + struct quirc_point align; + + /* Timing pattern endpoints */ + struct quirc_point tpep[3]; + int hscan; + int vscan; + + /* Grid size and perspective transform */ + int grid_size; + float c[QUIRC_PERSPECTIVE_PARAMS]; +} __attribute__((aligned(8))); + +struct quirc +{ + uint8_t *image; + quirc_pixel_t *pixels; + int w; + int h; + + int num_regions; + struct quirc_region regions[QUIRC_MAX_REGIONS]; + + int num_capstones; + struct quirc_capstone capstones[QUIRC_MAX_CAPSTONES]; + + int num_grids; + struct quirc_grid grids[QUIRC_MAX_GRIDS]; +} __attribute__((aligned(8))); + +/************************************************************************ + * QR-code version information database + */ + +#define QUIRC_MAX_VERSION 40 +#define QUIRC_MAX_ALIGNMENT 7 + +struct quirc_rs_params +{ + uint8_t bs; /* Small block size */ + uint8_t dw; /* Small data words */ + uint8_t ns; /* Number of small blocks */ +} __attribute__((aligned(8))); + +struct quirc_version_info +{ + uint16_t data_bytes; + uint8_t apat[QUIRC_MAX_ALIGNMENT]; + struct quirc_rs_params ecc[4]; +} __attribute__((aligned(8))); + +extern const struct quirc_version_info quirc_version_db[QUIRC_MAX_VERSION + 1]; + +#endif \ No newline at end of file diff --git a/ESP32QRCodeReader_Page/version_db.c b/ESP32QRCodeReader_Page/version_db.c new file mode 100644 index 0000000..0da2d07 --- /dev/null +++ b/ESP32QRCodeReader_Page/version_db.c @@ -0,0 +1,184 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "quirc_internal.h" + +const struct quirc_version_info quirc_version_db[QUIRC_MAX_VERSION + 1] = { + {0}, + {/* Version 1 */ + .data_bytes = 26, + .apat = {0}, + .ecc = { + {.bs = 26, .dw = 16, .ns = 1}, + {.bs = 26, .dw = 19, .ns = 1}, + {.bs = 26, .dw = 9, .ns = 1}, + {.bs = 26, .dw = 13, .ns = 1}}}, + {/* Version 2 */ + .data_bytes = 44, + .apat = {6, 18, 0}, + .ecc = {{.bs = 44, .dw = 28, .ns = 1}, {.bs = 44, .dw = 34, .ns = 1}, {.bs = 44, .dw = 16, .ns = 1}, {.bs = 44, .dw = 22, .ns = 1}}}, + {/* Version 3 */ + .data_bytes = 70, + .apat = {6, 22, 0}, + .ecc = {{.bs = 70, .dw = 44, .ns = 1}, {.bs = 70, .dw = 55, .ns = 1}, {.bs = 35, .dw = 13, .ns = 2}, {.bs = 35, .dw = 17, .ns = 2}}}, + {/* Version 4 */ + .data_bytes = 100, + .apat = {6, 26, 0}, + .ecc = {{.bs = 50, .dw = 32, .ns = 2}, {.bs = 100, .dw = 80, .ns = 1}, {.bs = 25, .dw = 9, .ns = 4}, {.bs = 50, .dw = 24, .ns = 2}}}, + {/* Version 5 */ + .data_bytes = 134, + .apat = {6, 30, 0}, + .ecc = {{.bs = 67, .dw = 43, .ns = 2}, {.bs = 134, .dw = 108, .ns = 1}, {.bs = 33, .dw = 11, .ns = 2}, {.bs = 33, .dw = 15, .ns = 2}}}, + {/* Version 6 */ + .data_bytes = 172, + .apat = {6, 34, 0}, + .ecc = {{.bs = 43, .dw = 27, .ns = 4}, {.bs = 86, .dw = 68, .ns = 2}, {.bs = 43, .dw = 15, .ns = 4}, {.bs = 43, .dw = 19, .ns = 4}}}, + {/* Version 7 */ + .data_bytes = 196, + .apat = {6, 22, 38, 0}, + .ecc = {{.bs = 49, .dw = 31, .ns = 4}, {.bs = 98, .dw = 78, .ns = 2}, {.bs = 39, .dw = 13, .ns = 4}, {.bs = 32, .dw = 14, .ns = 2}}}, + {/* Version 8 */ + .data_bytes = 242, + .apat = {6, 24, 42, 0}, + .ecc = {{.bs = 60, .dw = 38, .ns = 2}, {.bs = 121, .dw = 97, .ns = 2}, {.bs = 40, .dw = 14, .ns = 4}, {.bs = 40, .dw = 18, .ns = 4}}}, + {/* Version 9 */ + .data_bytes = 292, + .apat = {6, 26, 46, 0}, + .ecc = {{.bs = 58, .dw = 36, .ns = 3}, {.bs = 146, .dw = 116, .ns = 2}, {.bs = 36, .dw = 12, .ns = 4}, {.bs = 36, .dw = 16, .ns = 4}}}, + {/* Version 10 */ + .data_bytes = 346, + .apat = {6, 28, 50, 0}, + .ecc = {{.bs = 69, .dw = 43, .ns = 4}, {.bs = 86, .dw = 68, .ns = 2}, {.bs = 43, .dw = 15, .ns = 6}, {.bs = 43, .dw = 19, .ns = 6}}}, + {/* Version 11 */ + .data_bytes = 404, + .apat = {6, 30, 54, 0}, + .ecc = {{.bs = 80, .dw = 50, .ns = 1}, {.bs = 101, .dw = 81, .ns = 4}, {.bs = 36, .dw = 12, .ns = 3}, {.bs = 50, .dw = 22, .ns = 4}}}, + {/* Version 12 */ + .data_bytes = 466, + .apat = {6, 32, 58, 0}, + .ecc = {{.bs = 58, .dw = 36, .ns = 6}, {.bs = 116, .dw = 92, .ns = 2}, {.bs = 42, .dw = 14, .ns = 7}, {.bs = 46, .dw = 20, .ns = 4}}}, + {/* Version 13 */ + .data_bytes = 532, + .apat = {6, 34, 62, 0}, + .ecc = {{.bs = 59, .dw = 37, .ns = 8}, {.bs = 133, .dw = 107, .ns = 4}, {.bs = 33, .dw = 11, .ns = 12}, {.bs = 44, .dw = 20, .ns = 8}}}, + {/* Version 14 */ + .data_bytes = 581, + .apat = {6, 26, 46, 66, 0}, + .ecc = {{.bs = 64, .dw = 40, .ns = 4}, {.bs = 145, .dw = 115, .ns = 3}, {.bs = 36, .dw = 12, .ns = 11}, {.bs = 36, .dw = 16, .ns = 11}}}, + {/* Version 15 */ + .data_bytes = 655, + .apat = {6, 26, 48, 70, 0}, + .ecc = {{.bs = 65, .dw = 41, .ns = 5}, {.bs = 109, .dw = 87, .ns = 5}, {.bs = 36, .dw = 12, .ns = 11}, {.bs = 54, .dw = 24, .ns = 5}}}, + {/* Version 16 */ + .data_bytes = 733, + .apat = {6, 26, 50, 74, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 7}, {.bs = 122, .dw = 98, .ns = 5}, {.bs = 45, .dw = 15, .ns = 3}, {.bs = 43, .dw = 19, .ns = 15}}}, + {/* Version 17 */ + .data_bytes = 815, + .apat = {6, 30, 54, 78, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 10}, {.bs = 135, .dw = 107, .ns = 1}, {.bs = 42, .dw = 14, .ns = 2}, {.bs = 50, .dw = 22, .ns = 1}}}, + {/* Version 18 */ + .data_bytes = 901, + .apat = {6, 30, 56, 82, 0}, + .ecc = {{.bs = 69, .dw = 43, .ns = 9}, {.bs = 150, .dw = 120, .ns = 5}, {.bs = 42, .dw = 14, .ns = 2}, {.bs = 50, .dw = 22, .ns = 17}}}, + {/* Version 19 */ + .data_bytes = 991, + .apat = {6, 30, 58, 86, 0}, + .ecc = {{.bs = 70, .dw = 44, .ns = 3}, {.bs = 141, .dw = 113, .ns = 3}, {.bs = 39, .dw = 13, .ns = 9}, {.bs = 47, .dw = 21, .ns = 17}}}, + {/* Version 20 */ + .data_bytes = 1085, + .apat = {6, 34, 62, 90, 0}, + .ecc = {{.bs = 67, .dw = 41, .ns = 3}, {.bs = 135, .dw = 107, .ns = 3}, {.bs = 43, .dw = 15, .ns = 15}, {.bs = 54, .dw = 24, .ns = 15}}}, + {/* Version 21 */ + .data_bytes = 1156, + .apat = {6, 28, 50, 72, 92, 0}, + .ecc = {{.bs = 68, .dw = 42, .ns = 17}, {.bs = 144, .dw = 116, .ns = 4}, {.bs = 46, .dw = 16, .ns = 19}, {.bs = 50, .dw = 22, .ns = 17}}}, + {/* Version 22 */ + .data_bytes = 1258, + .apat = {6, 26, 50, 74, 98, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 17}, {.bs = 139, .dw = 111, .ns = 2}, {.bs = 37, .dw = 13, .ns = 34}, {.bs = 54, .dw = 24, .ns = 7}}}, + {/* Version 23 */ + .data_bytes = 1364, + .apat = {6, 30, 54, 78, 102, 0}, + .ecc = {{.bs = 75, .dw = 47, .ns = 4}, {.bs = 151, .dw = 121, .ns = 4}, {.bs = 45, .dw = 15, .ns = 16}, {.bs = 54, .dw = 24, .ns = 11}}}, + {/* Version 24 */ + .data_bytes = 1474, + .apat = {6, 28, 54, 80, 106, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 6}, {.bs = 147, .dw = 117, .ns = 6}, {.bs = 46, .dw = 16, .ns = 30}, {.bs = 54, .dw = 24, .ns = 11}}}, + {/* Version 25 */ + .data_bytes = 1588, + .apat = {6, 32, 58, 84, 110, 0}, + .ecc = {{.bs = 75, .dw = 47, .ns = 8}, {.bs = 132, .dw = 106, .ns = 8}, {.bs = 45, .dw = 15, .ns = 22}, {.bs = 54, .dw = 24, .ns = 7}}}, + {/* Version 26 */ + .data_bytes = 1706, + .apat = {6, 30, 58, 86, 114, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 19}, {.bs = 142, .dw = 114, .ns = 10}, {.bs = 46, .dw = 16, .ns = 33}, {.bs = 50, .dw = 22, .ns = 28}}}, + {/* Version 27 */ + .data_bytes = 1828, + .apat = {6, 34, 62, 90, 118, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 22}, {.bs = 152, .dw = 122, .ns = 8}, {.bs = 45, .dw = 15, .ns = 12}, {.bs = 53, .dw = 23, .ns = 8}}}, + {/* Version 28 */ + .data_bytes = 1921, + .apat = {6, 26, 50, 74, 98, 122, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 3}, {.bs = 147, .dw = 117, .ns = 3}, {.bs = 45, .dw = 15, .ns = 11}, {.bs = 54, .dw = 24, .ns = 4}}}, + {/* Version 29 */ + .data_bytes = 2051, + .apat = {6, 30, 54, 78, 102, 126, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 21}, {.bs = 146, .dw = 116, .ns = 7}, {.bs = 45, .dw = 15, .ns = 19}, {.bs = 53, .dw = 23, .ns = 1}}}, + {/* Version 30 */ + .data_bytes = 2185, + .apat = {6, 26, 52, 78, 104, 130, 0}, + .ecc = {{.bs = 75, .dw = 47, .ns = 19}, {.bs = 145, .dw = 115, .ns = 5}, {.bs = 45, .dw = 15, .ns = 23}, {.bs = 54, .dw = 24, .ns = 15}}}, + {/* Version 31 */ + .data_bytes = 2323, + .apat = {6, 30, 56, 82, 108, 134, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 2}, {.bs = 145, .dw = 115, .ns = 13}, {.bs = 45, .dw = 15, .ns = 23}, {.bs = 54, .dw = 24, .ns = 42}}}, + {/* Version 32 */ + .data_bytes = 2465, + .apat = {6, 34, 60, 86, 112, 138, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 10}, {.bs = 145, .dw = 115, .ns = 17}, {.bs = 45, .dw = 15, .ns = 19}, {.bs = 54, .dw = 24, .ns = 10}}}, + {/* Version 33 */ + .data_bytes = 2611, + .apat = {6, 30, 58, 86, 114, 142, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 14}, {.bs = 145, .dw = 115, .ns = 17}, {.bs = 45, .dw = 15, .ns = 11}, {.bs = 54, .dw = 24, .ns = 29}}}, + {/* Version 34 */ + .data_bytes = 2761, + .apat = {6, 34, 62, 90, 118, 146, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 14}, {.bs = 145, .dw = 115, .ns = 13}, {.bs = 46, .dw = 16, .ns = 59}, {.bs = 54, .dw = 24, .ns = 44}}}, + {/* Version 35 */ + .data_bytes = 2876, + .apat = {6, 30, 54, 78, 102, 126, 150}, + .ecc = {{.bs = 75, .dw = 47, .ns = 12}, {.bs = 151, .dw = 121, .ns = 12}, {.bs = 45, .dw = 15, .ns = 22}, {.bs = 54, .dw = 24, .ns = 39}}}, + {/* Version 36 */ + .data_bytes = 3034, + .apat = {6, 24, 50, 76, 102, 128, 154}, + .ecc = {{.bs = 75, .dw = 47, .ns = 6}, {.bs = 151, .dw = 121, .ns = 6}, {.bs = 45, .dw = 15, .ns = 2}, {.bs = 54, .dw = 24, .ns = 46}}}, + {/* Version 37 */ + .data_bytes = 3196, + .apat = {6, 28, 54, 80, 106, 132, 158}, + .ecc = {{.bs = 74, .dw = 46, .ns = 29}, {.bs = 152, .dw = 122, .ns = 17}, {.bs = 45, .dw = 15, .ns = 24}, {.bs = 54, .dw = 24, .ns = 49}}}, + {/* Version 38 */ + .data_bytes = 3362, + .apat = {6, 32, 58, 84, 110, 136, 162}, + .ecc = {{.bs = 74, .dw = 46, .ns = 13}, {.bs = 152, .dw = 122, .ns = 4}, {.bs = 45, .dw = 15, .ns = 42}, {.bs = 54, .dw = 24, .ns = 48}}}, + {/* Version 39 */ + .data_bytes = 3532, + .apat = {6, 26, 54, 82, 110, 138, 166}, + .ecc = {{.bs = 75, .dw = 47, .ns = 40}, {.bs = 147, .dw = 117, .ns = 20}, {.bs = 45, .dw = 15, .ns = 10}, {.bs = 54, .dw = 24, .ns = 43}}}, + {/* Version 40 */ + .data_bytes = 3706, + .apat = {6, 30, 58, 86, 114, 142, 170}, + .ecc = {{.bs = 75, .dw = 47, .ns = 18}, {.bs = 148, .dw = 118, .ns = 19}, {.bs = 45, .dw = 15, .ns = 20}, {.bs = 54, .dw = 24, .ns = 34}}}}; diff --git a/ESP32QRReaderDBWriter/Credentials.h b/ESP32QRReaderDBWriter/Credentials.h new file mode 100644 index 0000000..a84ee28 --- /dev/null +++ b/ESP32QRReaderDBWriter/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "cpsNUCwifi"; // your network SSID (name) +char pass[] = "ips999CPS"; // your network password + +char user[] = "db_user"; // MySQL user login username +char password[] = "db_password"; // MySQL user login password + +#endif //Credentials_h diff --git a/ESP32QRReaderDBWriter/ESP32QRReaderDBWriter.ino b/ESP32QRReaderDBWriter/ESP32QRReaderDBWriter.ino new file mode 100644 index 0000000..fea48dd --- /dev/null +++ b/ESP32QRReaderDBWriter/ESP32QRReaderDBWriter.ino @@ -0,0 +1,413 @@ +/* +ESP32-CAM QR code Reader +Author : ChungYi Fu (Kaohsiung, Taiwan) 2021-8-13 20:00 +https://www.facebook.com/francefu + +Refer to the code +https://github.com/alvarowolfx/ESP32QRCodeReader + +自訂指令格式 http://192.168.xxx.xxx/control?cmd=P1;P2;P3;P4;P5;P6;P7;P8;P9 + +http://192.168.xxx.xxx/?ip //取得APIP, STAIP +http://192.168.xxx.xxx/?mac //取得MAC位址 +http://192.168.xxx.xxx/?digitalwrite=pin;value //數位輸出 +http://192.168.xxx.xxx/?analogwrite=pin;value //類比輸出 +http://192.168.xxx.xxx/?digitalread=pin //數位讀取 +http://192.168.xxx.xxx/?analogread=pin //類比讀取 +http://192.168.xxx.xxx/?touchread=pin //觸碰讀取 +http://192.168.xxx.xxx/?restart //重啟電源 +http://192.168.xxx.xxx/?flash=value //閃光燈 value= 0~255 +http://192.168.xxx.xxx/?servo=pin;value //伺服馬達 value= 0~180 +http://192.168.xxx.xxx/?relay=pin;value //繼電器 value = 0, 1 +http://192.168.xxx.xxx/?uart=value //序列埠 +*/ + + + +// Serial.printf(); kann anscheinend keine Strings ausgeben, die länger als 13 Zeichen sind -> dadurch gehts: Serial.printf("Insertcommand: %s\n:", INSERT_SQL.c_str()); + +#include "esp_camera.h" +//#include "soc/soc.h" +#include "soc/rtc_cntl_reg.h" +#include "quirc.h" + +//Includes&defines etc für den MariaDB Entry ########################################################### +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME false + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(10, 42, 0, 1); +#endif + +uint16_t server_port = 3306; //5698; + +char default_database[] = "myTestDb"; //"test_arduino"; +char default_table[] = "myTestTable"; //"test_arduino"; + +String default_value = "defaultString"; + +// Sample query +String INSERT_SQL = String("INSERT INTO ") + default_database + "." + default_table + + " (qrCodeText) VALUES ('" + default_value + "')"; + + +#define LED_BUILTIN 4 //die Zeile wird für das LED benötigt + + +MySQL_Connection conn((Client *)&client); + +MySQL_Query *query_mem; +//Includes&defines etc für den MariaDB Entry - ENDE #################################################### + +TaskHandle_t Task; + +//ESP32-CAM +#define PWDN_GPIO_NUM 32 +#define RESET_GPIO_NUM -1 +#define XCLK_GPIO_NUM 0 +#define SIOD_GPIO_NUM 26 +#define SIOC_GPIO_NUM 27 +#define Y9_GPIO_NUM 35 +#define Y8_GPIO_NUM 34 +#define Y7_GPIO_NUM 39 +#define Y6_GPIO_NUM 36 +#define Y5_GPIO_NUM 21 +#define Y4_GPIO_NUM 19 +#define Y3_GPIO_NUM 18 +#define Y2_GPIO_NUM 5 +#define VSYNC_GPIO_NUM 25 +#define HREF_GPIO_NUM 23 +#define PCLK_GPIO_NUM 22 + +struct QRCodeData +{ + bool valid; + int dataType; + uint8_t payload[1024]; + int payloadLen; +}; + +struct quirc *q = NULL; +uint8_t *image = NULL; +camera_fb_t * fb = NULL; +struct quirc_code code; +struct quirc_data data; +quirc_decode_error_t err; +struct QRCodeData qrCodeData; +String QRCodeResult = ""; + + + +camera_config_t config; + +//############################################################################################### +void setup() { + //WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); + + Serial.begin(115200); + //Serial.setDebugOutput(false); + Serial.println(); + + Serial.println("--------------------------Starting the EPS32-QR-Code-Reader--------------------------"); + + pinMode(LED_BUILTIN, OUTPUT); //die Zeile wird für das LED benötigt + +https://github.com/espressif/esp32-camera/blob/master/driver/include/esp_camera.h + config.ledc_channel = LEDC_CHANNEL_0; + config.ledc_timer = LEDC_TIMER_0; + config.pin_d0 = Y2_GPIO_NUM; + config.pin_d1 = Y3_GPIO_NUM; + config.pin_d2 = Y4_GPIO_NUM; + config.pin_d3 = Y5_GPIO_NUM; + config.pin_d4 = Y6_GPIO_NUM; + config.pin_d5 = Y7_GPIO_NUM; + config.pin_d6 = Y8_GPIO_NUM; + config.pin_d7 = Y9_GPIO_NUM; + config.pin_xclk = XCLK_GPIO_NUM; + config.pin_pclk = PCLK_GPIO_NUM; + config.pin_vsync = VSYNC_GPIO_NUM; + config.pin_href = HREF_GPIO_NUM; + config.pin_sscb_sda = SIOD_GPIO_NUM; + config.pin_sscb_scl = SIOC_GPIO_NUM; + config.pin_pwdn = PWDN_GPIO_NUM; + config.pin_reset = RESET_GPIO_NUM; + config.xclk_freq_hz = 10000000; + config.pixel_format = PIXFORMAT_GRAYSCALE; + config.frame_size = FRAMESIZE_QVGA; + config.jpeg_quality = 15; + config.fb_count = 1; + + + esp_err_t err = esp_camera_init(&config); + if (err != ESP_OK) { + Serial.printf("Camera init failed with error 0x%x", err); + ESP.restart(); + } + + sensor_t * s = esp_camera_sensor_get(); + s->set_framesize(s, FRAMESIZE_QVGA); + + + xTaskCreatePinnedToCore( + QRCodeReader, // Task function. + "Task", // name of task. + 10000, // Stack size of task + NULL, // parameter of the task + 1, // priority of the task + &Task, // Task handle to keep track of created task + 0); // pin task to core 0 + + //Serial.print("listenConnection running on core "); + //Serial.println(xPortGetCoreID()); + +//Setup für insert in MariaDB ######################################################### +Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + +/* Infoausgabe + MYSQL_DISPLAY1("\n starting QR-Code reader on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); +*/ + + // Remember to initialize your WiFi module +#if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + /* Infoausgabe + #if ( USING_WIFI_ESP8266_AT ) + MYSQL_DISPLAY("Using ESP8266_AT/ESP8266_AT_WebServer Library"); + #elif ( USING_WIFIESPAT_LIB ) + MYSQL_DISPLAY("Using WiFiEspAT Library"); + #endif + */ + + // initialize serial for ESP module + EspSerial.begin(115200); + // initialize ESP module + WiFi.init(&EspSerial); + + MYSQL_DISPLAY(F("WiFi shield init done")); + + // check for the presence of the shield + if (WiFi.status() == WL_NO_SHIELD) + { + MYSQL_DISPLAY(F("WiFi shield not present")); + // don't continue + while (true); + } +#endif + + + + // Begin WiFi section + Serial.printf("Connecting to %s. \n", ssid); + //MYSQL_DISPLAY1("Connecting to", ssid); + + //WiFi.begin(ssid, pass); + WiFi.begin(ssid); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + //MYSQL_DISPLAY0("."); + + //ESP32-LED Output, dass es nicht mit dem WLAN verbunden ist + digitalWrite(LED_BUILTIN, HIGH); + delay(100); + digitalWrite(LED_BUILTIN, LOW); + delay(1000); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); + + + //ESP32-LED Output, dass es mit dem WLAN verbunden ist + for(int i=0; i<3;i++){ + digitalWrite(LED_BUILTIN, HIGH); + delay(100); + digitalWrite(LED_BUILTIN, LOW); + delay(300); + } + + + + +//Setup für insert in MariaDB - Ende ######################################################### +} + +void ledOutputError(){ + + //ESP32 LED Ausgabe, dass etwas nicht funktioniert hat + digitalWrite(LED_BUILTIN, HIGH); + delay(100); + digitalWrite(LED_BUILTIN, LOW); + delay(100); + digitalWrite(LED_BUILTIN, HIGH); + delay(1000); + digitalWrite(LED_BUILTIN, LOW); + delay(100); + digitalWrite(LED_BUILTIN, HIGH); + delay(100); + digitalWrite(LED_BUILTIN, LOW); + +} + + +//################################################################################### +void runInsert() // MariaDB-Insert-Funktion +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + MYSQL_DISPLAY(INSERT_SQL); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(INSERT_SQL.c_str()) ) + { + MYSQL_DISPLAY("Insert error"); + ledOutputError(); + } + else + { + MYSQL_DISPLAY("Data Inserted."); + + //ESP32 LED Ausgabe, dass etwas inserted wurde + digitalWrite(LED_BUILTIN, HIGH); + delay(1000); + digitalWrite(LED_BUILTIN, LOW); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + ledOutputError(); + } +} + + + +//###############################################################################################---------------------------- +void loop() { + +} + + +void charToString(const char *str, String &dbInsertString){ + + dbInsertString = ""; //max Länge 13 Zeichen für eine Ausgabe in Serial.printf + size_t len = strlen(str); + dbInsertString.reserve(len); + + for(size_t i=0;iwidth, fb->height); + image = quirc_begin(q, NULL, NULL); + //Serial.printf("Frame w h len: %d, %d, %d \r\n", fb->width, fb->height, fb->len); + memcpy(image, fb->buf, fb->len); + quirc_end(q); + //Serial.printf("quirc_end\r\n"); + + int count = quirc_count(q); + if (count > 0) { + //Serial.println(count); + quirc_extract(q, 0, &code); + err = quirc_decode(&code, &data); + + if (err){ + Serial.println("Decoding FAILED"); + QRCodeResult = "Decoding FAILED"; + } else { + Serial.printf("Decoding successful:\n"); + dumpData(&data); + + //MariaDb-part #################-------------------- + MYSQL_DISPLAY("Connecting..."); + + + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + + char * str = (char *) &data.payload[0]; //nicht sicher ob man die Umwandlung braucht + charToString(str,default_value); + + INSERT_SQL = String("INSERT INTO ") + default_database + "." + default_table + " (qrCodeText) VALUES ('" + default_value + "')"; + //Serial.printf("Insertcommand: %s\n:", INSERT_SQL.c_str()); + + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + ledOutputError(); + } + + + //MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + delay(2000); //um nicht den gleichen Eintrag sofort doppelt drinnen zu haben + //MariaDb-part-Ende #################-------------------- + + } + Serial.println(); + } + + + esp_camera_fb_return(fb); + fb = NULL; + image = NULL; + quirc_destroy(q); + } +} + +//############################################################################################### +void dumpData(const struct quirc_data *data) +{ + //Serial.printf("Version: %d\n", data->version); + //Serial.printf("ECC level: %c\n", "MLHQ"[data->ecc_level]); + //Serial.printf("Mask: %d\n", data->mask); + //Serial.printf("Length: %d\n", data->payload_len); + Serial.printf("Inhalt des QR-Codes: %s\n", data->payload); + +} diff --git a/ESP32QRReaderDBWriter/LICENSE b/ESP32QRReaderDBWriter/LICENSE new file mode 100644 index 0000000..d47c026 --- /dev/null +++ b/ESP32QRReaderDBWriter/LICENSE @@ -0,0 +1,16 @@ +quirc -- QR-code recognition library +Copyright (C) 2010-2012 Daniel Beer + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all +copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/ESP32QRReaderDBWriter/README.md b/ESP32QRReaderDBWriter/README.md new file mode 100644 index 0000000..d70c5c3 --- /dev/null +++ b/ESP32QRReaderDBWriter/README.md @@ -0,0 +1,193 @@ +Quirc +===== + +QR codes are a type of high-density matrix barcodes, and quirc is a library for +extracting and decoding them from images. It has several features which make it +a good choice for this purpose: + +* It is fast enough to be used with realtime video: extracting and decoding + from VGA frame takes about 50 ms on a modern x86 core. + +* It has a robust and tolerant recognition algorithm. It can correctly + recognise and decode QR codes which are rotated and/or oblique to the camera. + It can also distinguish and decode multiple codes within the same image. + +* It is easy to use, with a simple API described in a single commented header + file (see below for an overview). + +* It is small and easily embeddable, with no dependencies other than standard C + functions. + +* It has a very small memory footprint: one byte per image pixel, plus a few kB + per decoder object. + +* It uses no global mutable state, and is safe to use in a multithreaded + application. + +* BSD-licensed, with almost no restrictions regarding use and/or modification. + +The distribution comes with, in addition to the library, several test programs. +While the core library is very portable, these programs have some additional +dependencies. All of them require libjpeg, and two (`quirc-demo` and `inspect`) +require SDL. The camera demos use Linux-specific APIs: + +### quirc-demo + +This is an real-time demo which requires a camera and a graphical display. The +video stream is displayed on screen as it's received, and any QR codes +recognised are highlighted in the image, with the decoded information both +displayed on the image and printed on stdout. + +### quirc-scanner + +This program turns your camera into a barcode scanner. It's almost the same as +the `demo` application, but it doesn't display the video stream, and thus +doesn't require a graphical display. + +### qrtest + +This test is used to evaluate the performance of library. Given a directory +tree containing a bunch of JPEG images, it will attempt to locate and decode QR +codes in each image. Speed and success statistics are collected and printed on +stdout. + +### inspect + +This test is used for debugging. Given a single JPEG image, it will display a +diagram showing the internal state of the decoder as well as printing +additional information on stdout. + +Installation +------------ +To build the library and associated demos/tests, type `make`. If you need to +decode "large" image files build with `CFLAGS="-DQUIRC_MAX_REGIONS=65534" make` +instead. Note that this will increase the memory usage, it is discouraged for +low resource devices (i.e. embedded). + +Type `make install` to install the library, header file and camera demos. + +You can specify one or several of the following targets if you don't want, or +are unable to build everything: + +* libquirc.a +* libquirc.so +* qrtest +* inspect +* quirc-scanner +* quirc-demo + +Library use +----------- +All of the library's functionality is exposed through a single header file, +which you should include: + +```C +#include +``` + +To decode images, you'll need to instantiate a `struct quirc` object, which is +done with the `quirc_new` function. Later, when you no longer need to decode +anything, you should release the allocated memory with `quirc_destroy`: + +```C +struct quirc *qr; + +qr = quirc_new(); +if (!qr) { + perror("Failed to allocate memory"); + abort(); +} + +/* ... */ + +quirc_destroy(qr); +``` + +Having obtained a decoder object, you need to set the image size that you'll be +working with, which is done using `quirc_resize`: + +```C +if (quirc_resize(qr, 640, 480) < 0) { + perror("Failed to allocate video memory"); + abort(); +} +``` + +`quirc_resize` and `quirc_new` are the only library functions which allocate +memory. If you plan to process a series of frames (or a video stream), you +probably want to allocate and size a single decoder and hold onto it to process +each frame. + +Processing frames is done in two stages. The first stage is an +image-recognition stage called identification, which takes a grayscale image +and searches for QR codes. Using `quirc_begin` and `quirc_end`, you can feed a +grayscale image directly into the buffer that `quirc` uses for image +processing: + +```C +uint8_t *image; +int w, h; + +image = quirc_begin(qr, &w, &h); + +/* Fill out the image buffer here. + * image is a pointer to a w*h bytes. + * One byte per pixel, w pixels per line, h lines in the buffer. + */ + +quirc_end(qr); +``` + +Note that `quirc_begin` simply returns a pointer to a previously allocated +buffer. The buffer will contain uninitialized data. After the call to +`quirc_end`, the decoder holds a list of detected QR codes which can be queried +via `quirc_count` and `quirc_extract`. + +At this point, the second stage of processing occurs -- decoding. This is done +via the call to `quirc_decode`, which is not associated with a decoder object. + +```C +int num_codes; +int i; + +/* We've previously fed an image to the decoder via +* quirc_begin/quirc_end. +*/ + +num_codes = quirc_count(qr); +for (i = 0; i < num_codes; i++) { + struct quirc_code code; + struct quirc_data data; + quirc_decode_error_t err; + + quirc_extract(qr, i, &code); + + /* Decoding stage */ + err = quirc_decode(&code, &data); + if (err) + printf("DECODE FAILED: %s\n", quirc_strerror(err)); + else + printf("Data: %s\n", data.payload); +} +``` + +`quirc_code` and `quirc_data` are flat structures which don't need to be +initialized or freed after use. + +Copyright +--------- +Copyright (C) 2010-2012 Daniel Beer <> + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all +copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/ESP32QRReaderDBWriter/collections.c b/ESP32QRReaderDBWriter/collections.c new file mode 100644 index 0000000..ea0073d --- /dev/null +++ b/ESP32QRReaderDBWriter/collections.c @@ -0,0 +1,85 @@ +/* This file is part of the OpenMV project. + * Copyright (c) 2013-2017 Ibrahim Abdelkader & Kwabena W. Agyeman + * This work is licensed under the MIT license, see the file LICENSE for details. + */ + +#include "collections.h" +#define CHAR_BITS (sizeof(char) * 8) +#define CHAR_MASK (CHAR_BITS - 1) +#define CHAR_SHIFT IM_LOG2(CHAR_MASK) + +////////// +// lifo // +////////// + +void lifo_alloc(lifo_t *ptr, size_t size, size_t data_len) +{ + ptr->len = 0; + ptr->size = size; + ptr->data_len = data_len; + ptr->data = (char *)ps_malloc(size * data_len); +} + +void lifo_alloc_all(lifo_t *ptr, size_t *size, size_t data_len) +{ + ptr->data = (char *)ps_malloc(255); + ptr->data_len = data_len; + ptr->size = 255 / data_len; + ptr->len = 0; + *size = ptr->size; +} + +void lifo_free(lifo_t *ptr) +{ + if (ptr->data) + { + free(ptr->data); + } +} + +void lifo_clear(lifo_t *ptr) +{ + ptr->len = 0; +} + +size_t lifo_size(lifo_t *ptr) +{ + return ptr->len; +} + +bool lifo_is_not_empty(lifo_t *ptr) +{ + return ptr->len; +} + +bool lifo_is_not_full(lifo_t *ptr) +{ + return ptr->len != ptr->size; +} + +void lifo_enqueue(lifo_t *ptr, void *data) +{ + memcpy(ptr->data + (ptr->len * ptr->data_len), data, ptr->data_len); + + ptr->len += 1; +} + +void lifo_dequeue(lifo_t *ptr, void *data) +{ + if (data) + { + memcpy(data, ptr->data + ((ptr->len - 1) * ptr->data_len), ptr->data_len); + } + + ptr->len -= 1; +} + +void lifo_poke(lifo_t *ptr, void *data) +{ + memcpy(ptr->data + (ptr->len * ptr->data_len), data, ptr->data_len); +} + +void lifo_peek(lifo_t *ptr, void *data) +{ + memcpy(data, ptr->data + ((ptr->len - 1) * ptr->data_len), ptr->data_len); +} diff --git a/ESP32QRReaderDBWriter/collections.h b/ESP32QRReaderDBWriter/collections.h new file mode 100644 index 0000000..711cafa --- /dev/null +++ b/ESP32QRReaderDBWriter/collections.h @@ -0,0 +1,33 @@ +/* This file is part of the OpenMV project. + * Copyright (c) 2013-2017 Ibrahim Abdelkader & Kwabena W. Agyeman + * This work is licensed under the MIT license, see the file LICENSE for details. + */ + +#ifndef __COLLECTIONS_H__ +#define __COLLECTIONS_H__ +#include +#include +////////// +// lifo // +////////// + +typedef struct lifo +{ + size_t len, size, data_len; + char *data; +} +__attribute__((aligned(8))) lifo_t; + +void lifo_alloc(lifo_t *ptr, size_t size, size_t data_len); +void lifo_alloc_all(lifo_t *ptr, size_t *size, size_t data_len); +void lifo_free(lifo_t *ptr); +void lifo_clear(lifo_t *ptr); +size_t lifo_size(lifo_t *ptr); +bool lifo_is_not_empty(lifo_t *ptr); +bool lifo_is_not_full(lifo_t *ptr); +void lifo_enqueue(lifo_t *ptr, void *data); +void lifo_dequeue(lifo_t *ptr, void *data); +void lifo_poke(lifo_t *ptr, void *data); +void lifo_peek(lifo_t *ptr, void *data); + +#endif /* __COLLECTIONS_H__ */ \ No newline at end of file diff --git a/ESP32QRReaderDBWriter/decode.c b/ESP32QRReaderDBWriter/decode.c new file mode 100644 index 0000000..67c8ed5 --- /dev/null +++ b/ESP32QRReaderDBWriter/decode.c @@ -0,0 +1,983 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "quirc_internal.h" + +#include +#include + +#define MAX_POLY 64 + +/************************************************************************ + * Galois fields + */ + +struct galois_field +{ + int p; + const uint8_t *log; + const uint8_t *exp; +} __attribute__((aligned(8))); + +static const uint8_t gf16_exp[16] = { + 0x01, 0x02, 0x04, 0x08, 0x03, 0x06, 0x0c, 0x0b, + 0x05, 0x0a, 0x07, 0x0e, 0x0f, 0x0d, 0x09, 0x01}; + +static const uint8_t gf16_log[16] = { + 0x00, 0x0f, 0x01, 0x04, 0x02, 0x08, 0x05, 0x0a, + 0x03, 0x0e, 0x09, 0x07, 0x06, 0x0d, 0x0b, 0x0c}; + +static const struct galois_field gf16 = { + .p = 15, + .log = gf16_log, + .exp = gf16_exp}; + +static const uint8_t gf256_exp[256] = { + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, + 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26, + 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, + 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, + 0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, + 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23, + 0x46, 0x8c, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, + 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1, + 0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f, 0x5e, 0xbc, + 0x65, 0xca, 0x89, 0x0f, 0x1e, 0x3c, 0x78, 0xf0, + 0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, + 0xfe, 0xe1, 0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2, + 0xd9, 0xaf, 0x43, 0x86, 0x11, 0x22, 0x44, 0x88, + 0x0d, 0x1a, 0x34, 0x68, 0xd0, 0xbd, 0x67, 0xce, + 0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93, + 0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc, + 0x85, 0x17, 0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, + 0x4f, 0x9e, 0x21, 0x42, 0x84, 0x15, 0x2a, 0x54, + 0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4, 0x55, 0xaa, + 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73, + 0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, + 0xfc, 0xe5, 0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff, + 0xe3, 0xdb, 0xab, 0x4b, 0x96, 0x31, 0x62, 0xc4, + 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41, + 0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x07, 0x0e, + 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6, + 0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, + 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09, + 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, + 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16, + 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, + 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x01}; + +static const uint8_t gf256_log[256] = { + 0x00, 0xff, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, + 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b, + 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, + 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71, + 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, + 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45, + 0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27, 0xf9, 0xb9, + 0xc9, 0x9a, 0x09, 0x78, 0x4d, 0xe4, 0x72, 0xa6, + 0x06, 0xbf, 0x8b, 0x62, 0x66, 0xdd, 0x30, 0xfd, + 0xe2, 0x98, 0x25, 0xb3, 0x10, 0x91, 0x22, 0x88, + 0x36, 0xd0, 0x94, 0xce, 0x8f, 0x96, 0xdb, 0xbd, + 0xf1, 0xd2, 0x13, 0x5c, 0x83, 0x38, 0x46, 0x40, + 0x1e, 0x42, 0xb6, 0xa3, 0xc3, 0x48, 0x7e, 0x6e, + 0x6b, 0x3a, 0x28, 0x54, 0xfa, 0x85, 0xba, 0x3d, + 0xca, 0x5e, 0x9b, 0x9f, 0x0a, 0x15, 0x79, 0x2b, + 0x4e, 0xd4, 0xe5, 0xac, 0x73, 0xf3, 0xa7, 0x57, + 0x07, 0x70, 0xc0, 0xf7, 0x8c, 0x80, 0x63, 0x0d, + 0x67, 0x4a, 0xde, 0xed, 0x31, 0xc5, 0xfe, 0x18, + 0xe3, 0xa5, 0x99, 0x77, 0x26, 0xb8, 0xb4, 0x7c, + 0x11, 0x44, 0x92, 0xd9, 0x23, 0x20, 0x89, 0x2e, + 0x37, 0x3f, 0xd1, 0x5b, 0x95, 0xbc, 0xcf, 0xcd, + 0x90, 0x87, 0x97, 0xb2, 0xdc, 0xfc, 0xbe, 0x61, + 0xf2, 0x56, 0xd3, 0xab, 0x14, 0x2a, 0x5d, 0x9e, + 0x84, 0x3c, 0x39, 0x53, 0x47, 0x6d, 0x41, 0xa2, + 0x1f, 0x2d, 0x43, 0xd8, 0xb7, 0x7b, 0xa4, 0x76, + 0xc4, 0x17, 0x49, 0xec, 0x7f, 0x0c, 0x6f, 0xf6, + 0x6c, 0xa1, 0x3b, 0x52, 0x29, 0x9d, 0x55, 0xaa, + 0xfb, 0x60, 0x86, 0xb1, 0xbb, 0xcc, 0x3e, 0x5a, + 0xcb, 0x59, 0x5f, 0xb0, 0x9c, 0xa9, 0xa0, 0x51, + 0x0b, 0xf5, 0x16, 0xeb, 0x7a, 0x75, 0x2c, 0xd7, + 0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, + 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf}; + +const static struct galois_field gf256 = { + .p = 255, + .log = gf256_log, + .exp = gf256_exp}; + +/************************************************************************ + * Polynomial operations + */ + +static void poly_add(uint8_t *dst, const uint8_t *src, uint8_t c, + int shift, const struct galois_field *gf) +{ + int i; + int log_c = gf->log[c]; + + if (!c) + return; + + for (i = 0; i < MAX_POLY; i++) + { + int p = i + shift; + uint8_t v = src[i]; + + if (p < 0 || p >= MAX_POLY) + continue; + if (!v) + continue; + + dst[p] ^= gf->exp[(gf->log[v] + log_c) % gf->p]; + } +} + +static uint8_t poly_eval(const uint8_t *s, uint8_t x, + const struct galois_field *gf) +{ + int i; + uint8_t sum = 0; + uint8_t log_x = gf->log[x]; + + if (!x) + return s[0]; + + for (i = 0; i < MAX_POLY; i++) + { + uint8_t c = s[i]; + + if (!c) + continue; + + sum ^= gf->exp[(gf->log[c] + log_x * i) % gf->p]; + } + + return sum; +} + +/************************************************************************ + * Berlekamp-Massey algorithm for finding error locator polynomials. + */ + +static void berlekamp_massey(const uint8_t *s, int N, + const struct galois_field *gf, + uint8_t *sigma) +{ + uint8_t C[MAX_POLY]; + uint8_t B[MAX_POLY]; + int L = 0; + int m = 1; + uint8_t b = 1; + int n; + + memset(B, 0, sizeof(B)); + memset(C, 0, sizeof(C)); + B[0] = 1; + C[0] = 1; + + for (n = 0; n < N; n++) + { + uint8_t d = s[n]; + uint8_t mult; + int i; + + for (i = 1; i <= L; i++) + { + if (!(C[i] && s[n - i])) + continue; + + d ^= gf->exp[(gf->log[C[i]] + + gf->log[s[n - i]]) % + gf->p]; + } + + mult = gf->exp[(gf->p - gf->log[b] + gf->log[d]) % gf->p]; + + if (!d) + { + m++; + } + else if (L * 2 <= n) + { + uint8_t T[MAX_POLY]; + + memcpy(T, C, sizeof(T)); + poly_add(C, B, mult, m, gf); + memcpy(B, T, sizeof(B)); + L = n + 1 - L; + b = d; + m = 1; + } + else + { + poly_add(C, B, mult, m, gf); + m++; + } + } + + memcpy(sigma, C, MAX_POLY); +} + +/************************************************************************ + * Code stream error correction + * + * Generator polynomial for GF(2^8) is x^8 + x^4 + x^3 + x^2 + 1 + */ + +static int block_syndromes(const uint8_t *data, int bs, int npar, uint8_t *s) +{ + int nonzero = 0; + int i; + + memset(s, 0, MAX_POLY); + + for (i = 0; i < npar; i++) + { + int j; + + for (j = 0; j < bs; j++) + { + uint8_t c = data[bs - j - 1]; + + if (!c) + continue; + + s[i] ^= gf256_exp[((int)gf256_log[c] + + i * j) % + 255]; + } + + if (s[i]) + nonzero = 1; + } + + return nonzero; +} + +static void eloc_poly(uint8_t *omega, + const uint8_t *s, const uint8_t *sigma, + int npar) +{ + int i; + + memset(omega, 0, MAX_POLY); + + for (i = 0; i < npar; i++) + { + const uint8_t a = sigma[i]; + const uint8_t log_a = gf256_log[a]; + int j; + + if (!a) + continue; + + for (j = 0; j + 1 < MAX_POLY; j++) + { + const uint8_t b = s[j + 1]; + + if (i + j >= npar) + break; + + if (!b) + continue; + + omega[i + j] ^= + gf256_exp[(log_a + gf256_log[b]) % 255]; + } + } +} + +static quirc_decode_error_t correct_block(uint8_t *data, + const struct quirc_rs_params *ecc) +{ + int npar = ecc->bs - ecc->dw; + uint8_t s[MAX_POLY]; + uint8_t sigma[MAX_POLY]; + uint8_t sigma_deriv[MAX_POLY]; + uint8_t omega[MAX_POLY]; + int i; + + /* Compute syndrome vector */ + if (!block_syndromes(data, ecc->bs, npar, s)) + return QUIRC_SUCCESS; + + berlekamp_massey(s, npar, &gf256, sigma); + + /* Compute derivative of sigma */ + memset(sigma_deriv, 0, MAX_POLY); + for (i = 0; i + 1 < MAX_POLY; i += 2) + sigma_deriv[i] = sigma[i + 1]; + + /* Compute error evaluator polynomial */ + eloc_poly(omega, s, sigma, npar - 1); + + /* Find error locations and magnitudes */ + for (i = 0; i < ecc->bs; i++) + { + uint8_t xinv = gf256_exp[255 - i]; + + if (!poly_eval(sigma, xinv, &gf256)) + { + uint8_t sd_x = poly_eval(sigma_deriv, xinv, &gf256); + uint8_t omega_x = poly_eval(omega, xinv, &gf256); + uint8_t error = gf256_exp[(255 - gf256_log[sd_x] + + gf256_log[omega_x]) % + 255]; + + data[ecc->bs - i - 1] ^= error; + } + } + + if (block_syndromes(data, ecc->bs, npar, s)) + return QUIRC_ERROR_DATA_ECC; + + return QUIRC_SUCCESS; +} + +/************************************************************************ + * Format value error correction + * + * Generator polynomial for GF(2^4) is x^4 + x + 1 + */ + +#define FORMAT_MAX_ERROR 3 +#define FORMAT_SYNDROMES (FORMAT_MAX_ERROR * 2) +#define FORMAT_BITS 15 + +static int format_syndromes(uint16_t u, uint8_t *s) +{ + int i; + int nonzero = 0; + + memset(s, 0, MAX_POLY); + + for (i = 0; i < FORMAT_SYNDROMES; i++) + { + int j; + + s[i] = 0; + for (j = 0; j < FORMAT_BITS; j++) + if (u & (1 << j)) + s[i] ^= gf16_exp[((i + 1) * j) % 15]; + + if (s[i]) + nonzero = 1; + } + + return nonzero; +} + +static quirc_decode_error_t correct_format(uint16_t *f_ret) +{ + uint16_t u = *f_ret; + int i; + uint8_t s[MAX_POLY]; + uint8_t sigma[MAX_POLY]; + + /* Evaluate U (received codeword) at each of alpha_1 .. alpha_6 + * to get S_1 .. S_6 (but we index them from 0). + */ + if (!format_syndromes(u, s)) + return QUIRC_SUCCESS; + + berlekamp_massey(s, FORMAT_SYNDROMES, &gf16, sigma); + + /* Now, find the roots of the polynomial */ + for (i = 0; i < 15; i++) + if (!poly_eval(sigma, gf16_exp[15 - i], &gf16)) + u ^= (1 << i); + + if (format_syndromes(u, s)) + return QUIRC_ERROR_FORMAT_ECC; + + *f_ret = u; + return QUIRC_SUCCESS; +} + +/************************************************************************ + * Decoder algorithm + */ + +struct datastream +{ + uint8_t raw[QUIRC_MAX_PAYLOAD]; + int data_bits; + int ptr; + + uint8_t data[QUIRC_MAX_PAYLOAD]; +} __attribute__((aligned(8))); + +static inline int grid_bit(const struct quirc_code *code, int x, int y) +{ + int p = y * code->size + x; + + return (code->cell_bitmap[p >> 3] >> (p & 7)) & 1; +} + +static quirc_decode_error_t read_format(const struct quirc_code *code, + struct quirc_data *data, int which) +{ + int i; + uint16_t format = 0; + uint16_t fdata; + quirc_decode_error_t err; + + if (which) + { + for (i = 0; i < 7; i++) + format = (format << 1) | + grid_bit(code, 8, code->size - 1 - i); + for (i = 0; i < 8; i++) + format = (format << 1) | + grid_bit(code, code->size - 8 + i, 8); + } + else + { + static const int xs[15] = { + 8, 8, 8, 8, 8, 8, 8, 8, 7, 5, 4, 3, 2, 1, 0}; + static const int ys[15] = { + 0, 1, 2, 3, 4, 5, 7, 8, 8, 8, 8, 8, 8, 8, 8}; + + for (i = 14; i >= 0; i--) + format = (format << 1) | grid_bit(code, xs[i], ys[i]); + } + + format ^= 0x5412; + + err = correct_format(&format); + if (err) + return err; + + fdata = format >> 10; + data->ecc_level = fdata >> 3; + data->mask = fdata & 7; + + return QUIRC_SUCCESS; +} + +static int mask_bit(int mask, int i, int j) +{ + switch (mask) + { + case 0: + return !((i + j) % 2); + case 1: + return !(i % 2); + case 2: + return !(j % 3); + case 3: + return !((i + j) % 3); + case 4: + return !(((i / 2) + (j / 3)) % 2); + case 5: + return !((i * j) % 2 + (i * j) % 3); + case 6: + return !(((i * j) % 2 + (i * j) % 3) % 2); + case 7: + return !(((i * j) % 3 + (i + j) % 2) % 2); + } + + return 0; +} + +static int reserved_cell(int version, int i, int j) +{ + const struct quirc_version_info *ver = &quirc_version_db[version]; + int size = version * 4 + 17; + int ai = -1, aj = -1, a; + + /* Finder + format: top left */ + if (i < 9 && j < 9) + return 1; + + /* Finder + format: bottom left */ + if (i + 8 >= size && j < 9) + return 1; + + /* Finder + format: top right */ + if (i < 9 && j + 8 >= size) + return 1; + + /* Exclude timing patterns */ + if (i == 6 || j == 6) + return 1; + + /* Exclude version info, if it exists. Version info sits adjacent to + * the top-right and bottom-left finders in three rows, bounded by + * the timing pattern. + */ + if (version >= 7) + { + if (i < 6 && j + 11 >= size) + return 1; + if (i + 11 >= size && j < 6) + return 1; + } + + /* Exclude alignment patterns */ + for (a = 0; a < QUIRC_MAX_ALIGNMENT && ver->apat[a]; a++) + { + int p = ver->apat[a]; + + if (abs(p - i) < 3) + ai = a; + if (abs(p - j) < 3) + aj = a; + } + + if (ai >= 0 && aj >= 0) + { + a--; + if (ai > 0 && ai < a) + return 1; + if (aj > 0 && aj < a) + return 1; + if (aj == a && ai == a) + return 1; + } + + return 0; +} + +static void read_bit(const struct quirc_code *code, + struct quirc_data *data, + struct datastream *ds, int i, int j) +{ + int bitpos = ds->data_bits & 7; + int bytepos = ds->data_bits >> 3; + int v = grid_bit(code, j, i); + + if (mask_bit(data->mask, i, j)) + v ^= 1; + + if (v) + ds->raw[bytepos] |= (0x80 >> bitpos); + + ds->data_bits++; +} + +static void read_data(const struct quirc_code *code, + struct quirc_data *data, + struct datastream *ds) +{ + int y = code->size - 1; + int x = code->size - 1; + int dir = -1; + + while (x > 0) + { + if (x == 6) + x--; + + if (!reserved_cell(data->version, y, x)) + read_bit(code, data, ds, y, x); + + if (!reserved_cell(data->version, y, x - 1)) + read_bit(code, data, ds, y, x - 1); + + y += dir; + if (y < 0 || y >= code->size) + { + dir = -dir; + x -= 2; + y += dir; + } + } +} + +static quirc_decode_error_t codestream_ecc(struct quirc_data *data, + struct datastream *ds) +{ + const struct quirc_version_info *ver = + &quirc_version_db[data->version]; + const struct quirc_rs_params *sb_ecc = &ver->ecc[data->ecc_level]; + struct quirc_rs_params lb_ecc; + const int lb_count = + (ver->data_bytes - sb_ecc->bs * sb_ecc->ns) / (sb_ecc->bs + 1); + const int bc = lb_count + sb_ecc->ns; + const int ecc_offset = sb_ecc->dw * bc + lb_count; + int dst_offset = 0; + int i; + + memcpy(&lb_ecc, sb_ecc, sizeof(lb_ecc)); + lb_ecc.dw++; + lb_ecc.bs++; + + for (i = 0; i < bc; i++) + { + uint8_t *dst = ds->data + dst_offset; + const struct quirc_rs_params *ecc = + (i < sb_ecc->ns) ? sb_ecc : &lb_ecc; + const int num_ec = ecc->bs - ecc->dw; + quirc_decode_error_t err; + int j; + + for (j = 0; j < ecc->dw; j++) + dst[j] = ds->raw[j * bc + i]; + for (j = 0; j < num_ec; j++) + dst[ecc->dw + j] = ds->raw[ecc_offset + j * bc + i]; + + err = correct_block(dst, ecc); + if (err) + return err; + + dst_offset += ecc->dw; + } + + ds->data_bits = dst_offset * 8; + + return QUIRC_SUCCESS; +} + +static inline int bits_remaining(const struct datastream *ds) +{ + return ds->data_bits - ds->ptr; +} + +static int take_bits(struct datastream *ds, int len) +{ + int ret = 0; + + while (len && (ds->ptr < ds->data_bits)) + { + uint8_t b = ds->data[ds->ptr >> 3]; + int bitpos = ds->ptr & 7; + + ret <<= 1; + if ((b << bitpos) & 0x80) + ret |= 1; + + ds->ptr++; + len--; + } + + return ret; +} + +static int numeric_tuple(struct quirc_data *data, + struct datastream *ds, + int bits, int digits) +{ + int tuple; + int i; + + if (bits_remaining(ds) < bits) + return -1; + + tuple = take_bits(ds, bits); + + for (i = digits - 1; i >= 0; i--) + { + data->payload[data->payload_len + i] = tuple % 10 + '0'; + tuple /= 10; + } + + data->payload_len += digits; + return 0; +} + +static quirc_decode_error_t decode_numeric(struct quirc_data *data, + struct datastream *ds) +{ + int bits = 14; + int count; + + if (data->version < 10) + bits = 10; + else if (data->version < 27) + bits = 12; + + count = take_bits(ds, bits); + if (data->payload_len + count + 1 > QUIRC_MAX_PAYLOAD) + return QUIRC_ERROR_DATA_OVERFLOW; + + while (count >= 3) + { + if (numeric_tuple(data, ds, 10, 3) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count -= 3; + } + + if (count >= 2) + { + if (numeric_tuple(data, ds, 7, 2) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count -= 2; + } + + if (count) + { + if (numeric_tuple(data, ds, 4, 1) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count--; + } + + return QUIRC_SUCCESS; +} + +static int alpha_tuple(struct quirc_data *data, + struct datastream *ds, + int bits, int digits) +{ + int tuple; + int i; + + if (bits_remaining(ds) < bits) + return -1; + + tuple = take_bits(ds, bits); + + for (i = 0; i < digits; i++) + { + static const char *alpha_map = + "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"; + + data->payload[data->payload_len + digits - i - 1] = + alpha_map[tuple % 45]; + tuple /= 45; + } + + data->payload_len += digits; + return 0; +} + +static quirc_decode_error_t decode_alpha(struct quirc_data *data, + struct datastream *ds) +{ + int bits = 13; + int count; + + if (data->version < 10) + bits = 9; + else if (data->version < 27) + bits = 11; + + count = take_bits(ds, bits); + if (data->payload_len + count + 1 > QUIRC_MAX_PAYLOAD) + return QUIRC_ERROR_DATA_OVERFLOW; + + while (count >= 2) + { + if (alpha_tuple(data, ds, 11, 2) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count -= 2; + } + + if (count) + { + if (alpha_tuple(data, ds, 6, 1) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count--; + } + + return QUIRC_SUCCESS; +} + +static quirc_decode_error_t decode_byte(struct quirc_data *data, + struct datastream *ds) +{ + int bits = 16; + int count; + int i; + + if (data->version < 10) + bits = 8; + + count = take_bits(ds, bits); + if (data->payload_len + count + 1 > QUIRC_MAX_PAYLOAD) + return QUIRC_ERROR_DATA_OVERFLOW; + if (bits_remaining(ds) < count * 8) + return QUIRC_ERROR_DATA_UNDERFLOW; + + for (i = 0; i < count; i++) + data->payload[data->payload_len++] = take_bits(ds, 8); + + return QUIRC_SUCCESS; +} + +static quirc_decode_error_t decode_kanji(struct quirc_data *data, + struct datastream *ds) +{ + int bits = 12; + int count; + int i; + + if (data->version < 10) + bits = 8; + else if (data->version < 27) + bits = 10; + + count = take_bits(ds, bits); + if (data->payload_len + count * 2 + 1 > QUIRC_MAX_PAYLOAD) + return QUIRC_ERROR_DATA_OVERFLOW; + if (bits_remaining(ds) < count * 13) + return QUIRC_ERROR_DATA_UNDERFLOW; + + for (i = 0; i < count; i++) + { + int d = take_bits(ds, 13); + int msB = d / 0xc0; + int lsB = d % 0xc0; + int intermediate = (msB << 8) | lsB; + uint16_t sjw; + + if (intermediate + 0x8140 <= 0x9ffc) + { + /* bytes are in the range 0x8140 to 0x9FFC */ + sjw = intermediate + 0x8140; + } + else + { + /* bytes are in the range 0xE040 to 0xEBBF */ + sjw = intermediate + 0xc140; + } + + data->payload[data->payload_len++] = sjw >> 8; + data->payload[data->payload_len++] = sjw & 0xff; + } + + return QUIRC_SUCCESS; +} + +static quirc_decode_error_t decode_eci(struct quirc_data *data, + struct datastream *ds) +{ + if (bits_remaining(ds) < 8) + return QUIRC_ERROR_DATA_UNDERFLOW; + + data->eci = take_bits(ds, 8); + + if ((data->eci & 0xc0) == 0x80) + { + if (bits_remaining(ds) < 8) + return QUIRC_ERROR_DATA_UNDERFLOW; + + data->eci = (data->eci << 8) | take_bits(ds, 8); + } + else if ((data->eci & 0xe0) == 0xc0) + { + if (bits_remaining(ds) < 16) + return QUIRC_ERROR_DATA_UNDERFLOW; + + data->eci = (data->eci << 16) | take_bits(ds, 16); + } + + return QUIRC_SUCCESS; +} + +static quirc_decode_error_t decode_payload(struct quirc_data *data, + struct datastream *ds) +{ + while (bits_remaining(ds) >= 4) + { + quirc_decode_error_t err = QUIRC_SUCCESS; + int type = take_bits(ds, 4); + + switch (type) + { + case QUIRC_DATA_TYPE_NUMERIC: + err = decode_numeric(data, ds); + break; + + case QUIRC_DATA_TYPE_ALPHA: + err = decode_alpha(data, ds); + break; + + case QUIRC_DATA_TYPE_BYTE: + err = decode_byte(data, ds); + break; + + case QUIRC_DATA_TYPE_KANJI: + err = decode_kanji(data, ds); + break; + + case 7: + err = decode_eci(data, ds); + break; + + default: + goto done; + } + + if (err) + return err; + + if (!(type & (type - 1)) && (type > data->data_type)) + data->data_type = type; + } + +done: + + /* Add nul terminator to all payloads */ + if (data->payload_len >= sizeof(data->payload)) + data->payload_len--; + data->payload[data->payload_len] = 0; + + return QUIRC_SUCCESS; +} + +quirc_decode_error_t quirc_decode(const struct quirc_code *code, + struct quirc_data *data) +{ + quirc_decode_error_t err; + struct datastream *ds = ps_malloc(sizeof(struct datastream)); + + if ((code->size - 17) % 4) + { + free(ds); + return QUIRC_ERROR_INVALID_GRID_SIZE; + } + + memset(data, 0, sizeof(*data)); + memset(ds, 0, sizeof(*ds)); + + data->version = (code->size - 17) / 4; + + if (data->version < 1 || + data->version > QUIRC_MAX_VERSION) + { + free(ds); + return QUIRC_ERROR_INVALID_VERSION; + } + + /* Read format information -- try both locations */ + err = read_format(code, data, 0); + if (err) + err = read_format(code, data, 1); + if (err) + { + free(ds); + return err; + } + + read_data(code, data, ds); + err = codestream_ecc(data, ds); + if (err) + { + free(ds); + return err; + } + + err = decode_payload(data, ds); + if (err) + { + free(ds); + return err; + } + + free(ds); + return QUIRC_SUCCESS; +} \ No newline at end of file diff --git a/ESP32QRReaderDBWriter/defines.h b/ESP32QRReaderDBWriter/defines.h new file mode 100644 index 0000000..ed63a72 --- /dev/null +++ b/ESP32QRReaderDBWriter/defines.h @@ -0,0 +1,381 @@ +/**************************************************************************************************************************** + 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 DEBUG_ESP8266_AT_WEBSERVER_PORT Serial + +// Debug Level from 0 to 4 +#define _ESP_AT_LOGLEVEL_ 1 + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ! (ESP8266 || ESP32 ) + // Select only one of these libraries, only for boards other than ESP8266/ESP32 + #define USING_WIFI_ESP8266_AT false + #define USING_WIFININA_GENERIC false + #define USING_WIFININA false + #define USING_WIFIESPAT_LIB true + #define USING_WIFI_CUSTOM false +#endif + +#if defined(ARDUINO_SAMD_MKR1000) + #if defined(USE_WIFI_NINA) + #undef USE_WIFI_NINA + #endif + #define USE_WIFI_NINA false + #define USE_WIFI101 true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFI_USE_NRF528XX) + #undef WIFI_USE_NRF528XX + #endif + #define WIFI_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFI_USE_SAMD) + #undef WIFI_USE_SAMD + #endif + #define WIFI_USE_SAMD true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFI_USE_SAM_DUE) + #undef WIFI_USE_SAM_DUE + #endif + #define WIFI_USE_SAM_DUE true + #warning Use SAM_DUE architecture +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFI_USE_STM32) + #undef WIFI_USE_STM32 + #endif + #define WIFI_USE_STM32 true +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFI_USE_RP2040) + #undef WIFI_USE_RP2040 + #endif + #define WIFI_USE_RP2040 true +#endif + +#ifdef CORE_TEENSY + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For Teensy 4.1/4.0 + #define EspSerial Serial2 //Serial2, Pin RX2 : 7, TX2 : 8 + #endif + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" +#endif + +#elif defined(WIFI_USE_NRF528XX) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif defined(WIFI_USE_SAMD) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For SAMD + #define EspSerial Serial1 + #endif + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif defined(WIFI_USE_STM32) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For STM32 + #if defined(ARDUINO_NUCLEO_F767ZI) + #warning Nucleo-144 NUCLEO_F767ZI board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); + #elif defined(ARDUINO_NUCLEO_L053R8) + #warning Nucleo-64 NUCLEO_L053R8 board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); // (PA3, PA2); + #endif + + #warning EspSerial using SERIAL_PORT_HARDWARE, can be Serial or Serial1. See your board variant.h + #define EspSerial SERIAL_PORT_HARDWARE //Serial1 + #endif + + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif (ESP8266) + #warning ESP8266 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif (ESP32) + #warning ESP32 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif defined(WIFI_USE_RP2040) && !defined(ARDUINO_ARCH_MBED) + + // For RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + +#elif defined(WIFI_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + // For MBED RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#else + // For Mega + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #define BOARD_TYPE "AVR Mega" +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#endif + +#endif //defines_h diff --git a/ESP32QRReaderDBWriter/fmath.h b/ESP32QRReaderDBWriter/fmath.h new file mode 100644 index 0000000..76c3b93 --- /dev/null +++ b/ESP32QRReaderDBWriter/fmath.h @@ -0,0 +1,70 @@ +/* + * This file is part of the OpenMV project. + * Copyright (c) 2013/2014 Ibrahim Abdelkader + * This work is licensed under the MIT license, see the file LICENSE for details. + * + * Fast approximate math functions. + * + */ +#ifndef __FMATH_H +#define __FMATH_H +#include +#include + +static inline float fast_sqrtf(float x) +{ + //return sqrtf(x); + asm("fsqrt.s %0, %1" + : "=f"(x) + : "f"(x)); + return x; +} +static inline int fast_floorf(float x) +{ + return (int)(x); +} + +static inline int fast_ceilf(float x) +{ + return (int)(x + 0.9999f); +} + +static inline int fast_roundf(float x) +{ + return (int)(x); +} + +static inline float fast_fabsf(float d) +{ + return fabsf(d); +} + +extern int fast_floorf(float x); +extern int fast_ceilf(float x); +extern int fast_roundf(float x); +extern float fast_atanf(float x); +extern float fast_atan2f(float y, float x); +extern float fast_expf(float x); +extern float fast_cbrtf(float d); +extern float fast_fabsf(float d); +extern float fast_log(float x); +extern float fast_log2(float x); +extern float fast_powf(float a, float b); + +/*#define fast_sqrtf(x) (sqrtf(x)) +#define fast_floorf(x) ((int)floorf(x)) +#define fast_ceilf(x) ((int)ceilf(x)) +#define fast_roundf(x) ((int)roundf(x)) +#define fast_atanf(x) (atanf(x)) +#define fast_atan2f(x,y) (atan2f((x),(y))) +#define fast_expf(x) (expf(x)) +#define fast_cbrtf(x) (cbrtf(x)) +#define fast_fabsf(x) (fabsf(x)) +#define fast_log(x) (log(x)) +#define fast_log2(x) (log2(x)) +#define fast_powf(x,y) (powf((x),(y))) +*/ + +extern const float cos_table[360]; +extern const float sin_table[360]; +#endif // __FMATH_H \ No newline at end of file diff --git a/ESP32QRReaderDBWriter/identify.c b/ESP32QRReaderDBWriter/identify.c new file mode 100644 index 0000000..d0d0316 --- /dev/null +++ b/ESP32QRReaderDBWriter/identify.c @@ -0,0 +1,1286 @@ +/* quirc - QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include +#include + +#include "fmath.h" +#include "collections.h" +#include "quirc_internal.h" + +/************************************************************************ + * Linear algebra routines + */ + +static int line_intersect(const struct quirc_point *p0, + const struct quirc_point *p1, + const struct quirc_point *q0, + const struct quirc_point *q1, + struct quirc_point *r) +{ + /* (a, b) is perpendicular to line p */ + int a = -(p1->y - p0->y); + int b = p1->x - p0->x; + + /* (c, d) is perpendicular to line q */ + int c = -(q1->y - q0->y); + int d = q1->x - q0->x; + + /* e and f are dot products of the respective vectors with p and q */ + int e = a * p1->x + b * p1->y; + int f = c * q1->x + d * q1->y; + + /* Now we need to solve: + * [a b] [rx] [e] + * [c d] [ry] = [f] + * + * We do this by inverting the matrix and applying it to (e, f): + * [ d -b] [e] [rx] + * 1/det [-c a] [f] = [ry] + */ + int det = (a * d) - (b * c); + + if (!det) + return 0; + + r->x = (d * e - b * f) / det; + r->y = (-c * e + a * f) / det; + + return 1; +} + +static void perspective_setup(float *c, + const struct quirc_point *rect, + float w, float h) +{ + float x0 = rect[0].x; + float y0 = rect[0].y; + float x1 = rect[1].x; + float y1 = rect[1].y; + float x2 = rect[2].x; + float y2 = rect[2].y; + float x3 = rect[3].x; + float y3 = rect[3].y; + + float wden = w * (x2 * y3 - x3 * y2 + (x3 - x2) * y1 + x1 * (y2 - y3)); + float hden = h * (x2 * y3 + x1 * (y2 - y3) - x3 * y2 + (x3 - x2) * y1); + + c[0] = (x1 * (x2 * y3 - x3 * y2) + x0 * (-x2 * y3 + x3 * y2 + (x2 - x3) * y1) + + x1 * (x3 - x2) * y0) / + wden; + c[1] = -(x0 * (x2 * y3 + x1 * (y2 - y3) - x2 * y1) - x1 * x3 * y2 + x2 * x3 * y1 + (x1 * x3 - x2 * x3) * y0) / hden; + c[2] = x0; + c[3] = (y0 * (x1 * (y3 - y2) - x2 * y3 + x3 * y2) + y1 * (x2 * y3 - x3 * y2) + + x0 * y1 * (y2 - y3)) / + wden; + c[4] = (x0 * (y1 * y3 - y2 * y3) + x1 * y2 * y3 - x2 * y1 * y3 + + y0 * (x3 * y2 - x1 * y2 + (x2 - x3) * y1)) / + hden; + c[5] = y0; + c[6] = (x1 * (y3 - y2) + x0 * (y2 - y3) + (x2 - x3) * y1 + (x3 - x2) * y0) / wden; + c[7] = (-x2 * y3 + x1 * y3 + x3 * y2 + x0 * (y1 - y2) - x3 * y1 + (x2 - x1) * y0) / + hden; +} + +static void perspective_map(const float *c, + float u, float v, struct quirc_point *ret) +{ + float den = c[6] * u + c[7] * v + 1.0; + float x = (c[0] * u + c[1] * v + c[2]) / den; + float y = (c[3] * u + c[4] * v + c[5]) / den; + + ret->x = fast_roundf(x); + ret->y = fast_roundf(y); +} + +static void perspective_unmap(const float *c, + const struct quirc_point *in, + float *u, float *v) +{ + float x = in->x; + float y = in->y; + float den = -c[0] * c[7] * y + c[1] * c[6] * y + (c[3] * c[7] - c[4] * c[6]) * x + + c[0] * c[4] - c[1] * c[3]; + + *u = -(c[1] * (y - c[5]) - c[2] * c[7] * y + (c[5] * c[7] - c[4]) * x + c[2] * c[4]) / + den; + *v = (c[0] * (y - c[5]) - c[2] * c[6] * y + (c[5] * c[6] - c[3]) * x + c[2] * c[3]) / + den; +} + +/************************************************************************ + * Span-based floodfill routine + */ + +typedef void (*span_func_t)(void *user_data, int y, int left, int right); + +typedef struct xylf +{ + int16_t x, y, l, r; +} __attribute__((aligned(8))) +xylf_t; + +//计算该区域的面积,from是像素颜色,to是区块标号,user_data是申请的区块结构体,func是计算面积的函数 +static void flood_fill_seed(struct quirc *q, int x, int y, int from, int to, + span_func_t func, void *user_data, + int depth) +{ + (void)depth; // unused + + lifo_t lifo; + size_t lifo_len; + lifo_alloc_all(&lifo, &lifo_len, sizeof(xylf_t)); + //late in first out. 申请xylf_t的lifo,一次申请完,长度存储在lifo_len中 + + for (;;) + { + int left = x; + int right = x; + int i; + quirc_pixel_t *row = q->pixels + y * q->w; //行起始地址 + //查找左右边界 + while (left > 0 && row[left - 1] == from) + left--; + + while (right < q->w - 1 && row[right + 1] == from) + right++; + + /* Fill the extent 对应像素标记为区块号*/ + for (i = left; i <= right; i++) + row[i] = to; + //累加区域内的像素点数作为面积 + if (func) + func(user_data, y, left, right); + + for (;;) + { + if (lifo_size(&lifo) < lifo_len) + { //栈中的数量 + /* Seed new flood-fills */ + if (y > 0) + { //查找上一行有没有在同一区域的点 + row = q->pixels + (y - 1) * q->w; + + bool recurse = false; + for (i = left; i <= right; i++) + if (row[i] == from) + { //相同区域,则入栈原来的区块 + xylf_t context; + context.x = x; + context.y = y; + context.l = left; + context.r = right; + lifo_enqueue(&lifo, &context); + //mp_printf(&mp_plat_print, "#x=%x,y=%d;x1=%d,y1=%d\n",x,y,i,y-1); + x = i; + y = y - 1; + recurse = true; + break; + } + if (recurse) + break; + } + //查找下一行有没有在同一区域的点 + if (y < q->h - 1) + { + row = q->pixels + (y + 1) * q->w; + + bool recurse = false; + for (i = left; i <= right; i++) + if (row[i] == from) + { + xylf_t context; + context.x = x; + context.y = y; + context.l = left; + context.r = right; + lifo_enqueue(&lifo, &context); + //mp_printf(&mp_plat_print, "#x=%x,y=%d;x1=%d,y1=%d\n",x,y,i,y+1); + x = i; + y = y + 1; + recurse = true; + break; + } + if (recurse) + break; + } + } + + if (!lifo_size(&lifo)) + { + lifo_free(&lifo); //如果最起始为止就没找到,那么返回 + return; + } + //本次迭代,往上,往下找边界(相同颜色像素点),直到找不到为止 + //找到边界后,出栈上层像素点,回退回去 + xylf_t context; + lifo_dequeue(&lifo, &context); //这里存疑,如果都没有的话,dequeue就会反向溢出吧。。 + x = context.x; + y = context.y; + left = context.l; + right = context.r; + //mp_printf(&mp_plat_print, "#deq: x=%x,y=%d\n",x,y); + } //找到相同from,break到这外面 + } +} + +/************************************************************************ + * Adaptive thresholding + */ + +#define THRESHOLD_S_MIN 1 +#define THRESHOLD_S_DEN 8 +#define THRESHOLD_T 5 + +static void threshold(struct quirc *q) +{ + int x, y; + int avg_w = 0; + int avg_u = 0; + int threshold_s = q->w / THRESHOLD_S_DEN; + quirc_pixel_t *row = q->pixels; + + /* + * Ensure a sane, non-zero value for threshold_s. + * + * threshold_s can be zero if the image width is small. We need to avoid + * SIGFPE as it will be used as divisor. + */ + if (threshold_s < THRESHOLD_S_MIN) + threshold_s = THRESHOLD_S_MIN; + + for (y = 0; y < q->h; y++) + { + int row_average[q->w]; + + memset(row_average, 0, sizeof(row_average)); + + for (x = 0; x < q->w; x++) + { + int w, u; + + if (y & 1) + { + w = x; + u = q->w - 1 - x; + } + else + { + w = q->w - 1 - x; + u = x; + } + + avg_w = (avg_w * (threshold_s - 1)) / + threshold_s + + row[w]; + avg_u = (avg_u * (threshold_s - 1)) / + threshold_s + + row[u]; + + row_average[w] += avg_w; + row_average[u] += avg_u; + } + + for (x = 0; x < q->w; x++) + { + if (row[x] < row_average[x] * + (100 - THRESHOLD_T) / (200 * threshold_s)) + row[x] = QUIRC_PIXEL_BLACK; + else + row[x] = QUIRC_PIXEL_WHITE; + } + + row += q->w; + } +} + +static void area_count(void *user_data, int y, int left, int right) +{ + ((struct quirc_region *)user_data)->count += right - left + 1; +} + +static int region_code(struct quirc *q, int x, int y) +{ //region指的是QRcode的区域,成员为区域的坐标,像素面积,是否顶点 + int pixel; + struct quirc_region *box; + int region; + + if (x < 0 || y < 0 || x >= q->w || y >= q->h) + return -1; + + pixel = q->pixels[y * q->w + x]; + //预先判断非正常的像素情况,退出 + if (pixel >= QUIRC_PIXEL_REGION) + return pixel; + + if (pixel == QUIRC_PIXEL_WHITE) + return -1; + + if (q->num_regions >= QUIRC_MAX_REGIONS) + return -1; + //新建一个区域 + region = q->num_regions; + box = &q->regions[q->num_regions++]; + + memset(box, 0, sizeof(*box)); + + box->seed.x = x; + box->seed.y = y; + box->capstone = -1; + //计算该区域的面积 + flood_fill_seed(q, x, y, pixel, region, area_count, box, 0); + + return region; +} + +struct polygon_score_data +{ + struct quirc_point ref; + + int scores[4]; + struct quirc_point *corners; +} __attribute__((aligned(8))); + +static void find_one_corner(void *user_data, int y, int left, int right) +{ + struct polygon_score_data *psd = + (struct polygon_score_data *)user_data; + int xs[2] = {left, right}; + int dy = y - psd->ref.y; + int i; + + for (i = 0; i < 2; i++) + { + int dx = xs[i] - psd->ref.x; + int d = dx * dx + dy * dy; + + if (d > psd->scores[0]) + { + psd->scores[0] = d; + psd->corners[0].x = xs[i]; + psd->corners[0].y = y; + } + } +} + +static void find_other_corners(void *user_data, int y, int left, int right) +{ + struct polygon_score_data *psd = + (struct polygon_score_data *)user_data; + int xs[2] = {left, right}; + int i; + + for (i = 0; i < 2; i++) + { + int up = xs[i] * psd->ref.x + y * psd->ref.y; + int right = xs[i] * -psd->ref.y + y * psd->ref.x; + int scores[4] = {up, right, -up, -right}; + int j; + + for (j = 0; j < 4; j++) + { + if (scores[j] > psd->scores[j]) + { + psd->scores[j] = scores[j]; + psd->corners[j].x = xs[i]; + psd->corners[j].y = y; + } + } + } +} + +static void find_region_corners(struct quirc *q, + int rcode, const struct quirc_point *ref, + struct quirc_point *corners) +{ + struct quirc_region *region = &q->regions[rcode]; + struct polygon_score_data psd; + int i; + + memset(&psd, 0, sizeof(psd)); + psd.corners = corners; + + memcpy(&psd.ref, ref, sizeof(psd.ref)); + psd.scores[0] = -1; + flood_fill_seed(q, region->seed.x, region->seed.y, + rcode, QUIRC_PIXEL_BLACK, + find_one_corner, &psd, 0); + + psd.ref.x = psd.corners[0].x - psd.ref.x; + psd.ref.y = psd.corners[0].y - psd.ref.y; + + for (i = 0; i < 4; i++) + memcpy(&psd.corners[i], ®ion->seed, + sizeof(psd.corners[i])); + + i = region->seed.x * psd.ref.x + region->seed.y * psd.ref.y; + psd.scores[0] = i; + psd.scores[2] = -i; + i = region->seed.x * -psd.ref.y + region->seed.y * psd.ref.x; + psd.scores[1] = i; + psd.scores[3] = -i; + + flood_fill_seed(q, region->seed.x, region->seed.y, + QUIRC_PIXEL_BLACK, rcode, + find_other_corners, &psd, 0); +} + +static void record_capstone(struct quirc *q, int ring, int stone) +{ + struct quirc_region *stone_reg = &q->regions[stone]; + struct quirc_region *ring_reg = &q->regions[ring]; + struct quirc_capstone *capstone; + int cs_index; + + if (q->num_capstones >= QUIRC_MAX_CAPSTONES) + return; + + cs_index = q->num_capstones; + capstone = &q->capstones[q->num_capstones++]; + + memset(capstone, 0, sizeof(*capstone)); + + capstone->qr_grid = -1; + capstone->ring = ring; + capstone->stone = stone; + stone_reg->capstone = cs_index; + ring_reg->capstone = cs_index; + + /* Find the corners of the ring */ + find_region_corners(q, ring, &stone_reg->seed, capstone->corners); + + /* Set up the perspective transform and find the center */ + perspective_setup(capstone->c, capstone->corners, 7.0, 7.0); + perspective_map(capstone->c, 3.5, 3.5, &capstone->center); +} + +static void test_capstone(struct quirc *q, int x, int y, int *pb) +{ + int ring_right = region_code(q, x - pb[4], y); //x-pb[4]是标记环右边的左侧 + int stone = region_code(q, x - pb[4] - pb[3] - pb[2], y); //实心点左侧 + int ring_left = region_code(q, x - pb[4] - pb[3] - pb[2] - pb[1] - pb[0], y); //环左侧 + struct quirc_region *stone_reg; + struct quirc_region *ring_reg; + int ratio; + //以下检测顶点标记是否符合规范,环称为ring,中间称为stone + if (ring_left < 0 || ring_right < 0 || stone < 0) + return; + + /* Left and ring of ring should be connected */ + if (ring_left != ring_right) + return; + + /* Ring should be disconnected from stone */ + if (ring_left == stone) + return; + + stone_reg = &q->regions[stone]; + ring_reg = &q->regions[ring_left]; + + /* Already detected */ + if (stone_reg->capstone >= 0 || ring_reg->capstone >= 0) + return; + + /* Ratio should ideally be 37.5 中间实心点占面积比例应该在37.5%左右*/ + ratio = stone_reg->count * 100 / ring_reg->count; + if (ratio < 10 || ratio > 70) + return; + + record_capstone(q, ring_left, stone); +} + +static void finder_scan(struct quirc *q, int y) +{ + quirc_pixel_t *row = q->pixels + y * q->w; + int x; + int last_color = 0; + int run_length = 0; + int run_count = 0; + int pb[5]; //means QRcode's pixel width + + memset(pb, 0, sizeof(pb)); + for (x = 0; x < q->w; x++) + { + int color = row[x] ? 1 : 0; + + if (x && color != last_color) + { // color is different + memmove(pb, pb + 1, sizeof(pb[0]) * 4); //left move in one data + pb[4] = run_length; //run how many pix to get different color + run_length = 0; + run_count++; //get more than 5 time color jump + + if (!color && run_count >= 5) + { // find the marker of QRcode(three corner's marker) + static int check[5] = {1, 1, 3, 1, 1}; + int avg, err; + int i; + int ok = 1; + + avg = (pb[0] + pb[1] + pb[3] + pb[4]) / 4; + err = avg * 3 / 4; + + for (i = 0; i < 5; i++) + if (pb[i] < check[i] * avg - err || + pb[i] > check[i] * avg + err) + ok = 0; + + if (ok) + test_capstone(q, x, y, pb); + } + } + + run_length++; + last_color = color; + } +} + +static void find_alignment_pattern(struct quirc *q, int index) +{ + struct quirc_grid *qr = &q->grids[index]; + struct quirc_capstone *c0 = &q->capstones[qr->caps[0]]; + struct quirc_capstone *c2 = &q->capstones[qr->caps[2]]; + struct quirc_point a; + struct quirc_point b; + struct quirc_point c; + int size_estimate; + int step_size = 1; + int dir = 0; + float u, v; + + /* Grab our previous estimate of the alignment pattern corner */ + memcpy(&b, &qr->align, sizeof(b)); + + /* Guess another two corners of the alignment pattern so that we + * can estimate its size. + */ + perspective_unmap(c0->c, &b, &u, &v); + perspective_map(c0->c, u, v + 1.0, &a); + perspective_unmap(c2->c, &b, &u, &v); + perspective_map(c2->c, u + 1.0, v, &c); + + size_estimate = abs((a.x - b.x) * -(c.y - b.y) + + (a.y - b.y) * (c.x - b.x)); + + /* Spiral outwards from the estimate point until we find something + * roughly the right size. Don't look too far from the estimate + * point. + */ + while (step_size * step_size < size_estimate * 100) + { + static const int dx_map[] = {1, 0, -1, 0}; + static const int dy_map[] = {0, -1, 0, 1}; + int i; + + for (i = 0; i < step_size; i++) + { + int code = region_code(q, b.x, b.y); + + if (code >= 0) + { + struct quirc_region *reg = &q->regions[code]; + + if (reg->count >= size_estimate / 2 && + reg->count <= size_estimate * 2) + { + qr->align_region = code; + return; + } + } + + b.x += dx_map[dir]; + b.y += dy_map[dir]; + } + + dir = (dir + 1) % 4; + if (!(dir & 1)) + step_size++; + } +} + +static void find_leftmost_to_line(void *user_data, int y, int left, int right) +{ + struct polygon_score_data *psd = + (struct polygon_score_data *)user_data; + int xs[2] = {left, right}; + int i; + + for (i = 0; i < 2; i++) + { + int d = -psd->ref.y * xs[i] + psd->ref.x * y; + + if (d < psd->scores[0]) + { + psd->scores[0] = d; + psd->corners[0].x = xs[i]; + psd->corners[0].y = y; + } + } +} + +/* Do a Bresenham scan from one point to another and count the number + * of black/white transitions. + */ +static int timing_scan(const struct quirc *q, + const struct quirc_point *p0, + const struct quirc_point *p1) +{ + int n = p1->x - p0->x; + int d = p1->y - p0->y; + int x = p0->x; + int y = p0->y; + int *dom, *nondom; + int dom_step; + int nondom_step; + int a = 0; + int i; + int run_length = 0; + int count = 0; + + if (p0->x < 0 || p0->y < 0 || p0->x >= q->w || p0->y >= q->h) + return -1; + if (p1->x < 0 || p1->y < 0 || p1->x >= q->w || p1->y >= q->h) + return -1; + + if (abs(n) > abs(d)) + { + int swap = n; + + n = d; + d = swap; + + dom = &x; + nondom = &y; + } + else + { + dom = &y; + nondom = &x; + } + + if (n < 0) + { + n = -n; + nondom_step = -1; + } + else + { + nondom_step = 1; + } + + if (d < 0) + { + d = -d; + dom_step = -1; + } + else + { + dom_step = 1; + } + + x = p0->x; + y = p0->y; + for (i = 0; i <= d; i++) + { + int pixel; + + if (y < 0 || y >= q->h || x < 0 || x >= q->w) + break; + + pixel = q->pixels[y * q->w + x]; + + if (pixel) + { + if (run_length >= 2) + count++; + run_length = 0; + } + else + { + run_length++; + } + + a += n; + *dom += dom_step; + if (a >= d) + { + *nondom += nondom_step; + a -= d; + } + } + + return count; +} + +/* Try the measure the timing pattern for a given QR code. This does + * not require the global perspective to have been set up, but it + * does require that the capstone corners have been set to their + * canonical rotation. + * + * For each capstone, we find a point in the middle of the ring band + * which is nearest the centre of the code. Using these points, we do + * a horizontal and a vertical timing scan. + */ +static int measure_timing_pattern(struct quirc *q, int index) +{ + struct quirc_grid *qr = &q->grids[index]; + int i; + int scan; + int ver; + int size; + + for (i = 0; i < 3; i++) + { + static const float us[] = {6.5, 6.5, 0.5}; + static const float vs[] = {0.5, 6.5, 6.5}; + struct quirc_capstone *cap = &q->capstones[qr->caps[i]]; + + perspective_map(cap->c, us[i], vs[i], &qr->tpep[i]); + } + + qr->hscan = timing_scan(q, &qr->tpep[1], &qr->tpep[2]); + qr->vscan = timing_scan(q, &qr->tpep[1], &qr->tpep[0]); + + scan = qr->hscan; + if (qr->vscan > scan) + scan = qr->vscan; + + /* If neither scan worked, we can't go any further. */ + if (scan < 0) + return -1; + + /* Choose the nearest allowable grid size */ + size = scan * 2 + 13; + ver = (size - 15) / 4; + qr->grid_size = ver * 4 + 17; + + return 0; +} + +/* Read a cell from a grid using the currently set perspective + * transform. Returns +/- 1 for black/white, 0 for cells which are + * out of image bounds. + */ +static int read_cell(const struct quirc *q, int index, int x, int y) +{ + const struct quirc_grid *qr = &q->grids[index]; + struct quirc_point p; + + perspective_map(qr->c, x + 0.5, y + 0.5, &p); + if (p.y < 0 || p.y >= q->h || p.x < 0 || p.x >= q->w) + return 0; + + return q->pixels[p.y * q->w + p.x] ? 1 : -1; +} + +static int fitness_cell(const struct quirc *q, int index, int x, int y) +{ + const struct quirc_grid *qr = &q->grids[index]; + int score = 0; + int u, v; + + for (v = 0; v < 3; v++) + for (u = 0; u < 3; u++) + { + static const float offsets[] = {0.3, 0.5, 0.7}; + struct quirc_point p; + + perspective_map(qr->c, x + offsets[u], + y + offsets[v], &p); + if (p.y < 0 || p.y >= q->h || p.x < 0 || p.x >= q->w) + continue; + + if (q->pixels[p.y * q->w + p.x]) + score++; + else + score--; + } + + return score; +} + +static int fitness_ring(const struct quirc *q, int index, int cx, int cy, + int radius) +{ + int i; + int score = 0; + + for (i = 0; i < radius * 2; i++) + { + score += fitness_cell(q, index, cx - radius + i, cy - radius); + score += fitness_cell(q, index, cx - radius, cy + radius - i); + score += fitness_cell(q, index, cx + radius, cy - radius + i); + score += fitness_cell(q, index, cx + radius - i, cy + radius); + } + + return score; +} + +static int fitness_apat(const struct quirc *q, int index, int cx, int cy) +{ + return fitness_cell(q, index, cx, cy) - + fitness_ring(q, index, cx, cy, 1) + + fitness_ring(q, index, cx, cy, 2); +} + +static int fitness_capstone(const struct quirc *q, int index, int x, int y) +{ + x += 3; + y += 3; + + return fitness_cell(q, index, x, y) + + fitness_ring(q, index, x, y, 1) - + fitness_ring(q, index, x, y, 2) + + fitness_ring(q, index, x, y, 3); +} + +/* Compute a fitness score for the currently configured perspective + * transform, using the features we expect to find by scanning the + * grid. + */ +static int fitness_all(const struct quirc *q, int index) +{ + const struct quirc_grid *qr = &q->grids[index]; + int version = (qr->grid_size - 17) / 4; + const struct quirc_version_info *info = &quirc_version_db[version]; + int score = 0; + int i, j; + int ap_count; + + /* Check the timing pattern */ + for (i = 0; i < qr->grid_size - 14; i++) + { + int expect = (i & 1) ? 1 : -1; + + score += fitness_cell(q, index, i + 7, 6) * expect; + score += fitness_cell(q, index, 6, i + 7) * expect; + } + + /* Check capstones */ + score += fitness_capstone(q, index, 0, 0); + score += fitness_capstone(q, index, qr->grid_size - 7, 0); + score += fitness_capstone(q, index, 0, qr->grid_size - 7); + + if (version < 0 || version > QUIRC_MAX_VERSION) + return score; + + /* Check alignment patterns */ + ap_count = 0; + while ((ap_count < QUIRC_MAX_ALIGNMENT) && info->apat[ap_count]) + ap_count++; + + for (i = 1; i + 1 < ap_count; i++) + { + score += fitness_apat(q, index, 6, info->apat[i]); + score += fitness_apat(q, index, info->apat[i], 6); + } + + for (i = 1; i < ap_count; i++) + for (j = 1; j < ap_count; j++) + score += fitness_apat(q, index, + info->apat[i], info->apat[j]); + //mp_printf(&mp_plat_print, "##score=%d\n",score); + return score; +} + +static void jiggle_perspective(struct quirc *q, int index) +{ + struct quirc_grid *qr = &q->grids[index]; + int best = fitness_all(q, index); + int pass; + float adjustments[8]; + int i; + + for (i = 0; i < 8; i++) + adjustments[i] = qr->c[i] * 0.02; + + for (pass = 0; pass < 5; pass++) + { + for (i = 0; i < 16; i++) + { + int j = i >> 1; + int test; + float old = qr->c[j]; + float step = adjustments[j]; + float new; + + if (i & 1) + new = old + step; + else + new = old - step; + + qr->c[j] = new; + test = fitness_all(q, index); + + if (test > best) + best = test; + else + qr->c[j] = old; + } + + for (i = 0; i < 8; i++) + adjustments[i] *= 0.5; + } +} + +/* Once the capstones are in place and an alignment point has been + * chosen, we call this function to set up a grid-reading perspective + * transform. + */ +static void setup_qr_perspective(struct quirc *q, int index) +{ + struct quirc_grid *qr = &q->grids[index]; + struct quirc_point rect[4]; + + /* Set up the perspective map for reading the grid */ + memcpy(&rect[0], &q->capstones[qr->caps[1]].corners[0], + sizeof(rect[0])); + memcpy(&rect[1], &q->capstones[qr->caps[2]].corners[0], + sizeof(rect[0])); + memcpy(&rect[2], &qr->align, sizeof(rect[0])); + memcpy(&rect[3], &q->capstones[qr->caps[0]].corners[0], + sizeof(rect[0])); + perspective_setup(qr->c, rect, qr->grid_size - 7, qr->grid_size - 7); + + jiggle_perspective(q, index); +} + +/* Rotate the capstone with so that corner 0 is the leftmost with respect + * to the given reference line. + */ +static void rotate_capstone(struct quirc_capstone *cap, + const struct quirc_point *h0, + const struct quirc_point *hd) +{ + struct quirc_point copy[4]; + int j; + int best = 0; + int best_score = 0; + + for (j = 0; j < 4; j++) + { + struct quirc_point *p = &cap->corners[j]; + int score = (p->x - h0->x) * -hd->y + + (p->y - h0->y) * hd->x; + + if (!j || score < best_score) + { + best = j; + best_score = score; + } + } + + /* Rotate the capstone */ + for (j = 0; j < 4; j++) + memcpy(©[j], &cap->corners[(j + best) % 4], + sizeof(copy[j])); + memcpy(cap->corners, copy, sizeof(cap->corners)); + perspective_setup(cap->c, cap->corners, 7.0, 7.0); +} + +static void record_qr_grid(struct quirc *q, int a, int b, int c) +{ + struct quirc_point h0, hd; + int i; + int qr_index; + struct quirc_grid *qr; + + if (q->num_grids >= QUIRC_MAX_GRIDS) + return; + + /* Construct the hypotenuse line from A to C. B should be to + * the left of this line. + */ + memcpy(&h0, &q->capstones[a].center, sizeof(h0)); + hd.x = q->capstones[c].center.x - q->capstones[a].center.x; + hd.y = q->capstones[c].center.y - q->capstones[a].center.y; + + /* Make sure A-B-C is clockwise */ + if ((q->capstones[b].center.x - h0.x) * -hd.y + + (q->capstones[b].center.y - h0.y) * hd.x > + 0) + { + int swap = a; + + a = c; + c = swap; + hd.x = -hd.x; + hd.y = -hd.y; + } + + /* Record the grid and its components */ + qr_index = q->num_grids; + qr = &q->grids[q->num_grids++]; + + memset(qr, 0, sizeof(*qr)); + qr->caps[0] = a; + qr->caps[1] = b; + qr->caps[2] = c; + qr->align_region = -1; + + /* Rotate each capstone so that corner 0 is top-left with respect + * to the grid. + */ + for (i = 0; i < 3; i++) + { + struct quirc_capstone *cap = &q->capstones[qr->caps[i]]; + + rotate_capstone(cap, &h0, &hd); + cap->qr_grid = qr_index; + } + + /* Check the timing pattern. This doesn't require a perspective + * transform. + */ + if (measure_timing_pattern(q, qr_index) < 0) + goto fail; + + /* Make an estimate based for the alignment pattern based on extending + * lines from capstones A and C. + */ + if (!line_intersect(&q->capstones[a].corners[0], + &q->capstones[a].corners[1], + &q->capstones[c].corners[0], + &q->capstones[c].corners[3], + &qr->align)) + goto fail; + + /* On V2+ grids, we should use the alignment pattern. */ + if (qr->grid_size > 21) + { + /* Try to find the actual location of the alignment pattern. */ + find_alignment_pattern(q, qr_index); + + /* Find the point of the alignment pattern closest to the + * top-left of the QR grid. + */ + if (qr->align_region >= 0) + { + struct polygon_score_data psd; + struct quirc_region *reg = + &q->regions[qr->align_region]; + + /* Start from some point inside the alignment pattern */ + memcpy(&qr->align, ®->seed, sizeof(qr->align)); + + memcpy(&psd.ref, &hd, sizeof(psd.ref)); + psd.corners = &qr->align; + psd.scores[0] = -hd.y * qr->align.x + + hd.x * qr->align.y; + + flood_fill_seed(q, reg->seed.x, reg->seed.y, + qr->align_region, QUIRC_PIXEL_BLACK, + NULL, NULL, 0); + flood_fill_seed(q, reg->seed.x, reg->seed.y, + QUIRC_PIXEL_BLACK, qr->align_region, + find_leftmost_to_line, &psd, 0); + } + } + + setup_qr_perspective(q, qr_index); + return; + +fail: + /* We've been unable to complete setup for this grid. Undo what we've + * recorded and pretend it never happened. + */ + for (i = 0; i < 3; i++) + q->capstones[qr->caps[i]].qr_grid = -1; + q->num_grids--; +} + +struct neighbour +{ + int index; + float distance; +} __attribute__((aligned(8))); + +struct neighbour_list +{ + struct neighbour n[QUIRC_MAX_CAPSTONES]; + int count; +} __attribute__((aligned(8))); + +static void test_neighbours(struct quirc *q, int i, + const struct neighbour_list *hlist, + const struct neighbour_list *vlist) +{ + int j, k; + float best_score = 0.0; + int best_h = -1, best_v = -1; + + /* Test each possible grouping */ + for (j = 0; j < hlist->count; j++) + for (k = 0; k < vlist->count; k++) + { + const struct neighbour *hn = &hlist->n[j]; + const struct neighbour *vn = &vlist->n[k]; + float score = fast_fabsf(1.0 - hn->distance / vn->distance); + + if (score > 2.5) + continue; + + if (best_h < 0 || score < best_score) + { + best_h = hn->index; + best_v = vn->index; + best_score = score; + } + } + + if (best_h < 0 || best_v < 0) + return; + + record_qr_grid(q, best_h, i, best_v); +} + +static void test_grouping(struct quirc *q, int i) +{ + struct quirc_capstone *c1 = &q->capstones[i]; + int j; + struct neighbour_list hlist; + struct neighbour_list vlist; + + if (c1->qr_grid >= 0) + return; + + hlist.count = 0; + vlist.count = 0; + + /* Look for potential neighbours by examining the relative gradients + * from this capstone to others. + */ + for (j = 0; j < q->num_capstones; j++) + { + struct quirc_capstone *c2 = &q->capstones[j]; + float u, v; + + if (i == j || c2->qr_grid >= 0) + continue; + + perspective_unmap(c1->c, &c2->center, &u, &v); + + u = fast_fabsf(u - 3.5); + v = fast_fabsf(v - 3.5); + + if (u < 0.2 * v) + { + struct neighbour *n = &hlist.n[hlist.count++]; + + n->index = j; + n->distance = v; + } + + if (v < 0.2 * u) + { + struct neighbour *n = &vlist.n[vlist.count++]; + + n->index = j; + n->distance = u; + } + } + + if (!(hlist.count && vlist.count)) + return; + + test_neighbours(q, i, &hlist, &vlist); +} + +static void pixels_setup(struct quirc *q) +{ + if (sizeof(*q->image) == sizeof(*q->pixels)) + { + q->pixels = (quirc_pixel_t *)q->image; + } + else + { + int x, y; + for (y = 0; y < q->h; y++) + { + for (x = 0; x < q->w; x++) + { + q->pixels[y * q->w + x] = q->image[y * q->w + x]; + } + } + } +} + +uint8_t *quirc_begin(struct quirc *q, int *w, int *h) +{ + q->num_regions = QUIRC_PIXEL_REGION; + q->num_capstones = 0; + q->num_grids = 0; + + if (w) + *w = q->w; + if (h) + *h = q->h; + + return q->image; +} + +void quirc_end(struct quirc *q) +{ + int i; + pixels_setup(q); + threshold(q); + + for (i = 0; i < q->h; i++) + { + finder_scan(q, i); + } + + for (i = 0; i < q->num_capstones; i++) + { + test_grouping(q, i); + } +} + +void quirc_extract(const struct quirc *q, int index, + struct quirc_code *code) +{ + const struct quirc_grid *qr = &q->grids[index]; + int y; + int i = 0; + + if (index < 0 || index > q->num_grids) + return; + + memset(code, 0, sizeof(*code)); + + perspective_map(qr->c, 0.0, 0.0, &code->corners[0]); + perspective_map(qr->c, qr->grid_size, 0.0, &code->corners[1]); + perspective_map(qr->c, qr->grid_size, qr->grid_size, + &code->corners[2]); + perspective_map(qr->c, 0.0, qr->grid_size, &code->corners[3]); + + code->size = qr->grid_size; + + for (y = 0; y < qr->grid_size; y++) + { + int x; + + for (x = 0; x < qr->grid_size; x++) + { + if (read_cell(q, index, x, y) > 0) + code->cell_bitmap[i >> 3] |= (1 << (i & 7)); + + i++; + } + } +} diff --git a/ESP32QRReaderDBWriter/quirc.c b/ESP32QRReaderDBWriter/quirc.c new file mode 100644 index 0000000..e5a30fb --- /dev/null +++ b/ESP32QRReaderDBWriter/quirc.c @@ -0,0 +1,104 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include "quirc_internal.h" +#include + +const char *quirc_version(void) +{ + return "1.0"; +} + +//static struct quirc _q; +struct quirc *quirc_new(void) +{ + struct quirc *q = ps_malloc(sizeof(*q)); + + if (!q) + return NULL; + + memset(q, 0, sizeof(*q)); + return q; +} + +void quirc_destroy(struct quirc *q) +{ + if (q->image) + if (q->image) + free(q->image); + if (sizeof(*q->image) != sizeof(*q->pixels)) + if (q->pixels) + free(q->pixels); + + if (q) + free(q); +} + +//static quirc_pixel_t img_buf[320*240]; +int quirc_resize(struct quirc *q, int w, int h) +{ + if (q->image) + { + free(q->image); + } + uint8_t *new_image = ps_malloc(w * h); + + if (!new_image) + return -1; + + if (sizeof(*q->image) != sizeof(*q->pixels)) + { //should gray, 1==1 + size_t new_size = w * h * sizeof(quirc_pixel_t); + if (q->pixels) + free(q->pixels); + quirc_pixel_t *new_pixels = ps_malloc(new_size); + if (!new_pixels) + { + free(new_image); + return -1; + } + q->pixels = new_pixels; + } + q->image = new_image; + q->w = w; + q->h = h; + return 0; +} + +int quirc_count(const struct quirc *q) +{ + return q->num_grids; +} + +static const char *const error_table[] = { + [QUIRC_SUCCESS] = "Success", + [QUIRC_ERROR_INVALID_GRID_SIZE] = "Invalid grid size", + [QUIRC_ERROR_INVALID_VERSION] = "Invalid version", + [QUIRC_ERROR_FORMAT_ECC] = "Format data ECC failure", + [QUIRC_ERROR_DATA_ECC] = "ECC failure", + [QUIRC_ERROR_UNKNOWN_DATA_TYPE] = "Unknown data type", + [QUIRC_ERROR_DATA_OVERFLOW] = "Data overflow", + [QUIRC_ERROR_DATA_UNDERFLOW] = "Data underflow"}; + +const char *quirc_strerror(quirc_decode_error_t err) +{ + if (err >= 0 && err < sizeof(error_table) / sizeof(error_table[0])) + return error_table[err]; + + return "Unknown error"; +} diff --git a/ESP32QRReaderDBWriter/quirc.h b/ESP32QRReaderDBWriter/quirc.h new file mode 100644 index 0000000..ecdc172 --- /dev/null +++ b/ESP32QRReaderDBWriter/quirc.h @@ -0,0 +1,178 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef QUIRC_H_ +#define QUIRC_H_ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + + struct quirc; + + /* Obtain the library version string. */ + const char *quirc_version(void); + + /* Construct a new QR-code recognizer. This function will return NULL + * if sufficient memory could not be allocated. + */ + struct quirc *quirc_new(void); + + /* Destroy a QR-code recognizer. */ + void quirc_destroy(struct quirc *q); + + /* Resize the QR-code recognizer. The size of an image must be + * specified before codes can be analyzed. + * + * This function returns 0 on success, or -1 if sufficient memory could + * not be allocated. + */ + int quirc_resize(struct quirc *q, int w, int h); + + /* These functions are used to process images for QR-code recognition. + * quirc_begin() must first be called to obtain access to a buffer into + * which the input image should be placed. Optionally, the current + * width and height may be returned. + * + * After filling the buffer, quirc_end() should be called to process + * the image for QR-code recognition. The locations and content of each + * code may be obtained using accessor functions described below. + */ + uint8_t *quirc_begin(struct quirc *q, int *w, int *h); + void quirc_end(struct quirc *q); + + /* This structure describes a location in the input image buffer. */ + struct quirc_point + { + int x; + int y; + } __attribute__((aligned(8))); + + /* This enum describes the various decoder errors which may occur. */ + typedef enum + { + QUIRC_SUCCESS = 0, + QUIRC_ERROR_INVALID_GRID_SIZE, + QUIRC_ERROR_INVALID_VERSION, + QUIRC_ERROR_FORMAT_ECC, + QUIRC_ERROR_DATA_ECC, + QUIRC_ERROR_UNKNOWN_DATA_TYPE, + QUIRC_ERROR_DATA_OVERFLOW, + QUIRC_ERROR_DATA_UNDERFLOW + } quirc_decode_error_t; + + /* Return a string error message for an error code. */ + const char *quirc_strerror(quirc_decode_error_t err); + +/* Limits on the maximum size of QR-codes and their content. */ +#define QUIRC_MAX_BITMAP 3917 +#define QUIRC_MAX_PAYLOAD 8896 + +/* QR-code ECC types. */ +#define QUIRC_ECC_LEVEL_M 0 +#define QUIRC_ECC_LEVEL_L 1 +#define QUIRC_ECC_LEVEL_H 2 +#define QUIRC_ECC_LEVEL_Q 3 + +/* QR-code data types. */ +#define QUIRC_DATA_TYPE_NUMERIC 1 +#define QUIRC_DATA_TYPE_ALPHA 2 +#define QUIRC_DATA_TYPE_BYTE 4 +#define QUIRC_DATA_TYPE_KANJI 8 + +/* Common character encodings */ +#define QUIRC_ECI_ISO_8859_1 1 +#define QUIRC_ECI_IBM437 2 +#define QUIRC_ECI_ISO_8859_2 4 +#define QUIRC_ECI_ISO_8859_3 5 +#define QUIRC_ECI_ISO_8859_4 6 +#define QUIRC_ECI_ISO_8859_5 7 +#define QUIRC_ECI_ISO_8859_6 8 +#define QUIRC_ECI_ISO_8859_7 9 +#define QUIRC_ECI_ISO_8859_8 10 +#define QUIRC_ECI_ISO_8859_9 11 +#define QUIRC_ECI_WINDOWS_874 13 +#define QUIRC_ECI_ISO_8859_13 15 +#define QUIRC_ECI_ISO_8859_15 17 +#define QUIRC_ECI_SHIFT_JIS 20 +#define QUIRC_ECI_UTF_8 26 + + /* This structure is used to return information about detected QR codes + * in the input image. + */ + struct quirc_code + { + /* The four corners of the QR-code, from top left, clockwise */ + struct quirc_point corners[4]; + + /* The number of cells across in the QR-code. The cell bitmap + * is a bitmask giving the actual values of cells. If the cell + * at (x, y) is black, then the following bit is set: + * + * cell_bitmap[i >> 3] & (1 << (i & 7)) + * + * where i = (y * size) + x. + */ + int size; + uint8_t cell_bitmap[QUIRC_MAX_BITMAP]; + } __attribute__((aligned(8))); + + /* This structure holds the decoded QR-code data */ + struct quirc_data + { + /* Various parameters of the QR-code. These can mostly be + * ignored if you only care about the data. + */ + int version; + int ecc_level; + int mask; + + /* This field is the highest-valued data type found in the QR + * code. + */ + int data_type; + + /* Data payload. For the Kanji datatype, payload is encoded as + * Shift-JIS. For all other datatypes, payload is ASCII text. + */ + uint8_t payload[QUIRC_MAX_PAYLOAD]; + int payload_len; + + /* ECI assignment number */ + uint32_t eci; + } __attribute__((aligned(8))); + + /* Return the number of QR-codes identified in the last processed + * image. + */ + int quirc_count(const struct quirc *q); + + /* Extract the QR-code specified by the given index. */ + void quirc_extract(const struct quirc *q, int index, + struct quirc_code *code); + + /* Decode a QR-code, returning the payload data. */ + quirc_decode_error_t quirc_decode(const struct quirc_code *code, + struct quirc_data *data); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/ESP32QRReaderDBWriter/quirc_internal.h b/ESP32QRReaderDBWriter/quirc_internal.h new file mode 100644 index 0000000..3fa075c --- /dev/null +++ b/ESP32QRReaderDBWriter/quirc_internal.h @@ -0,0 +1,121 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef QUIRC_INTERNAL_H_ +#define QUIRC_INTERNAL_H_ + +#include "quirc.h" + +#define QUIRC_PIXEL_WHITE 0 +#define QUIRC_PIXEL_BLACK 1 +#define QUIRC_PIXEL_REGION 2 + +#ifndef QUIRC_MAX_REGIONS +#define QUIRC_MAX_REGIONS 254 +#endif + +#define QUIRC_MAX_CAPSTONES 32 +#define QUIRC_MAX_GRIDS 8 + +#define QUIRC_PERSPECTIVE_PARAMS 8 + +#if QUIRC_MAX_REGIONS < UINT8_MAX +typedef uint8_t quirc_pixel_t; +#elif QUIRC_MAX_REGIONS < UINT16_MAX +typedef uint16_t quirc_pixel_t; +#else +#error "QUIRC_MAX_REGIONS > 65534 is not supported" +#endif + +struct quirc_region +{ + struct quirc_point seed; + int count; + int capstone; +} __attribute__((aligned(8))); + +struct quirc_capstone +{ + int ring; + int stone; + + struct quirc_point corners[4]; + struct quirc_point center; + float c[QUIRC_PERSPECTIVE_PARAMS]; + + int qr_grid; +} __attribute__((aligned(8))); + +struct quirc_grid +{ + /* Capstone indices */ + int caps[3]; + + /* Alignment pattern region and corner */ + int align_region; + struct quirc_point align; + + /* Timing pattern endpoints */ + struct quirc_point tpep[3]; + int hscan; + int vscan; + + /* Grid size and perspective transform */ + int grid_size; + float c[QUIRC_PERSPECTIVE_PARAMS]; +} __attribute__((aligned(8))); + +struct quirc +{ + uint8_t *image; + quirc_pixel_t *pixels; + int w; + int h; + + int num_regions; + struct quirc_region regions[QUIRC_MAX_REGIONS]; + + int num_capstones; + struct quirc_capstone capstones[QUIRC_MAX_CAPSTONES]; + + int num_grids; + struct quirc_grid grids[QUIRC_MAX_GRIDS]; +} __attribute__((aligned(8))); + +/************************************************************************ + * QR-code version information database + */ + +#define QUIRC_MAX_VERSION 40 +#define QUIRC_MAX_ALIGNMENT 7 + +struct quirc_rs_params +{ + uint8_t bs; /* Small block size */ + uint8_t dw; /* Small data words */ + uint8_t ns; /* Number of small blocks */ +} __attribute__((aligned(8))); + +struct quirc_version_info +{ + uint16_t data_bytes; + uint8_t apat[QUIRC_MAX_ALIGNMENT]; + struct quirc_rs_params ecc[4]; +} __attribute__((aligned(8))); + +extern const struct quirc_version_info quirc_version_db[QUIRC_MAX_VERSION + 1]; + +#endif \ No newline at end of file diff --git a/ESP32QRReaderDBWriter/version_db.c b/ESP32QRReaderDBWriter/version_db.c new file mode 100644 index 0000000..0da2d07 --- /dev/null +++ b/ESP32QRReaderDBWriter/version_db.c @@ -0,0 +1,184 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "quirc_internal.h" + +const struct quirc_version_info quirc_version_db[QUIRC_MAX_VERSION + 1] = { + {0}, + {/* Version 1 */ + .data_bytes = 26, + .apat = {0}, + .ecc = { + {.bs = 26, .dw = 16, .ns = 1}, + {.bs = 26, .dw = 19, .ns = 1}, + {.bs = 26, .dw = 9, .ns = 1}, + {.bs = 26, .dw = 13, .ns = 1}}}, + {/* Version 2 */ + .data_bytes = 44, + .apat = {6, 18, 0}, + .ecc = {{.bs = 44, .dw = 28, .ns = 1}, {.bs = 44, .dw = 34, .ns = 1}, {.bs = 44, .dw = 16, .ns = 1}, {.bs = 44, .dw = 22, .ns = 1}}}, + {/* Version 3 */ + .data_bytes = 70, + .apat = {6, 22, 0}, + .ecc = {{.bs = 70, .dw = 44, .ns = 1}, {.bs = 70, .dw = 55, .ns = 1}, {.bs = 35, .dw = 13, .ns = 2}, {.bs = 35, .dw = 17, .ns = 2}}}, + {/* Version 4 */ + .data_bytes = 100, + .apat = {6, 26, 0}, + .ecc = {{.bs = 50, .dw = 32, .ns = 2}, {.bs = 100, .dw = 80, .ns = 1}, {.bs = 25, .dw = 9, .ns = 4}, {.bs = 50, .dw = 24, .ns = 2}}}, + {/* Version 5 */ + .data_bytes = 134, + .apat = {6, 30, 0}, + .ecc = {{.bs = 67, .dw = 43, .ns = 2}, {.bs = 134, .dw = 108, .ns = 1}, {.bs = 33, .dw = 11, .ns = 2}, {.bs = 33, .dw = 15, .ns = 2}}}, + {/* Version 6 */ + .data_bytes = 172, + .apat = {6, 34, 0}, + .ecc = {{.bs = 43, .dw = 27, .ns = 4}, {.bs = 86, .dw = 68, .ns = 2}, {.bs = 43, .dw = 15, .ns = 4}, {.bs = 43, .dw = 19, .ns = 4}}}, + {/* Version 7 */ + .data_bytes = 196, + .apat = {6, 22, 38, 0}, + .ecc = {{.bs = 49, .dw = 31, .ns = 4}, {.bs = 98, .dw = 78, .ns = 2}, {.bs = 39, .dw = 13, .ns = 4}, {.bs = 32, .dw = 14, .ns = 2}}}, + {/* Version 8 */ + .data_bytes = 242, + .apat = {6, 24, 42, 0}, + .ecc = {{.bs = 60, .dw = 38, .ns = 2}, {.bs = 121, .dw = 97, .ns = 2}, {.bs = 40, .dw = 14, .ns = 4}, {.bs = 40, .dw = 18, .ns = 4}}}, + {/* Version 9 */ + .data_bytes = 292, + .apat = {6, 26, 46, 0}, + .ecc = {{.bs = 58, .dw = 36, .ns = 3}, {.bs = 146, .dw = 116, .ns = 2}, {.bs = 36, .dw = 12, .ns = 4}, {.bs = 36, .dw = 16, .ns = 4}}}, + {/* Version 10 */ + .data_bytes = 346, + .apat = {6, 28, 50, 0}, + .ecc = {{.bs = 69, .dw = 43, .ns = 4}, {.bs = 86, .dw = 68, .ns = 2}, {.bs = 43, .dw = 15, .ns = 6}, {.bs = 43, .dw = 19, .ns = 6}}}, + {/* Version 11 */ + .data_bytes = 404, + .apat = {6, 30, 54, 0}, + .ecc = {{.bs = 80, .dw = 50, .ns = 1}, {.bs = 101, .dw = 81, .ns = 4}, {.bs = 36, .dw = 12, .ns = 3}, {.bs = 50, .dw = 22, .ns = 4}}}, + {/* Version 12 */ + .data_bytes = 466, + .apat = {6, 32, 58, 0}, + .ecc = {{.bs = 58, .dw = 36, .ns = 6}, {.bs = 116, .dw = 92, .ns = 2}, {.bs = 42, .dw = 14, .ns = 7}, {.bs = 46, .dw = 20, .ns = 4}}}, + {/* Version 13 */ + .data_bytes = 532, + .apat = {6, 34, 62, 0}, + .ecc = {{.bs = 59, .dw = 37, .ns = 8}, {.bs = 133, .dw = 107, .ns = 4}, {.bs = 33, .dw = 11, .ns = 12}, {.bs = 44, .dw = 20, .ns = 8}}}, + {/* Version 14 */ + .data_bytes = 581, + .apat = {6, 26, 46, 66, 0}, + .ecc = {{.bs = 64, .dw = 40, .ns = 4}, {.bs = 145, .dw = 115, .ns = 3}, {.bs = 36, .dw = 12, .ns = 11}, {.bs = 36, .dw = 16, .ns = 11}}}, + {/* Version 15 */ + .data_bytes = 655, + .apat = {6, 26, 48, 70, 0}, + .ecc = {{.bs = 65, .dw = 41, .ns = 5}, {.bs = 109, .dw = 87, .ns = 5}, {.bs = 36, .dw = 12, .ns = 11}, {.bs = 54, .dw = 24, .ns = 5}}}, + {/* Version 16 */ + .data_bytes = 733, + .apat = {6, 26, 50, 74, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 7}, {.bs = 122, .dw = 98, .ns = 5}, {.bs = 45, .dw = 15, .ns = 3}, {.bs = 43, .dw = 19, .ns = 15}}}, + {/* Version 17 */ + .data_bytes = 815, + .apat = {6, 30, 54, 78, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 10}, {.bs = 135, .dw = 107, .ns = 1}, {.bs = 42, .dw = 14, .ns = 2}, {.bs = 50, .dw = 22, .ns = 1}}}, + {/* Version 18 */ + .data_bytes = 901, + .apat = {6, 30, 56, 82, 0}, + .ecc = {{.bs = 69, .dw = 43, .ns = 9}, {.bs = 150, .dw = 120, .ns = 5}, {.bs = 42, .dw = 14, .ns = 2}, {.bs = 50, .dw = 22, .ns = 17}}}, + {/* Version 19 */ + .data_bytes = 991, + .apat = {6, 30, 58, 86, 0}, + .ecc = {{.bs = 70, .dw = 44, .ns = 3}, {.bs = 141, .dw = 113, .ns = 3}, {.bs = 39, .dw = 13, .ns = 9}, {.bs = 47, .dw = 21, .ns = 17}}}, + {/* Version 20 */ + .data_bytes = 1085, + .apat = {6, 34, 62, 90, 0}, + .ecc = {{.bs = 67, .dw = 41, .ns = 3}, {.bs = 135, .dw = 107, .ns = 3}, {.bs = 43, .dw = 15, .ns = 15}, {.bs = 54, .dw = 24, .ns = 15}}}, + {/* Version 21 */ + .data_bytes = 1156, + .apat = {6, 28, 50, 72, 92, 0}, + .ecc = {{.bs = 68, .dw = 42, .ns = 17}, {.bs = 144, .dw = 116, .ns = 4}, {.bs = 46, .dw = 16, .ns = 19}, {.bs = 50, .dw = 22, .ns = 17}}}, + {/* Version 22 */ + .data_bytes = 1258, + .apat = {6, 26, 50, 74, 98, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 17}, {.bs = 139, .dw = 111, .ns = 2}, {.bs = 37, .dw = 13, .ns = 34}, {.bs = 54, .dw = 24, .ns = 7}}}, + {/* Version 23 */ + .data_bytes = 1364, + .apat = {6, 30, 54, 78, 102, 0}, + .ecc = {{.bs = 75, .dw = 47, .ns = 4}, {.bs = 151, .dw = 121, .ns = 4}, {.bs = 45, .dw = 15, .ns = 16}, {.bs = 54, .dw = 24, .ns = 11}}}, + {/* Version 24 */ + .data_bytes = 1474, + .apat = {6, 28, 54, 80, 106, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 6}, {.bs = 147, .dw = 117, .ns = 6}, {.bs = 46, .dw = 16, .ns = 30}, {.bs = 54, .dw = 24, .ns = 11}}}, + {/* Version 25 */ + .data_bytes = 1588, + .apat = {6, 32, 58, 84, 110, 0}, + .ecc = {{.bs = 75, .dw = 47, .ns = 8}, {.bs = 132, .dw = 106, .ns = 8}, {.bs = 45, .dw = 15, .ns = 22}, {.bs = 54, .dw = 24, .ns = 7}}}, + {/* Version 26 */ + .data_bytes = 1706, + .apat = {6, 30, 58, 86, 114, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 19}, {.bs = 142, .dw = 114, .ns = 10}, {.bs = 46, .dw = 16, .ns = 33}, {.bs = 50, .dw = 22, .ns = 28}}}, + {/* Version 27 */ + .data_bytes = 1828, + .apat = {6, 34, 62, 90, 118, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 22}, {.bs = 152, .dw = 122, .ns = 8}, {.bs = 45, .dw = 15, .ns = 12}, {.bs = 53, .dw = 23, .ns = 8}}}, + {/* Version 28 */ + .data_bytes = 1921, + .apat = {6, 26, 50, 74, 98, 122, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 3}, {.bs = 147, .dw = 117, .ns = 3}, {.bs = 45, .dw = 15, .ns = 11}, {.bs = 54, .dw = 24, .ns = 4}}}, + {/* Version 29 */ + .data_bytes = 2051, + .apat = {6, 30, 54, 78, 102, 126, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 21}, {.bs = 146, .dw = 116, .ns = 7}, {.bs = 45, .dw = 15, .ns = 19}, {.bs = 53, .dw = 23, .ns = 1}}}, + {/* Version 30 */ + .data_bytes = 2185, + .apat = {6, 26, 52, 78, 104, 130, 0}, + .ecc = {{.bs = 75, .dw = 47, .ns = 19}, {.bs = 145, .dw = 115, .ns = 5}, {.bs = 45, .dw = 15, .ns = 23}, {.bs = 54, .dw = 24, .ns = 15}}}, + {/* Version 31 */ + .data_bytes = 2323, + .apat = {6, 30, 56, 82, 108, 134, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 2}, {.bs = 145, .dw = 115, .ns = 13}, {.bs = 45, .dw = 15, .ns = 23}, {.bs = 54, .dw = 24, .ns = 42}}}, + {/* Version 32 */ + .data_bytes = 2465, + .apat = {6, 34, 60, 86, 112, 138, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 10}, {.bs = 145, .dw = 115, .ns = 17}, {.bs = 45, .dw = 15, .ns = 19}, {.bs = 54, .dw = 24, .ns = 10}}}, + {/* Version 33 */ + .data_bytes = 2611, + .apat = {6, 30, 58, 86, 114, 142, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 14}, {.bs = 145, .dw = 115, .ns = 17}, {.bs = 45, .dw = 15, .ns = 11}, {.bs = 54, .dw = 24, .ns = 29}}}, + {/* Version 34 */ + .data_bytes = 2761, + .apat = {6, 34, 62, 90, 118, 146, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 14}, {.bs = 145, .dw = 115, .ns = 13}, {.bs = 46, .dw = 16, .ns = 59}, {.bs = 54, .dw = 24, .ns = 44}}}, + {/* Version 35 */ + .data_bytes = 2876, + .apat = {6, 30, 54, 78, 102, 126, 150}, + .ecc = {{.bs = 75, .dw = 47, .ns = 12}, {.bs = 151, .dw = 121, .ns = 12}, {.bs = 45, .dw = 15, .ns = 22}, {.bs = 54, .dw = 24, .ns = 39}}}, + {/* Version 36 */ + .data_bytes = 3034, + .apat = {6, 24, 50, 76, 102, 128, 154}, + .ecc = {{.bs = 75, .dw = 47, .ns = 6}, {.bs = 151, .dw = 121, .ns = 6}, {.bs = 45, .dw = 15, .ns = 2}, {.bs = 54, .dw = 24, .ns = 46}}}, + {/* Version 37 */ + .data_bytes = 3196, + .apat = {6, 28, 54, 80, 106, 132, 158}, + .ecc = {{.bs = 74, .dw = 46, .ns = 29}, {.bs = 152, .dw = 122, .ns = 17}, {.bs = 45, .dw = 15, .ns = 24}, {.bs = 54, .dw = 24, .ns = 49}}}, + {/* Version 38 */ + .data_bytes = 3362, + .apat = {6, 32, 58, 84, 110, 136, 162}, + .ecc = {{.bs = 74, .dw = 46, .ns = 13}, {.bs = 152, .dw = 122, .ns = 4}, {.bs = 45, .dw = 15, .ns = 42}, {.bs = 54, .dw = 24, .ns = 48}}}, + {/* Version 39 */ + .data_bytes = 3532, + .apat = {6, 26, 54, 82, 110, 138, 166}, + .ecc = {{.bs = 75, .dw = 47, .ns = 40}, {.bs = 147, .dw = 117, .ns = 20}, {.bs = 45, .dw = 15, .ns = 10}, {.bs = 54, .dw = 24, .ns = 43}}}, + {/* Version 40 */ + .data_bytes = 3706, + .apat = {6, 30, 58, 86, 114, 142, 170}, + .ecc = {{.bs = 75, .dw = 47, .ns = 18}, {.bs = 148, .dw = 118, .ns = 19}, {.bs = 45, .dw = 15, .ns = 20}, {.bs = 54, .dw = 24, .ns = 34}}}}; diff --git a/ESP32QRReaderDBWriterVideoStreamer/Credentials.h b/ESP32QRReaderDBWriterVideoStreamer/Credentials.h new file mode 100644 index 0000000..a84ee28 --- /dev/null +++ b/ESP32QRReaderDBWriterVideoStreamer/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "cpsNUCwifi"; // your network SSID (name) +char pass[] = "ips999CPS"; // your network password + +char user[] = "db_user"; // MySQL user login username +char password[] = "db_password"; // MySQL user login password + +#endif //Credentials_h diff --git a/ESP32QRReaderDBWriterVideoStreamer/ESP32QRReaderDBWriterVideoStreamer.ino b/ESP32QRReaderDBWriterVideoStreamer/ESP32QRReaderDBWriterVideoStreamer.ino new file mode 100644 index 0000000..b1872cb --- /dev/null +++ b/ESP32QRReaderDBWriterVideoStreamer/ESP32QRReaderDBWriterVideoStreamer.ino @@ -0,0 +1,740 @@ +/* +ESP32-CAM QR code Reader +Author : ChungYi Fu (Kaohsiung, Taiwan) 2021-8-13 20:00 +https://www.facebook.com/francefu + +Refer to the code +https://github.com/alvarowolfx/ESP32QRCodeReader + +自訂指令格式 http://192.168.xxx.xxx/control?cmd=P1;P2;P3;P4;P5;P6;P7;P8;P9 + +http://192.168.xxx.xxx/?ip //取得APIP, STAIP +http://192.168.xxx.xxx/?mac //取得MAC位址 +http://192.168.xxx.xxx/?digitalwrite=pin;value //數位輸出 +http://192.168.xxx.xxx/?analogwrite=pin;value //類比輸出 +http://192.168.xxx.xxx/?digitalread=pin //數位讀取 +http://192.168.xxx.xxx/?analogread=pin //類比讀取 +http://192.168.xxx.xxx/?touchread=pin //觸碰讀取 +http://192.168.xxx.xxx/?restart //重啟電源 +http://192.168.xxx.xxx/?flash=value //閃光燈 value= 0~255 +http://192.168.xxx.xxx/?servo=pin;value //伺服馬達 value= 0~180 +http://192.168.xxx.xxx/?relay=pin;value //繼電器 value = 0, 1 +http://192.168.xxx.xxx/?uart=value //序列埠 +*/ + + +/********* + Rui Santos + Complete project details at https://RandomNerdTutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/ + + IMPORTANT!!! + - Select Board "AI Thinker ESP32-CAM" + - GPIO 0 must be connected to GND to upload a sketch + - After connecting GPIO 0 to GND, press the ESP32-CAM on-board RESET button to put your board in flashing mode + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files. + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. +*********/ + + + +// Serial.printf(); kann anscheinend keine Strings ausgeben, die länger als 13 Zeichen sind -> dadurch gehts: Serial.printf("Insertcommand: %s\n:", INSERT_SQL.c_str()); + +#include "esp_camera.h" //視訊函式 +//#include "soc/soc.h" //用於電源不穩不重開機 +#include "soc/rtc_cntl_reg.h" //用於電源不穩不重開機 +#include "quirc.h" + +//Includes&defines etc für den MariaDB Entry ########################################################### +#include "defines.h" +#include "Credentials.h" + + + + + + +#include + +#define USING_HOST_NAME false + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(10, 42, 0, 1); +#endif + +uint16_t server_port = 3306; //5698; + +char default_database[] = "myTestDb"; //"test_arduino"; +char default_table[] = "myTestTable"; //"test_arduino"; + +String default_value = "defaultString"; + +// Sample query +String INSERT_SQL = String("INSERT INTO ") + default_database + "." + default_table + + " (qrCodeText) VALUES ('" + default_value + "')"; + + +#define LED_BUILTIN 4 //die Zeile wird für das LED benötigt + + +MySQL_Connection conn((Client *)&client); + +MySQL_Query *query_mem; +//Includes&defines etc für den MariaDB Entry - ENDE #################################################### + +TaskHandle_t Task; + +//ESP32-CAM 安信可模組腳位設定 +#define PWDN_GPIO_NUM 32 +#define RESET_GPIO_NUM -1 +#define XCLK_GPIO_NUM 0 +#define SIOD_GPIO_NUM 26 +#define SIOC_GPIO_NUM 27 +#define Y9_GPIO_NUM 35 +#define Y8_GPIO_NUM 34 +#define Y7_GPIO_NUM 39 +#define Y6_GPIO_NUM 36 +#define Y5_GPIO_NUM 21 +#define Y4_GPIO_NUM 19 +#define Y3_GPIO_NUM 18 +#define Y2_GPIO_NUM 5 +#define VSYNC_GPIO_NUM 25 +#define HREF_GPIO_NUM 23 +#define PCLK_GPIO_NUM 22 + +struct QRCodeData +{ + bool valid; + int dataType; + uint8_t payload[1024]; + int payloadLen; +}; + +struct quirc *q = NULL; +uint8_t *image = NULL; +camera_fb_t * fb = NULL; +struct quirc_code code; +struct quirc_data data; +quirc_decode_error_t err; +struct QRCodeData qrCodeData; +String QRCodeResult = ""; + +camera_config_t config; + + + + + +// Videostreamer - Anfang ################################################ +#include "esp_camera.h" +#include +#include "esp_timer.h" +#include "img_converters.h" +#include "Arduino.h" +#include "fb_gfx.h" +#include "soc/soc.h" //disable brownout problems +#include "soc/rtc_cntl_reg.h" //disable brownout problems +#include "esp_http_server.h" + +//Replace with your network credentials +//const char* ssid = "cpsNUCwifi"; +//const char* pass = "ips999CPS"; + +#define PART_BOUNDARY "123456789000000000000987654321" + +// This project was tested with the AI Thinker Model, M5STACK PSRAM Model and M5STACK WITHOUT PSRAM +#define CAMERA_MODEL_AI_THINKER +//#define CAMERA_MODEL_M5STACK_PSRAM +//#define CAMERA_MODEL_M5STACK_WITHOUT_PSRAM + +// Not tested with this model +//#define CAMERA_MODEL_WROVER_KIT + +#if defined(CAMERA_MODEL_WROVER_KIT) + #define PWDN_GPIO_NUM -1 + #define RESET_GPIO_NUM -1 + #define XCLK_GPIO_NUM 21 + #define SIOD_GPIO_NUM 26 + #define SIOC_GPIO_NUM 27 + + #define Y9_GPIO_NUM 35 + #define Y8_GPIO_NUM 34 + #define Y7_GPIO_NUM 39 + #define Y6_GPIO_NUM 36 + #define Y5_GPIO_NUM 19 + #define Y4_GPIO_NUM 18 + #define Y3_GPIO_NUM 5 + #define Y2_GPIO_NUM 4 + #define VSYNC_GPIO_NUM 25 + #define HREF_GPIO_NUM 23 + #define PCLK_GPIO_NUM 22 + +#elif defined(CAMERA_MODEL_M5STACK_PSRAM) + #define PWDN_GPIO_NUM -1 + #define RESET_GPIO_NUM 15 + #define XCLK_GPIO_NUM 27 + #define SIOD_GPIO_NUM 25 + #define SIOC_GPIO_NUM 23 + + #define Y9_GPIO_NUM 19 + #define Y8_GPIO_NUM 36 + #define Y7_GPIO_NUM 18 + #define Y6_GPIO_NUM 39 + #define Y5_GPIO_NUM 5 + #define Y4_GPIO_NUM 34 + #define Y3_GPIO_NUM 35 + #define Y2_GPIO_NUM 32 + #define VSYNC_GPIO_NUM 22 + #define HREF_GPIO_NUM 26 + #define PCLK_GPIO_NUM 21 + +#elif defined(CAMERA_MODEL_M5STACK_WITHOUT_PSRAM) + #define PWDN_GPIO_NUM -1 + #define RESET_GPIO_NUM 15 + #define XCLK_GPIO_NUM 27 + #define SIOD_GPIO_NUM 25 + #define SIOC_GPIO_NUM 23 + + #define Y9_GPIO_NUM 19 + #define Y8_GPIO_NUM 36 + #define Y7_GPIO_NUM 18 + #define Y6_GPIO_NUM 39 + #define Y5_GPIO_NUM 5 + #define Y4_GPIO_NUM 34 + #define Y3_GPIO_NUM 35 + #define Y2_GPIO_NUM 17 + #define VSYNC_GPIO_NUM 22 + #define HREF_GPIO_NUM 26 + #define PCLK_GPIO_NUM 21 + +#elif defined(CAMERA_MODEL_AI_THINKER) + #define PWDN_GPIO_NUM 32 + #define RESET_GPIO_NUM -1 + #define XCLK_GPIO_NUM 0 + #define SIOD_GPIO_NUM 26 + #define SIOC_GPIO_NUM 27 + + #define Y9_GPIO_NUM 35 + #define Y8_GPIO_NUM 34 + #define Y7_GPIO_NUM 39 + #define Y6_GPIO_NUM 36 + #define Y5_GPIO_NUM 21 + #define Y4_GPIO_NUM 19 + #define Y3_GPIO_NUM 18 + #define Y2_GPIO_NUM 5 + #define VSYNC_GPIO_NUM 25 + #define HREF_GPIO_NUM 23 + #define PCLK_GPIO_NUM 22 +#else + #error "Camera model not selected" +#endif + +static const char* _STREAM_CONTENT_TYPE = "multipart/x-mixed-replace;boundary=" PART_BOUNDARY; +static const char* _STREAM_BOUNDARY = "\r\n--" PART_BOUNDARY "\r\n"; +static const char* _STREAM_PART = "Content-Type: image/jpeg\r\nContent-Length: %u\r\n\r\n"; + +httpd_handle_t stream_httpd = NULL; + +static esp_err_t stream_handler(httpd_req_t *req){ //wenn via Browser (ip-Adresseingabe) auf den Stream zugegriffen wird, dann wird die Methode aufgerufen + camera_fb_t * fb = NULL; + esp_err_t res = ESP_OK; + size_t _jpg_buf_len = 0; + uint8_t * _jpg_buf = NULL; + char * part_buf[64]; + + res = httpd_resp_set_type(req, _STREAM_CONTENT_TYPE); + if(res != ESP_OK){ + return res; + } + + while(true){ + fb = esp_camera_fb_get(); + if (!fb) { + Serial.println("Camera capture failed"); + res = ESP_FAIL; + } else { + if(fb->width > 400){ + if(fb->format != PIXFORMAT_JPEG){ + bool jpeg_converted = frame2jpg(fb, 80, &_jpg_buf, &_jpg_buf_len); + esp_camera_fb_return(fb); + fb = NULL; + if(!jpeg_converted){ + Serial.println("JPEG compression failed"); + res = ESP_FAIL; + } + } else { + _jpg_buf_len = fb->len; + _jpg_buf = fb->buf; + } + } + } + if(res == ESP_OK){ + size_t hlen = snprintf((char *)part_buf, 64, _STREAM_PART, _jpg_buf_len); + res = httpd_resp_send_chunk(req, (const char *)part_buf, hlen); + } + if(res == ESP_OK){ + res = httpd_resp_send_chunk(req, (const char *)_jpg_buf, _jpg_buf_len); + } + if(res == ESP_OK){ + res = httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen(_STREAM_BOUNDARY)); + } + if(fb){ + esp_camera_fb_return(fb); + fb = NULL; + _jpg_buf = NULL; + } else if(_jpg_buf){ + free(_jpg_buf); + _jpg_buf = NULL; + } + if(res != ESP_OK){ + break; + } + //Serial.printf("MJPG: %uB\n",(uint32_t)(_jpg_buf_len)); + Serial.println("Ausgabe"); + } + Serial.println("Ausgabe dannach"); + return res; +} + +void startCameraServer(){ + httpd_config_t config = HTTPD_DEFAULT_CONFIG(); + config.server_port = 80; + +Serial.println("davor"); + httpd_uri_t index_uri = { + .uri = "/", + .method = HTTP_GET, + .handler = stream_handler, + .user_ctx = NULL + }; +Serial.println("dannach"); + + //Serial.printf("Starting web server on port: '%d'\n", config.server_port); + if (httpd_start(&stream_httpd, &config) == ESP_OK) { + httpd_register_uri_handler(stream_httpd, &index_uri); + } +} +// Videostreamer ENDE ################################################################### + + + + + +void setup() { + + + WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //關閉電源不穩就重開機的設定 + + Serial.begin(115200); + Serial.setDebugOutput(true); //開啟診斷輸出 + Serial.println(); + + pinMode(LED_BUILTIN, OUTPUT); //die Zeile wird für das LED benötigt + + + + +//Setup für insert in MariaDB ######################################################### + + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Basic_Insert_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Remember to initialize your WiFi module +#if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #if ( USING_WIFI_ESP8266_AT ) + MYSQL_DISPLAY("Using ESP8266_AT/ESP8266_AT_WebServer Library"); + #elif ( USING_WIFIESPAT_LIB ) + MYSQL_DISPLAY("Using WiFiEspAT Library"); + #endif + + // initialize serial for ESP module + EspSerial.begin(115200); + // initialize ESP module + WiFi.init(&EspSerial); + + MYSQL_DISPLAY(F("WiFi shield init done")); + + // check for the presence of the shield + if (WiFi.status() == WL_NO_SHIELD) + { + MYSQL_DISPLAY(F("WiFi shield not present")); + // don't continue + while (true); + } +#endif + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + + //ESP32-LED Output, dass es nicht mit dem WLAN verbunden ist + digitalWrite(LED_BUILTIN, HIGH); + delay(100); + digitalWrite(LED_BUILTIN, LOW); + delay(1000); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); + + + //ESP32-LED Output, dass es mit dem WLAN verbunden ist + for(int i=0; i<3;i++){ + digitalWrite(LED_BUILTIN, HIGH); + delay(100); + digitalWrite(LED_BUILTIN, LOW); + delay(300); + } + +//Setup für insert in MariaDB - Ende ######################################################### + + +//Setup für den QR-Code Reader ############################################################### + +config.ledc_channel = LEDC_CHANNEL_0; + config.ledc_timer = LEDC_TIMER_0; + config.pin_d0 = Y2_GPIO_NUM; + config.pin_d1 = Y3_GPIO_NUM; + config.pin_d2 = Y4_GPIO_NUM; + config.pin_d3 = Y5_GPIO_NUM; + config.pin_d4 = Y6_GPIO_NUM; + config.pin_d5 = Y7_GPIO_NUM; + config.pin_d6 = Y8_GPIO_NUM; + config.pin_d7 = Y9_GPIO_NUM; + config.pin_xclk = XCLK_GPIO_NUM; + config.pin_pclk = PCLK_GPIO_NUM; + config.pin_vsync = VSYNC_GPIO_NUM; + config.pin_href = HREF_GPIO_NUM; + config.pin_sscb_sda = SIOD_GPIO_NUM; + config.pin_sscb_scl = SIOC_GPIO_NUM; + config.pin_pwdn = PWDN_GPIO_NUM; + config.pin_reset = RESET_GPIO_NUM; + config.xclk_freq_hz = 10000000; // beim QR Reader sind es 10000000 + //config.pixel_format = PIXFORMAT_JPEG; // PIXFORMAT_GRAYSCALE + config.pixel_format = PIXFORMAT_GRAYSCALE; // PIXFORMAT_GRAYSCALE + + config.frame_size = FRAMESIZE_QVGA; + config.jpeg_quality = 15; + config.fb_count = 1; + /* + if(psramFound()){ + config.frame_size = FRAMESIZE_SVGA; // + //config.frame_size = FRAMESIZE_UXGA; // das UXGA Format wirft in Kombination mit anderen Configs errors - FRAMESIZE_QVGA + config.jpeg_quality = 10; //15 + config.fb_count = 2; //1 + //1 + } else { + config.frame_size = FRAMESIZE_SVGA; + config.jpeg_quality = 12; + config.fb_count = 1; + } + */ + + // Camera init + esp_err_t err = esp_camera_init(&config); // wenn der QR-Setup auskommentiert wird, dann muss das einkommentiert werden + if (err != ESP_OK) { + Serial.printf("Camera init failed with error 0x%x", err); + return; + } + + sensor_t * s = esp_camera_sensor_get(); + s->set_framesize(s, FRAMESIZE_VGA); //der FRAMESIZE_QVGA Parameter wurde auf FRAMESIZE_SVGA geändert + + //s->set_vflip(s, 1); //垂直翻轉 + //s->set_hmirror(s, 1); //水平鏡像 + + //閃光燈(GPIO4) + //ledcAttachPin(4, 4); + //ledcSetup(4, 5000, 8); + + + + xTaskCreatePinnedToCore( + QRCodeReader, //Task function. + "Task", // name of task. + 10000, // Stack size of task + NULL, // parameter of the task + 1, // priority of the task + &Task, // Task handle to keep track of created task + 0); // pin task to core 0 + + Serial.print("listenConnection running on core "); + Serial.println(xPortGetCoreID()); +/* */ + +//Setup für den QR-Code Reader ENDE ############################################################### + + + + //Videostreamer Setup Anfang ######################################################################## + //WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector + + //Serial.begin(115200); + //Serial.setDebugOutput(false); + + //Die Konfig wurde in den QR-Code Readerteil kopiert + /* + //camera_config_t config; + config.ledc_channel = LEDC_CHANNEL_0; + config.ledc_timer = LEDC_TIMER_0; + config.pin_d0 = Y2_GPIO_NUM; + config.pin_d1 = Y3_GPIO_NUM; + config.pin_d2 = Y4_GPIO_NUM; + config.pin_d3 = Y5_GPIO_NUM; + config.pin_d4 = Y6_GPIO_NUM; + config.pin_d5 = Y7_GPIO_NUM; + config.pin_d6 = Y8_GPIO_NUM; + config.pin_d7 = Y9_GPIO_NUM; + config.pin_xclk = XCLK_GPIO_NUM; + config.pin_pclk = PCLK_GPIO_NUM; + config.pin_vsync = VSYNC_GPIO_NUM; + config.pin_href = HREF_GPIO_NUM; + config.pin_sscb_sda = SIOD_GPIO_NUM; + config.pin_sscb_scl = SIOC_GPIO_NUM; + config.pin_pwdn = PWDN_GPIO_NUM; + config.pin_reset = RESET_GPIO_NUM; + config.xclk_freq_hz = 20000000; // beim QR Reader sind es 10000000 + //config.pixel_format = PIXFORMAT_JPEG; // PIXFORMAT_GRAYSCALE + config.pixel_format = PIXFORMAT_GRAYSCALE; // PIXFORMAT_GRAYSCALE + + + if(psramFound()){ + config.frame_size = FRAMESIZE_SVGA; // + //config.frame_size = FRAMESIZE_UXGA; // das UXGA Format wirft in Kombination mit anderen Configs errors - FRAMESIZE_QVGA + config.jpeg_quality = 10; //15 + config.fb_count = 2; //1 + //1 + } else { + config.frame_size = FRAMESIZE_SVGA; + config.jpeg_quality = 12; + config.fb_count = 1; + } + + + // Camera init + esp_err_t err = esp_camera_init(&config); // wenn der QR-Setup auskommentiert wird, dann muss das einkommentiert werden + if (err != ESP_OK) { + Serial.printf("Camera init failed with error 0x%x", err); + return; + } + */ + /* + // Wi-Fi connection + WiFi.begin(ssid, pass); + while (WiFi.status() != WL_CONNECTED) { + delay(500); + Serial.print("."); + } + Serial.println(""); + Serial.println("WiFi connected"); + */ + Serial.print("Camera Stream Ready! Go to: http://"); + Serial.print(WiFi.localIP()); + + // Start streaming web server + startCameraServer(); + //Videostreamer Setup ENDE ######################################################################## +} + + + +void ledOutputError(){ + + //ESP32 LED Ausgabe, dass etwas nicht funktioniert hat + digitalWrite(LED_BUILTIN, HIGH); + delay(100); + digitalWrite(LED_BUILTIN, LOW); + delay(100); + digitalWrite(LED_BUILTIN, HIGH); + delay(1000); + digitalWrite(LED_BUILTIN, LOW); + delay(100); + digitalWrite(LED_BUILTIN, HIGH); + delay(100); + digitalWrite(LED_BUILTIN, LOW); + +} + + +//################################################################################### +void runInsert() // MariaDB-Insert-Funktion +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + MYSQL_DISPLAY(INSERT_SQL); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(INSERT_SQL.c_str()) ) + { + MYSQL_DISPLAY("Insert error"); + ledOutputError(); + } + else + { + MYSQL_DISPLAY("Data Inserted."); + + //ESP32 LED Ausgabe, dass etwas inserted wurde + digitalWrite(LED_BUILTIN, HIGH); + delay(1000); + digitalWrite(LED_BUILTIN, LOW); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + ledOutputError(); + } +} + + + +void loop() { + delay(1); +} + + + + + +void charToString(const char *str, String &dbInsertString){ + + dbInsertString = ""; //max Länge 13 Zeichen für eine Ausgabe in Serial.printf + size_t len = strlen(str); + dbInsertString.reserve(len); + + for(size_t i=0;iwidth, fb->height); + image = quirc_begin(q, NULL, NULL); + //Serial.printf("Frame w h len: %d, %d, %d \r\n", fb->width, fb->height, fb->len); + memcpy(image, fb->buf, fb->len); + quirc_end(q); + //Serial.printf("quirc_end\r\n"); + + int count = quirc_count(q); + if (count > 0) { + Serial.println(count); + quirc_extract(q, 0, &code); + err = quirc_decode(&code, &data); + + if (err){ + Serial.println("Decoding FAILED"); + QRCodeResult = "Decoding FAILED"; + } else { + Serial.printf("Decoding successful:\n"); + dumpData(&data); + + //MariaDb-part #################-------------------- + MYSQL_DISPLAY("Connecting..."); + + //Testen des char-Array-String-Konvertierens + //char * str = (char *) &data.payload[0]; + //charToString(str,default_value); + + + + //Der Database-Connect (etc) Teil wirft noch errors + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + + char * str = (char *) &data.payload[0]; //nicht sicher ob man die Umwandlung braucht + charToString(str,default_value); + + INSERT_SQL = String("INSERT INTO ") + default_database + "." + default_table + " (qrCodeText) VALUES ('" + default_value + "')"; + //Serial.printf("Insertcommand: %s\n:", INSERT_SQL.c_str()); + + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + ledOutputError(); + } + + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + delay(2000); //um nicht den gleichen Eintrag sofort doppelt drinnen zu haben + //MariaDb-part-Ende #################-------------------- + + //vTaskDelay(3000/portTICK_RATE_MS); + } + Serial.println(); + } + + + esp_camera_fb_return(fb); + fb = NULL; + image = NULL; + quirc_destroy(q); + } +} + +//############################################################################################### +void dumpData(const struct quirc_data *data) +{ + Serial.printf("Version: %d\n", data->version); + Serial.printf("ECC level: %c\n", "MLHQ"[data->ecc_level]); + Serial.printf("Mask: %d\n", data->mask); + Serial.printf("Length: %d\n", data->payload_len); + Serial.printf("Payload: %s\n", data->payload); + + //QRCodeResult = const_cast(reinterpret_cast(data->payload)); + + //default_value = reinterpret_cast(data.payload); + //Serial.printf("MyTestPayload: %s\n", QRCodeResult); + //Serial.printf("MyTestPayload: %s\n", "testString"); + +} diff --git a/ESP32QRReaderDBWriterVideoStreamer/LICENSE b/ESP32QRReaderDBWriterVideoStreamer/LICENSE new file mode 100644 index 0000000..d47c026 --- /dev/null +++ b/ESP32QRReaderDBWriterVideoStreamer/LICENSE @@ -0,0 +1,16 @@ +quirc -- QR-code recognition library +Copyright (C) 2010-2012 Daniel Beer + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all +copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/ESP32QRReaderDBWriterVideoStreamer/README.md b/ESP32QRReaderDBWriterVideoStreamer/README.md new file mode 100644 index 0000000..d70c5c3 --- /dev/null +++ b/ESP32QRReaderDBWriterVideoStreamer/README.md @@ -0,0 +1,193 @@ +Quirc +===== + +QR codes are a type of high-density matrix barcodes, and quirc is a library for +extracting and decoding them from images. It has several features which make it +a good choice for this purpose: + +* It is fast enough to be used with realtime video: extracting and decoding + from VGA frame takes about 50 ms on a modern x86 core. + +* It has a robust and tolerant recognition algorithm. It can correctly + recognise and decode QR codes which are rotated and/or oblique to the camera. + It can also distinguish and decode multiple codes within the same image. + +* It is easy to use, with a simple API described in a single commented header + file (see below for an overview). + +* It is small and easily embeddable, with no dependencies other than standard C + functions. + +* It has a very small memory footprint: one byte per image pixel, plus a few kB + per decoder object. + +* It uses no global mutable state, and is safe to use in a multithreaded + application. + +* BSD-licensed, with almost no restrictions regarding use and/or modification. + +The distribution comes with, in addition to the library, several test programs. +While the core library is very portable, these programs have some additional +dependencies. All of them require libjpeg, and two (`quirc-demo` and `inspect`) +require SDL. The camera demos use Linux-specific APIs: + +### quirc-demo + +This is an real-time demo which requires a camera and a graphical display. The +video stream is displayed on screen as it's received, and any QR codes +recognised are highlighted in the image, with the decoded information both +displayed on the image and printed on stdout. + +### quirc-scanner + +This program turns your camera into a barcode scanner. It's almost the same as +the `demo` application, but it doesn't display the video stream, and thus +doesn't require a graphical display. + +### qrtest + +This test is used to evaluate the performance of library. Given a directory +tree containing a bunch of JPEG images, it will attempt to locate and decode QR +codes in each image. Speed and success statistics are collected and printed on +stdout. + +### inspect + +This test is used for debugging. Given a single JPEG image, it will display a +diagram showing the internal state of the decoder as well as printing +additional information on stdout. + +Installation +------------ +To build the library and associated demos/tests, type `make`. If you need to +decode "large" image files build with `CFLAGS="-DQUIRC_MAX_REGIONS=65534" make` +instead. Note that this will increase the memory usage, it is discouraged for +low resource devices (i.e. embedded). + +Type `make install` to install the library, header file and camera demos. + +You can specify one or several of the following targets if you don't want, or +are unable to build everything: + +* libquirc.a +* libquirc.so +* qrtest +* inspect +* quirc-scanner +* quirc-demo + +Library use +----------- +All of the library's functionality is exposed through a single header file, +which you should include: + +```C +#include +``` + +To decode images, you'll need to instantiate a `struct quirc` object, which is +done with the `quirc_new` function. Later, when you no longer need to decode +anything, you should release the allocated memory with `quirc_destroy`: + +```C +struct quirc *qr; + +qr = quirc_new(); +if (!qr) { + perror("Failed to allocate memory"); + abort(); +} + +/* ... */ + +quirc_destroy(qr); +``` + +Having obtained a decoder object, you need to set the image size that you'll be +working with, which is done using `quirc_resize`: + +```C +if (quirc_resize(qr, 640, 480) < 0) { + perror("Failed to allocate video memory"); + abort(); +} +``` + +`quirc_resize` and `quirc_new` are the only library functions which allocate +memory. If you plan to process a series of frames (or a video stream), you +probably want to allocate and size a single decoder and hold onto it to process +each frame. + +Processing frames is done in two stages. The first stage is an +image-recognition stage called identification, which takes a grayscale image +and searches for QR codes. Using `quirc_begin` and `quirc_end`, you can feed a +grayscale image directly into the buffer that `quirc` uses for image +processing: + +```C +uint8_t *image; +int w, h; + +image = quirc_begin(qr, &w, &h); + +/* Fill out the image buffer here. + * image is a pointer to a w*h bytes. + * One byte per pixel, w pixels per line, h lines in the buffer. + */ + +quirc_end(qr); +``` + +Note that `quirc_begin` simply returns a pointer to a previously allocated +buffer. The buffer will contain uninitialized data. After the call to +`quirc_end`, the decoder holds a list of detected QR codes which can be queried +via `quirc_count` and `quirc_extract`. + +At this point, the second stage of processing occurs -- decoding. This is done +via the call to `quirc_decode`, which is not associated with a decoder object. + +```C +int num_codes; +int i; + +/* We've previously fed an image to the decoder via +* quirc_begin/quirc_end. +*/ + +num_codes = quirc_count(qr); +for (i = 0; i < num_codes; i++) { + struct quirc_code code; + struct quirc_data data; + quirc_decode_error_t err; + + quirc_extract(qr, i, &code); + + /* Decoding stage */ + err = quirc_decode(&code, &data); + if (err) + printf("DECODE FAILED: %s\n", quirc_strerror(err)); + else + printf("Data: %s\n", data.payload); +} +``` + +`quirc_code` and `quirc_data` are flat structures which don't need to be +initialized or freed after use. + +Copyright +--------- +Copyright (C) 2010-2012 Daniel Beer <> + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all +copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/ESP32QRReaderDBWriterVideoStreamer/collections.c b/ESP32QRReaderDBWriterVideoStreamer/collections.c new file mode 100644 index 0000000..ea0073d --- /dev/null +++ b/ESP32QRReaderDBWriterVideoStreamer/collections.c @@ -0,0 +1,85 @@ +/* This file is part of the OpenMV project. + * Copyright (c) 2013-2017 Ibrahim Abdelkader & Kwabena W. Agyeman + * This work is licensed under the MIT license, see the file LICENSE for details. + */ + +#include "collections.h" +#define CHAR_BITS (sizeof(char) * 8) +#define CHAR_MASK (CHAR_BITS - 1) +#define CHAR_SHIFT IM_LOG2(CHAR_MASK) + +////////// +// lifo // +////////// + +void lifo_alloc(lifo_t *ptr, size_t size, size_t data_len) +{ + ptr->len = 0; + ptr->size = size; + ptr->data_len = data_len; + ptr->data = (char *)ps_malloc(size * data_len); +} + +void lifo_alloc_all(lifo_t *ptr, size_t *size, size_t data_len) +{ + ptr->data = (char *)ps_malloc(255); + ptr->data_len = data_len; + ptr->size = 255 / data_len; + ptr->len = 0; + *size = ptr->size; +} + +void lifo_free(lifo_t *ptr) +{ + if (ptr->data) + { + free(ptr->data); + } +} + +void lifo_clear(lifo_t *ptr) +{ + ptr->len = 0; +} + +size_t lifo_size(lifo_t *ptr) +{ + return ptr->len; +} + +bool lifo_is_not_empty(lifo_t *ptr) +{ + return ptr->len; +} + +bool lifo_is_not_full(lifo_t *ptr) +{ + return ptr->len != ptr->size; +} + +void lifo_enqueue(lifo_t *ptr, void *data) +{ + memcpy(ptr->data + (ptr->len * ptr->data_len), data, ptr->data_len); + + ptr->len += 1; +} + +void lifo_dequeue(lifo_t *ptr, void *data) +{ + if (data) + { + memcpy(data, ptr->data + ((ptr->len - 1) * ptr->data_len), ptr->data_len); + } + + ptr->len -= 1; +} + +void lifo_poke(lifo_t *ptr, void *data) +{ + memcpy(ptr->data + (ptr->len * ptr->data_len), data, ptr->data_len); +} + +void lifo_peek(lifo_t *ptr, void *data) +{ + memcpy(data, ptr->data + ((ptr->len - 1) * ptr->data_len), ptr->data_len); +} diff --git a/ESP32QRReaderDBWriterVideoStreamer/collections.h b/ESP32QRReaderDBWriterVideoStreamer/collections.h new file mode 100644 index 0000000..711cafa --- /dev/null +++ b/ESP32QRReaderDBWriterVideoStreamer/collections.h @@ -0,0 +1,33 @@ +/* This file is part of the OpenMV project. + * Copyright (c) 2013-2017 Ibrahim Abdelkader & Kwabena W. Agyeman + * This work is licensed under the MIT license, see the file LICENSE for details. + */ + +#ifndef __COLLECTIONS_H__ +#define __COLLECTIONS_H__ +#include +#include +////////// +// lifo // +////////// + +typedef struct lifo +{ + size_t len, size, data_len; + char *data; +} +__attribute__((aligned(8))) lifo_t; + +void lifo_alloc(lifo_t *ptr, size_t size, size_t data_len); +void lifo_alloc_all(lifo_t *ptr, size_t *size, size_t data_len); +void lifo_free(lifo_t *ptr); +void lifo_clear(lifo_t *ptr); +size_t lifo_size(lifo_t *ptr); +bool lifo_is_not_empty(lifo_t *ptr); +bool lifo_is_not_full(lifo_t *ptr); +void lifo_enqueue(lifo_t *ptr, void *data); +void lifo_dequeue(lifo_t *ptr, void *data); +void lifo_poke(lifo_t *ptr, void *data); +void lifo_peek(lifo_t *ptr, void *data); + +#endif /* __COLLECTIONS_H__ */ \ No newline at end of file diff --git a/ESP32QRReaderDBWriterVideoStreamer/decode.c b/ESP32QRReaderDBWriterVideoStreamer/decode.c new file mode 100644 index 0000000..67c8ed5 --- /dev/null +++ b/ESP32QRReaderDBWriterVideoStreamer/decode.c @@ -0,0 +1,983 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "quirc_internal.h" + +#include +#include + +#define MAX_POLY 64 + +/************************************************************************ + * Galois fields + */ + +struct galois_field +{ + int p; + const uint8_t *log; + const uint8_t *exp; +} __attribute__((aligned(8))); + +static const uint8_t gf16_exp[16] = { + 0x01, 0x02, 0x04, 0x08, 0x03, 0x06, 0x0c, 0x0b, + 0x05, 0x0a, 0x07, 0x0e, 0x0f, 0x0d, 0x09, 0x01}; + +static const uint8_t gf16_log[16] = { + 0x00, 0x0f, 0x01, 0x04, 0x02, 0x08, 0x05, 0x0a, + 0x03, 0x0e, 0x09, 0x07, 0x06, 0x0d, 0x0b, 0x0c}; + +static const struct galois_field gf16 = { + .p = 15, + .log = gf16_log, + .exp = gf16_exp}; + +static const uint8_t gf256_exp[256] = { + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, + 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26, + 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, + 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, + 0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, + 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23, + 0x46, 0x8c, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, + 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1, + 0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f, 0x5e, 0xbc, + 0x65, 0xca, 0x89, 0x0f, 0x1e, 0x3c, 0x78, 0xf0, + 0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, + 0xfe, 0xe1, 0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2, + 0xd9, 0xaf, 0x43, 0x86, 0x11, 0x22, 0x44, 0x88, + 0x0d, 0x1a, 0x34, 0x68, 0xd0, 0xbd, 0x67, 0xce, + 0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93, + 0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc, + 0x85, 0x17, 0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, + 0x4f, 0x9e, 0x21, 0x42, 0x84, 0x15, 0x2a, 0x54, + 0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4, 0x55, 0xaa, + 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73, + 0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, + 0xfc, 0xe5, 0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff, + 0xe3, 0xdb, 0xab, 0x4b, 0x96, 0x31, 0x62, 0xc4, + 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41, + 0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x07, 0x0e, + 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6, + 0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, + 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09, + 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, + 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16, + 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, + 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x01}; + +static const uint8_t gf256_log[256] = { + 0x00, 0xff, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, + 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b, + 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, + 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71, + 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, + 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45, + 0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27, 0xf9, 0xb9, + 0xc9, 0x9a, 0x09, 0x78, 0x4d, 0xe4, 0x72, 0xa6, + 0x06, 0xbf, 0x8b, 0x62, 0x66, 0xdd, 0x30, 0xfd, + 0xe2, 0x98, 0x25, 0xb3, 0x10, 0x91, 0x22, 0x88, + 0x36, 0xd0, 0x94, 0xce, 0x8f, 0x96, 0xdb, 0xbd, + 0xf1, 0xd2, 0x13, 0x5c, 0x83, 0x38, 0x46, 0x40, + 0x1e, 0x42, 0xb6, 0xa3, 0xc3, 0x48, 0x7e, 0x6e, + 0x6b, 0x3a, 0x28, 0x54, 0xfa, 0x85, 0xba, 0x3d, + 0xca, 0x5e, 0x9b, 0x9f, 0x0a, 0x15, 0x79, 0x2b, + 0x4e, 0xd4, 0xe5, 0xac, 0x73, 0xf3, 0xa7, 0x57, + 0x07, 0x70, 0xc0, 0xf7, 0x8c, 0x80, 0x63, 0x0d, + 0x67, 0x4a, 0xde, 0xed, 0x31, 0xc5, 0xfe, 0x18, + 0xe3, 0xa5, 0x99, 0x77, 0x26, 0xb8, 0xb4, 0x7c, + 0x11, 0x44, 0x92, 0xd9, 0x23, 0x20, 0x89, 0x2e, + 0x37, 0x3f, 0xd1, 0x5b, 0x95, 0xbc, 0xcf, 0xcd, + 0x90, 0x87, 0x97, 0xb2, 0xdc, 0xfc, 0xbe, 0x61, + 0xf2, 0x56, 0xd3, 0xab, 0x14, 0x2a, 0x5d, 0x9e, + 0x84, 0x3c, 0x39, 0x53, 0x47, 0x6d, 0x41, 0xa2, + 0x1f, 0x2d, 0x43, 0xd8, 0xb7, 0x7b, 0xa4, 0x76, + 0xc4, 0x17, 0x49, 0xec, 0x7f, 0x0c, 0x6f, 0xf6, + 0x6c, 0xa1, 0x3b, 0x52, 0x29, 0x9d, 0x55, 0xaa, + 0xfb, 0x60, 0x86, 0xb1, 0xbb, 0xcc, 0x3e, 0x5a, + 0xcb, 0x59, 0x5f, 0xb0, 0x9c, 0xa9, 0xa0, 0x51, + 0x0b, 0xf5, 0x16, 0xeb, 0x7a, 0x75, 0x2c, 0xd7, + 0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, + 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf}; + +const static struct galois_field gf256 = { + .p = 255, + .log = gf256_log, + .exp = gf256_exp}; + +/************************************************************************ + * Polynomial operations + */ + +static void poly_add(uint8_t *dst, const uint8_t *src, uint8_t c, + int shift, const struct galois_field *gf) +{ + int i; + int log_c = gf->log[c]; + + if (!c) + return; + + for (i = 0; i < MAX_POLY; i++) + { + int p = i + shift; + uint8_t v = src[i]; + + if (p < 0 || p >= MAX_POLY) + continue; + if (!v) + continue; + + dst[p] ^= gf->exp[(gf->log[v] + log_c) % gf->p]; + } +} + +static uint8_t poly_eval(const uint8_t *s, uint8_t x, + const struct galois_field *gf) +{ + int i; + uint8_t sum = 0; + uint8_t log_x = gf->log[x]; + + if (!x) + return s[0]; + + for (i = 0; i < MAX_POLY; i++) + { + uint8_t c = s[i]; + + if (!c) + continue; + + sum ^= gf->exp[(gf->log[c] + log_x * i) % gf->p]; + } + + return sum; +} + +/************************************************************************ + * Berlekamp-Massey algorithm for finding error locator polynomials. + */ + +static void berlekamp_massey(const uint8_t *s, int N, + const struct galois_field *gf, + uint8_t *sigma) +{ + uint8_t C[MAX_POLY]; + uint8_t B[MAX_POLY]; + int L = 0; + int m = 1; + uint8_t b = 1; + int n; + + memset(B, 0, sizeof(B)); + memset(C, 0, sizeof(C)); + B[0] = 1; + C[0] = 1; + + for (n = 0; n < N; n++) + { + uint8_t d = s[n]; + uint8_t mult; + int i; + + for (i = 1; i <= L; i++) + { + if (!(C[i] && s[n - i])) + continue; + + d ^= gf->exp[(gf->log[C[i]] + + gf->log[s[n - i]]) % + gf->p]; + } + + mult = gf->exp[(gf->p - gf->log[b] + gf->log[d]) % gf->p]; + + if (!d) + { + m++; + } + else if (L * 2 <= n) + { + uint8_t T[MAX_POLY]; + + memcpy(T, C, sizeof(T)); + poly_add(C, B, mult, m, gf); + memcpy(B, T, sizeof(B)); + L = n + 1 - L; + b = d; + m = 1; + } + else + { + poly_add(C, B, mult, m, gf); + m++; + } + } + + memcpy(sigma, C, MAX_POLY); +} + +/************************************************************************ + * Code stream error correction + * + * Generator polynomial for GF(2^8) is x^8 + x^4 + x^3 + x^2 + 1 + */ + +static int block_syndromes(const uint8_t *data, int bs, int npar, uint8_t *s) +{ + int nonzero = 0; + int i; + + memset(s, 0, MAX_POLY); + + for (i = 0; i < npar; i++) + { + int j; + + for (j = 0; j < bs; j++) + { + uint8_t c = data[bs - j - 1]; + + if (!c) + continue; + + s[i] ^= gf256_exp[((int)gf256_log[c] + + i * j) % + 255]; + } + + if (s[i]) + nonzero = 1; + } + + return nonzero; +} + +static void eloc_poly(uint8_t *omega, + const uint8_t *s, const uint8_t *sigma, + int npar) +{ + int i; + + memset(omega, 0, MAX_POLY); + + for (i = 0; i < npar; i++) + { + const uint8_t a = sigma[i]; + const uint8_t log_a = gf256_log[a]; + int j; + + if (!a) + continue; + + for (j = 0; j + 1 < MAX_POLY; j++) + { + const uint8_t b = s[j + 1]; + + if (i + j >= npar) + break; + + if (!b) + continue; + + omega[i + j] ^= + gf256_exp[(log_a + gf256_log[b]) % 255]; + } + } +} + +static quirc_decode_error_t correct_block(uint8_t *data, + const struct quirc_rs_params *ecc) +{ + int npar = ecc->bs - ecc->dw; + uint8_t s[MAX_POLY]; + uint8_t sigma[MAX_POLY]; + uint8_t sigma_deriv[MAX_POLY]; + uint8_t omega[MAX_POLY]; + int i; + + /* Compute syndrome vector */ + if (!block_syndromes(data, ecc->bs, npar, s)) + return QUIRC_SUCCESS; + + berlekamp_massey(s, npar, &gf256, sigma); + + /* Compute derivative of sigma */ + memset(sigma_deriv, 0, MAX_POLY); + for (i = 0; i + 1 < MAX_POLY; i += 2) + sigma_deriv[i] = sigma[i + 1]; + + /* Compute error evaluator polynomial */ + eloc_poly(omega, s, sigma, npar - 1); + + /* Find error locations and magnitudes */ + for (i = 0; i < ecc->bs; i++) + { + uint8_t xinv = gf256_exp[255 - i]; + + if (!poly_eval(sigma, xinv, &gf256)) + { + uint8_t sd_x = poly_eval(sigma_deriv, xinv, &gf256); + uint8_t omega_x = poly_eval(omega, xinv, &gf256); + uint8_t error = gf256_exp[(255 - gf256_log[sd_x] + + gf256_log[omega_x]) % + 255]; + + data[ecc->bs - i - 1] ^= error; + } + } + + if (block_syndromes(data, ecc->bs, npar, s)) + return QUIRC_ERROR_DATA_ECC; + + return QUIRC_SUCCESS; +} + +/************************************************************************ + * Format value error correction + * + * Generator polynomial for GF(2^4) is x^4 + x + 1 + */ + +#define FORMAT_MAX_ERROR 3 +#define FORMAT_SYNDROMES (FORMAT_MAX_ERROR * 2) +#define FORMAT_BITS 15 + +static int format_syndromes(uint16_t u, uint8_t *s) +{ + int i; + int nonzero = 0; + + memset(s, 0, MAX_POLY); + + for (i = 0; i < FORMAT_SYNDROMES; i++) + { + int j; + + s[i] = 0; + for (j = 0; j < FORMAT_BITS; j++) + if (u & (1 << j)) + s[i] ^= gf16_exp[((i + 1) * j) % 15]; + + if (s[i]) + nonzero = 1; + } + + return nonzero; +} + +static quirc_decode_error_t correct_format(uint16_t *f_ret) +{ + uint16_t u = *f_ret; + int i; + uint8_t s[MAX_POLY]; + uint8_t sigma[MAX_POLY]; + + /* Evaluate U (received codeword) at each of alpha_1 .. alpha_6 + * to get S_1 .. S_6 (but we index them from 0). + */ + if (!format_syndromes(u, s)) + return QUIRC_SUCCESS; + + berlekamp_massey(s, FORMAT_SYNDROMES, &gf16, sigma); + + /* Now, find the roots of the polynomial */ + for (i = 0; i < 15; i++) + if (!poly_eval(sigma, gf16_exp[15 - i], &gf16)) + u ^= (1 << i); + + if (format_syndromes(u, s)) + return QUIRC_ERROR_FORMAT_ECC; + + *f_ret = u; + return QUIRC_SUCCESS; +} + +/************************************************************************ + * Decoder algorithm + */ + +struct datastream +{ + uint8_t raw[QUIRC_MAX_PAYLOAD]; + int data_bits; + int ptr; + + uint8_t data[QUIRC_MAX_PAYLOAD]; +} __attribute__((aligned(8))); + +static inline int grid_bit(const struct quirc_code *code, int x, int y) +{ + int p = y * code->size + x; + + return (code->cell_bitmap[p >> 3] >> (p & 7)) & 1; +} + +static quirc_decode_error_t read_format(const struct quirc_code *code, + struct quirc_data *data, int which) +{ + int i; + uint16_t format = 0; + uint16_t fdata; + quirc_decode_error_t err; + + if (which) + { + for (i = 0; i < 7; i++) + format = (format << 1) | + grid_bit(code, 8, code->size - 1 - i); + for (i = 0; i < 8; i++) + format = (format << 1) | + grid_bit(code, code->size - 8 + i, 8); + } + else + { + static const int xs[15] = { + 8, 8, 8, 8, 8, 8, 8, 8, 7, 5, 4, 3, 2, 1, 0}; + static const int ys[15] = { + 0, 1, 2, 3, 4, 5, 7, 8, 8, 8, 8, 8, 8, 8, 8}; + + for (i = 14; i >= 0; i--) + format = (format << 1) | grid_bit(code, xs[i], ys[i]); + } + + format ^= 0x5412; + + err = correct_format(&format); + if (err) + return err; + + fdata = format >> 10; + data->ecc_level = fdata >> 3; + data->mask = fdata & 7; + + return QUIRC_SUCCESS; +} + +static int mask_bit(int mask, int i, int j) +{ + switch (mask) + { + case 0: + return !((i + j) % 2); + case 1: + return !(i % 2); + case 2: + return !(j % 3); + case 3: + return !((i + j) % 3); + case 4: + return !(((i / 2) + (j / 3)) % 2); + case 5: + return !((i * j) % 2 + (i * j) % 3); + case 6: + return !(((i * j) % 2 + (i * j) % 3) % 2); + case 7: + return !(((i * j) % 3 + (i + j) % 2) % 2); + } + + return 0; +} + +static int reserved_cell(int version, int i, int j) +{ + const struct quirc_version_info *ver = &quirc_version_db[version]; + int size = version * 4 + 17; + int ai = -1, aj = -1, a; + + /* Finder + format: top left */ + if (i < 9 && j < 9) + return 1; + + /* Finder + format: bottom left */ + if (i + 8 >= size && j < 9) + return 1; + + /* Finder + format: top right */ + if (i < 9 && j + 8 >= size) + return 1; + + /* Exclude timing patterns */ + if (i == 6 || j == 6) + return 1; + + /* Exclude version info, if it exists. Version info sits adjacent to + * the top-right and bottom-left finders in three rows, bounded by + * the timing pattern. + */ + if (version >= 7) + { + if (i < 6 && j + 11 >= size) + return 1; + if (i + 11 >= size && j < 6) + return 1; + } + + /* Exclude alignment patterns */ + for (a = 0; a < QUIRC_MAX_ALIGNMENT && ver->apat[a]; a++) + { + int p = ver->apat[a]; + + if (abs(p - i) < 3) + ai = a; + if (abs(p - j) < 3) + aj = a; + } + + if (ai >= 0 && aj >= 0) + { + a--; + if (ai > 0 && ai < a) + return 1; + if (aj > 0 && aj < a) + return 1; + if (aj == a && ai == a) + return 1; + } + + return 0; +} + +static void read_bit(const struct quirc_code *code, + struct quirc_data *data, + struct datastream *ds, int i, int j) +{ + int bitpos = ds->data_bits & 7; + int bytepos = ds->data_bits >> 3; + int v = grid_bit(code, j, i); + + if (mask_bit(data->mask, i, j)) + v ^= 1; + + if (v) + ds->raw[bytepos] |= (0x80 >> bitpos); + + ds->data_bits++; +} + +static void read_data(const struct quirc_code *code, + struct quirc_data *data, + struct datastream *ds) +{ + int y = code->size - 1; + int x = code->size - 1; + int dir = -1; + + while (x > 0) + { + if (x == 6) + x--; + + if (!reserved_cell(data->version, y, x)) + read_bit(code, data, ds, y, x); + + if (!reserved_cell(data->version, y, x - 1)) + read_bit(code, data, ds, y, x - 1); + + y += dir; + if (y < 0 || y >= code->size) + { + dir = -dir; + x -= 2; + y += dir; + } + } +} + +static quirc_decode_error_t codestream_ecc(struct quirc_data *data, + struct datastream *ds) +{ + const struct quirc_version_info *ver = + &quirc_version_db[data->version]; + const struct quirc_rs_params *sb_ecc = &ver->ecc[data->ecc_level]; + struct quirc_rs_params lb_ecc; + const int lb_count = + (ver->data_bytes - sb_ecc->bs * sb_ecc->ns) / (sb_ecc->bs + 1); + const int bc = lb_count + sb_ecc->ns; + const int ecc_offset = sb_ecc->dw * bc + lb_count; + int dst_offset = 0; + int i; + + memcpy(&lb_ecc, sb_ecc, sizeof(lb_ecc)); + lb_ecc.dw++; + lb_ecc.bs++; + + for (i = 0; i < bc; i++) + { + uint8_t *dst = ds->data + dst_offset; + const struct quirc_rs_params *ecc = + (i < sb_ecc->ns) ? sb_ecc : &lb_ecc; + const int num_ec = ecc->bs - ecc->dw; + quirc_decode_error_t err; + int j; + + for (j = 0; j < ecc->dw; j++) + dst[j] = ds->raw[j * bc + i]; + for (j = 0; j < num_ec; j++) + dst[ecc->dw + j] = ds->raw[ecc_offset + j * bc + i]; + + err = correct_block(dst, ecc); + if (err) + return err; + + dst_offset += ecc->dw; + } + + ds->data_bits = dst_offset * 8; + + return QUIRC_SUCCESS; +} + +static inline int bits_remaining(const struct datastream *ds) +{ + return ds->data_bits - ds->ptr; +} + +static int take_bits(struct datastream *ds, int len) +{ + int ret = 0; + + while (len && (ds->ptr < ds->data_bits)) + { + uint8_t b = ds->data[ds->ptr >> 3]; + int bitpos = ds->ptr & 7; + + ret <<= 1; + if ((b << bitpos) & 0x80) + ret |= 1; + + ds->ptr++; + len--; + } + + return ret; +} + +static int numeric_tuple(struct quirc_data *data, + struct datastream *ds, + int bits, int digits) +{ + int tuple; + int i; + + if (bits_remaining(ds) < bits) + return -1; + + tuple = take_bits(ds, bits); + + for (i = digits - 1; i >= 0; i--) + { + data->payload[data->payload_len + i] = tuple % 10 + '0'; + tuple /= 10; + } + + data->payload_len += digits; + return 0; +} + +static quirc_decode_error_t decode_numeric(struct quirc_data *data, + struct datastream *ds) +{ + int bits = 14; + int count; + + if (data->version < 10) + bits = 10; + else if (data->version < 27) + bits = 12; + + count = take_bits(ds, bits); + if (data->payload_len + count + 1 > QUIRC_MAX_PAYLOAD) + return QUIRC_ERROR_DATA_OVERFLOW; + + while (count >= 3) + { + if (numeric_tuple(data, ds, 10, 3) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count -= 3; + } + + if (count >= 2) + { + if (numeric_tuple(data, ds, 7, 2) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count -= 2; + } + + if (count) + { + if (numeric_tuple(data, ds, 4, 1) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count--; + } + + return QUIRC_SUCCESS; +} + +static int alpha_tuple(struct quirc_data *data, + struct datastream *ds, + int bits, int digits) +{ + int tuple; + int i; + + if (bits_remaining(ds) < bits) + return -1; + + tuple = take_bits(ds, bits); + + for (i = 0; i < digits; i++) + { + static const char *alpha_map = + "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"; + + data->payload[data->payload_len + digits - i - 1] = + alpha_map[tuple % 45]; + tuple /= 45; + } + + data->payload_len += digits; + return 0; +} + +static quirc_decode_error_t decode_alpha(struct quirc_data *data, + struct datastream *ds) +{ + int bits = 13; + int count; + + if (data->version < 10) + bits = 9; + else if (data->version < 27) + bits = 11; + + count = take_bits(ds, bits); + if (data->payload_len + count + 1 > QUIRC_MAX_PAYLOAD) + return QUIRC_ERROR_DATA_OVERFLOW; + + while (count >= 2) + { + if (alpha_tuple(data, ds, 11, 2) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count -= 2; + } + + if (count) + { + if (alpha_tuple(data, ds, 6, 1) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count--; + } + + return QUIRC_SUCCESS; +} + +static quirc_decode_error_t decode_byte(struct quirc_data *data, + struct datastream *ds) +{ + int bits = 16; + int count; + int i; + + if (data->version < 10) + bits = 8; + + count = take_bits(ds, bits); + if (data->payload_len + count + 1 > QUIRC_MAX_PAYLOAD) + return QUIRC_ERROR_DATA_OVERFLOW; + if (bits_remaining(ds) < count * 8) + return QUIRC_ERROR_DATA_UNDERFLOW; + + for (i = 0; i < count; i++) + data->payload[data->payload_len++] = take_bits(ds, 8); + + return QUIRC_SUCCESS; +} + +static quirc_decode_error_t decode_kanji(struct quirc_data *data, + struct datastream *ds) +{ + int bits = 12; + int count; + int i; + + if (data->version < 10) + bits = 8; + else if (data->version < 27) + bits = 10; + + count = take_bits(ds, bits); + if (data->payload_len + count * 2 + 1 > QUIRC_MAX_PAYLOAD) + return QUIRC_ERROR_DATA_OVERFLOW; + if (bits_remaining(ds) < count * 13) + return QUIRC_ERROR_DATA_UNDERFLOW; + + for (i = 0; i < count; i++) + { + int d = take_bits(ds, 13); + int msB = d / 0xc0; + int lsB = d % 0xc0; + int intermediate = (msB << 8) | lsB; + uint16_t sjw; + + if (intermediate + 0x8140 <= 0x9ffc) + { + /* bytes are in the range 0x8140 to 0x9FFC */ + sjw = intermediate + 0x8140; + } + else + { + /* bytes are in the range 0xE040 to 0xEBBF */ + sjw = intermediate + 0xc140; + } + + data->payload[data->payload_len++] = sjw >> 8; + data->payload[data->payload_len++] = sjw & 0xff; + } + + return QUIRC_SUCCESS; +} + +static quirc_decode_error_t decode_eci(struct quirc_data *data, + struct datastream *ds) +{ + if (bits_remaining(ds) < 8) + return QUIRC_ERROR_DATA_UNDERFLOW; + + data->eci = take_bits(ds, 8); + + if ((data->eci & 0xc0) == 0x80) + { + if (bits_remaining(ds) < 8) + return QUIRC_ERROR_DATA_UNDERFLOW; + + data->eci = (data->eci << 8) | take_bits(ds, 8); + } + else if ((data->eci & 0xe0) == 0xc0) + { + if (bits_remaining(ds) < 16) + return QUIRC_ERROR_DATA_UNDERFLOW; + + data->eci = (data->eci << 16) | take_bits(ds, 16); + } + + return QUIRC_SUCCESS; +} + +static quirc_decode_error_t decode_payload(struct quirc_data *data, + struct datastream *ds) +{ + while (bits_remaining(ds) >= 4) + { + quirc_decode_error_t err = QUIRC_SUCCESS; + int type = take_bits(ds, 4); + + switch (type) + { + case QUIRC_DATA_TYPE_NUMERIC: + err = decode_numeric(data, ds); + break; + + case QUIRC_DATA_TYPE_ALPHA: + err = decode_alpha(data, ds); + break; + + case QUIRC_DATA_TYPE_BYTE: + err = decode_byte(data, ds); + break; + + case QUIRC_DATA_TYPE_KANJI: + err = decode_kanji(data, ds); + break; + + case 7: + err = decode_eci(data, ds); + break; + + default: + goto done; + } + + if (err) + return err; + + if (!(type & (type - 1)) && (type > data->data_type)) + data->data_type = type; + } + +done: + + /* Add nul terminator to all payloads */ + if (data->payload_len >= sizeof(data->payload)) + data->payload_len--; + data->payload[data->payload_len] = 0; + + return QUIRC_SUCCESS; +} + +quirc_decode_error_t quirc_decode(const struct quirc_code *code, + struct quirc_data *data) +{ + quirc_decode_error_t err; + struct datastream *ds = ps_malloc(sizeof(struct datastream)); + + if ((code->size - 17) % 4) + { + free(ds); + return QUIRC_ERROR_INVALID_GRID_SIZE; + } + + memset(data, 0, sizeof(*data)); + memset(ds, 0, sizeof(*ds)); + + data->version = (code->size - 17) / 4; + + if (data->version < 1 || + data->version > QUIRC_MAX_VERSION) + { + free(ds); + return QUIRC_ERROR_INVALID_VERSION; + } + + /* Read format information -- try both locations */ + err = read_format(code, data, 0); + if (err) + err = read_format(code, data, 1); + if (err) + { + free(ds); + return err; + } + + read_data(code, data, ds); + err = codestream_ecc(data, ds); + if (err) + { + free(ds); + return err; + } + + err = decode_payload(data, ds); + if (err) + { + free(ds); + return err; + } + + free(ds); + return QUIRC_SUCCESS; +} \ No newline at end of file diff --git a/ESP32QRReaderDBWriterVideoStreamer/defines.h b/ESP32QRReaderDBWriterVideoStreamer/defines.h new file mode 100644 index 0000000..ed63a72 --- /dev/null +++ b/ESP32QRReaderDBWriterVideoStreamer/defines.h @@ -0,0 +1,381 @@ +/**************************************************************************************************************************** + 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 DEBUG_ESP8266_AT_WEBSERVER_PORT Serial + +// Debug Level from 0 to 4 +#define _ESP_AT_LOGLEVEL_ 1 + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ! (ESP8266 || ESP32 ) + // Select only one of these libraries, only for boards other than ESP8266/ESP32 + #define USING_WIFI_ESP8266_AT false + #define USING_WIFININA_GENERIC false + #define USING_WIFININA false + #define USING_WIFIESPAT_LIB true + #define USING_WIFI_CUSTOM false +#endif + +#if defined(ARDUINO_SAMD_MKR1000) + #if defined(USE_WIFI_NINA) + #undef USE_WIFI_NINA + #endif + #define USE_WIFI_NINA false + #define USE_WIFI101 true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFI_USE_NRF528XX) + #undef WIFI_USE_NRF528XX + #endif + #define WIFI_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFI_USE_SAMD) + #undef WIFI_USE_SAMD + #endif + #define WIFI_USE_SAMD true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFI_USE_SAM_DUE) + #undef WIFI_USE_SAM_DUE + #endif + #define WIFI_USE_SAM_DUE true + #warning Use SAM_DUE architecture +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFI_USE_STM32) + #undef WIFI_USE_STM32 + #endif + #define WIFI_USE_STM32 true +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFI_USE_RP2040) + #undef WIFI_USE_RP2040 + #endif + #define WIFI_USE_RP2040 true +#endif + +#ifdef CORE_TEENSY + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For Teensy 4.1/4.0 + #define EspSerial Serial2 //Serial2, Pin RX2 : 7, TX2 : 8 + #endif + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" +#endif + +#elif defined(WIFI_USE_NRF528XX) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif defined(WIFI_USE_SAMD) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For SAMD + #define EspSerial Serial1 + #endif + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif defined(WIFI_USE_STM32) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For STM32 + #if defined(ARDUINO_NUCLEO_F767ZI) + #warning Nucleo-144 NUCLEO_F767ZI board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); + #elif defined(ARDUINO_NUCLEO_L053R8) + #warning Nucleo-64 NUCLEO_L053R8 board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); // (PA3, PA2); + #endif + + #warning EspSerial using SERIAL_PORT_HARDWARE, can be Serial or Serial1. See your board variant.h + #define EspSerial SERIAL_PORT_HARDWARE //Serial1 + #endif + + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif (ESP8266) + #warning ESP8266 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif (ESP32) + #warning ESP32 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif defined(WIFI_USE_RP2040) && !defined(ARDUINO_ARCH_MBED) + + // For RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + +#elif defined(WIFI_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + // For MBED RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#else + // For Mega + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #define BOARD_TYPE "AVR Mega" +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#endif + +#endif //defines_h diff --git a/ESP32QRReaderDBWriterVideoStreamer/fmath.h b/ESP32QRReaderDBWriterVideoStreamer/fmath.h new file mode 100644 index 0000000..76c3b93 --- /dev/null +++ b/ESP32QRReaderDBWriterVideoStreamer/fmath.h @@ -0,0 +1,70 @@ +/* + * This file is part of the OpenMV project. + * Copyright (c) 2013/2014 Ibrahim Abdelkader + * This work is licensed under the MIT license, see the file LICENSE for details. + * + * Fast approximate math functions. + * + */ +#ifndef __FMATH_H +#define __FMATH_H +#include +#include + +static inline float fast_sqrtf(float x) +{ + //return sqrtf(x); + asm("fsqrt.s %0, %1" + : "=f"(x) + : "f"(x)); + return x; +} +static inline int fast_floorf(float x) +{ + return (int)(x); +} + +static inline int fast_ceilf(float x) +{ + return (int)(x + 0.9999f); +} + +static inline int fast_roundf(float x) +{ + return (int)(x); +} + +static inline float fast_fabsf(float d) +{ + return fabsf(d); +} + +extern int fast_floorf(float x); +extern int fast_ceilf(float x); +extern int fast_roundf(float x); +extern float fast_atanf(float x); +extern float fast_atan2f(float y, float x); +extern float fast_expf(float x); +extern float fast_cbrtf(float d); +extern float fast_fabsf(float d); +extern float fast_log(float x); +extern float fast_log2(float x); +extern float fast_powf(float a, float b); + +/*#define fast_sqrtf(x) (sqrtf(x)) +#define fast_floorf(x) ((int)floorf(x)) +#define fast_ceilf(x) ((int)ceilf(x)) +#define fast_roundf(x) ((int)roundf(x)) +#define fast_atanf(x) (atanf(x)) +#define fast_atan2f(x,y) (atan2f((x),(y))) +#define fast_expf(x) (expf(x)) +#define fast_cbrtf(x) (cbrtf(x)) +#define fast_fabsf(x) (fabsf(x)) +#define fast_log(x) (log(x)) +#define fast_log2(x) (log2(x)) +#define fast_powf(x,y) (powf((x),(y))) +*/ + +extern const float cos_table[360]; +extern const float sin_table[360]; +#endif // __FMATH_H \ No newline at end of file diff --git a/ESP32QRReaderDBWriterVideoStreamer/identify.c b/ESP32QRReaderDBWriterVideoStreamer/identify.c new file mode 100644 index 0000000..d0d0316 --- /dev/null +++ b/ESP32QRReaderDBWriterVideoStreamer/identify.c @@ -0,0 +1,1286 @@ +/* quirc - QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include +#include + +#include "fmath.h" +#include "collections.h" +#include "quirc_internal.h" + +/************************************************************************ + * Linear algebra routines + */ + +static int line_intersect(const struct quirc_point *p0, + const struct quirc_point *p1, + const struct quirc_point *q0, + const struct quirc_point *q1, + struct quirc_point *r) +{ + /* (a, b) is perpendicular to line p */ + int a = -(p1->y - p0->y); + int b = p1->x - p0->x; + + /* (c, d) is perpendicular to line q */ + int c = -(q1->y - q0->y); + int d = q1->x - q0->x; + + /* e and f are dot products of the respective vectors with p and q */ + int e = a * p1->x + b * p1->y; + int f = c * q1->x + d * q1->y; + + /* Now we need to solve: + * [a b] [rx] [e] + * [c d] [ry] = [f] + * + * We do this by inverting the matrix and applying it to (e, f): + * [ d -b] [e] [rx] + * 1/det [-c a] [f] = [ry] + */ + int det = (a * d) - (b * c); + + if (!det) + return 0; + + r->x = (d * e - b * f) / det; + r->y = (-c * e + a * f) / det; + + return 1; +} + +static void perspective_setup(float *c, + const struct quirc_point *rect, + float w, float h) +{ + float x0 = rect[0].x; + float y0 = rect[0].y; + float x1 = rect[1].x; + float y1 = rect[1].y; + float x2 = rect[2].x; + float y2 = rect[2].y; + float x3 = rect[3].x; + float y3 = rect[3].y; + + float wden = w * (x2 * y3 - x3 * y2 + (x3 - x2) * y1 + x1 * (y2 - y3)); + float hden = h * (x2 * y3 + x1 * (y2 - y3) - x3 * y2 + (x3 - x2) * y1); + + c[0] = (x1 * (x2 * y3 - x3 * y2) + x0 * (-x2 * y3 + x3 * y2 + (x2 - x3) * y1) + + x1 * (x3 - x2) * y0) / + wden; + c[1] = -(x0 * (x2 * y3 + x1 * (y2 - y3) - x2 * y1) - x1 * x3 * y2 + x2 * x3 * y1 + (x1 * x3 - x2 * x3) * y0) / hden; + c[2] = x0; + c[3] = (y0 * (x1 * (y3 - y2) - x2 * y3 + x3 * y2) + y1 * (x2 * y3 - x3 * y2) + + x0 * y1 * (y2 - y3)) / + wden; + c[4] = (x0 * (y1 * y3 - y2 * y3) + x1 * y2 * y3 - x2 * y1 * y3 + + y0 * (x3 * y2 - x1 * y2 + (x2 - x3) * y1)) / + hden; + c[5] = y0; + c[6] = (x1 * (y3 - y2) + x0 * (y2 - y3) + (x2 - x3) * y1 + (x3 - x2) * y0) / wden; + c[7] = (-x2 * y3 + x1 * y3 + x3 * y2 + x0 * (y1 - y2) - x3 * y1 + (x2 - x1) * y0) / + hden; +} + +static void perspective_map(const float *c, + float u, float v, struct quirc_point *ret) +{ + float den = c[6] * u + c[7] * v + 1.0; + float x = (c[0] * u + c[1] * v + c[2]) / den; + float y = (c[3] * u + c[4] * v + c[5]) / den; + + ret->x = fast_roundf(x); + ret->y = fast_roundf(y); +} + +static void perspective_unmap(const float *c, + const struct quirc_point *in, + float *u, float *v) +{ + float x = in->x; + float y = in->y; + float den = -c[0] * c[7] * y + c[1] * c[6] * y + (c[3] * c[7] - c[4] * c[6]) * x + + c[0] * c[4] - c[1] * c[3]; + + *u = -(c[1] * (y - c[5]) - c[2] * c[7] * y + (c[5] * c[7] - c[4]) * x + c[2] * c[4]) / + den; + *v = (c[0] * (y - c[5]) - c[2] * c[6] * y + (c[5] * c[6] - c[3]) * x + c[2] * c[3]) / + den; +} + +/************************************************************************ + * Span-based floodfill routine + */ + +typedef void (*span_func_t)(void *user_data, int y, int left, int right); + +typedef struct xylf +{ + int16_t x, y, l, r; +} __attribute__((aligned(8))) +xylf_t; + +//计算该区域的面积,from是像素颜色,to是区块标号,user_data是申请的区块结构体,func是计算面积的函数 +static void flood_fill_seed(struct quirc *q, int x, int y, int from, int to, + span_func_t func, void *user_data, + int depth) +{ + (void)depth; // unused + + lifo_t lifo; + size_t lifo_len; + lifo_alloc_all(&lifo, &lifo_len, sizeof(xylf_t)); + //late in first out. 申请xylf_t的lifo,一次申请完,长度存储在lifo_len中 + + for (;;) + { + int left = x; + int right = x; + int i; + quirc_pixel_t *row = q->pixels + y * q->w; //行起始地址 + //查找左右边界 + while (left > 0 && row[left - 1] == from) + left--; + + while (right < q->w - 1 && row[right + 1] == from) + right++; + + /* Fill the extent 对应像素标记为区块号*/ + for (i = left; i <= right; i++) + row[i] = to; + //累加区域内的像素点数作为面积 + if (func) + func(user_data, y, left, right); + + for (;;) + { + if (lifo_size(&lifo) < lifo_len) + { //栈中的数量 + /* Seed new flood-fills */ + if (y > 0) + { //查找上一行有没有在同一区域的点 + row = q->pixels + (y - 1) * q->w; + + bool recurse = false; + for (i = left; i <= right; i++) + if (row[i] == from) + { //相同区域,则入栈原来的区块 + xylf_t context; + context.x = x; + context.y = y; + context.l = left; + context.r = right; + lifo_enqueue(&lifo, &context); + //mp_printf(&mp_plat_print, "#x=%x,y=%d;x1=%d,y1=%d\n",x,y,i,y-1); + x = i; + y = y - 1; + recurse = true; + break; + } + if (recurse) + break; + } + //查找下一行有没有在同一区域的点 + if (y < q->h - 1) + { + row = q->pixels + (y + 1) * q->w; + + bool recurse = false; + for (i = left; i <= right; i++) + if (row[i] == from) + { + xylf_t context; + context.x = x; + context.y = y; + context.l = left; + context.r = right; + lifo_enqueue(&lifo, &context); + //mp_printf(&mp_plat_print, "#x=%x,y=%d;x1=%d,y1=%d\n",x,y,i,y+1); + x = i; + y = y + 1; + recurse = true; + break; + } + if (recurse) + break; + } + } + + if (!lifo_size(&lifo)) + { + lifo_free(&lifo); //如果最起始为止就没找到,那么返回 + return; + } + //本次迭代,往上,往下找边界(相同颜色像素点),直到找不到为止 + //找到边界后,出栈上层像素点,回退回去 + xylf_t context; + lifo_dequeue(&lifo, &context); //这里存疑,如果都没有的话,dequeue就会反向溢出吧。。 + x = context.x; + y = context.y; + left = context.l; + right = context.r; + //mp_printf(&mp_plat_print, "#deq: x=%x,y=%d\n",x,y); + } //找到相同from,break到这外面 + } +} + +/************************************************************************ + * Adaptive thresholding + */ + +#define THRESHOLD_S_MIN 1 +#define THRESHOLD_S_DEN 8 +#define THRESHOLD_T 5 + +static void threshold(struct quirc *q) +{ + int x, y; + int avg_w = 0; + int avg_u = 0; + int threshold_s = q->w / THRESHOLD_S_DEN; + quirc_pixel_t *row = q->pixels; + + /* + * Ensure a sane, non-zero value for threshold_s. + * + * threshold_s can be zero if the image width is small. We need to avoid + * SIGFPE as it will be used as divisor. + */ + if (threshold_s < THRESHOLD_S_MIN) + threshold_s = THRESHOLD_S_MIN; + + for (y = 0; y < q->h; y++) + { + int row_average[q->w]; + + memset(row_average, 0, sizeof(row_average)); + + for (x = 0; x < q->w; x++) + { + int w, u; + + if (y & 1) + { + w = x; + u = q->w - 1 - x; + } + else + { + w = q->w - 1 - x; + u = x; + } + + avg_w = (avg_w * (threshold_s - 1)) / + threshold_s + + row[w]; + avg_u = (avg_u * (threshold_s - 1)) / + threshold_s + + row[u]; + + row_average[w] += avg_w; + row_average[u] += avg_u; + } + + for (x = 0; x < q->w; x++) + { + if (row[x] < row_average[x] * + (100 - THRESHOLD_T) / (200 * threshold_s)) + row[x] = QUIRC_PIXEL_BLACK; + else + row[x] = QUIRC_PIXEL_WHITE; + } + + row += q->w; + } +} + +static void area_count(void *user_data, int y, int left, int right) +{ + ((struct quirc_region *)user_data)->count += right - left + 1; +} + +static int region_code(struct quirc *q, int x, int y) +{ //region指的是QRcode的区域,成员为区域的坐标,像素面积,是否顶点 + int pixel; + struct quirc_region *box; + int region; + + if (x < 0 || y < 0 || x >= q->w || y >= q->h) + return -1; + + pixel = q->pixels[y * q->w + x]; + //预先判断非正常的像素情况,退出 + if (pixel >= QUIRC_PIXEL_REGION) + return pixel; + + if (pixel == QUIRC_PIXEL_WHITE) + return -1; + + if (q->num_regions >= QUIRC_MAX_REGIONS) + return -1; + //新建一个区域 + region = q->num_regions; + box = &q->regions[q->num_regions++]; + + memset(box, 0, sizeof(*box)); + + box->seed.x = x; + box->seed.y = y; + box->capstone = -1; + //计算该区域的面积 + flood_fill_seed(q, x, y, pixel, region, area_count, box, 0); + + return region; +} + +struct polygon_score_data +{ + struct quirc_point ref; + + int scores[4]; + struct quirc_point *corners; +} __attribute__((aligned(8))); + +static void find_one_corner(void *user_data, int y, int left, int right) +{ + struct polygon_score_data *psd = + (struct polygon_score_data *)user_data; + int xs[2] = {left, right}; + int dy = y - psd->ref.y; + int i; + + for (i = 0; i < 2; i++) + { + int dx = xs[i] - psd->ref.x; + int d = dx * dx + dy * dy; + + if (d > psd->scores[0]) + { + psd->scores[0] = d; + psd->corners[0].x = xs[i]; + psd->corners[0].y = y; + } + } +} + +static void find_other_corners(void *user_data, int y, int left, int right) +{ + struct polygon_score_data *psd = + (struct polygon_score_data *)user_data; + int xs[2] = {left, right}; + int i; + + for (i = 0; i < 2; i++) + { + int up = xs[i] * psd->ref.x + y * psd->ref.y; + int right = xs[i] * -psd->ref.y + y * psd->ref.x; + int scores[4] = {up, right, -up, -right}; + int j; + + for (j = 0; j < 4; j++) + { + if (scores[j] > psd->scores[j]) + { + psd->scores[j] = scores[j]; + psd->corners[j].x = xs[i]; + psd->corners[j].y = y; + } + } + } +} + +static void find_region_corners(struct quirc *q, + int rcode, const struct quirc_point *ref, + struct quirc_point *corners) +{ + struct quirc_region *region = &q->regions[rcode]; + struct polygon_score_data psd; + int i; + + memset(&psd, 0, sizeof(psd)); + psd.corners = corners; + + memcpy(&psd.ref, ref, sizeof(psd.ref)); + psd.scores[0] = -1; + flood_fill_seed(q, region->seed.x, region->seed.y, + rcode, QUIRC_PIXEL_BLACK, + find_one_corner, &psd, 0); + + psd.ref.x = psd.corners[0].x - psd.ref.x; + psd.ref.y = psd.corners[0].y - psd.ref.y; + + for (i = 0; i < 4; i++) + memcpy(&psd.corners[i], ®ion->seed, + sizeof(psd.corners[i])); + + i = region->seed.x * psd.ref.x + region->seed.y * psd.ref.y; + psd.scores[0] = i; + psd.scores[2] = -i; + i = region->seed.x * -psd.ref.y + region->seed.y * psd.ref.x; + psd.scores[1] = i; + psd.scores[3] = -i; + + flood_fill_seed(q, region->seed.x, region->seed.y, + QUIRC_PIXEL_BLACK, rcode, + find_other_corners, &psd, 0); +} + +static void record_capstone(struct quirc *q, int ring, int stone) +{ + struct quirc_region *stone_reg = &q->regions[stone]; + struct quirc_region *ring_reg = &q->regions[ring]; + struct quirc_capstone *capstone; + int cs_index; + + if (q->num_capstones >= QUIRC_MAX_CAPSTONES) + return; + + cs_index = q->num_capstones; + capstone = &q->capstones[q->num_capstones++]; + + memset(capstone, 0, sizeof(*capstone)); + + capstone->qr_grid = -1; + capstone->ring = ring; + capstone->stone = stone; + stone_reg->capstone = cs_index; + ring_reg->capstone = cs_index; + + /* Find the corners of the ring */ + find_region_corners(q, ring, &stone_reg->seed, capstone->corners); + + /* Set up the perspective transform and find the center */ + perspective_setup(capstone->c, capstone->corners, 7.0, 7.0); + perspective_map(capstone->c, 3.5, 3.5, &capstone->center); +} + +static void test_capstone(struct quirc *q, int x, int y, int *pb) +{ + int ring_right = region_code(q, x - pb[4], y); //x-pb[4]是标记环右边的左侧 + int stone = region_code(q, x - pb[4] - pb[3] - pb[2], y); //实心点左侧 + int ring_left = region_code(q, x - pb[4] - pb[3] - pb[2] - pb[1] - pb[0], y); //环左侧 + struct quirc_region *stone_reg; + struct quirc_region *ring_reg; + int ratio; + //以下检测顶点标记是否符合规范,环称为ring,中间称为stone + if (ring_left < 0 || ring_right < 0 || stone < 0) + return; + + /* Left and ring of ring should be connected */ + if (ring_left != ring_right) + return; + + /* Ring should be disconnected from stone */ + if (ring_left == stone) + return; + + stone_reg = &q->regions[stone]; + ring_reg = &q->regions[ring_left]; + + /* Already detected */ + if (stone_reg->capstone >= 0 || ring_reg->capstone >= 0) + return; + + /* Ratio should ideally be 37.5 中间实心点占面积比例应该在37.5%左右*/ + ratio = stone_reg->count * 100 / ring_reg->count; + if (ratio < 10 || ratio > 70) + return; + + record_capstone(q, ring_left, stone); +} + +static void finder_scan(struct quirc *q, int y) +{ + quirc_pixel_t *row = q->pixels + y * q->w; + int x; + int last_color = 0; + int run_length = 0; + int run_count = 0; + int pb[5]; //means QRcode's pixel width + + memset(pb, 0, sizeof(pb)); + for (x = 0; x < q->w; x++) + { + int color = row[x] ? 1 : 0; + + if (x && color != last_color) + { // color is different + memmove(pb, pb + 1, sizeof(pb[0]) * 4); //left move in one data + pb[4] = run_length; //run how many pix to get different color + run_length = 0; + run_count++; //get more than 5 time color jump + + if (!color && run_count >= 5) + { // find the marker of QRcode(three corner's marker) + static int check[5] = {1, 1, 3, 1, 1}; + int avg, err; + int i; + int ok = 1; + + avg = (pb[0] + pb[1] + pb[3] + pb[4]) / 4; + err = avg * 3 / 4; + + for (i = 0; i < 5; i++) + if (pb[i] < check[i] * avg - err || + pb[i] > check[i] * avg + err) + ok = 0; + + if (ok) + test_capstone(q, x, y, pb); + } + } + + run_length++; + last_color = color; + } +} + +static void find_alignment_pattern(struct quirc *q, int index) +{ + struct quirc_grid *qr = &q->grids[index]; + struct quirc_capstone *c0 = &q->capstones[qr->caps[0]]; + struct quirc_capstone *c2 = &q->capstones[qr->caps[2]]; + struct quirc_point a; + struct quirc_point b; + struct quirc_point c; + int size_estimate; + int step_size = 1; + int dir = 0; + float u, v; + + /* Grab our previous estimate of the alignment pattern corner */ + memcpy(&b, &qr->align, sizeof(b)); + + /* Guess another two corners of the alignment pattern so that we + * can estimate its size. + */ + perspective_unmap(c0->c, &b, &u, &v); + perspective_map(c0->c, u, v + 1.0, &a); + perspective_unmap(c2->c, &b, &u, &v); + perspective_map(c2->c, u + 1.0, v, &c); + + size_estimate = abs((a.x - b.x) * -(c.y - b.y) + + (a.y - b.y) * (c.x - b.x)); + + /* Spiral outwards from the estimate point until we find something + * roughly the right size. Don't look too far from the estimate + * point. + */ + while (step_size * step_size < size_estimate * 100) + { + static const int dx_map[] = {1, 0, -1, 0}; + static const int dy_map[] = {0, -1, 0, 1}; + int i; + + for (i = 0; i < step_size; i++) + { + int code = region_code(q, b.x, b.y); + + if (code >= 0) + { + struct quirc_region *reg = &q->regions[code]; + + if (reg->count >= size_estimate / 2 && + reg->count <= size_estimate * 2) + { + qr->align_region = code; + return; + } + } + + b.x += dx_map[dir]; + b.y += dy_map[dir]; + } + + dir = (dir + 1) % 4; + if (!(dir & 1)) + step_size++; + } +} + +static void find_leftmost_to_line(void *user_data, int y, int left, int right) +{ + struct polygon_score_data *psd = + (struct polygon_score_data *)user_data; + int xs[2] = {left, right}; + int i; + + for (i = 0; i < 2; i++) + { + int d = -psd->ref.y * xs[i] + psd->ref.x * y; + + if (d < psd->scores[0]) + { + psd->scores[0] = d; + psd->corners[0].x = xs[i]; + psd->corners[0].y = y; + } + } +} + +/* Do a Bresenham scan from one point to another and count the number + * of black/white transitions. + */ +static int timing_scan(const struct quirc *q, + const struct quirc_point *p0, + const struct quirc_point *p1) +{ + int n = p1->x - p0->x; + int d = p1->y - p0->y; + int x = p0->x; + int y = p0->y; + int *dom, *nondom; + int dom_step; + int nondom_step; + int a = 0; + int i; + int run_length = 0; + int count = 0; + + if (p0->x < 0 || p0->y < 0 || p0->x >= q->w || p0->y >= q->h) + return -1; + if (p1->x < 0 || p1->y < 0 || p1->x >= q->w || p1->y >= q->h) + return -1; + + if (abs(n) > abs(d)) + { + int swap = n; + + n = d; + d = swap; + + dom = &x; + nondom = &y; + } + else + { + dom = &y; + nondom = &x; + } + + if (n < 0) + { + n = -n; + nondom_step = -1; + } + else + { + nondom_step = 1; + } + + if (d < 0) + { + d = -d; + dom_step = -1; + } + else + { + dom_step = 1; + } + + x = p0->x; + y = p0->y; + for (i = 0; i <= d; i++) + { + int pixel; + + if (y < 0 || y >= q->h || x < 0 || x >= q->w) + break; + + pixel = q->pixels[y * q->w + x]; + + if (pixel) + { + if (run_length >= 2) + count++; + run_length = 0; + } + else + { + run_length++; + } + + a += n; + *dom += dom_step; + if (a >= d) + { + *nondom += nondom_step; + a -= d; + } + } + + return count; +} + +/* Try the measure the timing pattern for a given QR code. This does + * not require the global perspective to have been set up, but it + * does require that the capstone corners have been set to their + * canonical rotation. + * + * For each capstone, we find a point in the middle of the ring band + * which is nearest the centre of the code. Using these points, we do + * a horizontal and a vertical timing scan. + */ +static int measure_timing_pattern(struct quirc *q, int index) +{ + struct quirc_grid *qr = &q->grids[index]; + int i; + int scan; + int ver; + int size; + + for (i = 0; i < 3; i++) + { + static const float us[] = {6.5, 6.5, 0.5}; + static const float vs[] = {0.5, 6.5, 6.5}; + struct quirc_capstone *cap = &q->capstones[qr->caps[i]]; + + perspective_map(cap->c, us[i], vs[i], &qr->tpep[i]); + } + + qr->hscan = timing_scan(q, &qr->tpep[1], &qr->tpep[2]); + qr->vscan = timing_scan(q, &qr->tpep[1], &qr->tpep[0]); + + scan = qr->hscan; + if (qr->vscan > scan) + scan = qr->vscan; + + /* If neither scan worked, we can't go any further. */ + if (scan < 0) + return -1; + + /* Choose the nearest allowable grid size */ + size = scan * 2 + 13; + ver = (size - 15) / 4; + qr->grid_size = ver * 4 + 17; + + return 0; +} + +/* Read a cell from a grid using the currently set perspective + * transform. Returns +/- 1 for black/white, 0 for cells which are + * out of image bounds. + */ +static int read_cell(const struct quirc *q, int index, int x, int y) +{ + const struct quirc_grid *qr = &q->grids[index]; + struct quirc_point p; + + perspective_map(qr->c, x + 0.5, y + 0.5, &p); + if (p.y < 0 || p.y >= q->h || p.x < 0 || p.x >= q->w) + return 0; + + return q->pixels[p.y * q->w + p.x] ? 1 : -1; +} + +static int fitness_cell(const struct quirc *q, int index, int x, int y) +{ + const struct quirc_grid *qr = &q->grids[index]; + int score = 0; + int u, v; + + for (v = 0; v < 3; v++) + for (u = 0; u < 3; u++) + { + static const float offsets[] = {0.3, 0.5, 0.7}; + struct quirc_point p; + + perspective_map(qr->c, x + offsets[u], + y + offsets[v], &p); + if (p.y < 0 || p.y >= q->h || p.x < 0 || p.x >= q->w) + continue; + + if (q->pixels[p.y * q->w + p.x]) + score++; + else + score--; + } + + return score; +} + +static int fitness_ring(const struct quirc *q, int index, int cx, int cy, + int radius) +{ + int i; + int score = 0; + + for (i = 0; i < radius * 2; i++) + { + score += fitness_cell(q, index, cx - radius + i, cy - radius); + score += fitness_cell(q, index, cx - radius, cy + radius - i); + score += fitness_cell(q, index, cx + radius, cy - radius + i); + score += fitness_cell(q, index, cx + radius - i, cy + radius); + } + + return score; +} + +static int fitness_apat(const struct quirc *q, int index, int cx, int cy) +{ + return fitness_cell(q, index, cx, cy) - + fitness_ring(q, index, cx, cy, 1) + + fitness_ring(q, index, cx, cy, 2); +} + +static int fitness_capstone(const struct quirc *q, int index, int x, int y) +{ + x += 3; + y += 3; + + return fitness_cell(q, index, x, y) + + fitness_ring(q, index, x, y, 1) - + fitness_ring(q, index, x, y, 2) + + fitness_ring(q, index, x, y, 3); +} + +/* Compute a fitness score for the currently configured perspective + * transform, using the features we expect to find by scanning the + * grid. + */ +static int fitness_all(const struct quirc *q, int index) +{ + const struct quirc_grid *qr = &q->grids[index]; + int version = (qr->grid_size - 17) / 4; + const struct quirc_version_info *info = &quirc_version_db[version]; + int score = 0; + int i, j; + int ap_count; + + /* Check the timing pattern */ + for (i = 0; i < qr->grid_size - 14; i++) + { + int expect = (i & 1) ? 1 : -1; + + score += fitness_cell(q, index, i + 7, 6) * expect; + score += fitness_cell(q, index, 6, i + 7) * expect; + } + + /* Check capstones */ + score += fitness_capstone(q, index, 0, 0); + score += fitness_capstone(q, index, qr->grid_size - 7, 0); + score += fitness_capstone(q, index, 0, qr->grid_size - 7); + + if (version < 0 || version > QUIRC_MAX_VERSION) + return score; + + /* Check alignment patterns */ + ap_count = 0; + while ((ap_count < QUIRC_MAX_ALIGNMENT) && info->apat[ap_count]) + ap_count++; + + for (i = 1; i + 1 < ap_count; i++) + { + score += fitness_apat(q, index, 6, info->apat[i]); + score += fitness_apat(q, index, info->apat[i], 6); + } + + for (i = 1; i < ap_count; i++) + for (j = 1; j < ap_count; j++) + score += fitness_apat(q, index, + info->apat[i], info->apat[j]); + //mp_printf(&mp_plat_print, "##score=%d\n",score); + return score; +} + +static void jiggle_perspective(struct quirc *q, int index) +{ + struct quirc_grid *qr = &q->grids[index]; + int best = fitness_all(q, index); + int pass; + float adjustments[8]; + int i; + + for (i = 0; i < 8; i++) + adjustments[i] = qr->c[i] * 0.02; + + for (pass = 0; pass < 5; pass++) + { + for (i = 0; i < 16; i++) + { + int j = i >> 1; + int test; + float old = qr->c[j]; + float step = adjustments[j]; + float new; + + if (i & 1) + new = old + step; + else + new = old - step; + + qr->c[j] = new; + test = fitness_all(q, index); + + if (test > best) + best = test; + else + qr->c[j] = old; + } + + for (i = 0; i < 8; i++) + adjustments[i] *= 0.5; + } +} + +/* Once the capstones are in place and an alignment point has been + * chosen, we call this function to set up a grid-reading perspective + * transform. + */ +static void setup_qr_perspective(struct quirc *q, int index) +{ + struct quirc_grid *qr = &q->grids[index]; + struct quirc_point rect[4]; + + /* Set up the perspective map for reading the grid */ + memcpy(&rect[0], &q->capstones[qr->caps[1]].corners[0], + sizeof(rect[0])); + memcpy(&rect[1], &q->capstones[qr->caps[2]].corners[0], + sizeof(rect[0])); + memcpy(&rect[2], &qr->align, sizeof(rect[0])); + memcpy(&rect[3], &q->capstones[qr->caps[0]].corners[0], + sizeof(rect[0])); + perspective_setup(qr->c, rect, qr->grid_size - 7, qr->grid_size - 7); + + jiggle_perspective(q, index); +} + +/* Rotate the capstone with so that corner 0 is the leftmost with respect + * to the given reference line. + */ +static void rotate_capstone(struct quirc_capstone *cap, + const struct quirc_point *h0, + const struct quirc_point *hd) +{ + struct quirc_point copy[4]; + int j; + int best = 0; + int best_score = 0; + + for (j = 0; j < 4; j++) + { + struct quirc_point *p = &cap->corners[j]; + int score = (p->x - h0->x) * -hd->y + + (p->y - h0->y) * hd->x; + + if (!j || score < best_score) + { + best = j; + best_score = score; + } + } + + /* Rotate the capstone */ + for (j = 0; j < 4; j++) + memcpy(©[j], &cap->corners[(j + best) % 4], + sizeof(copy[j])); + memcpy(cap->corners, copy, sizeof(cap->corners)); + perspective_setup(cap->c, cap->corners, 7.0, 7.0); +} + +static void record_qr_grid(struct quirc *q, int a, int b, int c) +{ + struct quirc_point h0, hd; + int i; + int qr_index; + struct quirc_grid *qr; + + if (q->num_grids >= QUIRC_MAX_GRIDS) + return; + + /* Construct the hypotenuse line from A to C. B should be to + * the left of this line. + */ + memcpy(&h0, &q->capstones[a].center, sizeof(h0)); + hd.x = q->capstones[c].center.x - q->capstones[a].center.x; + hd.y = q->capstones[c].center.y - q->capstones[a].center.y; + + /* Make sure A-B-C is clockwise */ + if ((q->capstones[b].center.x - h0.x) * -hd.y + + (q->capstones[b].center.y - h0.y) * hd.x > + 0) + { + int swap = a; + + a = c; + c = swap; + hd.x = -hd.x; + hd.y = -hd.y; + } + + /* Record the grid and its components */ + qr_index = q->num_grids; + qr = &q->grids[q->num_grids++]; + + memset(qr, 0, sizeof(*qr)); + qr->caps[0] = a; + qr->caps[1] = b; + qr->caps[2] = c; + qr->align_region = -1; + + /* Rotate each capstone so that corner 0 is top-left with respect + * to the grid. + */ + for (i = 0; i < 3; i++) + { + struct quirc_capstone *cap = &q->capstones[qr->caps[i]]; + + rotate_capstone(cap, &h0, &hd); + cap->qr_grid = qr_index; + } + + /* Check the timing pattern. This doesn't require a perspective + * transform. + */ + if (measure_timing_pattern(q, qr_index) < 0) + goto fail; + + /* Make an estimate based for the alignment pattern based on extending + * lines from capstones A and C. + */ + if (!line_intersect(&q->capstones[a].corners[0], + &q->capstones[a].corners[1], + &q->capstones[c].corners[0], + &q->capstones[c].corners[3], + &qr->align)) + goto fail; + + /* On V2+ grids, we should use the alignment pattern. */ + if (qr->grid_size > 21) + { + /* Try to find the actual location of the alignment pattern. */ + find_alignment_pattern(q, qr_index); + + /* Find the point of the alignment pattern closest to the + * top-left of the QR grid. + */ + if (qr->align_region >= 0) + { + struct polygon_score_data psd; + struct quirc_region *reg = + &q->regions[qr->align_region]; + + /* Start from some point inside the alignment pattern */ + memcpy(&qr->align, ®->seed, sizeof(qr->align)); + + memcpy(&psd.ref, &hd, sizeof(psd.ref)); + psd.corners = &qr->align; + psd.scores[0] = -hd.y * qr->align.x + + hd.x * qr->align.y; + + flood_fill_seed(q, reg->seed.x, reg->seed.y, + qr->align_region, QUIRC_PIXEL_BLACK, + NULL, NULL, 0); + flood_fill_seed(q, reg->seed.x, reg->seed.y, + QUIRC_PIXEL_BLACK, qr->align_region, + find_leftmost_to_line, &psd, 0); + } + } + + setup_qr_perspective(q, qr_index); + return; + +fail: + /* We've been unable to complete setup for this grid. Undo what we've + * recorded and pretend it never happened. + */ + for (i = 0; i < 3; i++) + q->capstones[qr->caps[i]].qr_grid = -1; + q->num_grids--; +} + +struct neighbour +{ + int index; + float distance; +} __attribute__((aligned(8))); + +struct neighbour_list +{ + struct neighbour n[QUIRC_MAX_CAPSTONES]; + int count; +} __attribute__((aligned(8))); + +static void test_neighbours(struct quirc *q, int i, + const struct neighbour_list *hlist, + const struct neighbour_list *vlist) +{ + int j, k; + float best_score = 0.0; + int best_h = -1, best_v = -1; + + /* Test each possible grouping */ + for (j = 0; j < hlist->count; j++) + for (k = 0; k < vlist->count; k++) + { + const struct neighbour *hn = &hlist->n[j]; + const struct neighbour *vn = &vlist->n[k]; + float score = fast_fabsf(1.0 - hn->distance / vn->distance); + + if (score > 2.5) + continue; + + if (best_h < 0 || score < best_score) + { + best_h = hn->index; + best_v = vn->index; + best_score = score; + } + } + + if (best_h < 0 || best_v < 0) + return; + + record_qr_grid(q, best_h, i, best_v); +} + +static void test_grouping(struct quirc *q, int i) +{ + struct quirc_capstone *c1 = &q->capstones[i]; + int j; + struct neighbour_list hlist; + struct neighbour_list vlist; + + if (c1->qr_grid >= 0) + return; + + hlist.count = 0; + vlist.count = 0; + + /* Look for potential neighbours by examining the relative gradients + * from this capstone to others. + */ + for (j = 0; j < q->num_capstones; j++) + { + struct quirc_capstone *c2 = &q->capstones[j]; + float u, v; + + if (i == j || c2->qr_grid >= 0) + continue; + + perspective_unmap(c1->c, &c2->center, &u, &v); + + u = fast_fabsf(u - 3.5); + v = fast_fabsf(v - 3.5); + + if (u < 0.2 * v) + { + struct neighbour *n = &hlist.n[hlist.count++]; + + n->index = j; + n->distance = v; + } + + if (v < 0.2 * u) + { + struct neighbour *n = &vlist.n[vlist.count++]; + + n->index = j; + n->distance = u; + } + } + + if (!(hlist.count && vlist.count)) + return; + + test_neighbours(q, i, &hlist, &vlist); +} + +static void pixels_setup(struct quirc *q) +{ + if (sizeof(*q->image) == sizeof(*q->pixels)) + { + q->pixels = (quirc_pixel_t *)q->image; + } + else + { + int x, y; + for (y = 0; y < q->h; y++) + { + for (x = 0; x < q->w; x++) + { + q->pixels[y * q->w + x] = q->image[y * q->w + x]; + } + } + } +} + +uint8_t *quirc_begin(struct quirc *q, int *w, int *h) +{ + q->num_regions = QUIRC_PIXEL_REGION; + q->num_capstones = 0; + q->num_grids = 0; + + if (w) + *w = q->w; + if (h) + *h = q->h; + + return q->image; +} + +void quirc_end(struct quirc *q) +{ + int i; + pixels_setup(q); + threshold(q); + + for (i = 0; i < q->h; i++) + { + finder_scan(q, i); + } + + for (i = 0; i < q->num_capstones; i++) + { + test_grouping(q, i); + } +} + +void quirc_extract(const struct quirc *q, int index, + struct quirc_code *code) +{ + const struct quirc_grid *qr = &q->grids[index]; + int y; + int i = 0; + + if (index < 0 || index > q->num_grids) + return; + + memset(code, 0, sizeof(*code)); + + perspective_map(qr->c, 0.0, 0.0, &code->corners[0]); + perspective_map(qr->c, qr->grid_size, 0.0, &code->corners[1]); + perspective_map(qr->c, qr->grid_size, qr->grid_size, + &code->corners[2]); + perspective_map(qr->c, 0.0, qr->grid_size, &code->corners[3]); + + code->size = qr->grid_size; + + for (y = 0; y < qr->grid_size; y++) + { + int x; + + for (x = 0; x < qr->grid_size; x++) + { + if (read_cell(q, index, x, y) > 0) + code->cell_bitmap[i >> 3] |= (1 << (i & 7)); + + i++; + } + } +} diff --git a/ESP32QRReaderDBWriterVideoStreamer/quirc.c b/ESP32QRReaderDBWriterVideoStreamer/quirc.c new file mode 100644 index 0000000..e5a30fb --- /dev/null +++ b/ESP32QRReaderDBWriterVideoStreamer/quirc.c @@ -0,0 +1,104 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include "quirc_internal.h" +#include + +const char *quirc_version(void) +{ + return "1.0"; +} + +//static struct quirc _q; +struct quirc *quirc_new(void) +{ + struct quirc *q = ps_malloc(sizeof(*q)); + + if (!q) + return NULL; + + memset(q, 0, sizeof(*q)); + return q; +} + +void quirc_destroy(struct quirc *q) +{ + if (q->image) + if (q->image) + free(q->image); + if (sizeof(*q->image) != sizeof(*q->pixels)) + if (q->pixels) + free(q->pixels); + + if (q) + free(q); +} + +//static quirc_pixel_t img_buf[320*240]; +int quirc_resize(struct quirc *q, int w, int h) +{ + if (q->image) + { + free(q->image); + } + uint8_t *new_image = ps_malloc(w * h); + + if (!new_image) + return -1; + + if (sizeof(*q->image) != sizeof(*q->pixels)) + { //should gray, 1==1 + size_t new_size = w * h * sizeof(quirc_pixel_t); + if (q->pixels) + free(q->pixels); + quirc_pixel_t *new_pixels = ps_malloc(new_size); + if (!new_pixels) + { + free(new_image); + return -1; + } + q->pixels = new_pixels; + } + q->image = new_image; + q->w = w; + q->h = h; + return 0; +} + +int quirc_count(const struct quirc *q) +{ + return q->num_grids; +} + +static const char *const error_table[] = { + [QUIRC_SUCCESS] = "Success", + [QUIRC_ERROR_INVALID_GRID_SIZE] = "Invalid grid size", + [QUIRC_ERROR_INVALID_VERSION] = "Invalid version", + [QUIRC_ERROR_FORMAT_ECC] = "Format data ECC failure", + [QUIRC_ERROR_DATA_ECC] = "ECC failure", + [QUIRC_ERROR_UNKNOWN_DATA_TYPE] = "Unknown data type", + [QUIRC_ERROR_DATA_OVERFLOW] = "Data overflow", + [QUIRC_ERROR_DATA_UNDERFLOW] = "Data underflow"}; + +const char *quirc_strerror(quirc_decode_error_t err) +{ + if (err >= 0 && err < sizeof(error_table) / sizeof(error_table[0])) + return error_table[err]; + + return "Unknown error"; +} diff --git a/ESP32QRReaderDBWriterVideoStreamer/quirc.h b/ESP32QRReaderDBWriterVideoStreamer/quirc.h new file mode 100644 index 0000000..ecdc172 --- /dev/null +++ b/ESP32QRReaderDBWriterVideoStreamer/quirc.h @@ -0,0 +1,178 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef QUIRC_H_ +#define QUIRC_H_ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + + struct quirc; + + /* Obtain the library version string. */ + const char *quirc_version(void); + + /* Construct a new QR-code recognizer. This function will return NULL + * if sufficient memory could not be allocated. + */ + struct quirc *quirc_new(void); + + /* Destroy a QR-code recognizer. */ + void quirc_destroy(struct quirc *q); + + /* Resize the QR-code recognizer. The size of an image must be + * specified before codes can be analyzed. + * + * This function returns 0 on success, or -1 if sufficient memory could + * not be allocated. + */ + int quirc_resize(struct quirc *q, int w, int h); + + /* These functions are used to process images for QR-code recognition. + * quirc_begin() must first be called to obtain access to a buffer into + * which the input image should be placed. Optionally, the current + * width and height may be returned. + * + * After filling the buffer, quirc_end() should be called to process + * the image for QR-code recognition. The locations and content of each + * code may be obtained using accessor functions described below. + */ + uint8_t *quirc_begin(struct quirc *q, int *w, int *h); + void quirc_end(struct quirc *q); + + /* This structure describes a location in the input image buffer. */ + struct quirc_point + { + int x; + int y; + } __attribute__((aligned(8))); + + /* This enum describes the various decoder errors which may occur. */ + typedef enum + { + QUIRC_SUCCESS = 0, + QUIRC_ERROR_INVALID_GRID_SIZE, + QUIRC_ERROR_INVALID_VERSION, + QUIRC_ERROR_FORMAT_ECC, + QUIRC_ERROR_DATA_ECC, + QUIRC_ERROR_UNKNOWN_DATA_TYPE, + QUIRC_ERROR_DATA_OVERFLOW, + QUIRC_ERROR_DATA_UNDERFLOW + } quirc_decode_error_t; + + /* Return a string error message for an error code. */ + const char *quirc_strerror(quirc_decode_error_t err); + +/* Limits on the maximum size of QR-codes and their content. */ +#define QUIRC_MAX_BITMAP 3917 +#define QUIRC_MAX_PAYLOAD 8896 + +/* QR-code ECC types. */ +#define QUIRC_ECC_LEVEL_M 0 +#define QUIRC_ECC_LEVEL_L 1 +#define QUIRC_ECC_LEVEL_H 2 +#define QUIRC_ECC_LEVEL_Q 3 + +/* QR-code data types. */ +#define QUIRC_DATA_TYPE_NUMERIC 1 +#define QUIRC_DATA_TYPE_ALPHA 2 +#define QUIRC_DATA_TYPE_BYTE 4 +#define QUIRC_DATA_TYPE_KANJI 8 + +/* Common character encodings */ +#define QUIRC_ECI_ISO_8859_1 1 +#define QUIRC_ECI_IBM437 2 +#define QUIRC_ECI_ISO_8859_2 4 +#define QUIRC_ECI_ISO_8859_3 5 +#define QUIRC_ECI_ISO_8859_4 6 +#define QUIRC_ECI_ISO_8859_5 7 +#define QUIRC_ECI_ISO_8859_6 8 +#define QUIRC_ECI_ISO_8859_7 9 +#define QUIRC_ECI_ISO_8859_8 10 +#define QUIRC_ECI_ISO_8859_9 11 +#define QUIRC_ECI_WINDOWS_874 13 +#define QUIRC_ECI_ISO_8859_13 15 +#define QUIRC_ECI_ISO_8859_15 17 +#define QUIRC_ECI_SHIFT_JIS 20 +#define QUIRC_ECI_UTF_8 26 + + /* This structure is used to return information about detected QR codes + * in the input image. + */ + struct quirc_code + { + /* The four corners of the QR-code, from top left, clockwise */ + struct quirc_point corners[4]; + + /* The number of cells across in the QR-code. The cell bitmap + * is a bitmask giving the actual values of cells. If the cell + * at (x, y) is black, then the following bit is set: + * + * cell_bitmap[i >> 3] & (1 << (i & 7)) + * + * where i = (y * size) + x. + */ + int size; + uint8_t cell_bitmap[QUIRC_MAX_BITMAP]; + } __attribute__((aligned(8))); + + /* This structure holds the decoded QR-code data */ + struct quirc_data + { + /* Various parameters of the QR-code. These can mostly be + * ignored if you only care about the data. + */ + int version; + int ecc_level; + int mask; + + /* This field is the highest-valued data type found in the QR + * code. + */ + int data_type; + + /* Data payload. For the Kanji datatype, payload is encoded as + * Shift-JIS. For all other datatypes, payload is ASCII text. + */ + uint8_t payload[QUIRC_MAX_PAYLOAD]; + int payload_len; + + /* ECI assignment number */ + uint32_t eci; + } __attribute__((aligned(8))); + + /* Return the number of QR-codes identified in the last processed + * image. + */ + int quirc_count(const struct quirc *q); + + /* Extract the QR-code specified by the given index. */ + void quirc_extract(const struct quirc *q, int index, + struct quirc_code *code); + + /* Decode a QR-code, returning the payload data. */ + quirc_decode_error_t quirc_decode(const struct quirc_code *code, + struct quirc_data *data); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/ESP32QRReaderDBWriterVideoStreamer/quirc_internal.h b/ESP32QRReaderDBWriterVideoStreamer/quirc_internal.h new file mode 100644 index 0000000..3fa075c --- /dev/null +++ b/ESP32QRReaderDBWriterVideoStreamer/quirc_internal.h @@ -0,0 +1,121 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef QUIRC_INTERNAL_H_ +#define QUIRC_INTERNAL_H_ + +#include "quirc.h" + +#define QUIRC_PIXEL_WHITE 0 +#define QUIRC_PIXEL_BLACK 1 +#define QUIRC_PIXEL_REGION 2 + +#ifndef QUIRC_MAX_REGIONS +#define QUIRC_MAX_REGIONS 254 +#endif + +#define QUIRC_MAX_CAPSTONES 32 +#define QUIRC_MAX_GRIDS 8 + +#define QUIRC_PERSPECTIVE_PARAMS 8 + +#if QUIRC_MAX_REGIONS < UINT8_MAX +typedef uint8_t quirc_pixel_t; +#elif QUIRC_MAX_REGIONS < UINT16_MAX +typedef uint16_t quirc_pixel_t; +#else +#error "QUIRC_MAX_REGIONS > 65534 is not supported" +#endif + +struct quirc_region +{ + struct quirc_point seed; + int count; + int capstone; +} __attribute__((aligned(8))); + +struct quirc_capstone +{ + int ring; + int stone; + + struct quirc_point corners[4]; + struct quirc_point center; + float c[QUIRC_PERSPECTIVE_PARAMS]; + + int qr_grid; +} __attribute__((aligned(8))); + +struct quirc_grid +{ + /* Capstone indices */ + int caps[3]; + + /* Alignment pattern region and corner */ + int align_region; + struct quirc_point align; + + /* Timing pattern endpoints */ + struct quirc_point tpep[3]; + int hscan; + int vscan; + + /* Grid size and perspective transform */ + int grid_size; + float c[QUIRC_PERSPECTIVE_PARAMS]; +} __attribute__((aligned(8))); + +struct quirc +{ + uint8_t *image; + quirc_pixel_t *pixels; + int w; + int h; + + int num_regions; + struct quirc_region regions[QUIRC_MAX_REGIONS]; + + int num_capstones; + struct quirc_capstone capstones[QUIRC_MAX_CAPSTONES]; + + int num_grids; + struct quirc_grid grids[QUIRC_MAX_GRIDS]; +} __attribute__((aligned(8))); + +/************************************************************************ + * QR-code version information database + */ + +#define QUIRC_MAX_VERSION 40 +#define QUIRC_MAX_ALIGNMENT 7 + +struct quirc_rs_params +{ + uint8_t bs; /* Small block size */ + uint8_t dw; /* Small data words */ + uint8_t ns; /* Number of small blocks */ +} __attribute__((aligned(8))); + +struct quirc_version_info +{ + uint16_t data_bytes; + uint8_t apat[QUIRC_MAX_ALIGNMENT]; + struct quirc_rs_params ecc[4]; +} __attribute__((aligned(8))); + +extern const struct quirc_version_info quirc_version_db[QUIRC_MAX_VERSION + 1]; + +#endif \ No newline at end of file diff --git a/ESP32QRReaderDBWriterVideoStreamer/version_db.c b/ESP32QRReaderDBWriterVideoStreamer/version_db.c new file mode 100644 index 0000000..0da2d07 --- /dev/null +++ b/ESP32QRReaderDBWriterVideoStreamer/version_db.c @@ -0,0 +1,184 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "quirc_internal.h" + +const struct quirc_version_info quirc_version_db[QUIRC_MAX_VERSION + 1] = { + {0}, + {/* Version 1 */ + .data_bytes = 26, + .apat = {0}, + .ecc = { + {.bs = 26, .dw = 16, .ns = 1}, + {.bs = 26, .dw = 19, .ns = 1}, + {.bs = 26, .dw = 9, .ns = 1}, + {.bs = 26, .dw = 13, .ns = 1}}}, + {/* Version 2 */ + .data_bytes = 44, + .apat = {6, 18, 0}, + .ecc = {{.bs = 44, .dw = 28, .ns = 1}, {.bs = 44, .dw = 34, .ns = 1}, {.bs = 44, .dw = 16, .ns = 1}, {.bs = 44, .dw = 22, .ns = 1}}}, + {/* Version 3 */ + .data_bytes = 70, + .apat = {6, 22, 0}, + .ecc = {{.bs = 70, .dw = 44, .ns = 1}, {.bs = 70, .dw = 55, .ns = 1}, {.bs = 35, .dw = 13, .ns = 2}, {.bs = 35, .dw = 17, .ns = 2}}}, + {/* Version 4 */ + .data_bytes = 100, + .apat = {6, 26, 0}, + .ecc = {{.bs = 50, .dw = 32, .ns = 2}, {.bs = 100, .dw = 80, .ns = 1}, {.bs = 25, .dw = 9, .ns = 4}, {.bs = 50, .dw = 24, .ns = 2}}}, + {/* Version 5 */ + .data_bytes = 134, + .apat = {6, 30, 0}, + .ecc = {{.bs = 67, .dw = 43, .ns = 2}, {.bs = 134, .dw = 108, .ns = 1}, {.bs = 33, .dw = 11, .ns = 2}, {.bs = 33, .dw = 15, .ns = 2}}}, + {/* Version 6 */ + .data_bytes = 172, + .apat = {6, 34, 0}, + .ecc = {{.bs = 43, .dw = 27, .ns = 4}, {.bs = 86, .dw = 68, .ns = 2}, {.bs = 43, .dw = 15, .ns = 4}, {.bs = 43, .dw = 19, .ns = 4}}}, + {/* Version 7 */ + .data_bytes = 196, + .apat = {6, 22, 38, 0}, + .ecc = {{.bs = 49, .dw = 31, .ns = 4}, {.bs = 98, .dw = 78, .ns = 2}, {.bs = 39, .dw = 13, .ns = 4}, {.bs = 32, .dw = 14, .ns = 2}}}, + {/* Version 8 */ + .data_bytes = 242, + .apat = {6, 24, 42, 0}, + .ecc = {{.bs = 60, .dw = 38, .ns = 2}, {.bs = 121, .dw = 97, .ns = 2}, {.bs = 40, .dw = 14, .ns = 4}, {.bs = 40, .dw = 18, .ns = 4}}}, + {/* Version 9 */ + .data_bytes = 292, + .apat = {6, 26, 46, 0}, + .ecc = {{.bs = 58, .dw = 36, .ns = 3}, {.bs = 146, .dw = 116, .ns = 2}, {.bs = 36, .dw = 12, .ns = 4}, {.bs = 36, .dw = 16, .ns = 4}}}, + {/* Version 10 */ + .data_bytes = 346, + .apat = {6, 28, 50, 0}, + .ecc = {{.bs = 69, .dw = 43, .ns = 4}, {.bs = 86, .dw = 68, .ns = 2}, {.bs = 43, .dw = 15, .ns = 6}, {.bs = 43, .dw = 19, .ns = 6}}}, + {/* Version 11 */ + .data_bytes = 404, + .apat = {6, 30, 54, 0}, + .ecc = {{.bs = 80, .dw = 50, .ns = 1}, {.bs = 101, .dw = 81, .ns = 4}, {.bs = 36, .dw = 12, .ns = 3}, {.bs = 50, .dw = 22, .ns = 4}}}, + {/* Version 12 */ + .data_bytes = 466, + .apat = {6, 32, 58, 0}, + .ecc = {{.bs = 58, .dw = 36, .ns = 6}, {.bs = 116, .dw = 92, .ns = 2}, {.bs = 42, .dw = 14, .ns = 7}, {.bs = 46, .dw = 20, .ns = 4}}}, + {/* Version 13 */ + .data_bytes = 532, + .apat = {6, 34, 62, 0}, + .ecc = {{.bs = 59, .dw = 37, .ns = 8}, {.bs = 133, .dw = 107, .ns = 4}, {.bs = 33, .dw = 11, .ns = 12}, {.bs = 44, .dw = 20, .ns = 8}}}, + {/* Version 14 */ + .data_bytes = 581, + .apat = {6, 26, 46, 66, 0}, + .ecc = {{.bs = 64, .dw = 40, .ns = 4}, {.bs = 145, .dw = 115, .ns = 3}, {.bs = 36, .dw = 12, .ns = 11}, {.bs = 36, .dw = 16, .ns = 11}}}, + {/* Version 15 */ + .data_bytes = 655, + .apat = {6, 26, 48, 70, 0}, + .ecc = {{.bs = 65, .dw = 41, .ns = 5}, {.bs = 109, .dw = 87, .ns = 5}, {.bs = 36, .dw = 12, .ns = 11}, {.bs = 54, .dw = 24, .ns = 5}}}, + {/* Version 16 */ + .data_bytes = 733, + .apat = {6, 26, 50, 74, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 7}, {.bs = 122, .dw = 98, .ns = 5}, {.bs = 45, .dw = 15, .ns = 3}, {.bs = 43, .dw = 19, .ns = 15}}}, + {/* Version 17 */ + .data_bytes = 815, + .apat = {6, 30, 54, 78, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 10}, {.bs = 135, .dw = 107, .ns = 1}, {.bs = 42, .dw = 14, .ns = 2}, {.bs = 50, .dw = 22, .ns = 1}}}, + {/* Version 18 */ + .data_bytes = 901, + .apat = {6, 30, 56, 82, 0}, + .ecc = {{.bs = 69, .dw = 43, .ns = 9}, {.bs = 150, .dw = 120, .ns = 5}, {.bs = 42, .dw = 14, .ns = 2}, {.bs = 50, .dw = 22, .ns = 17}}}, + {/* Version 19 */ + .data_bytes = 991, + .apat = {6, 30, 58, 86, 0}, + .ecc = {{.bs = 70, .dw = 44, .ns = 3}, {.bs = 141, .dw = 113, .ns = 3}, {.bs = 39, .dw = 13, .ns = 9}, {.bs = 47, .dw = 21, .ns = 17}}}, + {/* Version 20 */ + .data_bytes = 1085, + .apat = {6, 34, 62, 90, 0}, + .ecc = {{.bs = 67, .dw = 41, .ns = 3}, {.bs = 135, .dw = 107, .ns = 3}, {.bs = 43, .dw = 15, .ns = 15}, {.bs = 54, .dw = 24, .ns = 15}}}, + {/* Version 21 */ + .data_bytes = 1156, + .apat = {6, 28, 50, 72, 92, 0}, + .ecc = {{.bs = 68, .dw = 42, .ns = 17}, {.bs = 144, .dw = 116, .ns = 4}, {.bs = 46, .dw = 16, .ns = 19}, {.bs = 50, .dw = 22, .ns = 17}}}, + {/* Version 22 */ + .data_bytes = 1258, + .apat = {6, 26, 50, 74, 98, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 17}, {.bs = 139, .dw = 111, .ns = 2}, {.bs = 37, .dw = 13, .ns = 34}, {.bs = 54, .dw = 24, .ns = 7}}}, + {/* Version 23 */ + .data_bytes = 1364, + .apat = {6, 30, 54, 78, 102, 0}, + .ecc = {{.bs = 75, .dw = 47, .ns = 4}, {.bs = 151, .dw = 121, .ns = 4}, {.bs = 45, .dw = 15, .ns = 16}, {.bs = 54, .dw = 24, .ns = 11}}}, + {/* Version 24 */ + .data_bytes = 1474, + .apat = {6, 28, 54, 80, 106, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 6}, {.bs = 147, .dw = 117, .ns = 6}, {.bs = 46, .dw = 16, .ns = 30}, {.bs = 54, .dw = 24, .ns = 11}}}, + {/* Version 25 */ + .data_bytes = 1588, + .apat = {6, 32, 58, 84, 110, 0}, + .ecc = {{.bs = 75, .dw = 47, .ns = 8}, {.bs = 132, .dw = 106, .ns = 8}, {.bs = 45, .dw = 15, .ns = 22}, {.bs = 54, .dw = 24, .ns = 7}}}, + {/* Version 26 */ + .data_bytes = 1706, + .apat = {6, 30, 58, 86, 114, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 19}, {.bs = 142, .dw = 114, .ns = 10}, {.bs = 46, .dw = 16, .ns = 33}, {.bs = 50, .dw = 22, .ns = 28}}}, + {/* Version 27 */ + .data_bytes = 1828, + .apat = {6, 34, 62, 90, 118, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 22}, {.bs = 152, .dw = 122, .ns = 8}, {.bs = 45, .dw = 15, .ns = 12}, {.bs = 53, .dw = 23, .ns = 8}}}, + {/* Version 28 */ + .data_bytes = 1921, + .apat = {6, 26, 50, 74, 98, 122, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 3}, {.bs = 147, .dw = 117, .ns = 3}, {.bs = 45, .dw = 15, .ns = 11}, {.bs = 54, .dw = 24, .ns = 4}}}, + {/* Version 29 */ + .data_bytes = 2051, + .apat = {6, 30, 54, 78, 102, 126, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 21}, {.bs = 146, .dw = 116, .ns = 7}, {.bs = 45, .dw = 15, .ns = 19}, {.bs = 53, .dw = 23, .ns = 1}}}, + {/* Version 30 */ + .data_bytes = 2185, + .apat = {6, 26, 52, 78, 104, 130, 0}, + .ecc = {{.bs = 75, .dw = 47, .ns = 19}, {.bs = 145, .dw = 115, .ns = 5}, {.bs = 45, .dw = 15, .ns = 23}, {.bs = 54, .dw = 24, .ns = 15}}}, + {/* Version 31 */ + .data_bytes = 2323, + .apat = {6, 30, 56, 82, 108, 134, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 2}, {.bs = 145, .dw = 115, .ns = 13}, {.bs = 45, .dw = 15, .ns = 23}, {.bs = 54, .dw = 24, .ns = 42}}}, + {/* Version 32 */ + .data_bytes = 2465, + .apat = {6, 34, 60, 86, 112, 138, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 10}, {.bs = 145, .dw = 115, .ns = 17}, {.bs = 45, .dw = 15, .ns = 19}, {.bs = 54, .dw = 24, .ns = 10}}}, + {/* Version 33 */ + .data_bytes = 2611, + .apat = {6, 30, 58, 86, 114, 142, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 14}, {.bs = 145, .dw = 115, .ns = 17}, {.bs = 45, .dw = 15, .ns = 11}, {.bs = 54, .dw = 24, .ns = 29}}}, + {/* Version 34 */ + .data_bytes = 2761, + .apat = {6, 34, 62, 90, 118, 146, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 14}, {.bs = 145, .dw = 115, .ns = 13}, {.bs = 46, .dw = 16, .ns = 59}, {.bs = 54, .dw = 24, .ns = 44}}}, + {/* Version 35 */ + .data_bytes = 2876, + .apat = {6, 30, 54, 78, 102, 126, 150}, + .ecc = {{.bs = 75, .dw = 47, .ns = 12}, {.bs = 151, .dw = 121, .ns = 12}, {.bs = 45, .dw = 15, .ns = 22}, {.bs = 54, .dw = 24, .ns = 39}}}, + {/* Version 36 */ + .data_bytes = 3034, + .apat = {6, 24, 50, 76, 102, 128, 154}, + .ecc = {{.bs = 75, .dw = 47, .ns = 6}, {.bs = 151, .dw = 121, .ns = 6}, {.bs = 45, .dw = 15, .ns = 2}, {.bs = 54, .dw = 24, .ns = 46}}}, + {/* Version 37 */ + .data_bytes = 3196, + .apat = {6, 28, 54, 80, 106, 132, 158}, + .ecc = {{.bs = 74, .dw = 46, .ns = 29}, {.bs = 152, .dw = 122, .ns = 17}, {.bs = 45, .dw = 15, .ns = 24}, {.bs = 54, .dw = 24, .ns = 49}}}, + {/* Version 38 */ + .data_bytes = 3362, + .apat = {6, 32, 58, 84, 110, 136, 162}, + .ecc = {{.bs = 74, .dw = 46, .ns = 13}, {.bs = 152, .dw = 122, .ns = 4}, {.bs = 45, .dw = 15, .ns = 42}, {.bs = 54, .dw = 24, .ns = 48}}}, + {/* Version 39 */ + .data_bytes = 3532, + .apat = {6, 26, 54, 82, 110, 138, 166}, + .ecc = {{.bs = 75, .dw = 47, .ns = 40}, {.bs = 147, .dw = 117, .ns = 20}, {.bs = 45, .dw = 15, .ns = 10}, {.bs = 54, .dw = 24, .ns = 43}}}, + {/* Version 40 */ + .data_bytes = 3706, + .apat = {6, 30, 58, 86, 114, 142, 170}, + .ecc = {{.bs = 75, .dw = 47, .ns = 18}, {.bs = 148, .dw = 118, .ns = 19}, {.bs = 45, .dw = 15, .ns = 20}, {.bs = 54, .dw = 24, .ns = 34}}}}; diff --git a/ESP32_VideoStreamer/ESP32_VideoStreamer.ino b/ESP32_VideoStreamer/ESP32_VideoStreamer.ino new file mode 100644 index 0000000..a054d84 --- /dev/null +++ b/ESP32_VideoStreamer/ESP32_VideoStreamer.ino @@ -0,0 +1,266 @@ +/********* + Rui Santos + Complete project details at https://RandomNerdTutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/ + + IMPORTANT!!! + - Select Board "AI Thinker ESP32-CAM" + - GPIO 0 must be connected to GND to upload a sketch + - After connecting GPIO 0 to GND, press the ESP32-CAM on-board RESET button to put your board in flashing mode + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files. + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. +*********/ + +#include "esp_camera.h" +#include +#include "esp_timer.h" +#include "img_converters.h" +#include "Arduino.h" +#include "fb_gfx.h" +#include "soc/soc.h" //disable brownout problems +#include "soc/rtc_cntl_reg.h" //disable brownout problems +#include "esp_http_server.h" + +//Replace with your network credentials +const char* ssid = "cpsNUCwifi"; +const char* password = "ips999CPS"; + +#define PART_BOUNDARY "123456789000000000000987654321" + +// This project was tested with the AI Thinker Model, M5STACK PSRAM Model and M5STACK WITHOUT PSRAM +#define CAMERA_MODEL_AI_THINKER +//#define CAMERA_MODEL_M5STACK_PSRAM +//#define CAMERA_MODEL_M5STACK_WITHOUT_PSRAM + +// Not tested with this model +//#define CAMERA_MODEL_WROVER_KIT + +#if defined(CAMERA_MODEL_WROVER_KIT) + #define PWDN_GPIO_NUM -1 + #define RESET_GPIO_NUM -1 + #define XCLK_GPIO_NUM 21 + #define SIOD_GPIO_NUM 26 + #define SIOC_GPIO_NUM 27 + + #define Y9_GPIO_NUM 35 + #define Y8_GPIO_NUM 34 + #define Y7_GPIO_NUM 39 + #define Y6_GPIO_NUM 36 + #define Y5_GPIO_NUM 19 + #define Y4_GPIO_NUM 18 + #define Y3_GPIO_NUM 5 + #define Y2_GPIO_NUM 4 + #define VSYNC_GPIO_NUM 25 + #define HREF_GPIO_NUM 23 + #define PCLK_GPIO_NUM 22 + +#elif defined(CAMERA_MODEL_M5STACK_PSRAM) + #define PWDN_GPIO_NUM -1 + #define RESET_GPIO_NUM 15 + #define XCLK_GPIO_NUM 27 + #define SIOD_GPIO_NUM 25 + #define SIOC_GPIO_NUM 23 + + #define Y9_GPIO_NUM 19 + #define Y8_GPIO_NUM 36 + #define Y7_GPIO_NUM 18 + #define Y6_GPIO_NUM 39 + #define Y5_GPIO_NUM 5 + #define Y4_GPIO_NUM 34 + #define Y3_GPIO_NUM 35 + #define Y2_GPIO_NUM 32 + #define VSYNC_GPIO_NUM 22 + #define HREF_GPIO_NUM 26 + #define PCLK_GPIO_NUM 21 + +#elif defined(CAMERA_MODEL_M5STACK_WITHOUT_PSRAM) + #define PWDN_GPIO_NUM -1 + #define RESET_GPIO_NUM 15 + #define XCLK_GPIO_NUM 27 + #define SIOD_GPIO_NUM 25 + #define SIOC_GPIO_NUM 23 + + #define Y9_GPIO_NUM 19 + #define Y8_GPIO_NUM 36 + #define Y7_GPIO_NUM 18 + #define Y6_GPIO_NUM 39 + #define Y5_GPIO_NUM 5 + #define Y4_GPIO_NUM 34 + #define Y3_GPIO_NUM 35 + #define Y2_GPIO_NUM 17 + #define VSYNC_GPIO_NUM 22 + #define HREF_GPIO_NUM 26 + #define PCLK_GPIO_NUM 21 + +#elif defined(CAMERA_MODEL_AI_THINKER) + #define PWDN_GPIO_NUM 32 + #define RESET_GPIO_NUM -1 + #define XCLK_GPIO_NUM 0 + #define SIOD_GPIO_NUM 26 + #define SIOC_GPIO_NUM 27 + + #define Y9_GPIO_NUM 35 + #define Y8_GPIO_NUM 34 + #define Y7_GPIO_NUM 39 + #define Y6_GPIO_NUM 36 + #define Y5_GPIO_NUM 21 + #define Y4_GPIO_NUM 19 + #define Y3_GPIO_NUM 18 + #define Y2_GPIO_NUM 5 + #define VSYNC_GPIO_NUM 25 + #define HREF_GPIO_NUM 23 + #define PCLK_GPIO_NUM 22 +#else + #error "Camera model not selected" +#endif + +static const char* _STREAM_CONTENT_TYPE = "multipart/x-mixed-replace;boundary=" PART_BOUNDARY; +static const char* _STREAM_BOUNDARY = "\r\n--" PART_BOUNDARY "\r\n"; +static const char* _STREAM_PART = "Content-Type: image/jpeg\r\nContent-Length: %u\r\n\r\n"; + +httpd_handle_t stream_httpd = NULL; + +static esp_err_t stream_handler(httpd_req_t *req){ //wenn via Browser (ip-Adresseingabe) auf den Stream zugegriffen wird, dann wird die Methode aufgerufen + camera_fb_t * fb = NULL; + esp_err_t res = ESP_OK; + size_t _jpg_buf_len = 0; + uint8_t * _jpg_buf = NULL; + char * part_buf[64]; + + res = httpd_resp_set_type(req, _STREAM_CONTENT_TYPE); + if(res != ESP_OK){ + return res; + } + + while(true){ + fb = esp_camera_fb_get(); + if (!fb) { + Serial.println("Camera capture failed"); + res = ESP_FAIL; + } else { + if(fb->width > 400){ + if(fb->format != PIXFORMAT_JPEG){ + bool jpeg_converted = frame2jpg(fb, 80, &_jpg_buf, &_jpg_buf_len); + esp_camera_fb_return(fb); + fb = NULL; + if(!jpeg_converted){ + Serial.println("JPEG compression failed"); + res = ESP_FAIL; + } + } else { + _jpg_buf_len = fb->len; + _jpg_buf = fb->buf; + } + } + } + if(res == ESP_OK){ + size_t hlen = snprintf((char *)part_buf, 64, _STREAM_PART, _jpg_buf_len); + res = httpd_resp_send_chunk(req, (const char *)part_buf, hlen); + } + if(res == ESP_OK){ + res = httpd_resp_send_chunk(req, (const char *)_jpg_buf, _jpg_buf_len); + } + if(res == ESP_OK){ + res = httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen(_STREAM_BOUNDARY)); + } + if(fb){ + esp_camera_fb_return(fb); + fb = NULL; + _jpg_buf = NULL; + } else if(_jpg_buf){ + free(_jpg_buf); + _jpg_buf = NULL; + } + if(res != ESP_OK){ + break; + } + //Serial.printf("MJPG: %uB\n",(uint32_t)(_jpg_buf_len)); + } + return res; +} + +void startCameraServer(){ + httpd_config_t config = HTTPD_DEFAULT_CONFIG(); + config.server_port = 80; + + httpd_uri_t index_uri = { + .uri = "/", + .method = HTTP_GET, + .handler = stream_handler, + .user_ctx = NULL + }; + + //Serial.printf("Starting web server on port: '%d'\n", config.server_port); + if (httpd_start(&stream_httpd, &config) == ESP_OK) { + httpd_register_uri_handler(stream_httpd, &index_uri); + } +} + +void setup() { + WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector + + Serial.begin(115200); + Serial.setDebugOutput(false); + + camera_config_t config; + config.ledc_channel = LEDC_CHANNEL_0; + config.ledc_timer = LEDC_TIMER_0; + config.pin_d0 = Y2_GPIO_NUM; + config.pin_d1 = Y3_GPIO_NUM; + config.pin_d2 = Y4_GPIO_NUM; + config.pin_d3 = Y5_GPIO_NUM; + config.pin_d4 = Y6_GPIO_NUM; + config.pin_d5 = Y7_GPIO_NUM; + config.pin_d6 = Y8_GPIO_NUM; + config.pin_d7 = Y9_GPIO_NUM; + config.pin_xclk = XCLK_GPIO_NUM; + config.pin_pclk = PCLK_GPIO_NUM; + config.pin_vsync = VSYNC_GPIO_NUM; + config.pin_href = HREF_GPIO_NUM; + config.pin_sscb_sda = SIOD_GPIO_NUM; + config.pin_sscb_scl = SIOC_GPIO_NUM; + config.pin_pwdn = PWDN_GPIO_NUM; + config.pin_reset = RESET_GPIO_NUM; + config.xclk_freq_hz = 20000000; + config.pixel_format = PIXFORMAT_JPEG; + + if(psramFound()){ + config.frame_size = FRAMESIZE_UXGA; + config.jpeg_quality = 10; + config.fb_count = 2; + } else { + config.frame_size = FRAMESIZE_SVGA; + config.jpeg_quality = 12; + config.fb_count = 1; + } + + // Camera init + esp_err_t err = esp_camera_init(&config); + if (err != ESP_OK) { + Serial.printf("Camera init failed with error 0x%x", err); + return; + } + // Wi-Fi connection + //WiFi.begin(ssid, password); + WiFi.begin(ssid); + + while (WiFi.status() != WL_CONNECTED) { + delay(500); + Serial.print("."); + } + Serial.println(""); + Serial.println("WiFi connected"); + + Serial.print("Camera Stream Ready! Go to: http://"); + Serial.print(WiFi.localIP()); + + // Start streaming web server + startCameraServer(); +} + +void loop() { + delay(1); +} diff --git a/libraries/ESP32QRCodeReader_Page_original/ESP32QRCodeReader_Page.ino b/libraries/ESP32QRCodeReader_Page_original/ESP32QRCodeReader_Page.ino new file mode 100644 index 0000000..a7b889a --- /dev/null +++ b/libraries/ESP32QRCodeReader_Page_original/ESP32QRCodeReader_Page.ino @@ -0,0 +1,583 @@ +/* +ESP32-CAM QR code Reader +Author : ChungYi Fu (Kaohsiung, Taiwan) 2021-8-13 20:00 +https://www.facebook.com/francefu + +Refer to the code +https://github.com/alvarowolfx/ESP32QRCodeReader + +自訂指令格式 http://192.168.xxx.xxx/control?cmd=P1;P2;P3;P4;P5;P6;P7;P8;P9 + +http://192.168.xxx.xxx/?ip //取得APIP, STAIP +http://192.168.xxx.xxx/?mac //取得MAC位址 +http://192.168.xxx.xxx/?digitalwrite=pin;value //數位輸出 +http://192.168.xxx.xxx/?analogwrite=pin;value //類比輸出 +http://192.168.xxx.xxx/?digitalread=pin //數位讀取 +http://192.168.xxx.xxx/?analogread=pin //類比讀取 +http://192.168.xxx.xxx/?touchread=pin //觸碰讀取 +http://192.168.xxx.xxx/?restart //重啟電源 +http://192.168.xxx.xxx/?flash=value //閃光燈 value= 0~255 +http://192.168.xxx.xxx/?servo=pin;value //伺服馬達 value= 0~180 +http://192.168.xxx.xxx/?relay=pin;value //繼電器 value = 0, 1 +http://192.168.xxx.xxx/?uart=value //序列埠 +*/ + +//輸入WIFI連線帳號密碼 +const char* ssid = "*****"; +const char* password = "*****"; + +//輸入AP端連線帳號密碼 http://192.168.4.1 +const char* apssid = "esp32-cam"; +const char* appassword = "12345678"; //AP密碼至少要8個字元以上 + +String Feedback=""; //回傳客戶端訊息 +//指令參數值 +String Command="",cmd="",P1="",P2="",P3="",P4="",P5="",P6="",P7="",P8="",P9=""; +//指令拆解狀態值 +byte ReceiveState=0,cmdState=1,strState=1,questionstate=0,equalstate=0,semicolonstate=0; + +#include +#include "esp_camera.h" //視訊函式 +#include "soc/soc.h" //用於電源不穩不重開機 +#include "soc/rtc_cntl_reg.h" //用於電源不穩不重開機 +#include "quirc.h" + +TaskHandle_t Task; + +//ESP32-CAM 安信可模組腳位設定 +#define PWDN_GPIO_NUM 32 +#define RESET_GPIO_NUM -1 +#define XCLK_GPIO_NUM 0 +#define SIOD_GPIO_NUM 26 +#define SIOC_GPIO_NUM 27 +#define Y9_GPIO_NUM 35 +#define Y8_GPIO_NUM 34 +#define Y7_GPIO_NUM 39 +#define Y6_GPIO_NUM 36 +#define Y5_GPIO_NUM 21 +#define Y4_GPIO_NUM 19 +#define Y3_GPIO_NUM 18 +#define Y2_GPIO_NUM 5 +#define VSYNC_GPIO_NUM 25 +#define HREF_GPIO_NUM 23 +#define PCLK_GPIO_NUM 22 + +struct QRCodeData +{ + bool valid; + int dataType; + uint8_t payload[1024]; + int payloadLen; +}; + +struct quirc *q = NULL; +uint8_t *image = NULL; +camera_fb_t * fb = NULL; +struct quirc_code code; +struct quirc_data data; +quirc_decode_error_t err; +struct QRCodeData qrCodeData; +String QRCodeResult = ""; + +WiFiServer server(80); +WiFiClient client; + +camera_config_t config; + +void setup() { + WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //關閉電源不穩就重開機的設定 + + Serial.begin(115200); + Serial.setDebugOutput(true); //開啟診斷輸出 + Serial.println(); + +//視訊組態設定 https://github.com/espressif/esp32-camera/blob/master/driver/include/esp_camera.h + config.ledc_channel = LEDC_CHANNEL_0; + config.ledc_timer = LEDC_TIMER_0; + config.pin_d0 = Y2_GPIO_NUM; + config.pin_d1 = Y3_GPIO_NUM; + config.pin_d2 = Y4_GPIO_NUM; + config.pin_d3 = Y5_GPIO_NUM; + config.pin_d4 = Y6_GPIO_NUM; + config.pin_d5 = Y7_GPIO_NUM; + config.pin_d6 = Y8_GPIO_NUM; + config.pin_d7 = Y9_GPIO_NUM; + config.pin_xclk = XCLK_GPIO_NUM; + config.pin_pclk = PCLK_GPIO_NUM; + config.pin_vsync = VSYNC_GPIO_NUM; + config.pin_href = HREF_GPIO_NUM; + config.pin_sscb_sda = SIOD_GPIO_NUM; + config.pin_sscb_scl = SIOC_GPIO_NUM; + config.pin_pwdn = PWDN_GPIO_NUM; + config.pin_reset = RESET_GPIO_NUM; + config.xclk_freq_hz = 10000000; + config.pixel_format = PIXFORMAT_GRAYSCALE; + config.frame_size = FRAMESIZE_QVGA; + config.jpeg_quality = 15; + config.fb_count = 1; + + //視訊初始化 + esp_err_t err = esp_camera_init(&config); + if (err != ESP_OK) { + Serial.printf("Camera init failed with error 0x%x", err); + ESP.restart(); + } + + sensor_t * s = esp_camera_sensor_get(); + s->set_framesize(s, FRAMESIZE_QVGA); + + //s->set_vflip(s, 1); //垂直翻轉 + //s->set_hmirror(s, 1); //水平鏡像 + + //閃光燈(GPIO4) + ledcAttachPin(4, 4); + ledcSetup(4, 5000, 8); + + WiFi.mode(WIFI_AP_STA); //其他模式 WiFi.mode(WIFI_AP); WiFi.mode(WIFI_STA); + + //指定Client端靜態IP + //WiFi.config(IPAddress(192, 168, 201, 100), IPAddress(192, 168, 201, 2), IPAddress(255, 255, 255, 0)); + + for (int i=0;i<2;i++) { + WiFi.begin(ssid, password); //執行網路連線 + + delay(1000); + Serial.println(""); + Serial.print("Connecting to "); + Serial.println(ssid); + + long int StartTime=millis(); + while (WiFi.status() != WL_CONNECTED) { + delay(500); + if ((StartTime+5000) < millis()) break; //等待10秒連線 + } + + if (WiFi.status() == WL_CONNECTED) { //若連線成功 + WiFi.softAP((WiFi.localIP().toString()+"_"+(String)apssid).c_str(), appassword); //設定SSID顯示客戶端IP + Serial.println(""); + Serial.println("STAIP address: "); + Serial.println(WiFi.localIP()); + Serial.println(""); + + for (int i=0;i<5;i++) { //若連上WIFI設定閃光燈快速閃爍 + ledcWrite(4,10); + delay(200); + ledcWrite(4,0); + delay(200); + } + break; + } + } + + if (WiFi.status() != WL_CONNECTED) { //若連線失敗 + WiFi.softAP((WiFi.softAPIP().toString()+"_"+(String)apssid).c_str(), appassword); + + for (int i=0;i<2;i++) { //若連不上WIFI設定閃光燈慢速閃爍 + ledcWrite(4,10); + delay(1000); + ledcWrite(4,0); + delay(1000); + } + } + + //指定AP端IP + //WiFi.softAPConfig(IPAddress(192, 168, 4, 1), IPAddress(192, 168, 4, 1), IPAddress(255, 255, 255, 0)); + Serial.println(""); + Serial.println("APIP address: "); + Serial.println(WiFi.softAPIP()); + Serial.println(""); + + //設定閃光燈為低電位 + pinMode(4, OUTPUT); + digitalWrite(4, LOW); + + server.begin(); + + xTaskCreatePinnedToCore( + QRCodeReader, /* Task function. */ + "Task", /* name of task. */ + 10000, /* Stack size of task */ + NULL, /* parameter of the task */ + 1, /* priority of the task */ + &Task, /* Task handle to keep track of created task */ + 0); /* pin task to core 0 */ + + Serial.print("listenConnection running on core "); + Serial.println(xPortGetCoreID()); +} + +void loop() { + listenConnection(); +} + +void QRCodeReader( void * pvParameters ){ + Serial.print("QRCodeReader running on core "); + Serial.println(xPortGetCoreID()); + + while(1){ + q = quirc_new(); + if (q == NULL){ + Serial.print("can't create quirc object\r\n"); + continue; + } + + fb = esp_camera_fb_get(); + if (!fb) + { + Serial.println("Camera capture failed"); + continue; + } + + //Serial.printf("quirc_begin\r\n"); + quirc_resize(q, fb->width, fb->height); + image = quirc_begin(q, NULL, NULL); + //Serial.printf("Frame w h len: %d, %d, %d \r\n", fb->width, fb->height, fb->len); + memcpy(image, fb->buf, fb->len); + quirc_end(q); + //Serial.printf("quirc_end\r\n"); + + int count = quirc_count(q); + if (count > 0) { + Serial.println(count); + quirc_extract(q, 0, &code); + err = quirc_decode(&code, &data); + + if (err){ + Serial.println("Decoding FAILED"); + QRCodeResult = "Decoding FAILED"; + } else { + Serial.printf("Decoding successful:\n"); + dumpData(&data); + /* + qrCodeData.dataType = data.data_type; + for (int j = 0; j < data.payload_len; j++) + { + qrCodeData.payload[j] = data.payload[j]; + } + qrCodeData.valid = true; + qrCodeData.payload[data.payload_len] = '\0'; + qrCodeData.payloadLen = data.payload_len; + */ + //vTaskDelay(3000/portTICK_RATE_MS); + } + Serial.println(); + } + + esp_camera_fb_return(fb); + fb = NULL; + image = NULL; + quirc_destroy(q); + } +} + +void dumpData(const struct quirc_data *data) +{ + Serial.printf("Version: %d\n", data->version); + Serial.printf("ECC level: %c\n", "MLHQ"[data->ecc_level]); + Serial.printf("Mask: %d\n", data->mask); + Serial.printf("Length: %d\n", data->payload_len); + Serial.printf("Payload: %s\n", data->payload); + + QRCodeResult = (const char *)data->payload; +} + +//執行自訂指令 +void ExecuteCommand() { + //Serial.println(""); + //Serial.println("Command: "+Command); + if (cmd!="getstill") { + Serial.println("cmd= "+cmd+" ,P1= "+P1+" ,P2= "+P2+" ,P3= "+P3+" ,P4= "+P4+" ,P5= "+P5+" ,P6= "+P6+" ,P7= "+P7+" ,P8= "+P8+" ,P9= "+P9); + Serial.println(""); + } + + //自訂指令區塊 http://192.168.xxx.xxx?cmd=P1;P2;P3;P4;P5;P6;P7;P8;P9 + if (cmd=="your cmd") { + // You can do anything + // Feedback="Hello World"; //可為一般文字或HTML語法 + } + else if (cmd=="ip") { //查詢APIP, STAIP + Feedback="AP IP: "+WiFi.softAPIP().toString(); + Feedback+="
"; + Feedback+="STA IP: "+WiFi.localIP().toString(); + } + else if (cmd=="mac") { //查詢MAC位址 + Feedback="STA MAC: "+WiFi.macAddress(); + } + else if (cmd=="restart") { //重設WIFI連線 + ESP.restart(); + } + else if (cmd=="digitalwrite") { //數位輸出 + ledcDetachPin(P1.toInt()); + pinMode(P1.toInt(), OUTPUT); + digitalWrite(P1.toInt(), P2.toInt()); + } + else if (cmd=="digitalread") { //數位輸入 + Feedback=String(digitalRead(P1.toInt())); + } + else if (cmd=="analogwrite") { //類比輸出 + if (P1=="4") { + ledcAttachPin(4, 4); + ledcSetup(4, 5000, 8); + ledcWrite(4,P2.toInt()); + } + else { + ledcAttachPin(P1.toInt(), 9); + ledcSetup(9, 5000, 8); + ledcWrite(9,P2.toInt()); + } + } + else if (cmd=="analogread") { //類比讀取 + Feedback=String(analogRead(P1.toInt())); + } + else if (cmd=="touchread") { //觸碰讀取 + Feedback=String(touchRead(P1.toInt())); + } + else if (cmd=="framesize") { //解析度 + sensor_t * s = esp_camera_sensor_get(); + int val = P1.toInt(); + s->set_framesize(s, (framesize_t)val); + } + else if (cmd=="quality") { //畫質 + sensor_t * s = esp_camera_sensor_get(); + int val = P1.toInt(); + s->set_quality(s, val); + } + else if (cmd=="contrast") { //對比 + sensor_t * s = esp_camera_sensor_get(); + int val = P1.toInt(); + s->set_contrast(s, val); + } + else if (cmd=="brightness") { //亮度 + sensor_t * s = esp_camera_sensor_get(); + int val = P1.toInt(); + s->set_brightness(s, val); + } + else if (cmd=="hmirror") { //水平鏡像 + sensor_t * s = esp_camera_sensor_get(); + int val = P1.toInt(); + s->set_hmirror(s, val); + } + else if (cmd=="vflip") { //垂直翻轉 + sensor_t * s = esp_camera_sensor_get(); + int val = P1.toInt(); + s->set_vflip(s, val); + } + else if (cmd=="serial") { //序列埠 + Serial.print(P1); + } + else if (cmd=="restart") { //重啟電源 + ESP.restart(); + } + else if (cmd=="flash") { //閃光燈 + ledcAttachPin(4, 4); + ledcSetup(4, 5000, 8); + int val = P1.toInt(); + ledcWrite(4,val); + } + else if(cmd=="servo") { //伺服馬達 (0-180) + ledcAttachPin(P1.toInt(), 3); + ledcSetup(3, 50, 16); + + int val = 7864-P2.toInt()*34.59; + if (val > 7864) + val = 7864; + else if (val < 1638) + val = 1638; + ledcWrite(3, val); + } + else if (cmd=="relay") { //繼電器 + pinMode(P1.toInt(), OUTPUT); + digitalWrite(13, P2.toInt()); + } + else { + Feedback="Command is not defined."; + } + + if (Feedback=="") Feedback=Command; +} + + +//自訂網頁首頁管理介面 +static const char PROGMEM INDEX_HTML[] = R"rawliteral( + + + + + + + +
+Flash +
+
+ + + + +)rawliteral"; + +void listenConnection() { + Feedback="";Command="";cmd="";P1="";P2="";P3="";P4="";P5="";P6="";P7="";P8="";P9=""; + ReceiveState=0,cmdState=1,strState=1,questionstate=0,equalstate=0,semicolonstate=0; + + client = server.available(); + + if (client) { + String currentLine = ""; + + while (client.connected()) { + if (client.available()) { + char c = client.read(); + getCommand(c); //將緩衝區取得的字元拆解出指令參數 + if (c == '\n') { + if (currentLine.length() == 0) { + if (cmd=="getstill") { + getStill(); + } else { + mainPage(); + } + Feedback=""; + break; + } else { + currentLine = ""; + } + } else if (c != '\r') { + currentLine += c; + } + + if ((currentLine.indexOf("?")!=-1)&&(currentLine.indexOf(" HTTP")!=-1)) { + if (Command.indexOf("stop")!=-1) { //若指令中含關鍵字stop立即斷線 -> http://192.168.xxx.xxx?cmd=aaa;bbb;ccc;stop + client.println(); + client.println(); + client.stop(); + } + currentLine=""; + Feedback=""; + ExecuteCommand(); + } + } + } + delay(1); + client.stop(); + } +} + +void mainPage() { + //回傳HTML首頁或Feedback + client.println("HTTP/1.1 200 OK"); + client.println("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept"); + client.println("Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS"); + client.println("Content-Type: text/html; charset=utf-8"); + client.println("Access-Control-Allow-Origin: *"); + client.println("Connection: close"); + client.println(); + + String Data=""; + if (cmd!="") + Data = Feedback; + else { + Data = String((const char *)INDEX_HTML); + } + int Index; + for (Index = 0; Index < Data.length(); Index = Index+1024) { + client.print(Data.substring(Index, Index+1024)); + } +} + +void getStill() { + camera_fb_t * fb = NULL; + fb = esp_camera_fb_get(); + if(!fb) { + Serial.println("Camera capture failed"); + return; + } + uint8_t *fbBuf = fb->buf; + size_t fbLen = fb->len; + + client.println("HTTP/1.1 200 OK"); + client.println("Access-Control-Allow-Origin: *"); + client.println("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept"); + client.println("Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS"); + client.println("Content-Type: application/octet-stream"); + client.println(); + + for (size_t n=0;n0) { + size_t remainder = fbLen%1024; + client.write(fbBuf, remainder); + } + } + esp_camera_fb_return(fb); + + pinMode(4, OUTPUT); + digitalWrite(4, LOW); +} + +//拆解命令字串置入變數 +void getCommand(char c) { + if (c=='?') ReceiveState=1; + if ((c==' ')||(c=='\r')||(c=='\n')) ReceiveState=0; + + if (ReceiveState==1) + { + Command=Command+String(c); + + if (c=='=') cmdState=0; + if (c==';') strState++; + + if ((cmdState==1)&&((c!='?')||(questionstate==1))) cmd=cmd+String(c); + if ((cmdState==0)&&(strState==1)&&((c!='=')||(equalstate==1))) P1=P1+String(c); + if ((cmdState==0)&&(strState==2)&&(c!=';')) P2=P2+String(c); + if ((cmdState==0)&&(strState==3)&&(c!=';')) P3=P3+String(c); + if ((cmdState==0)&&(strState==4)&&(c!=';')) P4=P4+String(c); + if ((cmdState==0)&&(strState==5)&&(c!=';')) P5=P5+String(c); + if ((cmdState==0)&&(strState==6)&&(c!=';')) P6=P6+String(c); + if ((cmdState==0)&&(strState==7)&&(c!=';')) P7=P7+String(c); + if ((cmdState==0)&&(strState==8)&&(c!=';')) P8=P8+String(c); + if ((cmdState==0)&&(strState>=9)&&((c!=';')||(semicolonstate==1))) P9=P9+String(c); + + if (c=='?') questionstate=1; + if (c=='=') equalstate=1; + if ((strState>=9)&&(c==';')) semicolonstate=1; + } +} diff --git a/libraries/ESP32QRCodeReader_Page_original/LICENSE b/libraries/ESP32QRCodeReader_Page_original/LICENSE new file mode 100644 index 0000000..d47c026 --- /dev/null +++ b/libraries/ESP32QRCodeReader_Page_original/LICENSE @@ -0,0 +1,16 @@ +quirc -- QR-code recognition library +Copyright (C) 2010-2012 Daniel Beer + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all +copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/libraries/ESP32QRCodeReader_Page_original/README.md b/libraries/ESP32QRCodeReader_Page_original/README.md new file mode 100644 index 0000000..d70c5c3 --- /dev/null +++ b/libraries/ESP32QRCodeReader_Page_original/README.md @@ -0,0 +1,193 @@ +Quirc +===== + +QR codes are a type of high-density matrix barcodes, and quirc is a library for +extracting and decoding them from images. It has several features which make it +a good choice for this purpose: + +* It is fast enough to be used with realtime video: extracting and decoding + from VGA frame takes about 50 ms on a modern x86 core. + +* It has a robust and tolerant recognition algorithm. It can correctly + recognise and decode QR codes which are rotated and/or oblique to the camera. + It can also distinguish and decode multiple codes within the same image. + +* It is easy to use, with a simple API described in a single commented header + file (see below for an overview). + +* It is small and easily embeddable, with no dependencies other than standard C + functions. + +* It has a very small memory footprint: one byte per image pixel, plus a few kB + per decoder object. + +* It uses no global mutable state, and is safe to use in a multithreaded + application. + +* BSD-licensed, with almost no restrictions regarding use and/or modification. + +The distribution comes with, in addition to the library, several test programs. +While the core library is very portable, these programs have some additional +dependencies. All of them require libjpeg, and two (`quirc-demo` and `inspect`) +require SDL. The camera demos use Linux-specific APIs: + +### quirc-demo + +This is an real-time demo which requires a camera and a graphical display. The +video stream is displayed on screen as it's received, and any QR codes +recognised are highlighted in the image, with the decoded information both +displayed on the image and printed on stdout. + +### quirc-scanner + +This program turns your camera into a barcode scanner. It's almost the same as +the `demo` application, but it doesn't display the video stream, and thus +doesn't require a graphical display. + +### qrtest + +This test is used to evaluate the performance of library. Given a directory +tree containing a bunch of JPEG images, it will attempt to locate and decode QR +codes in each image. Speed and success statistics are collected and printed on +stdout. + +### inspect + +This test is used for debugging. Given a single JPEG image, it will display a +diagram showing the internal state of the decoder as well as printing +additional information on stdout. + +Installation +------------ +To build the library and associated demos/tests, type `make`. If you need to +decode "large" image files build with `CFLAGS="-DQUIRC_MAX_REGIONS=65534" make` +instead. Note that this will increase the memory usage, it is discouraged for +low resource devices (i.e. embedded). + +Type `make install` to install the library, header file and camera demos. + +You can specify one or several of the following targets if you don't want, or +are unable to build everything: + +* libquirc.a +* libquirc.so +* qrtest +* inspect +* quirc-scanner +* quirc-demo + +Library use +----------- +All of the library's functionality is exposed through a single header file, +which you should include: + +```C +#include +``` + +To decode images, you'll need to instantiate a `struct quirc` object, which is +done with the `quirc_new` function. Later, when you no longer need to decode +anything, you should release the allocated memory with `quirc_destroy`: + +```C +struct quirc *qr; + +qr = quirc_new(); +if (!qr) { + perror("Failed to allocate memory"); + abort(); +} + +/* ... */ + +quirc_destroy(qr); +``` + +Having obtained a decoder object, you need to set the image size that you'll be +working with, which is done using `quirc_resize`: + +```C +if (quirc_resize(qr, 640, 480) < 0) { + perror("Failed to allocate video memory"); + abort(); +} +``` + +`quirc_resize` and `quirc_new` are the only library functions which allocate +memory. If you plan to process a series of frames (or a video stream), you +probably want to allocate and size a single decoder and hold onto it to process +each frame. + +Processing frames is done in two stages. The first stage is an +image-recognition stage called identification, which takes a grayscale image +and searches for QR codes. Using `quirc_begin` and `quirc_end`, you can feed a +grayscale image directly into the buffer that `quirc` uses for image +processing: + +```C +uint8_t *image; +int w, h; + +image = quirc_begin(qr, &w, &h); + +/* Fill out the image buffer here. + * image is a pointer to a w*h bytes. + * One byte per pixel, w pixels per line, h lines in the buffer. + */ + +quirc_end(qr); +``` + +Note that `quirc_begin` simply returns a pointer to a previously allocated +buffer. The buffer will contain uninitialized data. After the call to +`quirc_end`, the decoder holds a list of detected QR codes which can be queried +via `quirc_count` and `quirc_extract`. + +At this point, the second stage of processing occurs -- decoding. This is done +via the call to `quirc_decode`, which is not associated with a decoder object. + +```C +int num_codes; +int i; + +/* We've previously fed an image to the decoder via +* quirc_begin/quirc_end. +*/ + +num_codes = quirc_count(qr); +for (i = 0; i < num_codes; i++) { + struct quirc_code code; + struct quirc_data data; + quirc_decode_error_t err; + + quirc_extract(qr, i, &code); + + /* Decoding stage */ + err = quirc_decode(&code, &data); + if (err) + printf("DECODE FAILED: %s\n", quirc_strerror(err)); + else + printf("Data: %s\n", data.payload); +} +``` + +`quirc_code` and `quirc_data` are flat structures which don't need to be +initialized or freed after use. + +Copyright +--------- +Copyright (C) 2010-2012 Daniel Beer <> + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all +copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/libraries/ESP32QRCodeReader_Page_original/collections.c b/libraries/ESP32QRCodeReader_Page_original/collections.c new file mode 100644 index 0000000..ea0073d --- /dev/null +++ b/libraries/ESP32QRCodeReader_Page_original/collections.c @@ -0,0 +1,85 @@ +/* This file is part of the OpenMV project. + * Copyright (c) 2013-2017 Ibrahim Abdelkader & Kwabena W. Agyeman + * This work is licensed under the MIT license, see the file LICENSE for details. + */ + +#include "collections.h" +#define CHAR_BITS (sizeof(char) * 8) +#define CHAR_MASK (CHAR_BITS - 1) +#define CHAR_SHIFT IM_LOG2(CHAR_MASK) + +////////// +// lifo // +////////// + +void lifo_alloc(lifo_t *ptr, size_t size, size_t data_len) +{ + ptr->len = 0; + ptr->size = size; + ptr->data_len = data_len; + ptr->data = (char *)ps_malloc(size * data_len); +} + +void lifo_alloc_all(lifo_t *ptr, size_t *size, size_t data_len) +{ + ptr->data = (char *)ps_malloc(255); + ptr->data_len = data_len; + ptr->size = 255 / data_len; + ptr->len = 0; + *size = ptr->size; +} + +void lifo_free(lifo_t *ptr) +{ + if (ptr->data) + { + free(ptr->data); + } +} + +void lifo_clear(lifo_t *ptr) +{ + ptr->len = 0; +} + +size_t lifo_size(lifo_t *ptr) +{ + return ptr->len; +} + +bool lifo_is_not_empty(lifo_t *ptr) +{ + return ptr->len; +} + +bool lifo_is_not_full(lifo_t *ptr) +{ + return ptr->len != ptr->size; +} + +void lifo_enqueue(lifo_t *ptr, void *data) +{ + memcpy(ptr->data + (ptr->len * ptr->data_len), data, ptr->data_len); + + ptr->len += 1; +} + +void lifo_dequeue(lifo_t *ptr, void *data) +{ + if (data) + { + memcpy(data, ptr->data + ((ptr->len - 1) * ptr->data_len), ptr->data_len); + } + + ptr->len -= 1; +} + +void lifo_poke(lifo_t *ptr, void *data) +{ + memcpy(ptr->data + (ptr->len * ptr->data_len), data, ptr->data_len); +} + +void lifo_peek(lifo_t *ptr, void *data) +{ + memcpy(data, ptr->data + ((ptr->len - 1) * ptr->data_len), ptr->data_len); +} diff --git a/libraries/ESP32QRCodeReader_Page_original/collections.h b/libraries/ESP32QRCodeReader_Page_original/collections.h new file mode 100644 index 0000000..711cafa --- /dev/null +++ b/libraries/ESP32QRCodeReader_Page_original/collections.h @@ -0,0 +1,33 @@ +/* This file is part of the OpenMV project. + * Copyright (c) 2013-2017 Ibrahim Abdelkader & Kwabena W. Agyeman + * This work is licensed under the MIT license, see the file LICENSE for details. + */ + +#ifndef __COLLECTIONS_H__ +#define __COLLECTIONS_H__ +#include +#include +////////// +// lifo // +////////// + +typedef struct lifo +{ + size_t len, size, data_len; + char *data; +} +__attribute__((aligned(8))) lifo_t; + +void lifo_alloc(lifo_t *ptr, size_t size, size_t data_len); +void lifo_alloc_all(lifo_t *ptr, size_t *size, size_t data_len); +void lifo_free(lifo_t *ptr); +void lifo_clear(lifo_t *ptr); +size_t lifo_size(lifo_t *ptr); +bool lifo_is_not_empty(lifo_t *ptr); +bool lifo_is_not_full(lifo_t *ptr); +void lifo_enqueue(lifo_t *ptr, void *data); +void lifo_dequeue(lifo_t *ptr, void *data); +void lifo_poke(lifo_t *ptr, void *data); +void lifo_peek(lifo_t *ptr, void *data); + +#endif /* __COLLECTIONS_H__ */ \ No newline at end of file diff --git a/libraries/ESP32QRCodeReader_Page_original/decode.c b/libraries/ESP32QRCodeReader_Page_original/decode.c new file mode 100644 index 0000000..67c8ed5 --- /dev/null +++ b/libraries/ESP32QRCodeReader_Page_original/decode.c @@ -0,0 +1,983 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "quirc_internal.h" + +#include +#include + +#define MAX_POLY 64 + +/************************************************************************ + * Galois fields + */ + +struct galois_field +{ + int p; + const uint8_t *log; + const uint8_t *exp; +} __attribute__((aligned(8))); + +static const uint8_t gf16_exp[16] = { + 0x01, 0x02, 0x04, 0x08, 0x03, 0x06, 0x0c, 0x0b, + 0x05, 0x0a, 0x07, 0x0e, 0x0f, 0x0d, 0x09, 0x01}; + +static const uint8_t gf16_log[16] = { + 0x00, 0x0f, 0x01, 0x04, 0x02, 0x08, 0x05, 0x0a, + 0x03, 0x0e, 0x09, 0x07, 0x06, 0x0d, 0x0b, 0x0c}; + +static const struct galois_field gf16 = { + .p = 15, + .log = gf16_log, + .exp = gf16_exp}; + +static const uint8_t gf256_exp[256] = { + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, + 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26, + 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, + 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, + 0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, + 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23, + 0x46, 0x8c, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, + 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1, + 0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f, 0x5e, 0xbc, + 0x65, 0xca, 0x89, 0x0f, 0x1e, 0x3c, 0x78, 0xf0, + 0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, + 0xfe, 0xe1, 0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2, + 0xd9, 0xaf, 0x43, 0x86, 0x11, 0x22, 0x44, 0x88, + 0x0d, 0x1a, 0x34, 0x68, 0xd0, 0xbd, 0x67, 0xce, + 0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93, + 0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc, + 0x85, 0x17, 0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, + 0x4f, 0x9e, 0x21, 0x42, 0x84, 0x15, 0x2a, 0x54, + 0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4, 0x55, 0xaa, + 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73, + 0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, + 0xfc, 0xe5, 0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff, + 0xe3, 0xdb, 0xab, 0x4b, 0x96, 0x31, 0x62, 0xc4, + 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41, + 0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x07, 0x0e, + 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6, + 0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, + 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09, + 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, + 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16, + 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, + 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x01}; + +static const uint8_t gf256_log[256] = { + 0x00, 0xff, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, + 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b, + 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, + 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71, + 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, + 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45, + 0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27, 0xf9,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 0xeb, 0x7a, 0x75, 0x2c, 0xd7, + 0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, + 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf}; + +const static struct galois_field gf256 = { + .p = 255, + .log = gf256_log, + .exp = gf256_exp}; + +/************************************************************************ + * Polynomial operations + */ + +static void poly_add(uint8_t *dst, const uint8_t *src, uint8_t c, + int shift, const struct galois_field *gf) +{ + int i; + int log_c = gf->log[c]; + + if (!c) + return; + + for (i = 0; i < MAX_POLY; i++) + { + int p = i + shift; + uint8_t v = src[i]; + + if (p < 0 || p >= MAX_POLY) + continue; + if (!v) + continue; + + dst[p] ^= gf->exp[(gf->log[v] + log_c) % gf->p]; + } +} + +static uint8_t poly_eval(const uint8_t *s, uint8_t x, + const struct galois_field *gf) +{ + int i; + uint8_t sum = 0; + uint8_t log_x = gf->log[x]; + + if (!x) + return s[0]; + + for (i = 0; i < MAX_POLY; i++) + { + uint8_t c = s[i]; + + if (!c) + continue; + + sum ^= gf->exp[(gf->log[c] + log_x * i) % gf->p]; + } + + return sum; +} + +/************************************************************************ + * Berlekamp-Massey algorithm for finding error locator polynomials. + */ + +static void berlekamp_massey(const uint8_t *s, int N, + const struct galois_field *gf, + uint8_t *sigma) +{ + uint8_t C[MAX_POLY]; + uint8_t B[MAX_POLY]; + int L = 0; + int m = 1; + uint8_t b = 1; + int n; + + memset(B, 0, sizeof(B)); + memset(C, 0, sizeof(C)); + B[0] = 1; + C[0] = 1; + + for (n = 0; n < N; n++) + { + uint8_t d = s[n]; + uint8_t mult; + int i; + + for (i = 1; i <= L; i++) + { + if (!(C[i] && s[n - i])) + continue; + + d ^= gf->exp[(gf->log[C[i]] + + gf->log[s[n - i]]) % + gf->p]; + } + + mult = gf->exp[(gf->p - gf->log[b] + gf->log[d]) % gf->p]; + + if (!d) + { + m++; + } + else if (L * 2 <= n) + { + uint8_t T[MAX_POLY]; + + memcpy(T, C, sizeof(T)); + poly_add(C, B, mult, m, gf); + memcpy(B, T, sizeof(B)); + L = n + 1 - L; + b = d; + m = 1; + } + else + { + poly_add(C, B, mult, m, gf); + m++; + } + } + + memcpy(sigma, C, MAX_POLY); +} + +/************************************************************************ + * Code stream error correction + * + * Generator polynomial for GF(2^8) is x^8 + x^4 + x^3 + x^2 + 1 + */ + +static int block_syndromes(const uint8_t *data, int bs, int npar, uint8_t *s) +{ + int nonzero = 0; + int i; + + memset(s, 0, MAX_POLY); + + for (i = 0; i < npar; i++) + { + int j; + + for (j = 0; j < bs; j++) + { + uint8_t c = data[bs - j - 1]; + + if (!c) + continue; + + s[i] ^= gf256_exp[((int)gf256_log[c] + + i * j) % + 255]; + } + + if (s[i]) + nonzero = 1; + } + + return nonzero; +} + +static void eloc_poly(uint8_t *omega, + const uint8_t *s, const uint8_t *sigma, + int npar) +{ + int i; + + memset(omega, 0, MAX_POLY); + + for (i = 0; i < npar; i++) + { + const uint8_t a = sigma[i]; + const uint8_t log_a = gf256_log[a]; + int j; + + if (!a) + continue; + + for (j = 0; j + 1 < MAX_POLY; j++) + { + const uint8_t b = s[j + 1]; + + if (i + j >= npar) + break; + + if (!b) + continue; + + omega[i + j] ^= + gf256_exp[(log_a + gf256_log[b]) % 255]; + } + } +} + +static quirc_decode_error_t correct_block(uint8_t *data, + const struct quirc_rs_params *ecc) +{ + int npar = ecc->bs - ecc->dw; + uint8_t s[MAX_POLY]; + uint8_t sigma[MAX_POLY]; + uint8_t sigma_deriv[MAX_POLY]; + uint8_t omega[MAX_POLY]; + int i; + + /* Compute syndrome vector */ + if (!block_syndromes(data, ecc->bs, npar, s)) + return QUIRC_SUCCESS; + + berlekamp_massey(s, npar, &gf256, sigma); + + /* Compute derivative of sigma */ + memset(sigma_deriv, 0, MAX_POLY); + for (i = 0; i + 1 < MAX_POLY; i += 2) + sigma_deriv[i] = sigma[i + 1]; + + /* Compute error evaluator polynomial */ + eloc_poly(omega, s, sigma, npar - 1); + + /* Find error locations and magnitudes */ + for (i = 0; i < ecc->bs; i++) + { + uint8_t xinv = gf256_exp[255 - i]; + + if (!poly_eval(sigma, xinv, &gf256)) + { + uint8_t sd_x = poly_eval(sigma_deriv, xinv, &gf256); + uint8_t omega_x = poly_eval(omega, xinv, &gf256); + uint8_t error = gf256_exp[(255 - gf256_log[sd_x] + + gf256_log[omega_x]) % + 255]; + + data[ecc->bs - i - 1] ^= error; + } + } + + if (block_syndromes(data, ecc->bs, npar, s)) + return QUIRC_ERROR_DATA_ECC; + + return QUIRC_SUCCESS; +} + +/************************************************************************ + * Format value error correction + * + * Generator polynomial for GF(2^4) is x^4 + x + 1 + */ + +#define FORMAT_MAX_ERROR 3 +#define FORMAT_SYNDROMES (FORMAT_MAX_ERROR * 2) +#define FORMAT_BITS 15 + +static int format_syndromes(uint16_t u, uint8_t *s) +{ + int i; + int nonzero = 0; + + memset(s, 0, MAX_POLY); + + for (i = 0; i < FORMAT_SYNDROMES; i++) + { + int j; + + s[i] = 0; + for (j = 0; j < FORMAT_BITS; j++) + if (u & (1 << j)) + s[i] ^= gf16_exp[((i + 1) * j) % 15]; + + if (s[i]) + nonzero = 1; + } + + return nonzero; +} + +static quirc_decode_error_t correct_format(uint16_t *f_ret) +{ + uint16_t u = *f_ret; + int i; + uint8_t s[MAX_POLY]; + uint8_t sigma[MAX_POLY]; + + /* Evaluate U (received codeword) at each of alpha_1 .. alpha_6 + * to get S_1 .. S_6 (but we index them from 0). + */ + if (!format_syndromes(u, s)) + return QUIRC_SUCCESS; + + berlekamp_massey(s, FORMAT_SYNDROMES, &gf16, sigma); + + /* Now, find the roots of the polynomial */ + for (i = 0; i < 15; i++) + if (!poly_eval(sigma, gf16_exp[15 - i], &gf16)) + u ^= (1 << i); + + if (format_syndromes(u, s)) + return QUIRC_ERROR_FORMAT_ECC; + + *f_ret = u; + return QUIRC_SUCCESS; +} + +/************************************************************************ + * Decoder algorithm + */ + +struct datastream +{ + uint8_t raw[QUIRC_MAX_PAYLOAD]; + int data_bits; + int ptr; + + uint8_t data[QUIRC_MAX_PAYLOAD]; +} __attribute__((aligned(8))); + +static inline int grid_bit(const struct quirc_code *code, int x, int y) +{ + int p = y * code->size + x; + + return (code->cell_bitmap[p >> 3] >> (p & 7)) & 1; +} + +static quirc_decode_error_t read_format(const struct quirc_code *code, + struct quirc_data *data, int which) +{ + int i; + uint16_t format = 0; + uint16_t fdata; + quirc_decode_error_t err; + + if (which) + { + for (i = 0; i < 7; i++) + format = (format << 1) | + grid_bit(code, 8, code->size - 1 - i); + for (i = 0; i < 8; i++) + format = (format << 1) | + grid_bit(code, code->size - 8 + i, 8); + } + else + { + static const int xs[15] = { + 8, 8, 8, 8, 8, 8, 8, 8, 7, 5, 4, 3, 2, 1, 0}; + static const int ys[15] = { + 0, 1, 2, 3, 4, 5, 7, 8, 8, 8, 8, 8, 8, 8, 8}; + + for (i = 14; i >= 0; i--) + format = (format << 1) | grid_bit(code, xs[i], ys[i]); + } + + format ^= 0x5412; + + err = correct_format(&format); + if (err) + return err; + + fdata = format >> 10; + data->ecc_level = fdata >> 3; + data->mask = fdata & 7; + + return QUIRC_SUCCESS; +} + +static int mask_bit(int mask, int i, int j) +{ + switch (mask) + { + case 0: + return !((i + j) % 2); + case 1: + return !(i % 2); + case 2: + return !(j % 3); + case 3: + return !((i + j) % 3); + case 4: + return !(((i / 2) + (j / 3)) % 2); + case 5: + return !((i * j) % 2 + (i * j) % 3); + case 6: + return !(((i * j) % 2 + (i * j) % 3) % 2); + case 7: + return !(((i * j) % 3 + (i + j) % 2) % 2); + } + + return 0; +} + +static int reserved_cell(int version, int i, int j) +{ + const struct quirc_version_info *ver = &quirc_version_db[version]; + int size = version * 4 + 17; + int ai = -1, aj = -1, a; + + /* Finder + format: top left */ + if (i < 9 && j < 9) + return 1; + + /* Finder + format: bottom left */ + if (i + 8 >= size && j < 9) + return 1; + + /* Finder + format: top right */ + if (i < 9 && j + 8 >= size) + return 1; + + /* Exclude timing patterns */ + if (i == 6 || j == 6) + return 1; + + /* Exclude version info, if it exists. Version info sits adjacent to + * the top-right and bottom-left finders in three rows, bounded by + * the timing pattern. + */ + if (version >= 7) + { + if (i < 6 && j + 11 >= size) + return 1; + if (i + 11 >= size && j < 6) + return 1; + } + + /* Exclude alignment patterns */ + for (a = 0; a < QUIRC_MAX_ALIGNMENT && ver->apat[a]; a++) + { + int p = ver->apat[a]; + + if (abs(p - i) < 3) + ai = a; + if (abs(p - j) < 3) + aj = a; + } + + if (ai >= 0 && aj >= 0) + { + a--; + if (ai > 0 && ai < a) + return 1; + if (aj > 0 && aj < a) + return 1; + if (aj == a && ai == a) + return 1; + } + + return 0; +} + +static void read_bit(const struct quirc_code *code, + struct quirc_data *data, + struct datastream *ds, int i, int j) +{ + int bitpos = ds->data_bits & 7; + int bytepos = ds->data_bits >> 3; + int v = grid_bit(code, j, i); + + if (mask_bit(data->mask, i, j)) + v ^= 1; + + if (v) + ds->raw[bytepos] |= (0x80 >> bitpos); + + ds->data_bits++; +} + +static void read_data(const struct quirc_code *code, + struct quirc_data *data, + struct datastream *ds) +{ + int y = code->size - 1; + int x = code->size - 1; + int dir = -1; + + while (x > 0) + { + if (x == 6) + x--; + + if (!reserved_cell(data->version, y, x)) + read_bit(code, data, ds, y, x); + + if (!reserved_cell(data->version, y, x - 1)) + read_bit(code, data, ds, y, x - 1); + + y += dir; + if (y < 0 || y >= code->size) + { + dir = -dir; + x -= 2; + y += dir; + } + } +} + +static quirc_decode_error_t codestream_ecc(struct quirc_data *data, + struct datastream *ds) +{ + const struct quirc_version_info *ver = + &quirc_version_db[data->version]; + const struct quirc_rs_params *sb_ecc = &ver->ecc[data->ecc_level]; + struct quirc_rs_params lb_ecc; + const int lb_count = + (ver->data_bytes - sb_ecc->bs * sb_ecc->ns) / (sb_ecc->bs + 1); + const int bc = lb_count + sb_ecc->ns; + const int ecc_offset = sb_ecc->dw * bc + lb_count; + int dst_offset = 0; + int i; + + memcpy(&lb_ecc, sb_ecc, sizeof(lb_ecc)); + lb_ecc.dw++; + lb_ecc.bs++; + + for (i = 0; i < bc; i++) + { + uint8_t *dst = ds->data + dst_offset; + const struct quirc_rs_params *ecc = + (i < sb_ecc->ns) ? sb_ecc : &lb_ecc; + const int num_ec = ecc->bs - ecc->dw; + quirc_decode_error_t err; + int j; + + for (j = 0; j < ecc->dw; j++) + dst[j] = ds->raw[j * bc + i]; + for (j = 0; j < num_ec; j++) + dst[ecc->dw + j] = ds->raw[ecc_offset + j * bc + i]; + + err = correct_block(dst, ecc); + if (err) + return err; + + dst_offset += ecc->dw; + } + + ds->data_bits = dst_offset * 8; + + return QUIRC_SUCCESS; +} + +static inline int bits_remaining(const struct datastream *ds) +{ + return ds->data_bits - ds->ptr; +} + +static int take_bits(struct datastream *ds, int len) +{ + int ret = 0; + + while (len && (ds->ptr < ds->data_bits)) + { + uint8_t b = ds->data[ds->ptr >> 3]; + int bitpos = ds->ptr & 7; + + ret <<= 1; + if ((b << bitpos) & 0x80) + ret |= 1; + + ds->ptr++; + len--; + } + + return ret; +} + +static int numeric_tuple(struct quirc_data *data, + struct datastream *ds, + int bits, int digits) +{ + int tuple; + int i; + + if (bits_remaining(ds) < bits) + return -1; + + tuple = take_bits(ds, bits); + + for (i = digits - 1; i >= 0; i--) + { + data->payload[data->payload_len + i] = tuple % 10 + '0'; + tuple /= 10; + } + + data->payload_len += digits; + return 0; +} + +static quirc_decode_error_t decode_numeric(struct quirc_data *data, + struct datastream *ds) +{ + int bits = 14; + int count; + + if (data->version < 10) + bits = 10; + else if (data->version < 27) + bits = 12; + + count = take_bits(ds, bits); + if (data->payload_len + count + 1 > QUIRC_MAX_PAYLOAD) + return QUIRC_ERROR_DATA_OVERFLOW; + + while (count >= 3) + { + if (numeric_tuple(data, ds, 10, 3) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count -= 3; + } + + if (count >= 2) + { + if (numeric_tuple(data, ds, 7, 2) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count -= 2; + } + + if (count) + { + if (numeric_tuple(data, ds, 4, 1) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count--; + } + + return QUIRC_SUCCESS; +} + +static int alpha_tuple(struct quirc_data *data, + struct datastream *ds, + int bits, int digits) +{ + int tuple; + int i; + + if (bits_remaining(ds) < bits) + return -1; + + tuple = take_bits(ds, bits); + + for (i = 0; i < digits; i++) + { + static const char *alpha_map = + "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"; + + data->payload[data->payload_len + digits - i - 1] = + alpha_map[tuple % 45]; + tuple /= 45; + } + + data->payload_len += digits; + return 0; +} + +static quirc_decode_error_t decode_alpha(struct quirc_data *data, + struct datastream *ds) +{ + int bits = 13; + int count; + + if (data->version < 10) + bits = 9; + else if (data->version < 27) + bits = 11; + + count = take_bits(ds, bits); + if (data->payload_len + count + 1 > QUIRC_MAX_PAYLOAD) + return QUIRC_ERROR_DATA_OVERFLOW; + + while (count >= 2) + { + if (alpha_tuple(data, ds, 11, 2) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count -= 2; + } + + if (count) + { + if (alpha_tuple(data, ds, 6, 1) < 0) + return QUIRC_ERROR_DATA_UNDERFLOW; + count--; + } + + return QUIRC_SUCCESS; +} + +static quirc_decode_error_t decode_byte(struct quirc_data *data, + struct datastream *ds) +{ + int bits = 16; + int count; + int i; + + if (data->version < 10) + bits = 8; + + count = take_bits(ds, bits); + if (data->payload_len + count + 1 > QUIRC_MAX_PAYLOAD) + return QUIRC_ERROR_DATA_OVERFLOW; + if (bits_remaining(ds) < count * 8) + return QUIRC_ERROR_DATA_UNDERFLOW; + + for (i = 0; i < count; i++) + data->payload[data->payload_len++] = take_bits(ds, 8); + + return QUIRC_SUCCESS; +} + +static quirc_decode_error_t decode_kanji(struct quirc_data *data, + struct datastream *ds) +{ + int bits = 12; + int count; + int i; + + if (data->version < 10) + bits = 8; + else if (data->version < 27) + bits = 10; + + count = take_bits(ds, bits); + if (data->payload_len + count * 2 + 1 > QUIRC_MAX_PAYLOAD) + return QUIRC_ERROR_DATA_OVERFLOW; + if (bits_remaining(ds) < count * 13) + return QUIRC_ERROR_DATA_UNDERFLOW; + + for (i = 0; i < count; i++) + { + int d = take_bits(ds, 13); + int msB = d / 0xc0; + int lsB = d % 0xc0; + int intermediate = (msB << 8) | lsB; + uint16_t sjw; + + if (intermediate + 0x8140 <= 0x9ffc) + { + /* bytes are in the range 0x8140 to 0x9FFC */ + sjw = intermediate + 0x8140; + } + else + { + /* bytes are in the range 0xE040 to 0xEBBF */ + sjw = intermediate + 0xc140; + } + + data->payload[data->payload_len++] = sjw >> 8; + data->payload[data->payload_len++] = sjw & 0xff; + } + + return QUIRC_SUCCESS; +} + +static quirc_decode_error_t decode_eci(struct quirc_data *data, + struct datastream *ds) +{ + if (bits_remaining(ds) < 8) + return QUIRC_ERROR_DATA_UNDERFLOW; + + data->eci = take_bits(ds, 8); + + if ((data->eci & 0xc0) == 0x80) + { + if (bits_remaining(ds) < 8) + return QUIRC_ERROR_DATA_UNDERFLOW; + + data->eci = (data->eci << 8) | take_bits(ds, 8); + } + else if ((data->eci & 0xe0) == 0xc0) + { + if (bits_remaining(ds) < 16) + return QUIRC_ERROR_DATA_UNDERFLOW; + + data->eci = (data->eci << 16) | take_bits(ds, 16); + } + + return QUIRC_SUCCESS; +} + +static quirc_decode_error_t decode_payload(struct quirc_data *data, + struct datastream *ds) +{ + while (bits_remaining(ds) >= 4) + { + quirc_decode_error_t err = QUIRC_SUCCESS; + int type = take_bits(ds, 4); + + switch (type) + { + case QUIRC_DATA_TYPE_NUMERIC: + err = decode_numeric(data, ds); + break; + + case QUIRC_DATA_TYPE_ALPHA: + err = decode_alpha(data, ds); + break; + + case QUIRC_DATA_TYPE_BYTE: + err = decode_byte(data, ds); + break; + + case QUIRC_DATA_TYPE_KANJI: + err = decode_kanji(data, ds); + break; + + case 7: + err = decode_eci(data, ds); + break; + + default: + goto done; + } + + if (err) + return err; + + if (!(type & (type - 1)) && (type > data->data_type)) + data->data_type = type; + } + +done: + + /* Add nul terminator to all payloads */ + if (data->payload_len >= sizeof(data->payload)) + data->payload_len--; + data->payload[data->payload_len] = 0; + + return QUIRC_SUCCESS; +} + +quirc_decode_error_t quirc_decode(const struct quirc_code *code, + struct quirc_data *data) +{ + quirc_decode_error_t err; + struct datastream *ds = ps_malloc(sizeof(struct datastream)); + + if ((code->size - 17) % 4) + { + free(ds); + return QUIRC_ERROR_INVALID_GRID_SIZE; + } + + memset(data, 0, sizeof(*data)); + memset(ds, 0, sizeof(*ds)); + + data->version = (code->size - 17) / 4; + + if (data->version < 1 || + data->version > QUIRC_MAX_VERSION) + { + free(ds); + return QUIRC_ERROR_INVALID_VERSION; + } + + /* Read format information -- try both locations */ + err = read_format(code, data, 0); + if (err) + err = read_format(code, data, 1); + if (err) + { + free(ds); + return err; + } + + read_data(code, data, ds); + err = codestream_ecc(data, ds); + if (err) + { + free(ds); + return err; + } + + err = decode_payload(data, ds); + if (err) + { + free(ds); + return err; + } + + free(ds); + return QUIRC_SUCCESS; +} \ No newline at end of file diff --git a/libraries/ESP32QRCodeReader_Page_original/fmath.h b/libraries/ESP32QRCodeReader_Page_original/fmath.h new file mode 100644 index 0000000..76c3b93 --- /dev/null +++ b/libraries/ESP32QRCodeReader_Page_original/fmath.h @@ -0,0 +1,70 @@ +/* + * This file is part of the OpenMV project. + * Copyright (c) 2013/2014 Ibrahim Abdelkader + * This work is licensed under the MIT license, see the file LICENSE for details. + * + * Fast approximate math functions. + * + */ +#ifndef __FMATH_H +#define __FMATH_H +#include +#include + +static inline float fast_sqrtf(float x) +{ + //return sqrtf(x); + asm("fsqrt.s %0, %1" + : "=f"(x) + : "f"(x)); + return x; +} +static inline int fast_floorf(float x) +{ + return (int)(x); +} + +static inline int fast_ceilf(float x) +{ + return (int)(x + 0.9999f); +} + +static inline int fast_roundf(float x) +{ + return (int)(x); +} + +static inline float fast_fabsf(float d) +{ + return fabsf(d); +} + +extern int fast_floorf(float x); +extern int fast_ceilf(float x); +extern int fast_roundf(float x); +extern float fast_atanf(float x); +extern float fast_atan2f(float y, float x); +extern float fast_expf(float x); +extern float fast_cbrtf(float d); +extern float fast_fabsf(float d); +extern float fast_log(float x); +extern float fast_log2(float x); +extern float fast_powf(float a, float b); + +/*#define fast_sqrtf(x) (sqrtf(x)) +#define fast_floorf(x) ((int)floorf(x)) +#define fast_ceilf(x) ((int)ceilf(x)) +#define fast_roundf(x) ((int)roundf(x)) +#define fast_atanf(x) (atanf(x)) +#define fast_atan2f(x,y) (atan2f((x),(y))) +#define fast_expf(x) (expf(x)) +#define fast_cbrtf(x) (cbrtf(x)) +#define fast_fabsf(x) (fabsf(x)) +#define fast_log(x) (log(x)) +#define fast_log2(x) (log2(x)) +#define fast_powf(x,y) (powf((x),(y))) +*/ + +extern const float cos_table[360]; +extern const float sin_table[360]; +#endif // __FMATH_H \ No newline at end of file diff --git a/libraries/ESP32QRCodeReader_Page_original/identify.c b/libraries/ESP32QRCodeReader_Page_original/identify.c new file mode 100644 index 0000000..d0d0316 --- /dev/null +++ b/libraries/ESP32QRCodeReader_Page_original/identify.c @@ -0,0 +1,1286 @@ +/* quirc - QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include +#include + +#include "fmath.h" +#include "collections.h" +#include "quirc_internal.h" + +/************************************************************************ + * Linear algebra routines + */ + +static int line_intersect(const struct quirc_point *p0, + const struct quirc_point *p1, + const struct quirc_point *q0, + const struct quirc_point *q1, + struct quirc_point *r) +{ + /* (a, b) is perpendicular to line p */ + int a = -(p1->y - p0->y); + int b = p1->x - p0->x; + + /* (c, d) is perpendicular to line q */ + int c = -(q1->y - q0->y); + int d = q1->x - q0->x; + + /* e and f are dot products of the respective vectors with p and q */ + int e = a * p1->x + b * p1->y; + int f = c * q1->x + d * q1->y; + + /* Now we need to solve: + * [a b] [rx] [e] + * [c d] [ry] = [f] + * + * We do this by inverting the matrix and applying it to (e, f): + * [ d -b] [e] [rx] + * 1/det [-c a] [f] = [ry] + */ + int det = (a * d) - (b * c); + + if (!det) + return 0; + + r->x = (d * e - b * f) / det; + r->y = (-c * e + a * f) / det; + + return 1; +} + +static void perspective_setup(float *c, + const struct quirc_point *rect, + float w, float h) +{ + float x0 = rect[0].x; + float y0 = rect[0].y; + float x1 = rect[1].x; + float y1 = rect[1].y; + float x2 = rect[2].x; + float y2 = rect[2].y; + float x3 = rect[3].x; + float y3 = rect[3].y; + + float wden = w * (x2 * y3 - x3 * y2 + (x3 - x2) * y1 + x1 * (y2 - y3)); + float hden = h * (x2 * y3 + x1 * (y2 - y3) - x3 * y2 + (x3 - x2) * y1); + + c[0] = (x1 * (x2 * y3 - x3 * y2) + x0 * (-x2 * y3 + x3 * y2 + (x2 - x3) * y1) + + x1 * (x3 - x2) * y0) / + wden; + c[1] = -(x0 * (x2 * y3 + x1 * (y2 - y3) - x2 * y1) - x1 * x3 * y2 + x2 * x3 * y1 + (x1 * x3 - x2 * x3) * y0) / hden; + c[2] = x0; + c[3] = (y0 * (x1 * (y3 - y2) - x2 * y3 + x3 * y2) + y1 * (x2 * y3 - x3 * y2) + + x0 * y1 * (y2 - y3)) / + wden; + c[4] = (x0 * (y1 * y3 - y2 * y3) + x1 * y2 * y3 - x2 * y1 * y3 + + y0 * (x3 * y2 - x1 * y2 + (x2 - x3) * y1)) / + hden; + c[5] = y0; + c[6] = (x1 * (y3 - y2) + x0 * (y2 - y3) + (x2 - x3) * y1 + (x3 - x2) * y0) / wden; + c[7] = (-x2 * y3 + x1 * y3 + x3 * y2 + x0 * (y1 - y2) - x3 * y1 + (x2 - x1) * y0) / + hden; +} + +static void perspective_map(const float *c, + float u, float v, struct quirc_point *ret) +{ + float den = c[6] * u + c[7] * v + 1.0; + float x = (c[0] * u + c[1] * v + c[2]) / den; + float y = (c[3] * u + c[4] * v + c[5]) / den; + + ret->x = fast_roundf(x); + ret->y = fast_roundf(y); +} + +static void perspective_unmap(const float *c, + const struct quirc_point *in, + float *u, float *v) +{ + float x = in->x; + float y = in->y; + float den = -c[0] * c[7] * y + c[1] * c[6] * y + (c[3] * c[7] - c[4] * c[6]) * x + + c[0] * c[4] - c[1] * c[3]; + + *u = -(c[1] * (y - c[5]) - c[2] * c[7] * y + (c[5] * c[7] - c[4]) * x + c[2] * c[4]) / + den; + *v = (c[0] * (y - c[5]) - c[2] * c[6] * y + (c[5] * c[6] - c[3]) * x + c[2] * c[3]) / + den; +} + +/************************************************************************ + * Span-based floodfill routine + */ + +typedef void (*span_func_t)(void *user_data, int y, int left, int right); + +typedef struct xylf +{ + int16_t x, y, l, r; +} __attribute__((aligned(8))) +xylf_t; + +//计算该区域的面积,from是像素颜色,to是区块标号,user_data是申请的区块结构体,func是计算面积的函数 +static void flood_fill_seed(struct quirc *q, int x, int y, int from, int to, + span_func_t func, void *user_data, + int depth) +{ + (void)depth; // unused + + lifo_t lifo; + size_t lifo_len; + lifo_alloc_all(&lifo, &lifo_len, sizeof(xylf_t)); + //late in first out. 申请xylf_t的lifo,一次申请完,长度存储在lifo_len中 + + for (;;) + { + int left = x; + int right = x; + int i; + quirc_pixel_t *row = q->pixels + y * q->w; //行起始地址 + //查找左右边界 + while (left > 0 && row[left - 1] == from) + left--; + + while (right < q->w - 1 && row[right + 1] == from) + right++; + + /* Fill the extent 对应像素标记为区块号*/ + for (i = left; i <= right; i++) + row[i] = to; + //累加区域内的像素点数作为面积 + if (func) + func(user_data, y, left, right); + + for (;;) + { + if (lifo_size(&lifo) < lifo_len) + { //栈中的数量 + /* Seed new flood-fills */ + if (y > 0) + { //查找上一行有没有在同一区域的点 + row = q->pixels + (y - 1) * q->w; + + bool recurse = false; + for (i = left; i <= right; i++) + if (row[i] == from) + { //相同区域,则入栈原来的区块 + xylf_t context; + context.x = x; + context.y = y; + context.l = left; + context.r = right; + lifo_enqueue(&lifo, &context); + //mp_printf(&mp_plat_print, "#x=%x,y=%d;x1=%d,y1=%d\n",x,y,i,y-1); + x = i; + y = y - 1; + recurse = true; + break; + } + if (recurse) + break; + } + //查找下一行有没有在同一区域的点 + if (y < q->h - 1) + { + row = q->pixels + (y + 1) * q->w; + + bool recurse = false; + for (i = left; i <= right; i++) + if (row[i] == from) + { + xylf_t context; + context.x = x; + context.y = y; + context.l = left; + context.r = right; + lifo_enqueue(&lifo, &context); + //mp_printf(&mp_plat_print, "#x=%x,y=%d;x1=%d,y1=%d\n",x,y,i,y+1); + x = i; + y = y + 1; + recurse = true; + break; + } + if (recurse) + break; + } + } + + if (!lifo_size(&lifo)) + { + lifo_free(&lifo); //如果最起始为止就没找到,那么返回 + return; + } + //本次迭代,往上,往下找边界(相同颜色像素点),直到找不到为止 + //找到边界后,出栈上层像素点,回退回去 + xylf_t context; + lifo_dequeue(&lifo, &context); //这里存疑,如果都没有的话,dequeue就会反向溢出吧。。 + x = context.x; + y = context.y; + left = context.l; + right = context.r; + //mp_printf(&mp_plat_print, "#deq: x=%x,y=%d\n",x,y); + } //找到相同from,break到这外面 + } +} + +/************************************************************************ + * Adaptive thresholding + */ + +#define THRESHOLD_S_MIN 1 +#define THRESHOLD_S_DEN 8 +#define THRESHOLD_T 5 + +static void threshold(struct quirc *q) +{ + int x, y; + int avg_w = 0; + int avg_u = 0; + int threshold_s = q->w / THRESHOLD_S_DEN; + quirc_pixel_t *row = q->pixels; + + /* + * Ensure a sane, non-zero value for threshold_s. + * + * threshold_s can be zero if the image width is small. We need to avoid + * SIGFPE as it will be used as divisor. + */ + if (threshold_s < THRESHOLD_S_MIN) + threshold_s = THRESHOLD_S_MIN; + + for (y = 0; y < q->h; y++) + { + int row_average[q->w]; + + memset(row_average, 0, sizeof(row_average)); + + for (x = 0; x < q->w; x++) + { + int w, u; + + if (y & 1) + { + w = x; + u = q->w - 1 - x; + } + else + { + w = q->w - 1 - x; + u = x; + } + + avg_w = (avg_w * (threshold_s - 1)) / + threshold_s + + row[w]; + avg_u = (avg_u * (threshold_s - 1)) / + threshold_s + + row[u]; + + row_average[w] += avg_w; + row_average[u] += avg_u; + } + + for (x = 0; x < q->w; x++) + { + if (row[x] < row_average[x] * + (100 - THRESHOLD_T) / (200 * threshold_s)) + row[x] = QUIRC_PIXEL_BLACK; + else + row[x] = QUIRC_PIXEL_WHITE; + } + + row += q->w; + } +} + +static void area_count(void *user_data, int y, int left, int right) +{ + ((struct quirc_region *)user_data)->count += right - left + 1; +} + +static int region_code(struct quirc *q, int x, int y) +{ //region指的是QRcode的区域,成员为区域的坐标,像素面积,是否顶点 + int pixel; + struct quirc_region *box; + int region; + + if (x < 0 || y < 0 || x >= q->w || y >= q->h) + return -1; + + pixel = q->pixels[y * q->w + x]; + //预先判断非正常的像素情况,退出 + if (pixel >= QUIRC_PIXEL_REGION) + return pixel; + + if (pixel == QUIRC_PIXEL_WHITE) + return -1; + + if (q->num_regions >= QUIRC_MAX_REGIONS) + return -1; + //新建一个区域 + region = q->num_regions; + box = &q->regions[q->num_regions++]; + + memset(box, 0, sizeof(*box)); + + box->seed.x = x; + box->seed.y = y; + box->capstone = -1; + //计算该区域的面积 + flood_fill_seed(q, x, y, pixel, region, area_count, box, 0); + + return region; +} + +struct polygon_score_data +{ + struct quirc_point ref; + + int scores[4]; + struct quirc_point *corners; +} __attribute__((aligned(8))); + +static void find_one_corner(void *user_data, int y, int left, int right) +{ + struct polygon_score_data *psd = + (struct polygon_score_data *)user_data; + int xs[2] = {left, right}; + int dy = y - psd->ref.y; + int i; + + for (i = 0; i < 2; i++) + { + int dx = xs[i] - psd->ref.x; + int d = dx * dx + dy * dy; + + if (d > psd->scores[0]) + { + psd->scores[0] = d; + psd->corners[0].x = xs[i]; + psd->corners[0].y = y; + } + } +} + +static void find_other_corners(void *user_data, int y, int left, int right) +{ + struct polygon_score_data *psd = + (struct polygon_score_data *)user_data; + int xs[2] = {left, right}; + int i; + + for (i = 0; i < 2; i++) + { + int up = xs[i] * psd->ref.x + y * psd->ref.y; + int right = xs[i] * -psd->ref.y + y * psd->ref.x; + int scores[4] = {up, right, -up, -right}; + int j; + + for (j = 0; j < 4; j++) + { + if (scores[j] > psd->scores[j]) + { + psd->scores[j] = scores[j]; + psd->corners[j].x = xs[i]; + psd->corners[j].y = y; + } + } + } +} + +static void find_region_corners(struct quirc *q, + int rcode, const struct quirc_point *ref, + struct quirc_point *corners) +{ + struct quirc_region *region = &q->regions[rcode]; + struct polygon_score_data psd; + int i; + + memset(&psd, 0, sizeof(psd)); + psd.corners = corners; + + memcpy(&psd.ref, ref, sizeof(psd.ref)); + psd.scores[0] = -1; + flood_fill_seed(q, region->seed.x, region->seed.y, + rcode, QUIRC_PIXEL_BLACK, + find_one_corner, &psd, 0); + + psd.ref.x = psd.corners[0].x - psd.ref.x; + psd.ref.y = psd.corners[0].y - psd.ref.y; + + for (i = 0; i < 4; i++) + memcpy(&psd.corners[i], ®ion->seed, + sizeof(psd.corners[i])); + + i = region->seed.x * psd.ref.x + region->seed.y * psd.ref.y; + psd.scores[0] = i; + psd.scores[2] = -i; + i = region->seed.x * -psd.ref.y + region->seed.y * psd.ref.x; + psd.scores[1] = i; + psd.scores[3] = -i; + + flood_fill_seed(q, region->seed.x, region->seed.y, + QUIRC_PIXEL_BLACK, rcode, + find_other_corners, &psd, 0); +} + +static void record_capstone(struct quirc *q, int ring, int stone) +{ + struct quirc_region *stone_reg = &q->regions[stone]; + struct quirc_region *ring_reg = &q->regions[ring]; + struct quirc_capstone *capstone; + int cs_index; + + if (q->num_capstones >= QUIRC_MAX_CAPSTONES) + return; + + cs_index = q->num_capstones; + capstone = &q->capstones[q->num_capstones++]; + + memset(capstone, 0, sizeof(*capstone)); + + capstone->qr_grid = -1; + capstone->ring = ring; + capstone->stone = stone; + stone_reg->capstone = cs_index; + ring_reg->capstone = cs_index; + + /* Find the corners of the ring */ + find_region_corners(q, ring, &stone_reg->seed, capstone->corners); + + /* Set up the perspective transform and find the center */ + perspective_setup(capstone->c, capstone->corners, 7.0, 7.0); + perspective_map(capstone->c, 3.5, 3.5, &capstone->center); +} + +static void test_capstone(struct quirc *q, int x, int y, int *pb) +{ + int ring_right = region_code(q, x - pb[4], y); //x-pb[4]是标记环右边的左侧 + int stone = region_code(q, x - pb[4] - pb[3] - pb[2], y); //实心点左侧 + int ring_left = region_code(q, x - pb[4] - pb[3] - pb[2] - pb[1] - pb[0], y); //环左侧 + struct quirc_region *stone_reg; + struct quirc_region *ring_reg; + int ratio; + //以下检测顶点标记是否符合规范,环称为ring,中间称为stone + if (ring_left < 0 || ring_right < 0 || stone < 0) + return; + + /* Left and ring of ring should be connected */ + if (ring_left != ring_right) + return; + + /* Ring should be disconnected from stone */ + if (ring_left == stone) + return; + + stone_reg = &q->regions[stone]; + ring_reg = &q->regions[ring_left]; + + /* Already detected */ + if (stone_reg->capstone >= 0 || ring_reg->capstone >= 0) + return; + + /* Ratio should ideally be 37.5 中间实心点占面积比例应该在37.5%左右*/ + ratio = stone_reg->count * 100 / ring_reg->count; + if (ratio < 10 || ratio > 70) + return; + + record_capstone(q, ring_left, stone); +} + +static void finder_scan(struct quirc *q, int y) +{ + quirc_pixel_t *row = q->pixels + y * q->w; + int x; + int last_color = 0; + int run_length = 0; + int run_count = 0; + int pb[5]; //means QRcode's pixel width + + memset(pb, 0, sizeof(pb)); + for (x = 0; x < q->w; x++) + { + int color = row[x] ? 1 : 0; + + if (x && color != last_color) + { // color is different + memmove(pb, pb + 1, sizeof(pb[0]) * 4); //left move in one data + pb[4] = run_length; //run how many pix to get different color + run_length = 0; + run_count++; //get more than 5 time color jump + + if (!color && run_count >= 5) + { // find the marker of QRcode(three corner's marker) + static int check[5] = {1, 1, 3, 1, 1}; + int avg, err; + int i; + int ok = 1; + + avg = (pb[0] + pb[1] + pb[3] + pb[4]) / 4; + err = avg * 3 / 4; + + for (i = 0; i < 5; i++) + if (pb[i] < check[i] * avg - err || + pb[i] > check[i] * avg + err) + ok = 0; + + if (ok) + test_capstone(q, x, y, pb); + } + } + + run_length++; + last_color = color; + } +} + +static void find_alignment_pattern(struct quirc *q, int index) +{ + struct quirc_grid *qr = &q->grids[index]; + struct quirc_capstone *c0 = &q->capstones[qr->caps[0]]; + struct quirc_capstone *c2 = &q->capstones[qr->caps[2]]; + struct quirc_point a; + struct quirc_point b; + struct quirc_point c; + int size_estimate; + int step_size = 1; + int dir = 0; + float u, v; + + /* Grab our previous estimate of the alignment pattern corner */ + memcpy(&b, &qr->align, sizeof(b)); + + /* Guess another two corners of the alignment pattern so that we + * can estimate its size. + */ + perspective_unmap(c0->c, &b, &u, &v); + perspective_map(c0->c, u, v + 1.0, &a); + perspective_unmap(c2->c, &b, &u, &v); + perspective_map(c2->c, u + 1.0, v, &c); + + size_estimate = abs((a.x - b.x) * -(c.y - b.y) + + (a.y - b.y) * (c.x - b.x)); + + /* Spiral outwards from the estimate point until we find something + * roughly the right size. Don't look too far from the estimate + * point. + */ + while (step_size * step_size < size_estimate * 100) + { + static const int dx_map[] = {1, 0, -1, 0}; + static const int dy_map[] = {0, -1, 0, 1}; + int i; + + for (i = 0; i < step_size; i++) + { + int code = region_code(q, b.x, b.y); + + if (code >= 0) + { + struct quirc_region *reg = &q->regions[code]; + + if (reg->count >= size_estimate / 2 && + reg->count <= size_estimate * 2) + { + qr->align_region = code; + return; + } + } + + b.x += dx_map[dir]; + b.y += dy_map[dir]; + } + + dir = (dir + 1) % 4; + if (!(dir & 1)) + step_size++; + } +} + +static void find_leftmost_to_line(void *user_data, int y, int left, int right) +{ + struct polygon_score_data *psd = + (struct polygon_score_data *)user_data; + int xs[2] = {left, right}; + int i; + + for (i = 0; i < 2; i++) + { + int d = -psd->ref.y * xs[i] + psd->ref.x * y; + + if (d < psd->scores[0]) + { + psd->scores[0] = d; + psd->corners[0].x = xs[i]; + psd->corners[0].y = y; + } + } +} + +/* Do a Bresenham scan from one point to another and count the number + * of black/white transitions. + */ +static int timing_scan(const struct quirc *q, + const struct quirc_point *p0, + const struct quirc_point *p1) +{ + int n = p1->x - p0->x; + int d = p1->y - p0->y; + int x = p0->x; + int y = p0->y; + int *dom, *nondom; + int dom_step; + int nondom_step; + int a = 0; + int i; + int run_length = 0; + int count = 0; + + if (p0->x < 0 || p0->y < 0 || p0->x >= q->w || p0->y >= q->h) + return -1; + if (p1->x < 0 || p1->y < 0 || p1->x >= q->w || p1->y >= q->h) + return -1; + + if (abs(n) > abs(d)) + { + int swap = n; + + n = d; + d = swap; + + dom = &x; + nondom = &y; + } + else + { + dom = &y; + nondom = &x; + } + + if (n < 0) + { + n = -n; + nondom_step = -1; + } + else + { + nondom_step = 1; + } + + if (d < 0) + { + d = -d; + dom_step = -1; + } + else + { + dom_step = 1; + } + + x = p0->x; + y = p0->y; + for (i = 0; i <= d; i++) + { + int pixel; + + if (y < 0 || y >= q->h || x < 0 || x >= q->w) + break; + + pixel = q->pixels[y * q->w + x]; + + if (pixel) + { + if (run_length >= 2) + count++; + run_length = 0; + } + else + { + run_length++; + } + + a += n; + *dom += dom_step; + if (a >= d) + { + *nondom += nondom_step; + a -= d; + } + } + + return count; +} + +/* Try the measure the timing pattern for a given QR code. This does + * not require the global perspective to have been set up, but it + * does require that the capstone corners have been set to their + * canonical rotation. + * + * For each capstone, we find a point in the middle of the ring band + * which is nearest the centre of the code. Using these points, we do + * a horizontal and a vertical timing scan. + */ +static int measure_timing_pattern(struct quirc *q, int index) +{ + struct quirc_grid *qr = &q->grids[index]; + int i; + int scan; + int ver; + int size; + + for (i = 0; i < 3; i++) + { + static const float us[] = {6.5, 6.5, 0.5}; + static const float vs[] = {0.5, 6.5, 6.5}; + struct quirc_capstone *cap = &q->capstones[qr->caps[i]]; + + perspective_map(cap->c, us[i], vs[i], &qr->tpep[i]); + } + + qr->hscan = timing_scan(q, &qr->tpep[1], &qr->tpep[2]); + qr->vscan = timing_scan(q, &qr->tpep[1], &qr->tpep[0]); + + scan = qr->hscan; + if (qr->vscan > scan) + scan = qr->vscan; + + /* If neither scan worked, we can't go any further. */ + if (scan < 0) + return -1; + + /* Choose the nearest allowable grid size */ + size = scan * 2 + 13; + ver = (size - 15) / 4; + qr->grid_size = ver * 4 + 17; + + return 0; +} + +/* Read a cell from a grid using the currently set perspective + * transform. Returns +/- 1 for black/white, 0 for cells which are + * out of image bounds. + */ +static int read_cell(const struct quirc *q, int index, int x, int y) +{ + const struct quirc_grid *qr = &q->grids[index]; + struct quirc_point p; + + perspective_map(qr->c, x + 0.5, y + 0.5, &p); + if (p.y < 0 || p.y >= q->h || p.x < 0 || p.x >= q->w) + return 0; + + return q->pixels[p.y * q->w + p.x] ? 1 : -1; +} + +static int fitness_cell(const struct quirc *q, int index, int x, int y) +{ + const struct quirc_grid *qr = &q->grids[index]; + int score = 0; + int u, v; + + for (v = 0; v < 3; v++) + for (u = 0; u < 3; u++) + { + static const float offsets[] = {0.3, 0.5, 0.7}; + struct quirc_point p; + + perspective_map(qr->c, x + offsets[u], + y + offsets[v], &p); + if (p.y < 0 || p.y >= q->h || p.x < 0 || p.x >= q->w) + continue; + + if (q->pixels[p.y * q->w + p.x]) + score++; + else + score--; + } + + return score; +} + +static int fitness_ring(const struct quirc *q, int index, int cx, int cy, + int radius) +{ + int i; + int score = 0; + + for (i = 0; i < radius * 2; i++) + { + score += fitness_cell(q, index, cx - radius + i, cy - radius); + score += fitness_cell(q, index, cx - radius, cy + radius - i); + score += fitness_cell(q, index, cx + radius, cy - radius + i); + score += fitness_cell(q, index, cx + radius - i, cy + radius); + } + + return score; +} + +static int fitness_apat(const struct quirc *q, int index, int cx, int cy) +{ + return fitness_cell(q, index, cx, cy) - + fitness_ring(q, index, cx, cy, 1) + + fitness_ring(q, index, cx, cy, 2); +} + +static int fitness_capstone(const struct quirc *q, int index, int x, int y) +{ + x += 3; + y += 3; + + return fitness_cell(q, index, x, y) + + fitness_ring(q, index, x, y, 1) - + fitness_ring(q, index, x, y, 2) + + fitness_ring(q, index, x, y, 3); +} + +/* Compute a fitness score for the currently configured perspective + * transform, using the features we expect to find by scanning the + * grid. + */ +static int fitness_all(const struct quirc *q, int index) +{ + const struct quirc_grid *qr = &q->grids[index]; + int version = (qr->grid_size - 17) / 4; + const struct quirc_version_info *info = &quirc_version_db[version]; + int score = 0; + int i, j; + int ap_count; + + /* Check the timing pattern */ + for (i = 0; i < qr->grid_size - 14; i++) + { + int expect = (i & 1) ? 1 : -1; + + score += fitness_cell(q, index, i + 7, 6) * expect; + score += fitness_cell(q, index, 6, i + 7) * expect; + } + + /* Check capstones */ + score += fitness_capstone(q, index, 0, 0); + score += fitness_capstone(q, index, qr->grid_size - 7, 0); + score += fitness_capstone(q, index, 0, qr->grid_size - 7); + + if (version < 0 || version > QUIRC_MAX_VERSION) + return score; + + /* Check alignment patterns */ + ap_count = 0; + while ((ap_count < QUIRC_MAX_ALIGNMENT) && info->apat[ap_count]) + ap_count++; + + for (i = 1; i + 1 < ap_count; i++) + { + score += fitness_apat(q, index, 6, info->apat[i]); + score += fitness_apat(q, index, info->apat[i], 6); + } + + for (i = 1; i < ap_count; i++) + for (j = 1; j < ap_count; j++) + score += fitness_apat(q, index, + info->apat[i], info->apat[j]); + //mp_printf(&mp_plat_print, "##score=%d\n",score); + return score; +} + +static void jiggle_perspective(struct quirc *q, int index) +{ + struct quirc_grid *qr = &q->grids[index]; + int best = fitness_all(q, index); + int pass; + float adjustments[8]; + int i; + + for (i = 0; i < 8; i++) + adjustments[i] = qr->c[i] * 0.02; + + for (pass = 0; pass < 5; pass++) + { + for (i = 0; i < 16; i++) + { + int j = i >> 1; + int test; + float old = qr->c[j]; + float step = adjustments[j]; + float new; + + if (i & 1) + new = old + step; + else + new = old - step; + + qr->c[j] = new; + test = fitness_all(q, index); + + if (test > best) + best = test; + else + qr->c[j] = old; + } + + for (i = 0; i < 8; i++) + adjustments[i] *= 0.5; + } +} + +/* Once the capstones are in place and an alignment point has been + * chosen, we call this function to set up a grid-reading perspective + * transform. + */ +static void setup_qr_perspective(struct quirc *q, int index) +{ + struct quirc_grid *qr = &q->grids[index]; + struct quirc_point rect[4]; + + /* Set up the perspective map for reading the grid */ + memcpy(&rect[0], &q->capstones[qr->caps[1]].corners[0], + sizeof(rect[0])); + memcpy(&rect[1], &q->capstones[qr->caps[2]].corners[0], + sizeof(rect[0])); + memcpy(&rect[2], &qr->align, sizeof(rect[0])); + memcpy(&rect[3], &q->capstones[qr->caps[0]].corners[0], + sizeof(rect[0])); + perspective_setup(qr->c, rect, qr->grid_size - 7, qr->grid_size - 7); + + jiggle_perspective(q, index); +} + +/* Rotate the capstone with so that corner 0 is the leftmost with respect + * to the given reference line. + */ +static void rotate_capstone(struct quirc_capstone *cap, + const struct quirc_point *h0, + const struct quirc_point *hd) +{ + struct quirc_point copy[4]; + int j; + int best = 0; + int best_score = 0; + + for (j = 0; j < 4; j++) + { + struct quirc_point *p = &cap->corners[j]; + int score = (p->x - h0->x) * -hd->y + + (p->y - h0->y) * hd->x; + + if (!j || score < best_score) + { + best = j; + best_score = score; + } + } + + /* Rotate the capstone */ + for (j = 0; j < 4; j++) + memcpy(©[j], &cap->corners[(j + best) % 4], + sizeof(copy[j])); + memcpy(cap->corners, copy, sizeof(cap->corners)); + perspective_setup(cap->c, cap->corners, 7.0, 7.0); +} + +static void record_qr_grid(struct quirc *q, int a, int b, int c) +{ + struct quirc_point h0, hd; + int i; + int qr_index; + struct quirc_grid *qr; + + if (q->num_grids >= QUIRC_MAX_GRIDS) + return; + + /* Construct the hypotenuse line from A to C. B should be to + * the left of this line. + */ + memcpy(&h0, &q->capstones[a].center, sizeof(h0)); + hd.x = q->capstones[c].center.x - q->capstones[a].center.x; + hd.y = q->capstones[c].center.y - q->capstones[a].center.y; + + /* Make sure A-B-C is clockwise */ + if ((q->capstones[b].center.x - h0.x) * -hd.y + + (q->capstones[b].center.y - h0.y) * hd.x > + 0) + { + int swap = a; + + a = c; + c = swap; + hd.x = -hd.x; + hd.y = -hd.y; + } + + /* Record the grid and its components */ + qr_index = q->num_grids; + qr = &q->grids[q->num_grids++]; + + memset(qr, 0, sizeof(*qr)); + qr->caps[0] = a; + qr->caps[1] = b; + qr->caps[2] = c; + qr->align_region = -1; + + /* Rotate each capstone so that corner 0 is top-left with respect + * to the grid. + */ + for (i = 0; i < 3; i++) + { + struct quirc_capstone *cap = &q->capstones[qr->caps[i]]; + + rotate_capstone(cap, &h0, &hd); + cap->qr_grid = qr_index; + } + + /* Check the timing pattern. This doesn't require a perspective + * transform. + */ + if (measure_timing_pattern(q, qr_index) < 0) + goto fail; + + /* Make an estimate based for the alignment pattern based on extending + * lines from capstones A and C. + */ + if (!line_intersect(&q->capstones[a].corners[0], + &q->capstones[a].corners[1], + &q->capstones[c].corners[0], + &q->capstones[c].corners[3], + &qr->align)) + goto fail; + + /* On V2+ grids, we should use the alignment pattern. */ + if (qr->grid_size > 21) + { + /* Try to find the actual location of the alignment pattern. */ + find_alignment_pattern(q, qr_index); + + /* Find the point of the alignment pattern closest to the + * top-left of the QR grid. + */ + if (qr->align_region >= 0) + { + struct polygon_score_data psd; + struct quirc_region *reg = + &q->regions[qr->align_region]; + + /* Start from some point inside the alignment pattern */ + memcpy(&qr->align, ®->seed, sizeof(qr->align)); + + memcpy(&psd.ref, &hd, sizeof(psd.ref)); + psd.corners = &qr->align; + psd.scores[0] = -hd.y * qr->align.x + + hd.x * qr->align.y; + + flood_fill_seed(q, reg->seed.x, reg->seed.y, + qr->align_region, QUIRC_PIXEL_BLACK, + NULL, NULL, 0); + flood_fill_seed(q, reg->seed.x, reg->seed.y, + QUIRC_PIXEL_BLACK, qr->align_region, + find_leftmost_to_line, &psd, 0); + } + } + + setup_qr_perspective(q, qr_index); + return; + +fail: + /* We've been unable to complete setup for this grid. Undo what we've + * recorded and pretend it never happened. + */ + for (i = 0; i < 3; i++) + q->capstones[qr->caps[i]].qr_grid = -1; + q->num_grids--; +} + +struct neighbour +{ + int index; + float distance; +} __attribute__((aligned(8))); + +struct neighbour_list +{ + struct neighbour n[QUIRC_MAX_CAPSTONES]; + int count; +} __attribute__((aligned(8))); + +static void test_neighbours(struct quirc *q, int i, + const struct neighbour_list *hlist, + const struct neighbour_list *vlist) +{ + int j, k; + float best_score = 0.0; + int best_h = -1, best_v = -1; + + /* Test each possible grouping */ + for (j = 0; j < hlist->count; j++) + for (k = 0; k < vlist->count; k++) + { + const struct neighbour *hn = &hlist->n[j]; + const struct neighbour *vn = &vlist->n[k]; + float score = fast_fabsf(1.0 - hn->distance / vn->distance); + + if (score > 2.5) + continue; + + if (best_h < 0 || score < best_score) + { + best_h = hn->index; + best_v = vn->index; + best_score = score; + } + } + + if (best_h < 0 || best_v < 0) + return; + + record_qr_grid(q, best_h, i, best_v); +} + +static void test_grouping(struct quirc *q, int i) +{ + struct quirc_capstone *c1 = &q->capstones[i]; + int j; + struct neighbour_list hlist; + struct neighbour_list vlist; + + if (c1->qr_grid >= 0) + return; + + hlist.count = 0; + vlist.count = 0; + + /* Look for potential neighbours by examining the relative gradients + * from this capstone to others. + */ + for (j = 0; j < q->num_capstones; j++) + { + struct quirc_capstone *c2 = &q->capstones[j]; + float u, v; + + if (i == j || c2->qr_grid >= 0) + continue; + + perspective_unmap(c1->c, &c2->center, &u, &v); + + u = fast_fabsf(u - 3.5); + v = fast_fabsf(v - 3.5); + + if (u < 0.2 * v) + { + struct neighbour *n = &hlist.n[hlist.count++]; + + n->index = j; + n->distance = v; + } + + if (v < 0.2 * u) + { + struct neighbour *n = &vlist.n[vlist.count++]; + + n->index = j; + n->distance = u; + } + } + + if (!(hlist.count && vlist.count)) + return; + + test_neighbours(q, i, &hlist, &vlist); +} + +static void pixels_setup(struct quirc *q) +{ + if (sizeof(*q->image) == sizeof(*q->pixels)) + { + q->pixels = (quirc_pixel_t *)q->image; + } + else + { + int x, y; + for (y = 0; y < q->h; y++) + { + for (x = 0; x < q->w; x++) + { + q->pixels[y * q->w + x] = q->image[y * q->w + x]; + } + } + } +} + +uint8_t *quirc_begin(struct quirc *q, int *w, int *h) +{ + q->num_regions = QUIRC_PIXEL_REGION; + q->num_capstones = 0; + q->num_grids = 0; + + if (w) + *w = q->w; + if (h) + *h = q->h; + + return q->image; +} + +void quirc_end(struct quirc *q) +{ + int i; + pixels_setup(q); + threshold(q); + + for (i = 0; i < q->h; i++) + { + finder_scan(q, i); + } + + for (i = 0; i < q->num_capstones; i++) + { + test_grouping(q, i); + } +} + +void quirc_extract(const struct quirc *q, int index, + struct quirc_code *code) +{ + const struct quirc_grid *qr = &q->grids[index]; + int y; + int i = 0; + + if (index < 0 || index > q->num_grids) + return; + + memset(code, 0, sizeof(*code)); + + perspective_map(qr->c, 0.0, 0.0, &code->corners[0]); + perspective_map(qr->c, qr->grid_size, 0.0, &code->corners[1]); + perspective_map(qr->c, qr->grid_size, qr->grid_size, + &code->corners[2]); + perspective_map(qr->c, 0.0, qr->grid_size, &code->corners[3]); + + code->size = qr->grid_size; + + for (y = 0; y < qr->grid_size; y++) + { + int x; + + for (x = 0; x < qr->grid_size; x++) + { + if (read_cell(q, index, x, y) > 0) + code->cell_bitmap[i >> 3] |= (1 << (i & 7)); + + i++; + } + } +} diff --git a/libraries/ESP32QRCodeReader_Page_original/quirc.c b/libraries/ESP32QRCodeReader_Page_original/quirc.c new file mode 100644 index 0000000..e5a30fb --- /dev/null +++ b/libraries/ESP32QRCodeReader_Page_original/quirc.c @@ -0,0 +1,104 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include "quirc_internal.h" +#include + +const char *quirc_version(void) +{ + return "1.0"; +} + +//static struct quirc _q; +struct quirc *quirc_new(void) +{ + struct quirc *q = ps_malloc(sizeof(*q)); + + if (!q) + return NULL; + + memset(q, 0, sizeof(*q)); + return q; +} + +void quirc_destroy(struct quirc *q) +{ + if (q->image) + if (q->image) + free(q->image); + if (sizeof(*q->image) != sizeof(*q->pixels)) + if (q->pixels) + free(q->pixels); + + if (q) + free(q); +} + +//static quirc_pixel_t img_buf[320*240]; +int quirc_resize(struct quirc *q, int w, int h) +{ + if (q->image) + { + free(q->image); + } + uint8_t *new_image = ps_malloc(w * h); + + if (!new_image) + return -1; + + if (sizeof(*q->image) != sizeof(*q->pixels)) + { //should gray, 1==1 + size_t new_size = w * h * sizeof(quirc_pixel_t); + if (q->pixels) + free(q->pixels); + quirc_pixel_t *new_pixels = ps_malloc(new_size); + if (!new_pixels) + { + free(new_image); + return -1; + } + q->pixels = new_pixels; + } + q->image = new_image; + q->w = w; + q->h = h; + return 0; +} + +int quirc_count(const struct quirc *q) +{ + return q->num_grids; +} + +static const char *const error_table[] = { + [QUIRC_SUCCESS] = "Success", + [QUIRC_ERROR_INVALID_GRID_SIZE] = "Invalid grid size", + [QUIRC_ERROR_INVALID_VERSION] = "Invalid version", + [QUIRC_ERROR_FORMAT_ECC] = "Format data ECC failure", + [QUIRC_ERROR_DATA_ECC] = "ECC failure", + [QUIRC_ERROR_UNKNOWN_DATA_TYPE] = "Unknown data type", + [QUIRC_ERROR_DATA_OVERFLOW] = "Data overflow", + [QUIRC_ERROR_DATA_UNDERFLOW] = "Data underflow"}; + +const char *quirc_strerror(quirc_decode_error_t err) +{ + if (err >= 0 && err < sizeof(error_table) / sizeof(error_table[0])) + return error_table[err]; + + return "Unknown error"; +} diff --git a/libraries/ESP32QRCodeReader_Page_original/quirc.h b/libraries/ESP32QRCodeReader_Page_original/quirc.h new file mode 100644 index 0000000..ecdc172 --- /dev/null +++ b/libraries/ESP32QRCodeReader_Page_original/quirc.h @@ -0,0 +1,178 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef QUIRC_H_ +#define QUIRC_H_ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + + struct quirc; + + /* Obtain the library version string. */ + const char *quirc_version(void); + + /* Construct a new QR-code recognizer. This function will return NULL + * if sufficient memory could not be allocated. + */ + struct quirc *quirc_new(void); + + /* Destroy a QR-code recognizer. */ + void quirc_destroy(struct quirc *q); + + /* Resize the QR-code recognizer. The size of an image must be + * specified before codes can be analyzed. + * + * This function returns 0 on success, or -1 if sufficient memory could + * not be allocated. + */ + int quirc_resize(struct quirc *q, int w, int h); + + /* These functions are used to process images for QR-code recognition. + * quirc_begin() must first be called to obtain access to a buffer into + * which the input image should be placed. Optionally, the current + * width and height may be returned. + * + * After filling the buffer, quirc_end() should be called to process + * the image for QR-code recognition. The locations and content of each + * code may be obtained using accessor functions described below. + */ + uint8_t *quirc_begin(struct quirc *q, int *w, int *h); + void quirc_end(struct quirc *q); + + /* This structure describes a location in the input image buffer. */ + struct quirc_point + { + int x; + int y; + } __attribute__((aligned(8))); + + /* This enum describes the various decoder errors which may occur. */ + typedef enum + { + QUIRC_SUCCESS = 0, + QUIRC_ERROR_INVALID_GRID_SIZE, + QUIRC_ERROR_INVALID_VERSION, + QUIRC_ERROR_FORMAT_ECC, + QUIRC_ERROR_DATA_ECC, + QUIRC_ERROR_UNKNOWN_DATA_TYPE, + QUIRC_ERROR_DATA_OVERFLOW, + QUIRC_ERROR_DATA_UNDERFLOW + } quirc_decode_error_t; + + /* Return a string error message for an error code. */ + const char *quirc_strerror(quirc_decode_error_t err); + +/* Limits on the maximum size of QR-codes and their content. */ +#define QUIRC_MAX_BITMAP 3917 +#define QUIRC_MAX_PAYLOAD 8896 + +/* QR-code ECC types. */ +#define QUIRC_ECC_LEVEL_M 0 +#define QUIRC_ECC_LEVEL_L 1 +#define QUIRC_ECC_LEVEL_H 2 +#define QUIRC_ECC_LEVEL_Q 3 + +/* QR-code data types. */ +#define QUIRC_DATA_TYPE_NUMERIC 1 +#define QUIRC_DATA_TYPE_ALPHA 2 +#define QUIRC_DATA_TYPE_BYTE 4 +#define QUIRC_DATA_TYPE_KANJI 8 + +/* Common character encodings */ +#define QUIRC_ECI_ISO_8859_1 1 +#define QUIRC_ECI_IBM437 2 +#define QUIRC_ECI_ISO_8859_2 4 +#define QUIRC_ECI_ISO_8859_3 5 +#define QUIRC_ECI_ISO_8859_4 6 +#define QUIRC_ECI_ISO_8859_5 7 +#define QUIRC_ECI_ISO_8859_6 8 +#define QUIRC_ECI_ISO_8859_7 9 +#define QUIRC_ECI_ISO_8859_8 10 +#define QUIRC_ECI_ISO_8859_9 11 +#define QUIRC_ECI_WINDOWS_874 13 +#define QUIRC_ECI_ISO_8859_13 15 +#define QUIRC_ECI_ISO_8859_15 17 +#define QUIRC_ECI_SHIFT_JIS 20 +#define QUIRC_ECI_UTF_8 26 + + /* This structure is used to return information about detected QR codes + * in the input image. + */ + struct quirc_code + { + /* The four corners of the QR-code, from top left, clockwise */ + struct quirc_point corners[4]; + + /* The number of cells across in the QR-code. The cell bitmap + * is a bitmask giving the actual values of cells. If the cell + * at (x, y) is black, then the following bit is set: + * + * cell_bitmap[i >> 3] & (1 << (i & 7)) + * + * where i = (y * size) + x. + */ + int size; + uint8_t cell_bitmap[QUIRC_MAX_BITMAP]; + } __attribute__((aligned(8))); + + /* This structure holds the decoded QR-code data */ + struct quirc_data + { + /* Various parameters of the QR-code. These can mostly be + * ignored if you only care about the data. + */ + int version; + int ecc_level; + int mask; + + /* This field is the highest-valued data type found in the QR + * code. + */ + int data_type; + + /* Data payload. For the Kanji datatype, payload is encoded as + * Shift-JIS. For all other datatypes, payload is ASCII text. + */ + uint8_t payload[QUIRC_MAX_PAYLOAD]; + int payload_len; + + /* ECI assignment number */ + uint32_t eci; + } __attribute__((aligned(8))); + + /* Return the number of QR-codes identified in the last processed + * image. + */ + int quirc_count(const struct quirc *q); + + /* Extract the QR-code specified by the given index. */ + void quirc_extract(const struct quirc *q, int index, + struct quirc_code *code); + + /* Decode a QR-code, returning the payload data. */ + quirc_decode_error_t quirc_decode(const struct quirc_code *code, + struct quirc_data *data); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/libraries/ESP32QRCodeReader_Page_original/quirc_internal.h b/libraries/ESP32QRCodeReader_Page_original/quirc_internal.h new file mode 100644 index 0000000..3fa075c --- /dev/null +++ b/libraries/ESP32QRCodeReader_Page_original/quirc_internal.h @@ -0,0 +1,121 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef QUIRC_INTERNAL_H_ +#define QUIRC_INTERNAL_H_ + +#include "quirc.h" + +#define QUIRC_PIXEL_WHITE 0 +#define QUIRC_PIXEL_BLACK 1 +#define QUIRC_PIXEL_REGION 2 + +#ifndef QUIRC_MAX_REGIONS +#define QUIRC_MAX_REGIONS 254 +#endif + +#define QUIRC_MAX_CAPSTONES 32 +#define QUIRC_MAX_GRIDS 8 + +#define QUIRC_PERSPECTIVE_PARAMS 8 + +#if QUIRC_MAX_REGIONS < UINT8_MAX +typedef uint8_t quirc_pixel_t; +#elif QUIRC_MAX_REGIONS < UINT16_MAX +typedef uint16_t quirc_pixel_t; +#else +#error "QUIRC_MAX_REGIONS > 65534 is not supported" +#endif + +struct quirc_region +{ + struct quirc_point seed; + int count; + int capstone; +} __attribute__((aligned(8))); + +struct quirc_capstone +{ + int ring; + int stone; + + struct quirc_point corners[4]; + struct quirc_point center; + float c[QUIRC_PERSPECTIVE_PARAMS]; + + int qr_grid; +} __attribute__((aligned(8))); + +struct quirc_grid +{ + /* Capstone indices */ + int caps[3]; + + /* Alignment pattern region and corner */ + int align_region; + struct quirc_point align; + + /* Timing pattern endpoints */ + struct quirc_point tpep[3]; + int hscan; + int vscan; + + /* Grid size and perspective transform */ + int grid_size; + float c[QUIRC_PERSPECTIVE_PARAMS]; +} __attribute__((aligned(8))); + +struct quirc +{ + uint8_t *image; + quirc_pixel_t *pixels; + int w; + int h; + + int num_regions; + struct quirc_region regions[QUIRC_MAX_REGIONS]; + + int num_capstones; + struct quirc_capstone capstones[QUIRC_MAX_CAPSTONES]; + + int num_grids; + struct quirc_grid grids[QUIRC_MAX_GRIDS]; +} __attribute__((aligned(8))); + +/************************************************************************ + * QR-code version information database + */ + +#define QUIRC_MAX_VERSION 40 +#define QUIRC_MAX_ALIGNMENT 7 + +struct quirc_rs_params +{ + uint8_t bs; /* Small block size */ + uint8_t dw; /* Small data words */ + uint8_t ns; /* Number of small blocks */ +} __attribute__((aligned(8))); + +struct quirc_version_info +{ + uint16_t data_bytes; + uint8_t apat[QUIRC_MAX_ALIGNMENT]; + struct quirc_rs_params ecc[4]; +} __attribute__((aligned(8))); + +extern const struct quirc_version_info quirc_version_db[QUIRC_MAX_VERSION + 1]; + +#endif \ No newline at end of file diff --git a/libraries/ESP32QRCodeReader_Page_original/version_db.c b/libraries/ESP32QRCodeReader_Page_original/version_db.c new file mode 100644 index 0000000..0da2d07 --- /dev/null +++ b/libraries/ESP32QRCodeReader_Page_original/version_db.c @@ -0,0 +1,184 @@ +/* quirc -- QR-code recognition library + * Copyright (C) 2010-2012 Daniel Beer + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "quirc_internal.h" + +const struct quirc_version_info quirc_version_db[QUIRC_MAX_VERSION + 1] = { + {0}, + {/* Version 1 */ + .data_bytes = 26, + .apat = {0}, + .ecc = { + {.bs = 26, .dw = 16, .ns = 1}, + {.bs = 26, .dw = 19, .ns = 1}, + {.bs = 26, .dw = 9, .ns = 1}, + {.bs = 26, .dw = 13, .ns = 1}}}, + {/* Version 2 */ + .data_bytes = 44, + .apat = {6, 18, 0}, + .ecc = {{.bs = 44, .dw = 28, .ns = 1}, {.bs = 44, .dw = 34, .ns = 1}, {.bs = 44, .dw = 16, .ns = 1}, {.bs = 44, .dw = 22, .ns = 1}}}, + {/* Version 3 */ + .data_bytes = 70, + .apat = {6, 22, 0}, + .ecc = {{.bs = 70, .dw = 44, .ns = 1}, {.bs = 70, .dw = 55, .ns = 1}, {.bs = 35, .dw = 13, .ns = 2}, {.bs = 35, .dw = 17, .ns = 2}}}, + {/* Version 4 */ + .data_bytes = 100, + .apat = {6, 26, 0}, + .ecc = {{.bs = 50, .dw = 32, .ns = 2}, {.bs = 100, .dw = 80, .ns = 1}, {.bs = 25, .dw = 9, .ns = 4}, {.bs = 50, .dw = 24, .ns = 2}}}, + {/* Version 5 */ + .data_bytes = 134, + .apat = {6, 30, 0}, + .ecc = {{.bs = 67, .dw = 43, .ns = 2}, {.bs = 134, .dw = 108, .ns = 1}, {.bs = 33, .dw = 11, .ns = 2}, {.bs = 33, .dw = 15, .ns = 2}}}, + {/* Version 6 */ + .data_bytes = 172, + .apat = {6, 34, 0}, + .ecc = {{.bs = 43, .dw = 27, .ns = 4}, {.bs = 86, .dw = 68, .ns = 2}, {.bs = 43, .dw = 15, .ns = 4}, {.bs = 43, .dw = 19, .ns = 4}}}, + {/* Version 7 */ + .data_bytes = 196, + .apat = {6, 22, 38, 0}, + .ecc = {{.bs = 49, .dw = 31, .ns = 4}, {.bs = 98, .dw = 78, .ns = 2}, {.bs = 39, .dw = 13, .ns = 4}, {.bs = 32, .dw = 14, .ns = 2}}}, + {/* Version 8 */ + .data_bytes = 242, + .apat = {6, 24, 42, 0}, + .ecc = {{.bs = 60, .dw = 38, .ns = 2}, {.bs = 121, .dw = 97, .ns = 2}, {.bs = 40, .dw = 14, .ns = 4}, {.bs = 40, .dw = 18, .ns = 4}}}, + {/* Version 9 */ + .data_bytes = 292, + .apat = {6, 26, 46, 0}, + .ecc = {{.bs = 58, .dw = 36, .ns = 3}, {.bs = 146, .dw = 116, .ns = 2}, {.bs = 36, .dw = 12, .ns = 4}, {.bs = 36, .dw = 16, .ns = 4}}}, + {/* Version 10 */ + .data_bytes = 346, + .apat = {6, 28, 50, 0}, + .ecc = {{.bs = 69, .dw = 43, .ns = 4}, {.bs = 86, .dw = 68, .ns = 2}, {.bs = 43, .dw = 15, .ns = 6}, {.bs = 43, .dw = 19, .ns = 6}}}, + {/* Version 11 */ + .data_bytes = 404, + .apat = {6, 30, 54, 0}, + .ecc = {{.bs = 80, .dw = 50, .ns = 1}, {.bs = 101, .dw = 81, .ns = 4}, {.bs = 36, .dw = 12, .ns = 3}, {.bs = 50, .dw = 22, .ns = 4}}}, + {/* Version 12 */ + .data_bytes = 466, + .apat = {6, 32, 58, 0}, + .ecc = {{.bs = 58, .dw = 36, .ns = 6}, {.bs = 116, .dw = 92, .ns = 2}, {.bs = 42, .dw = 14, .ns = 7}, {.bs = 46, .dw = 20, .ns = 4}}}, + {/* Version 13 */ + .data_bytes = 532, + .apat = {6, 34, 62, 0}, + .ecc = {{.bs = 59, .dw = 37, .ns = 8}, {.bs = 133, .dw = 107, .ns = 4}, {.bs = 33, .dw = 11, .ns = 12}, {.bs = 44, .dw = 20, .ns = 8}}}, + {/* Version 14 */ + .data_bytes = 581, + .apat = {6, 26, 46, 66, 0}, + .ecc = {{.bs = 64, .dw = 40, .ns = 4}, {.bs = 145, .dw = 115, .ns = 3}, {.bs = 36, .dw = 12, .ns = 11}, {.bs = 36, .dw = 16, .ns = 11}}}, + {/* Version 15 */ + .data_bytes = 655, + .apat = {6, 26, 48, 70, 0}, + .ecc = {{.bs = 65, .dw = 41, .ns = 5}, {.bs = 109, .dw = 87, .ns = 5}, {.bs = 36, .dw = 12, .ns = 11}, {.bs = 54, .dw = 24, .ns = 5}}}, + {/* Version 16 */ + .data_bytes = 733, + .apat = {6, 26, 50, 74, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 7}, {.bs = 122, .dw = 98, .ns = 5}, {.bs = 45, .dw = 15, .ns = 3}, {.bs = 43, .dw = 19, .ns = 15}}}, + {/* Version 17 */ + .data_bytes = 815, + .apat = {6, 30, 54, 78, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 10}, {.bs = 135, .dw = 107, .ns = 1}, {.bs = 42, .dw = 14, .ns = 2}, {.bs = 50, .dw = 22, .ns = 1}}}, + {/* Version 18 */ + .data_bytes = 901, + .apat = {6, 30, 56, 82, 0}, + .ecc = {{.bs = 69, .dw = 43, .ns = 9}, {.bs = 150, .dw = 120, .ns = 5}, {.bs = 42, .dw = 14, .ns = 2}, {.bs = 50, .dw = 22, .ns = 17}}}, + {/* Version 19 */ + .data_bytes = 991, + .apat = {6, 30, 58, 86, 0}, + .ecc = {{.bs = 70, .dw = 44, .ns = 3}, {.bs = 141, .dw = 113, .ns = 3}, {.bs = 39, .dw = 13, .ns = 9}, {.bs = 47, .dw = 21, .ns = 17}}}, + {/* Version 20 */ + .data_bytes = 1085, + .apat = {6, 34, 62, 90, 0}, + .ecc = {{.bs = 67, .dw = 41, .ns = 3}, {.bs = 135, .dw = 107, .ns = 3}, {.bs = 43, .dw = 15, .ns = 15}, {.bs = 54, .dw = 24, .ns = 15}}}, + {/* Version 21 */ + .data_bytes = 1156, + .apat = {6, 28, 50, 72, 92, 0}, + .ecc = {{.bs = 68, .dw = 42, .ns = 17}, {.bs = 144, .dw = 116, .ns = 4}, {.bs = 46, .dw = 16, .ns = 19}, {.bs = 50, .dw = 22, .ns = 17}}}, + {/* Version 22 */ + .data_bytes = 1258, + .apat = {6, 26, 50, 74, 98, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 17}, {.bs = 139, .dw = 111, .ns = 2}, {.bs = 37, .dw = 13, .ns = 34}, {.bs = 54, .dw = 24, .ns = 7}}}, + {/* Version 23 */ + .data_bytes = 1364, + .apat = {6, 30, 54, 78, 102, 0}, + .ecc = {{.bs = 75, .dw = 47, .ns = 4}, {.bs = 151, .dw = 121, .ns = 4}, {.bs = 45, .dw = 15, .ns = 16}, {.bs = 54, .dw = 24, .ns = 11}}}, + {/* Version 24 */ + .data_bytes = 1474, + .apat = {6, 28, 54, 80, 106, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 6}, {.bs = 147, .dw = 117, .ns = 6}, {.bs = 46, .dw = 16, .ns = 30}, {.bs = 54, .dw = 24, .ns = 11}}}, + {/* Version 25 */ + .data_bytes = 1588, + .apat = {6, 32, 58, 84, 110, 0}, + .ecc = {{.bs = 75, .dw = 47, .ns = 8}, {.bs = 132, .dw = 106, .ns = 8}, {.bs = 45, .dw = 15, .ns = 22}, {.bs = 54, .dw = 24, .ns = 7}}}, + {/* Version 26 */ + .data_bytes = 1706, + .apat = {6, 30, 58, 86, 114, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 19}, {.bs = 142, .dw = 114, .ns = 10}, {.bs = 46, .dw = 16, .ns = 33}, {.bs = 50, .dw = 22, .ns = 28}}}, + {/* Version 27 */ + .data_bytes = 1828, + .apat = {6, 34, 62, 90, 118, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 22}, {.bs = 152, .dw = 122, .ns = 8}, {.bs = 45, .dw = 15, .ns = 12}, {.bs = 53, .dw = 23, .ns = 8}}}, + {/* Version 28 */ + .data_bytes = 1921, + .apat = {6, 26, 50, 74, 98, 122, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 3}, {.bs = 147, .dw = 117, .ns = 3}, {.bs = 45, .dw = 15, .ns = 11}, {.bs = 54, .dw = 24, .ns = 4}}}, + {/* Version 29 */ + .data_bytes = 2051, + .apat = {6, 30, 54, 78, 102, 126, 0}, + .ecc = {{.bs = 73, .dw = 45, .ns = 21}, {.bs = 146, .dw = 116, .ns = 7}, {.bs = 45, .dw = 15, .ns = 19}, {.bs = 53, .dw = 23, .ns = 1}}}, + {/* Version 30 */ + .data_bytes = 2185, + .apat = {6, 26, 52, 78, 104, 130, 0}, + .ecc = {{.bs = 75, .dw = 47, .ns = 19}, {.bs = 145, .dw = 115, .ns = 5}, {.bs = 45, .dw = 15, .ns = 23}, {.bs = 54, .dw = 24, .ns = 15}}}, + {/* Version 31 */ + .data_bytes = 2323, + .apat = {6, 30, 56, 82, 108, 134, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 2}, {.bs = 145, .dw = 115, .ns = 13}, {.bs = 45, .dw = 15, .ns = 23}, {.bs = 54, .dw = 24, .ns = 42}}}, + {/* Version 32 */ + .data_bytes = 2465, + .apat = {6, 34, 60, 86, 112, 138, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 10}, {.bs = 145, .dw = 115, .ns = 17}, {.bs = 45, .dw = 15, .ns = 19}, {.bs = 54, .dw = 24, .ns = 10}}}, + {/* Version 33 */ + .data_bytes = 2611, + .apat = {6, 30, 58, 86, 114, 142, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 14}, {.bs = 145, .dw = 115, .ns = 17}, {.bs = 45, .dw = 15, .ns = 11}, {.bs = 54, .dw = 24, .ns = 29}}}, + {/* Version 34 */ + .data_bytes = 2761, + .apat = {6, 34, 62, 90, 118, 146, 0}, + .ecc = {{.bs = 74, .dw = 46, .ns = 14}, {.bs = 145, .dw = 115, .ns = 13}, {.bs = 46, .dw = 16, .ns = 59}, {.bs = 54, .dw = 24, .ns = 44}}}, + {/* Version 35 */ + .data_bytes = 2876, + .apat = {6, 30, 54, 78, 102, 126, 150}, + .ecc = {{.bs = 75, .dw = 47, .ns = 12}, {.bs = 151, .dw = 121, .ns = 12}, {.bs = 45, .dw = 15, .ns = 22}, {.bs = 54, .dw = 24, .ns = 39}}}, + {/* Version 36 */ + .data_bytes = 3034, + .apat = {6, 24, 50, 76, 102, 128, 154}, + .ecc = {{.bs = 75, .dw = 47, .ns = 6}, {.bs = 151, .dw = 121, .ns = 6}, {.bs = 45, .dw = 15, .ns = 2}, {.bs = 54, .dw = 24, .ns = 46}}}, + {/* Version 37 */ + .data_bytes = 3196, + .apat = {6, 28, 54, 80, 106, 132, 158}, + .ecc = {{.bs = 74, .dw = 46, .ns = 29}, {.bs = 152, .dw = 122, .ns = 17}, {.bs = 45, .dw = 15, .ns = 24}, {.bs = 54, .dw = 24, .ns = 49}}}, + {/* Version 38 */ + .data_bytes = 3362, + .apat = {6, 32, 58, 84, 110, 136, 162}, + .ecc = {{.bs = 74, .dw = 46, .ns = 13}, {.bs = 152, .dw = 122, .ns = 4}, {.bs = 45, .dw = 15, .ns = 42}, {.bs = 54, .dw = 24, .ns = 48}}}, + {/* Version 39 */ + .data_bytes = 3532, + .apat = {6, 26, 54, 82, 110, 138, 166}, + .ecc = {{.bs = 75, .dw = 47, .ns = 40}, {.bs = 147, .dw = 117, .ns = 20}, {.bs = 45, .dw = 15, .ns = 10}, {.bs = 54, .dw = 24, .ns = 43}}}, + {/* Version 40 */ + .data_bytes = 3706, + .apat = {6, 30, 58, 86, 114, 142, 170}, + .ecc = {{.bs = 75, .dw = 47, .ns = 18}, {.bs = 148, .dw = 118, .ns = 19}, {.bs = 45, .dw = 15, .ns = 20}, {.bs = 54, .dw = 24, .ns = 34}}}}; diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/CONTRIBUTING.md b/libraries/MySQL_MariaDB_Generic-1.7.2/CONTRIBUTING.md new file mode 100644 index 0000000..81addcf --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/CONTRIBUTING.md @@ -0,0 +1,54 @@ +## Contributing to MySQL_MariaDB_Generic + +### Reporting Bugs + +Please report bugs in MySQL_MariaDB_Generic if you find them. + +However, before reporting a bug please check through the following: + +* [Existing Open Issues](https://github.com/khoih-prog/MySQL_MariaDB_Generic/issues) - someone might have already encountered this. + +If you don't find anything, please [open a new issue](https://github.com/khoih-prog/MySQL_MariaDB_Generic/issues/new). + +### How to submit a bug report + +Please ensure to specify the following: + +* Arduino IDE version (e.g. 1.8.19) or Platform.io version +* Board Core Version (e.g. Arduino SAMDUE core v1.6.12, ESP32 core v2.0.2, ESP8266 core v3.0.2, ArduinoCore-mbed v3.0.1, etc.) +* Contextual information (e.g. what you were trying to achieve) +* Simplest possible steps to reproduce +* Anything that might be relevant in your opinion, such as: + * Operating system (Windows, Ubuntu, etc.) and the output of `uname -a` + * Network configuration + + +### Example + +``` +Arduino IDE version: 1.8.19 +MBED RASPBERRY_PI_PICO board +ArduinoCore-mbed v3.0.1 +OS: Ubuntu 20.04 LTS +Linux xy-Inspiron-3593 5.13.0-39-generic #44~20.04.1-Ubuntu SMP Thu Mar 24 16:43:35 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux + +Context: +I encountered a crash while trying to use the Timer Interrupt. + +Steps to reproduce: +1. ... +2. ... +3. ... +4. ... +``` + +### Sending Feature Requests + +Feel free to post feature requests. It's helpful if you can explain exactly why the feature would be useful. + +There are usually some outstanding feature requests in the [existing issues list](https://github.com/khoih-prog/MySQL_MariaDB_Generic/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement), feel free to add comments to them. + +### Sending Pull Requests + +Pull Requests with changes and fixes are also welcome! + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LICENSE b/libraries/MySQL_MariaDB_Generic-1.7.2/LICENSE new file mode 100644 index 0000000..cfe22f4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Khoi Hoang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/Ethernet.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/Ethernet.cpp new file mode 100644 index 0000000..0f3db05 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/Ethernet.cpp @@ -0,0 +1,320 @@ +/**************************************************************************************************************************** + Ethernet.cpp + + EthernetWebServer is a library for the Ethernet shields to run WebServer + + Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases + Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer + Licensed under MIT license + Version: 1.0.9 + + Copyright 2018 Paul Stoffregen + + Permission is hereby granted, free of charge, to any person obtaining a copy of this + software and associated documentation files (the "Software"), to deal in the Software + without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/02/2020 Initial coding for Arduino Mega, Teensy, etc to support Ethernetx libraries + 1.0.1 K Hoang 20/02/2020 Add support to lambda functions + 1.0.2 K Hoang 20/02/2020 Add support to UIPEthernet library for ENC28J60 + 1.0.3 K Hoang 23/02/2020 Add support to SAM DUE / SAMD21 boards + 1.0.4 K Hoang 16/04/2020 Add support to SAMD51 boards + 1.0.5 K Hoang 24/04/2020 Add support to nRF52 boards, such as AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, + Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B30_ublox, etc. + More Custom Ethernet libraries supported such as Ethernet2, Ethernet3, EthernetLarge + 1.0.6 K Hoang 27/04/2020 Add support to ESP32/ESP8266 boards + 1.0.7 K Hoang 30/04/2020 Add ENC28J60 support to ESP32/ESP8266 boards + 1.0.8 K Hoang 12/05/2020 Fix W5x00 support for ESP8266 boards. + 1.0.9 K Hoang 15/05/2020 Add EthernetWrapper.h for easier W5x00 support as well as more Ethernet libs in the future. + *****************************************************************************************************************************/ + +#include +#include "Ethernet.h" +#include "utility/w5100.h" +#include "Dhcp.h" + +#define ETHERNET_DEBUG 1 + + +IPAddress EthernetClass::_dnsServerAddress; +DhcpClass* EthernetClass::_dhcp = NULL; + +// KH +void EthernetClass::setRstPin(uint8_t pinRST) +{ + _pinRST = pinRST; + pinMode(_pinRST, OUTPUT); + digitalWrite(_pinRST, HIGH); +} +void EthernetClass::setCsPin(uint8_t pinCS) +{ + _pinCS = pinCS; + W5100.setSS(pinCS); + +#if ( ETHERNET_DEBUG > 0 ) + Serial.print("Input pinCS = "); + Serial.println(pinCS); + Serial.print("_pinCS = "); + Serial.println(_pinCS); +#endif +} + +void EthernetClass::initMaxSockNum(uint8_t maxSockNum) +{ + _maxSockNum = maxSockNum; +} + +uint8_t EthernetClass::softreset() +{ + return W5100.softReset(); +} + +void EthernetClass::hardreset() +{ + if(_pinRST != 0) + { + digitalWrite(_pinRST, LOW); + delay(1); + digitalWrite(_pinRST, HIGH); + delay(150); + } +} + +int EthernetClass::begin(uint8_t *mac, unsigned long timeout, unsigned long responseTimeout) +{ + DhcpClass s_dhcp; + _dhcp = &s_dhcp; + +#if ( ETHERNET_DEBUG > 0 ) + Serial.print("_pinCS = "); + Serial.print(_pinCS); +#endif + + // Initialise the basic info + if (W5100.init() == 0) + return 0; + + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.setMACAddress(mac); + W5100.setIPAddress(IPAddress(0,0,0,0).raw_address()); + SPI.endTransaction(); + + // Now try to get our config info from a DHCP server + int ret = _dhcp->beginWithDHCP(mac, timeout, responseTimeout); + if (ret == 1) + { + // We've successfully found a DHCP server and got our configuration + // info, so set things accordingly + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.setIPAddress(_dhcp->getLocalIp().raw_address()); + W5100.setGatewayIp(_dhcp->getGatewayIp().raw_address()); + W5100.setSubnetMask(_dhcp->getSubnetMask().raw_address()); + SPI.endTransaction(); + _dnsServerAddress = _dhcp->getDnsServerIp(); + socketPortRand(micros()); + } + return ret; +} + +void EthernetClass::begin(uint8_t *mac, IPAddress ip) +{ + // Assume the DNS server will be the machine on the same network as the local IP + // but with last octet being '1' + IPAddress dns = ip; + dns[3] = 1; + begin(mac, ip, dns); +} + +void EthernetClass::begin(uint8_t *mac, IPAddress ip, IPAddress dns) +{ + // Assume the gateway will be the machine on the same network as the local IP + // but with last octet being '1' + IPAddress gateway = ip; + gateway[3] = 1; + begin(mac, ip, dns, gateway); +} + +void EthernetClass::begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway) +{ + IPAddress subnet(255, 255, 255, 0); + begin(mac, ip, dns, gateway, subnet); +} + +void EthernetClass::begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) +{ + // Initialise the basic info + if (W5100.init() == 0) + return; + + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.setMACAddress(mac); + +#if ( defined(ESP8266) || defined(ESP32) ) + W5100.setIPAddress(ip.raw_address()); + W5100.setGatewayIp(gateway.raw_address()); + W5100.setSubnetMask(subnet.raw_address()); +#elif (ARDUINO > 106 || TEENSYDUINO > 121) + W5100.setIPAddress(ip._address.bytes); + W5100.setGatewayIp(gateway._address.bytes); + W5100.setSubnetMask(subnet._address.bytes); +#else + W5100.setIPAddress(ip._address); + W5100.setGatewayIp(gateway._address); + W5100.setSubnetMask(subnet._address); +#endif + + SPI.endTransaction(); + _dnsServerAddress = dns; +} + +void EthernetClass::init(uint8_t sspin) +{ + W5100.setSS(sspin); +} + +EthernetLinkStatus EthernetClass::linkStatus() +{ + switch (W5100.getLinkStatus()) { + case UNKNOWN: return Unknown; + case LINK_ON: return LinkON; + case LINK_OFF: return LinkOFF; + default: return Unknown; + } +} + +EthernetHardwareStatus EthernetClass::hardwareStatus() +{ + switch (W5100.getChip()) { + case 51: return EthernetW5100; + case 52: return EthernetW5200; + case 55: return EthernetW5500; + default: return EthernetNoHardware; + } +} + +int EthernetClass::maintain() +{ + int rc = DHCP_CHECK_NONE; + if (_dhcp != NULL) { + // we have a pointer to dhcp, use it + rc = _dhcp->checkLease(); + switch (rc) + { + case DHCP_CHECK_NONE: + //nothing done + break; + case DHCP_CHECK_RENEW_OK: + case DHCP_CHECK_REBIND_OK: + //we might have got a new IP. + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.setIPAddress(_dhcp->getLocalIp().raw_address()); + W5100.setGatewayIp(_dhcp->getGatewayIp().raw_address()); + W5100.setSubnetMask(_dhcp->getSubnetMask().raw_address()); + SPI.endTransaction(); + _dnsServerAddress = _dhcp->getDnsServerIp(); + break; + default: + //this is actually an error, it will retry though + break; + } + } + return rc; +} + + +void EthernetClass::MACAddress(uint8_t *mac_address) +{ + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.getMACAddress(mac_address); + SPI.endTransaction(); +} + +IPAddress EthernetClass::localIP() +{ + IPAddress ret; + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.getIPAddress(ret.raw_address()); + SPI.endTransaction(); + return ret; +} + +IPAddress EthernetClass::subnetMask() +{ + IPAddress ret; + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.getSubnetMask(ret.raw_address()); + SPI.endTransaction(); + return ret; +} + +IPAddress EthernetClass::gatewayIP() +{ + IPAddress ret; + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.getGatewayIp(ret.raw_address()); + SPI.endTransaction(); + return ret; +} + +void EthernetClass::setMACAddress(const uint8_t *mac_address) +{ + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.setMACAddress(mac_address); + SPI.endTransaction(); +} + +void EthernetClass::setLocalIP(const IPAddress local_ip) +{ + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + IPAddress ip = local_ip; + W5100.setIPAddress(ip.raw_address()); + SPI.endTransaction(); +} + +void EthernetClass::setSubnetMask(const IPAddress subnet) +{ + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + IPAddress ip = subnet; + W5100.setSubnetMask(ip.raw_address()); + SPI.endTransaction(); +} + +void EthernetClass::setGatewayIP(const IPAddress gateway) +{ + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + IPAddress ip = gateway; + W5100.setGatewayIp(ip.raw_address()); + SPI.endTransaction(); +} + +void EthernetClass::setRetransmissionTimeout(uint16_t milliseconds) +{ + if (milliseconds > 6553) milliseconds = 6553; + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.setRetransmissionTime(milliseconds * 10); + SPI.endTransaction(); +} + +void EthernetClass::setRetransmissionCount(uint8_t num) +{ + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.setRetransmissionCount(num); + SPI.endTransaction(); +} + +EthernetClass Ethernet; diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/Ethernet.h b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/Ethernet.h new file mode 100644 index 0000000..6fee77f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/Ethernet.h @@ -0,0 +1,366 @@ +/**************************************************************************************************************************** + Ethernet.h + + EthernetWebServer is a library for the Ethernet shields to run WebServer + + Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases + Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer + Licensed under MIT license + Version: 1.0.9 + + Copyright 2018 Paul Stoffregen + + Permission is hereby granted, free of charge, to any person obtaining a copy of this + software and associated documentation files (the "Software"), to deal in the Software + without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/02/2020 Initial coding for Arduino Mega, Teensy, etc to support Ethernetx libraries + 1.0.1 K Hoang 20/02/2020 Add support to lambda functions + 1.0.2 K Hoang 20/02/2020 Add support to UIPEthernet library for ENC28J60 + 1.0.3 K Hoang 23/02/2020 Add support to SAM DUE / SAMD21 boards + 1.0.4 K Hoang 16/04/2020 Add support to SAMD51 boards + 1.0.5 K Hoang 24/04/2020 Add support to nRF52 boards, such as AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, + Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B30_ublox, etc. + More Custom Ethernet libraries supported such as Ethernet2, Ethernet3, EthernetLarge + 1.0.6 K Hoang 27/04/2020 Add support to ESP32/ESP8266 boards + 1.0.7 K Hoang 30/04/2020 Add ENC28J60 support to ESP32/ESP8266 boards + 1.0.8 K Hoang 12/05/2020 Fix W5x00 support for ESP8266 boards. + 1.0.9 K Hoang 15/05/2020 Add EthernetWrapper.h for easier W5x00 support as well as more Ethernet libs in the future. + *****************************************************************************************************************************/ + +#ifndef ethernet_h_ +#define ethernet_h_ + +// All symbols exposed to Arduino sketches are contained in this header file +// +// Older versions had much of this stuff in EthernetClient.h, EthernetServer.h, +// and socket.h. Including headers in different order could cause trouble, so +// these "friend" classes are now defined in the same header file. socket.h +// was removed to avoid possible conflict with the C library header files. + + +// Configure the maximum number of sockets to support. W5100 chips can have +// up to 4 sockets. W5200 & W5500 can have up to 8 sockets. Several bytes +// of RAM are used for each socket. Reducing the maximum can save RAM, but +// you are limited to fewer simultaneous connections. +#if defined(RAMEND) && defined(RAMSTART) && ((RAMEND - RAMSTART) <= 2048) +#define MAX_SOCK_NUM 2 //Reduce MAX_SOCK_NUM to 2 from 4, to increase buffer from 2k to 4K +#else +#define MAX_SOCK_NUM 4 //Reduce MAX_SOCK_NUM to 4 from 8, to increase buffer from 2k to 4K +#endif + +// By default, each socket uses 2K buffers inside the Wiznet chip. If +// MAX_SOCK_NUM is set to fewer than the chip's maximum, uncommenting +// this will use larger buffers within the Wiznet chip. Large buffers +// can really help with UDP protocols like Artnet. In theory larger +// buffers should allow faster TCP over high-latency links, but this +// does not always seem to work in practice (maybe Wiznet bugs?) +// +//KH, to increase buffer size for W5x00 to min 4K +#define ETHERNET_LARGE_BUFFERS + + +#include +#include "Client.h" +#include "Server.h" +#include "Udp.h" + +enum EthernetLinkStatus { + Unknown, + LinkON, + LinkOFF +}; + +enum EthernetHardwareStatus { + EthernetNoHardware, + EthernetW5100, + EthernetW5200, + EthernetW5500 +}; + +class EthernetUDP; +class EthernetClient; +class EthernetServer; +class DhcpClass; + +class EthernetClass { +private: + static IPAddress _dnsServerAddress; + static DhcpClass* _dhcp; +public: + // KH + uint8_t _maxSockNum; + uint8_t _pinCS; + uint8_t _pinRST; + + void setRstPin(uint8_t pinRST = 9); // for WIZ550io or USR-ES1, must set befor Ethernet.begin + void setCsPin(uint8_t pinCS = 10); // must set befor Ethernet.begin + + // Initialize with less sockets but more RX/TX Buffer + // maxSockNum = 1 Socket 0 -> RX/TX Buffer 16k + // maxSockNum = 2 Socket 0, 1 -> RX/TX Buffer 8k + // maxSockNum = 4 Socket 0...3 -> RX/TX Buffer 4k + // maxSockNum = 8 (Standard) all sockets -> RX/TX Buffer 2k + // be carefull of the MAX_SOCK_NUM, because in the moment it can't dynamicly changed + void initMaxSockNum(uint8_t maxSockNum = 8); + + uint8_t softreset(); // can set only after Ethernet.begin + void hardreset(); // You need to set the Rst pin + + // Initialise the Ethernet shield to use the provided MAC address and + // gain the rest of the configuration through DHCP. + // Returns 0 if the DHCP configuration failed, and 1 if it succeeded + int begin(uint8_t *mac, unsigned long timeout = 60000, unsigned long responseTimeout = 4000); + int maintain(); + EthernetLinkStatus linkStatus(); + EthernetHardwareStatus hardwareStatus(); + + // Manual configuration + void begin(uint8_t *mac, IPAddress ip); + void begin(uint8_t *mac, IPAddress ip, IPAddress dns); + void begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway); + void begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet); + void init(uint8_t sspin = 10); + + void MACAddress(uint8_t *mac_address); + IPAddress localIP(); + IPAddress subnetMask(); + IPAddress gatewayIP(); + IPAddress dnsServerIP() { return _dnsServerAddress; } + + void setMACAddress(const uint8_t *mac_address); + void setLocalIP(const IPAddress local_ip); + void setSubnetMask(const IPAddress subnet); + void setGatewayIP(const IPAddress gateway); + void setDnsServerIP(const IPAddress dns_server) { _dnsServerAddress = dns_server; } + void setRetransmissionTimeout(uint16_t milliseconds); + void setRetransmissionCount(uint8_t num); + + friend class EthernetClient; + friend class EthernetServer; + friend class EthernetUDP; +private: + // Opens a socket(TCP or UDP or IP_RAW mode) + uint8_t socketBegin(uint8_t protocol, uint16_t port); + uint8_t socketBeginMulticast(uint8_t protocol, IPAddress ip,uint16_t port); + uint8_t socketStatus(uint8_t s); + // Close socket + void socketClose(uint8_t s); + // Establish TCP connection (Active connection) + void socketConnect(uint8_t s, uint8_t * addr, uint16_t port); + // disconnect the connection + void socketDisconnect(uint8_t s); + // Establish TCP connection (Passive connection) + uint8_t socketListen(uint8_t s); + // Send data (TCP) + uint16_t socketSend(uint8_t s, const uint8_t * buf, uint16_t len); + uint16_t socketSendAvailable(uint8_t s); + // Receive data (TCP) + int socketRecv(uint8_t s, uint8_t * buf, int16_t len); + uint16_t socketRecvAvailable(uint8_t s); + uint8_t socketPeek(uint8_t s); + // sets up a UDP datagram, the data for which will be provided by one + // or more calls to bufferData and then finally sent with sendUDP. + // return true if the datagram was successfully set up, or false if there was an error + bool socketStartUDP(uint8_t s, uint8_t* addr, uint16_t port); + // copy up to len bytes of data from buf into a UDP datagram to be + // sent later by sendUDP. Allows datagrams to be built up from a series of bufferData calls. + // return Number of bytes successfully buffered + uint16_t socketBufferData(uint8_t s, uint16_t offset, const uint8_t* buf, uint16_t len); + // Send a UDP datagram built up from a sequence of startUDP followed by one or more + // calls to bufferData. + // return true if the datagram was successfully sent, or false if there was an error + bool socketSendUDP(uint8_t s); + // Initialize the "random" source port number + void socketPortRand(uint16_t n); +}; + +extern EthernetClass Ethernet; + + +#define UDP_TX_PACKET_MAX_SIZE 24 + +class EthernetUDP : public UDP { +private: + uint16_t _port; // local port to listen on + IPAddress _remoteIP; // remote IP address for the incoming packet whilst it's being processed + uint16_t _remotePort; // remote port for the incoming packet whilst it's being processed + uint16_t _offset; // offset into the packet being sent + +protected: + uint8_t sockindex; + uint16_t _remaining; // remaining bytes of incoming packet yet to be processed + +public: + EthernetUDP() : sockindex(MAX_SOCK_NUM) {} // Constructor + virtual uint8_t begin(uint16_t); // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + virtual uint8_t beginMulticast(IPAddress, uint16_t); // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + virtual void stop(); // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port); + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char *host, uint16_t port); + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket(); + // Write a single byte into the packet + virtual size_t write(uint8_t); + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t *buffer, size_t size); + + using Print::write; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket(); + // Number of bytes remaining in the current packet + virtual int available(); + // Read a single byte from the current packet + virtual int read(); + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len); + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) { return read((unsigned char*)buffer, len); }; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek(); + virtual void flush(); // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP() { return _remoteIP; }; + // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort() { return _remotePort; }; + virtual uint16_t localPort() { return _port; } +}; + + + + +class EthernetClient : public Client { +public: + + EthernetClient() : sockindex(MAX_SOCK_NUM), _timeout(5000) { } + EthernetClient(uint8_t s) : sockindex(s), _timeout(5000) { } + + uint8_t status(); + virtual int connect(IPAddress ip, uint16_t port); + virtual int connect(const char *host, uint16_t port); + virtual int availableForWrite(void); + virtual size_t write(uint8_t); + virtual size_t write(const uint8_t *buf, size_t size); + + virtual int available(); + virtual int read(); + virtual int read(uint8_t *buf, size_t size); + virtual int peek(); + virtual void flush(); + virtual void stop(); + virtual uint8_t connected(); + virtual operator bool() { return sockindex < MAX_SOCK_NUM; } + virtual bool operator==(const bool value) { return bool() == value; } + virtual bool operator!=(const bool value) { return bool() != value; } + virtual bool operator==(const EthernetClient&); + virtual bool operator!=(const EthernetClient& rhs) { return !this->operator==(rhs); } + uint8_t getSocketNumber() const { return sockindex; } + virtual uint16_t localPort(); + virtual IPAddress remoteIP(); + virtual uint16_t remotePort(); + virtual void setConnectionTimeout(uint16_t timeout) { _timeout = timeout; } + + friend class EthernetServer; + + using Print::write; + +private: + uint8_t sockindex; // MAX_SOCK_NUM means client not in use + uint16_t _timeout; +}; + + +class EthernetServer : public Server { +private: + uint16_t _port; +public: + EthernetServer(uint16_t port) : _port(port) { } + EthernetClient available(); + EthernetClient accept(); + virtual void begin(); + virtual size_t write(uint8_t); + virtual size_t write(const uint8_t *buf, size_t size); + virtual operator bool(); + using Print::write; + //void statusreport(); + + // TODO: make private when socket allocation moves to EthernetClass + static uint16_t server_port[MAX_SOCK_NUM]; +}; + + +class DhcpClass { +private: + uint32_t _dhcpInitialTransactionId; + uint32_t _dhcpTransactionId; + uint8_t _dhcpMacAddr[6]; +#ifdef __arm__ + uint8_t _dhcpLocalIp[4] __attribute__((aligned(4))); + uint8_t _dhcpSubnetMask[4] __attribute__((aligned(4))); + uint8_t _dhcpGatewayIp[4] __attribute__((aligned(4))); + uint8_t _dhcpDhcpServerIp[4] __attribute__((aligned(4))); + uint8_t _dhcpDnsServerIp[4] __attribute__((aligned(4))); +#else + uint8_t _dhcpLocalIp[4]; + uint8_t _dhcpSubnetMask[4]; + uint8_t _dhcpGatewayIp[4]; + uint8_t _dhcpDhcpServerIp[4]; + uint8_t _dhcpDnsServerIp[4]; +#endif + uint32_t _dhcpLeaseTime; + uint32_t _dhcpT1, _dhcpT2; + uint32_t _renewInSec; + uint32_t _rebindInSec; + unsigned long _timeout; + unsigned long _responseTimeout; + unsigned long _lastCheckLeaseMillis; + uint8_t _dhcp_state; + EthernetUDP _dhcpUdpSocket; + + int request_DHCP_lease(); + void reset_DHCP_lease(); + void presend_DHCP(); + void send_DHCP_MESSAGE(uint8_t, uint16_t); + void printByte(char *, uint8_t); + + uint8_t parseDHCPResponse(unsigned long responseTimeout, uint32_t& transactionId); +public: + IPAddress getLocalIp(); + IPAddress getSubnetMask(); + IPAddress getGatewayIp(); + IPAddress getDhcpServerIp(); + IPAddress getDnsServerIp(); + + int beginWithDHCP(uint8_t *, unsigned long timeout = 60000, unsigned long responseTimeout = 4000); + int checkLease(); +}; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/EthernetServer.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/EthernetServer.cpp new file mode 100644 index 0000000..2f6b8fb --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/EthernetServer.cpp @@ -0,0 +1,244 @@ +/**************************************************************************************************************************** + EthernetServer.cpp + + EthernetWebServer is a library for the Ethernet shields to run WebServer + + Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases + Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer + Licensed under MIT license + Version: 1.0.9 + + Copyright 2018 Paul Stoffregen + + Permission is hereby granted, free of charge, to any person obtaining a copy of this + software and associated documentation files (the "Software"), to deal in the Software + without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/02/2020 Initial coding for Arduino Mega, Teensy, etc to support Ethernetx libraries + 1.0.1 K Hoang 20/02/2020 Add support to lambda functions + 1.0.2 K Hoang 20/02/2020 Add support to UIPEthernet library for ENC28J60 + 1.0.3 K Hoang 23/02/2020 Add support to SAM DUE / SAMD21 boards + 1.0.4 K Hoang 16/04/2020 Add support to SAMD51 boards + 1.0.5 K Hoang 24/04/2020 Add support to nRF52 boards, such as AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, + Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B30_ublox, etc. + More Custom Ethernet libraries supported such as Ethernet2, Ethernet3, EthernetLarge + 1.0.6 K Hoang 27/04/2020 Add support to ESP32/ESP8266 boards + 1.0.7 K Hoang 30/04/2020 Add ENC28J60 support to ESP32/ESP8266 boards + 1.0.8 K Hoang 12/05/2020 Fix W5x00 support for ESP8266 boards. + 1.0.9 K Hoang 15/05/2020 Add EthernetWrapper.h for easier W5x00 support as well as more Ethernet libs in the future. + *****************************************************************************************************************************/ + +#include +#include "Ethernet.h" +#include "utility/w5100.h" + +uint16_t EthernetServer::server_port[MAX_SOCK_NUM]; + + +void EthernetServer::begin() +{ + uint8_t sockindex = Ethernet.socketBegin(SnMR::TCP, _port); + if (sockindex < MAX_SOCK_NUM) + { + if (Ethernet.socketListen(sockindex)) + { + server_port[sockindex] = _port; + } + else + { + Ethernet.socketDisconnect(sockindex); + } + } +} + +EthernetClient EthernetServer::available() +{ + bool listening = false; + uint8_t sockindex = MAX_SOCK_NUM; + uint8_t chip, maxindex=MAX_SOCK_NUM; + + chip = W5100.getChip(); + + if (!chip) + return EthernetClient(MAX_SOCK_NUM); + + //KH, set W5100 to max 2 sockets to increase buffer size + if (chip == 51) + { +#ifdef ETHERNET_LARGE_BUFFERS + maxindex = 2; // W5100 chip never supports more than 4 sockets +#else + maxindex = 4; // W5100 chip never supports more than 4 sockets. Original +#endif + } + + for (uint8_t i=0; i < maxindex; i++) + { + if (server_port[i] == _port) + { + uint8_t stat = Ethernet.socketStatus(i); + if (stat == SnSR::ESTABLISHED || stat == SnSR::CLOSE_WAIT) + { + if (Ethernet.socketRecvAvailable(i) > 0) + { + sockindex = i; + } + else + { + // remote host closed connection, our end still open + if (stat == SnSR::CLOSE_WAIT) + { + Ethernet.socketDisconnect(i); + // status becomes LAST_ACK for short time + } + } + } + else if (stat == SnSR::LISTEN) + { + listening = true; + } + else if (stat == SnSR::CLOSED) + { + server_port[i] = 0; + } + } + } + + if (!listening) + { + begin(); + } + + return EthernetClient(sockindex); +} + +EthernetClient EthernetServer::accept() +{ + bool listening = false; + uint8_t sockindex = MAX_SOCK_NUM; + uint8_t chip, maxindex=MAX_SOCK_NUM; + + chip = W5100.getChip(); + + if (!chip) + return EthernetClient(MAX_SOCK_NUM); + + //KH, set W5100 to max 2 sockets to increase buffer size + if (chip == 51) + { +#ifdef ETHERNET_LARGE_BUFFERS + maxindex = 2; // W5100 chip never supports more than 4 sockets +#else + maxindex = 4; // W5100 chip never supports more than 4 sockets. Original +#endif + } + + for (uint8_t i=0; i < maxindex; i++) + { + if (server_port[i] == _port) + { + uint8_t stat = Ethernet.socketStatus(i); + + if (sockindex == MAX_SOCK_NUM && (stat == SnSR::ESTABLISHED || stat == SnSR::CLOSE_WAIT)) + { + // Return the connected client even if no data received. + // Some protocols like FTP expect the server to send the + // first data. + sockindex = i; + server_port[i] = 0; // only return the client once + } + else if (stat == SnSR::LISTEN) + { + listening = true; + } + else if (stat == SnSR::CLOSED) + { + server_port[i] = 0; + } + } + } + + if (!listening) + begin(); + + return EthernetClient(sockindex); +} + +EthernetServer::operator bool() +{ + uint8_t maxindex=MAX_SOCK_NUM; + + //KH, set W5100 to max 2 sockets to increase buffer size + if (W5100.getChip() == 51) + { +#ifdef ETHERNET_LARGE_BUFFERS + maxindex = 2; // W5100 chip never supports more than 4 sockets +#else + maxindex = 4; // W5100 chip never supports more than 4 sockets. Original +#endif + } + + for (uint8_t i=0; i < maxindex; i++) + { + if (server_port[i] == _port) + { + if (Ethernet.socketStatus(i) == SnSR::LISTEN) + { + return true; // server is listening for incoming clients + } + } + } + return false; +} + +size_t EthernetServer::write(uint8_t b) +{ + return write(&b, 1); +} + +size_t EthernetServer::write(const uint8_t *buffer, size_t size) +{ + uint8_t chip, maxindex=MAX_SOCK_NUM; + + chip = W5100.getChip(); + if (!chip) return 0; + + //KH, set W5100 to max 2 sockets to increase buffer size + if (chip == 51) + { +#ifdef ETHERNET_LARGE_BUFFERS + maxindex = 2; // W5100 chip never supports more than 4 sockets +#else + maxindex = 4; // W5100 chip never supports more than 4 sockets. Original +#endif + } + + available(); + + for (uint8_t i=0; i < maxindex; i++) + { + if (server_port[i] == _port) + { + if (Ethernet.socketStatus(i) == SnSR::ESTABLISHED) + { + Ethernet.socketSend(i, buffer, size); + } + } + } + return size; +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/utility/w5100.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/utility/w5100.cpp new file mode 100644 index 0000000..5cf9cf7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/utility/w5100.cpp @@ -0,0 +1,711 @@ +/**************************************************************************************************************************** + w5100.cpp - Driver for W5x00 + + EthernetWebServer is a library for the Ethernet shields to run WebServer + + Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases + Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer + Licensed under MIT license + Version: 1.0.9 + + Copyright 2018 Paul Stoffregen + + Permission is hereby granted, free of charge, to any person obtaining a copy of this + software and associated documentation files (the "Software"), to deal in the Software + without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/02/2020 Initial coding for Arduino Mega, Teensy, etc to support Ethernetx libraries + 1.0.1 K Hoang 20/02/2020 Add support to lambda functions + 1.0.2 K Hoang 20/02/2020 Add support to UIPEthernet library for ENC28J60 + 1.0.3 K Hoang 23/02/2020 Add support to SAM DUE / SAMD21 boards + 1.0.4 K Hoang 16/04/2020 Add support to SAMD51 boards + 1.0.5 K Hoang 24/04/2020 Add support to nRF52 boards, such as AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, + Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B30_ublox, etc. + More Custom Ethernet libraries supported such as Ethernet2, Ethernet3, EthernetLarge + 1.0.6 K Hoang 27/04/2020 Add support to ESP32/ESP8266 boards + 1.0.7 K Hoang 30/04/2020 Add ENC28J60 support to ESP32/ESP8266 boards + 1.0.8 K Hoang 12/05/2020 Fix W5x00 support for ESP8266 boards. + 1.0.9 K Hoang 15/05/2020 Add EthernetWrapper.h for easier W5x00 support as well as more Ethernet libs in the future. + *****************************************************************************************************************************/ + +#include +#include "Ethernet.h" +#include "w5100.h" + +#define W5100_DEBUG 1 + +/***************************************************/ +/** Default SS pin setting **/ +/***************************************************/ + +// If variant.h or other headers specifically define the +// default SS pin for ethernet, use it. +#if defined(PIN_SPI_SS_ETHERNET_LIB) + +#define SS_PIN_DEFAULT PIN_SPI_SS_ETHERNET_LIB +//KH +#warning w5100.cpp Use PIN_SPI_SS_ETHERNET_LIB defined, change SS_PIN_DEFAULT to PIN_SPI_SS_ETHERNET_LIB + +// MKR boards default to pin 5 for MKR ETH +// Pins 8-10 are MOSI/SCK/MISO on MRK, so don't use pin 10 +#elif defined(USE_ARDUINO_MKR_PIN_LAYOUT) || defined(ARDUINO_SAMD_MKRZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRWAN1300) + +#define SS_PIN_DEFAULT 5 +//KH +#warning w5100.cpp Use MKR, change SS_PIN_DEFAULT to 5 + +// For boards using AVR, assume shields with SS on pin 10 +// will be used. This allows for Arduino Mega (where +// SS is pin 53) and Arduino Leonardo (where SS is pin 17) +// to work by default with Arduino Ethernet Shield R2 & R3. +#elif defined(__AVR__) + +#define SS_PIN_DEFAULT 10 +//KH +#warning w5100.cpp Use __AVR__, change SS_PIN_DEFAULT to 10 + +// If variant.h or other headers define these names +// use them if none of the other cases match +#elif defined(PIN_SPI_SS) + +#if defined(__SAMD21G18A__) +//10 - 2 (6 conflict) all not OK for Nano 33 IoT !!! SPI corrupted??? +#warning w5100.cpp Use __SAMD21G18A__, change SS_PIN_DEFAULT to 10 +#define SS_PIN_DEFAULT 10 +#else +#define SS_PIN_DEFAULT PIN_SPI_SS + +//KH +#warning w5100.cpp Use PIN_SPI_SS defined, change SS_PIN_DEFAULT to PIN_SPI_SS +#endif + +#elif defined(CORE_SS0_PIN) +#define SS_PIN_DEFAULT CORE_SS0_PIN + +//KH +#warning w5100.cpp Use CORE_SS0_PIN defined, change SS_PIN_DEFAULT to CORE_SS0_PIN + +//KH for ESP32 +#elif defined(ESP32) +//pin SS already defined in ESP32 as pin 5, don't use this as conflict with SPIFFS, EEPROM, etc. +// Use in GPIO22 +#warning w5100.cpp Use ESP32, change SS_PIN_DEFAULT to GPIO22, MOSI(23), MISO(19), SCK(18) +#define SS_PIN_DEFAULT 22 //SS +/////// + +//KH for ESP8266 +#elif defined(ESP8266) +//pin SS already defined in ESP8266 as pin 15. Conflict => Move to pin GPIO4 (D2) +#warning w5100.cpp Use ESP8266, change SS_PIN_DEFAULT to SS(4), MOSI(13), MISO(12), SCK(14) +#define SS_PIN_DEFAULT D2 // GPIO4, SS + +/////// + +// As a final fallback, use pin 10 +#else +#define SS_PIN_DEFAULT 10 + +//KH +#warning w5100.cpp Use fallback, change SS_PIN_DEFAULT to 10 + +#endif + +// W5100 controller instance +uint8_t W5100Class::chip = 0; +uint8_t W5100Class::CH_BASE_MSB; +uint8_t W5100Class::ss_pin = SS_PIN_DEFAULT; +#ifdef ETHERNET_LARGE_BUFFERS +uint16_t W5100Class::SSIZE = 2048; +uint16_t W5100Class::SMASK = 0x07FF; +#endif +W5100Class W5100; + +// pointers and bitmasks for optimized SS pin +#if defined(__AVR__) + volatile uint8_t * W5100Class::ss_pin_reg; + uint8_t W5100Class::ss_pin_mask; +#elif defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK66FX1M0__) || defined(__MK64FX512__) + volatile uint8_t * W5100Class::ss_pin_reg; +#elif defined(__IMXRT1062__) + volatile uint32_t * W5100Class::ss_pin_reg; + uint32_t W5100Class::ss_pin_mask; +#elif defined(__MKL26Z64__) + volatile uint8_t * W5100Class::ss_pin_reg; + uint8_t W5100Class::ss_pin_mask; +#elif defined(__SAM3X8E__) || defined(__SAM3A8C__) || defined(__SAM3A4C__) + volatile uint32_t * W5100Class::ss_pin_reg; + uint32_t W5100Class::ss_pin_mask; +#elif defined(__PIC32MX__) + volatile uint32_t * W5100Class::ss_pin_reg; + uint32_t W5100Class::ss_pin_mask; +#elif defined(ARDUINO_ARCH_ESP8266) + volatile uint32_t * W5100Class::ss_pin_reg; + uint32_t W5100Class::ss_pin_mask; +#elif defined(__SAMD21G18A__) + volatile uint32_t * W5100Class::ss_pin_reg; + uint32_t W5100Class::ss_pin_mask; + #warning w5100.cpp Use __SAMD21G18A__ +#endif + +// KH +uint8_t W5100Class::init(uint8_t socketNumbers, uint8_t new_ss_pin) +{ + uint8_t i; + + if (initialized) return 1; + + // Many Ethernet shields have a CAT811 or similar reset chip + // connected to W5100 or W5200 chips. The W5200 will not work at + // all, and may even drive its MISO pin, until given an active low + // reset pulse! The CAT811 has a 240 ms typical pulse length, and + // a 400 ms worst case maximum pulse length. MAX811 has a worst + // case maximum 560 ms pulse length. This delay is meant to wait + // until the reset pulse is ended. If your hardware has a shorter + // reset time, this can be edited or removed. + delay(560); + + //W5100Class::ss_pin = new_ss_pin; + +#if ( W5100_DEBUG > 0 ) + //KH + Serial.print("\nW5100 init, using SS_PIN_DEFAULT = "); + Serial.print(SS_PIN_DEFAULT); + Serial.print(", new ss_pin = "); + Serial.print(new_ss_pin); + Serial.print(", W5100Class::ss_pin = "); + Serial.println(W5100Class::ss_pin); +#endif + + SPI.begin(); + + initSS(); + resetSS(); + + // From #define SPI_ETHERNET_SETTINGS SPISettings(14000000, MSBFIRST, SPI_MODE0) + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + + // Attempt W5200 detection first, because W5200 does not properly + // reset its SPI state when CS goes high (inactive). Communication + // from detecting the other chips can leave the W5200 in a state + // where it won't recover, unless given a reset pulse. + if (isW5200()) + { + CH_BASE_MSB = 0x40; +#ifdef ETHERNET_LARGE_BUFFERS +#if MAX_SOCK_NUM <= 1 + SSIZE = 16384; +#elif MAX_SOCK_NUM <= 2 + SSIZE = 8192; +#elif MAX_SOCK_NUM <= 4 + SSIZE = 4096; +#else + SSIZE = 2048; +#endif + SMASK = SSIZE - 1; +#endif + for (i=0; i> 10); + writeSnTX_SIZE(i, SSIZE >> 10); + } + for (; i<8; i++) + { + writeSnRX_SIZE(i, 0); + writeSnTX_SIZE(i, 0); + } + +#if ( W5100_DEBUG > 0 ) + Serial.print("W5100::init: W5200, SSIZE ="); + Serial.println(SSIZE); +#endif + + // Try W5500 next. Wiznet finally seems to have implemented + // SPI well with this chip. It appears to be very resilient, + // so try it after the fragile W5200 + } else if (isW5500()) + { + CH_BASE_MSB = 0x10; +#ifdef ETHERNET_LARGE_BUFFERS +#if MAX_SOCK_NUM <= 1 + SSIZE = 16384; +#elif MAX_SOCK_NUM <= 2 + SSIZE = 8192; +#elif MAX_SOCK_NUM <= 4 + SSIZE = 4096; +#else + SSIZE = 2048; +#endif + SMASK = SSIZE - 1; + for (i=0; i> 10); + writeSnTX_SIZE(i, SSIZE >> 10); + } + for (; i<8; i++) + { + writeSnRX_SIZE(i, 0); + writeSnTX_SIZE(i, 0); + } +#endif + +#if ( W5100_DEBUG > 0 ) + Serial.print("W5100::init: W5500, SSIZE ="); + Serial.println(SSIZE); +#endif + + // Try W5100 last. This simple chip uses fixed 4 byte frames + // for every 8 bit access. Terribly inefficient, but so simple + // it recovers from "hearing" unsuccessful W5100 or W5200 + // communication. W5100 is also the only chip without a VERSIONR + // register for identification, so we check this last. + } else if (isW5100()) + { + CH_BASE_MSB = 0x04; + +#ifdef ETHERNET_LARGE_BUFFERS + + #if MAX_SOCK_NUM <= 1 + SSIZE = 8192; + writeTMSR(0x03); + writeRMSR(0x03); + #else + SSIZE = 4096; + writeTMSR(0x0A); + writeRMSR(0x0A); + #endif + + SMASK = SSIZE - 1; +#else + + writeTMSR(0x55); + writeRMSR(0x55); +#endif + +#if ( W5100_DEBUG > 0 ) + Serial.print("W5100::init: W5100, SSIZE ="); + Serial.println(SSIZE); +#endif + + // No hardware seems to be present. Or it could be a W5200 + // that's heard other SPI communication if its chip select + // pin wasn't high when a SD card or other SPI chip was used. + } + else + { +#if ( W5100_DEBUG > 0 ) + Serial.println("no chip :-("); +#endif + + chip = 0; + SPI.endTransaction(); + return 0; // no known chip is responding :-( + } + + SPI.endTransaction(); + initialized = true; + return 1; // successful init +} + +// Soft reset the Wiznet chip, by writing to its MR register reset bit +uint8_t W5100Class::softReset(void) +{ + uint16_t count=0; + +#if ( W5100_DEBUG > 1 ) + Serial.println("Wiznet soft reset"); +#endif + + // write to reset bit + writeMR(0x80); + // then wait for soft reset to complete + do + { + uint8_t mr = readMR(); + +#if ( W5100_DEBUG > 2 ) + Serial.print("mr="); + Serial.println(mr, HEX); +#endif + + if (mr == 0) + return 1; + + delay(1); + } while (++count < 20); + return 0; +} + +uint8_t W5100Class::isW5100(void) +{ + chip = 51; + +#if ( W5100_DEBUG > 1 ) + Serial.println("W5100.cpp: detect W5100 chip"); +#endif + + if (!softReset()) + return 0; + + writeMR(0x10); + if (readMR() != 0x10) + return 0; + + writeMR(0x12); + if (readMR() != 0x12) + return 0; + + writeMR(0x00); + if (readMR() != 0x00) + return 0; + +#if ( W5100_DEBUG > 1 ) + Serial.println("chip is W5100"); +#endif + + return 1; +} + +uint8_t W5100Class::isW5200(void) +{ + chip = 52; + +#if ( W5100_DEBUG > 1 ) + Serial.println("W5100.cpp: detect W5200 chip"); +#endif + + if (!softReset()) + return 0; + + writeMR(0x08); + if (readMR() != 0x08) + return 0; + + writeMR(0x10); + if (readMR() != 0x10) + return 0; + + writeMR(0x00); + if (readMR() != 0x00) + return 0; + + int ver = readVERSIONR_W5200(); + +#if ( W5100_DEBUG > 1 ) + Serial.print("version="); + Serial.println(ver); +#endif + + if (ver != 3) + return 0; + +#if ( W5100_DEBUG > 1 ) + Serial.println("chip is W5200"); +#endif + + return 1; +} + +uint8_t W5100Class::isW5500(void) +{ + chip = 55; + +#if ( W5100_DEBUG > 1 ) + Serial.println("W5100.cpp: detect W5500 chip"); +#endif + + if (!softReset()) + return 0; + + writeMR(0x08); + if (readMR() != 0x08) + return 0; + + writeMR(0x10); + if (readMR() != 0x10) + return 0; + + writeMR(0x00); + if (readMR() != 0x00) + return 0; + + int ver = readVERSIONR_W5500(); + +#if ( W5100_DEBUG > 1 ) + Serial.print("version="); + Serial.println(ver); +#endif + + if (ver != 4) + return 0; + +#if ( W5100_DEBUG > 1 ) + Serial.println("chip is W5500"); +#endif + + return 1; +} + +W5100Linkstatus W5100Class::getLinkStatus() +{ + uint8_t phystatus; + + // KH + if (!initialized) return UNKNOWN; + + switch (chip) + { + case 52: + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + phystatus = readPSTATUS_W5200(); + SPI.endTransaction(); + if (phystatus & 0x20) + return LINK_ON; + + return LINK_OFF; + + case 55: + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + phystatus = readPHYCFGR_W5500(); + SPI.endTransaction(); + if (phystatus & 0x01) + return LINK_ON; + + return LINK_OFF; + + default: + return UNKNOWN; + } +} + +uint16_t W5100Class::write(uint16_t addr, const uint8_t *buf, uint16_t len) +{ + uint8_t cmd[8]; + + if (chip == 51) + { + for (uint16_t i=0; i> 8); + SPI.transfer(addr & 0xFF); + addr++; + SPI.transfer(buf[i]); + resetSS(); + } + } + else if (chip == 52) + { + setSS(); + cmd[0] = addr >> 8; + cmd[1] = addr & 0xFF; + cmd[2] = ((len >> 8) & 0x7F) | 0x80; + cmd[3] = len & 0xFF; + SPI.transfer(cmd, 4); + +#ifdef SPI_HAS_TRANSFER_BUF + SPI.transfer(buf, NULL, len); +#else + // TODO: copy 8 bytes at a time to cmd[] and block transfer + for (uint16_t i=0; i < len; i++) + { + SPI.transfer(buf[i]); + } +#endif + resetSS(); + } + else + { + // chip == 55 + setSS(); + if (addr < 0x100) + { + // common registers 00nn + cmd[0] = 0; + cmd[1] = addr & 0xFF; + cmd[2] = 0x04; + } + else if (addr < 0x8000) + { + // socket registers 10nn, 11nn, 12nn, 13nn, etc + cmd[0] = 0; + cmd[1] = addr & 0xFF; + cmd[2] = ((addr >> 3) & 0xE0) | 0x0C; + } + else if (addr < 0xC000) + { + // transmit buffers 8000-87FF, 8800-8FFF, 9000-97FF, etc + // 10## #nnn nnnn nnnn + cmd[0] = addr >> 8; + cmd[1] = addr & 0xFF; + #if defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 1 + cmd[2] = 0x14; // 16K buffers + #elif defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 2 + cmd[2] = ((addr >> 8) & 0x20) | 0x14; // 8K buffers + #elif defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 4 + cmd[2] = ((addr >> 7) & 0x60) | 0x14; // 4K buffers + #else + cmd[2] = ((addr >> 6) & 0xE0) | 0x14; // 2K buffers + #endif + } + else + { + // receive buffers + cmd[0] = addr >> 8; + cmd[1] = addr & 0xFF; + #if defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 1 + cmd[2] = 0x1C; // 16K buffers + #elif defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 2 + cmd[2] = ((addr >> 8) & 0x20) | 0x1C; // 8K buffers + #elif defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 4 + cmd[2] = ((addr >> 7) & 0x60) | 0x1C; // 4K buffers + #else + cmd[2] = ((addr >> 6) & 0xE0) | 0x1C; // 2K buffers + #endif + } + + if (len <= 5) + { + for (uint8_t i=0; i < len; i++) + { + cmd[i + 3] = buf[i]; + } + + SPI.transfer(cmd, len + 3); + } + else + { + SPI.transfer(cmd, 3); +#ifdef SPI_HAS_TRANSFER_BUF + SPI.transfer(buf, NULL, len); +#else + // TODO: copy 8 bytes at a time to cmd[] and block transfer + for (uint16_t i=0; i < len; i++) + { + SPI.transfer(buf[i]); + } +#endif + } + resetSS(); + } + return len; +} + +uint16_t W5100Class::read(uint16_t addr, uint8_t *buf, uint16_t len) +{ + uint8_t cmd[4]; + + if (chip == 51) + { + for (uint16_t i=0; i < len; i++) + { + setSS(); + #if 1 + SPI.transfer(0x0F); + SPI.transfer(addr >> 8); + SPI.transfer(addr & 0xFF); + addr++; + buf[i] = SPI.transfer(0); + #else + cmd[0] = 0x0F; + cmd[1] = addr >> 8; + cmd[2] = addr & 0xFF; + cmd[3] = 0; + SPI.transfer(cmd, 4); // TODO: why doesn't this work? + buf[i] = cmd[3]; + addr++; + #endif + resetSS(); + } + } + else if (chip == 52) + { + setSS(); + cmd[0] = addr >> 8; + cmd[1] = addr & 0xFF; + cmd[2] = (len >> 8) & 0x7F; + cmd[3] = len & 0xFF; + SPI.transfer(cmd, 4); + memset(buf, 0, len); + SPI.transfer(buf, len); + resetSS(); + } + else + { + // chip == 55 + setSS(); + + if (addr < 0x100) + { + // common registers 00nn + cmd[0] = 0; + cmd[1] = addr & 0xFF; + cmd[2] = 0x00; + } + else if (addr < 0x8000) + { + // socket registers 10nn, 11nn, 12nn, 13nn, etc + cmd[0] = 0; + cmd[1] = addr & 0xFF; + cmd[2] = ((addr >> 3) & 0xE0) | 0x08; + } + else if (addr < 0xC000) + { + // transmit buffers 8000-87FF, 8800-8FFF, 9000-97FF, etc + // 10## #nnn nnnn nnnn + cmd[0] = addr >> 8; + cmd[1] = addr & 0xFF; + #if defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 1 + cmd[2] = 0x10; // 16K buffers + #elif defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 2 + cmd[2] = ((addr >> 8) & 0x20) | 0x10; // 8K buffers + #elif defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 4 + cmd[2] = ((addr >> 7) & 0x60) | 0x10; // 4K buffers + #else + cmd[2] = ((addr >> 6) & 0xE0) | 0x10; // 2K buffers + #endif + } else + { + // receive buffers + cmd[0] = addr >> 8; + cmd[1] = addr & 0xFF; + #if defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 1 + cmd[2] = 0x18; // 16K buffers + #elif defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 2 + cmd[2] = ((addr >> 8) & 0x20) | 0x18; // 8K buffers + #elif defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 4 + cmd[2] = ((addr >> 7) & 0x60) | 0x18; // 4K buffers + #else + cmd[2] = ((addr >> 6) & 0xE0) | 0x18; // 2K buffers + #endif + } + SPI.transfer(cmd, 3); + memset(buf, 0, len); + SPI.transfer(buf, len); + resetSS(); + } + return len; +} + +void W5100Class::execCmdSn(SOCKET s, SockCMD _cmd) +{ + // Send command to socket + writeSnCR(s, _cmd); + // Wait for command to complete + while (readSnCR(s)) ; +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/utility/w5100.h b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/utility/w5100.h new file mode 100644 index 0000000..838a49f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet/src/utility/w5100.h @@ -0,0 +1,642 @@ +/**************************************************************************************************************************** + w5100.h - Driver for W5x00 + + EthernetWebServer is a library for the Ethernet shields to run WebServer + + Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases + Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer + Licensed under MIT license + Version: 1.0.9 + + Copyright 2018 Paul Stoffregen + + Permission is hereby granted, free of charge, to any person obtaining a copy of this + software and associated documentation files (the "Software"), to deal in the Software + without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/02/2020 Initial coding for Arduino Mega, Teensy, etc to support Ethernetx libraries + 1.0.1 K Hoang 20/02/2020 Add support to lambda functions + 1.0.2 K Hoang 20/02/2020 Add support to UIPEthernet library for ENC28J60 + 1.0.3 K Hoang 23/02/2020 Add support to SAM DUE / SAMD21 boards + 1.0.4 K Hoang 16/04/2020 Add support to SAMD51 boards + 1.0.5 K Hoang 24/04/2020 Add support to nRF52 boards, such as AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, + Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B30_ublox, etc. + More Custom Ethernet libraries supported such as Ethernet2, Ethernet3, EthernetLarge + 1.0.6 K Hoang 27/04/2020 Add support to ESP32/ESP8266 boards + 1.0.7 K Hoang 30/04/2020 Add ENC28J60 support to ESP32/ESP8266 boards + 1.0.8 K Hoang 12/05/2020 Fix W5x00 support for ESP8266 boards. + 1.0.9 K Hoang 15/05/2020 Add EthernetWrapper.h for easier W5x00 support as well as more Ethernet libs in the future. + *****************************************************************************************************************************/ + +// w5100.h contains private W5x00 hardware "driver" level definitions +// which are not meant to be exposed to other libraries or Arduino users + +#ifndef W5100_H_INCLUDED +#define W5100_H_INCLUDED + +#include +#include + +#ifndef USE_W5100 +#define USE_W5100 false +#else +#define USE_W5100 true +#endif + +#if !USE_W5100 + +// Safe for W5200 and W5500, but also tested OK on W5100 +// Use 14MHz if you know your W5100 can't run +// Higher SPI clock results in faster transfer to hosts on a LAN +// or with very low packet latency. With ordinary internet latency, +// the TCP window size & packet loss determine your overall speed. +#warning Use 25MHz clock for W5200/W5500. Not for W5100 +#define SPI_ETHERNET_SETTINGS SPISettings(25000000, MSBFIRST, SPI_MODE0) + +#else + +// Safe for all chips but too slow +#define SPI_ETHERNET_SETTINGS SPISettings(14000000, MSBFIRST, SPI_MODE0) +#warning Use 14MHz clock for W5100/W5200/W5500. Slow. + +#endif + +// Require Ethernet.h, because we need MAX_SOCK_NUM +#ifndef ethernet_h_ +#error "Ethernet.h must be included before w5100.h" +#endif + +// Arduino 101's SPI can not run faster than 8 MHz. +#if defined(ARDUINO_ARCH_ARC32) +#undef SPI_ETHERNET_SETTINGS +#define SPI_ETHERNET_SETTINGS SPISettings(8000000, MSBFIRST, SPI_MODE0) +#endif + +// Arduino Zero can't use W5100-based shields faster than 8 MHz +// https://github.com/arduino-libraries/Ethernet/issues/37#issuecomment-408036848 +// W5500 does seem to work at 12 MHz. Delete this if only using W5500 +#if defined(__SAMD21G18A__) +#undef SPI_ETHERNET_SETTINGS +//#warning Use SAMD21 architecture SPISettings(8000000, MSBFIRST, SPI_MODE3) => IP OK +#warning Use SAMD21 architecture SPISettings(30000000, MSBFIRST, SPI_MODE3) => IP OK +// Still not working !!! Original SPI_MODE0 not OK at all +//#define SPI_ETHERNET_SETTINGS SPISettings(8000000, MSBFIRST, SPI_MODE3) +#define SPI_ETHERNET_SETTINGS SPISettings(30000000, MSBFIRST, SPI_MODE3) +#endif + +typedef uint8_t SOCKET; + +class SnMR { +public: + static const uint8_t CLOSE = 0x00; + static const uint8_t TCP = 0x21; + static const uint8_t UDP = 0x02; + static const uint8_t IPRAW = 0x03; + static const uint8_t MACRAW = 0x04; + static const uint8_t PPPOE = 0x05; + static const uint8_t ND = 0x20; + static const uint8_t MULTI = 0x80; +}; + +enum SockCMD { + Sock_OPEN = 0x01, + Sock_LISTEN = 0x02, + Sock_CONNECT = 0x04, + Sock_DISCON = 0x08, + Sock_CLOSE = 0x10, + Sock_SEND = 0x20, + Sock_SEND_MAC = 0x21, + Sock_SEND_KEEP = 0x22, + Sock_RECV = 0x40 +}; + +class SnIR { +public: + static const uint8_t SEND_OK = 0x10; + static const uint8_t TIMEOUT = 0x08; + static const uint8_t RECV = 0x04; + static const uint8_t DISCON = 0x02; + static const uint8_t CON = 0x01; +}; + +class SnSR { +public: + static const uint8_t CLOSED = 0x00; + static const uint8_t INIT = 0x13; + static const uint8_t LISTEN = 0x14; + static const uint8_t SYNSENT = 0x15; + static const uint8_t SYNRECV = 0x16; + static const uint8_t ESTABLISHED = 0x17; + static const uint8_t FIN_WAIT = 0x18; + static const uint8_t CLOSING = 0x1A; + static const uint8_t TIME_WAIT = 0x1B; + static const uint8_t CLOSE_WAIT = 0x1C; + static const uint8_t LAST_ACK = 0x1D; + static const uint8_t UDP = 0x22; + static const uint8_t IPRAW = 0x32; + static const uint8_t MACRAW = 0x42; + static const uint8_t PPPOE = 0x5F; +}; + +class IPPROTO { +public: + static const uint8_t IP = 0; + static const uint8_t ICMP = 1; + static const uint8_t IGMP = 2; + static const uint8_t GGP = 3; + static const uint8_t TCP = 6; + static const uint8_t PUP = 12; + static const uint8_t UDP = 17; + static const uint8_t IDP = 22; + static const uint8_t ND = 77; + static const uint8_t RAW = 255; +}; + +enum W5100Linkstatus { + UNKNOWN, + LINK_ON, + LINK_OFF +}; + +class W5100Class { + +public: + // KH + uint8_t init(uint8_t socketNumbers = MAX_SOCK_NUM, uint8_t new_ss_pin = 10); + + inline void setGatewayIp(const uint8_t * addr) { writeGAR(addr); } + inline void getGatewayIp(uint8_t * addr) { readGAR(addr); } + + inline void setSubnetMask(const uint8_t * addr) { writeSUBR(addr); } + inline void getSubnetMask(uint8_t * addr) { readSUBR(addr); } + + inline void setMACAddress(const uint8_t * addr) { writeSHAR(addr); } + inline void getMACAddress(uint8_t * addr) { readSHAR(addr); } + + inline void setIPAddress(const uint8_t * addr) { writeSIPR(addr); } + inline void getIPAddress(uint8_t * addr) { readSIPR(addr); } + + inline void setRetransmissionTime(uint16_t timeout) { writeRTR(timeout); } + inline void setRetransmissionCount(uint8_t retry) { writeRCR(retry); } + + static void execCmdSn(SOCKET s, SockCMD _cmd); + + + // W5100 Registers + // --------------- +//private: +public: + static uint16_t write(uint16_t addr, const uint8_t *buf, uint16_t len); + + static uint8_t write(uint16_t addr, uint8_t data) + { + return write(addr, &data, 1); + } + + static uint16_t read(uint16_t addr, uint8_t *buf, uint16_t len); + + static uint8_t read(uint16_t addr) + { + uint8_t data; + read(addr, &data, 1); + return data; + } + +#define __GP_REGISTER8(name, address) \ + static inline void write##name(uint8_t _data) { \ + write(address, _data); \ + } \ + static inline uint8_t read##name() { \ + return read(address); \ + } +#define __GP_REGISTER16(name, address) \ + static void write##name(uint16_t _data) { \ + uint8_t buf[2]; \ + buf[0] = _data >> 8; \ + buf[1] = _data & 0xFF; \ + write(address, buf, 2); \ + } \ + static uint16_t read##name() { \ + uint8_t buf[2]; \ + read(address, buf, 2); \ + return (buf[0] << 8) | buf[1]; \ + } +#define __GP_REGISTER_N(name, address, size) \ + static uint16_t write##name(const uint8_t *_buff) { \ + return write(address, _buff, size); \ + } \ + static uint16_t read##name(uint8_t *_buff) { \ + return read(address, _buff, size); \ + } + + W5100Linkstatus getLinkStatus(); + +public: + __GP_REGISTER8 (MR, 0x0000); // Mode + __GP_REGISTER_N(GAR, 0x0001, 4); // Gateway IP address + __GP_REGISTER_N(SUBR, 0x0005, 4); // Subnet mask address + __GP_REGISTER_N(SHAR, 0x0009, 6); // Source MAC address + __GP_REGISTER_N(SIPR, 0x000F, 4); // Source IP address + __GP_REGISTER8 (IR, 0x0015); // Interrupt + __GP_REGISTER8 (IMR, 0x0016); // Interrupt Mask + __GP_REGISTER16(RTR, 0x0017); // Timeout address + __GP_REGISTER8 (RCR, 0x0019); // Retry count + __GP_REGISTER8 (RMSR, 0x001A); // Receive memory size (W5100 only) + __GP_REGISTER8 (TMSR, 0x001B); // Transmit memory size (W5100 only) + __GP_REGISTER8 (PATR, 0x001C); // Authentication type address in PPPoE mode + __GP_REGISTER8 (PTIMER, 0x0028); // PPP LCP Request Timer + __GP_REGISTER8 (PMAGIC, 0x0029); // PPP LCP Magic Number + __GP_REGISTER_N(UIPR, 0x002A, 4); // Unreachable IP address in UDP mode (W5100 only) + __GP_REGISTER16(UPORT, 0x002E); // Unreachable Port address in UDP mode (W5100 only) + __GP_REGISTER8 (VERSIONR_W5200,0x001F); // Chip Version Register (W5200 only) + __GP_REGISTER8 (VERSIONR_W5500,0x0039); // Chip Version Register (W5500 only) + __GP_REGISTER8 (PSTATUS_W5200, 0x0035); // PHY Status + __GP_REGISTER8 (PHYCFGR_W5500, 0x002E); // PHY Configuration register, default: 10111xxx + + +#undef __GP_REGISTER8 +#undef __GP_REGISTER16 +#undef __GP_REGISTER_N + + // W5100 Socket registers + // ---------------------- +private: + static uint16_t CH_BASE(void) { + //if (chip == 55) return 0x1000; + //if (chip == 52) return 0x4000; + //return 0x0400; + return CH_BASE_MSB << 8; + } + static uint8_t CH_BASE_MSB; // 1 redundant byte, saves ~80 bytes code on AVR + static const uint16_t CH_SIZE = 0x0100; + + static inline uint8_t readSn(SOCKET s, uint16_t addr) + { + return read(CH_BASE() + s * CH_SIZE + addr); + } + static inline uint8_t writeSn(SOCKET s, uint16_t addr, uint8_t data) + { + return write(CH_BASE() + s * CH_SIZE + addr, data); + } + static inline uint16_t readSn(SOCKET s, uint16_t addr, uint8_t *buf, uint16_t len) + { + return read(CH_BASE() + s * CH_SIZE + addr, buf, len); + } + static inline uint16_t writeSn(SOCKET s, uint16_t addr, uint8_t *buf, uint16_t len) + { + return write(CH_BASE() + s * CH_SIZE + addr, buf, len); + } + +#define __SOCKET_REGISTER8(name, address) \ + static inline void write##name(SOCKET _s, uint8_t _data) { \ + writeSn(_s, address, _data); \ + } \ + static inline uint8_t read##name(SOCKET _s) { \ + return readSn(_s, address); \ + } +#define __SOCKET_REGISTER16(name, address) \ + static void write##name(SOCKET _s, uint16_t _data) { \ + uint8_t buf[2]; \ + buf[0] = _data >> 8; \ + buf[1] = _data & 0xFF; \ + writeSn(_s, address, buf, 2); \ + } \ + static uint16_t read##name(SOCKET _s) { \ + uint8_t buf[2]; \ + readSn(_s, address, buf, 2); \ + return (buf[0] << 8) | buf[1]; \ + } +#define __SOCKET_REGISTER_N(name, address, size) \ + static uint16_t write##name(SOCKET _s, uint8_t *_buff) { \ + return writeSn(_s, address, _buff, size); \ + } \ + static uint16_t read##name(SOCKET _s, uint8_t *_buff) { \ + return readSn(_s, address, _buff, size); \ + } + +public: + __SOCKET_REGISTER8(SnMR, 0x0000) // Mode + __SOCKET_REGISTER8(SnCR, 0x0001) // Command + __SOCKET_REGISTER8(SnIR, 0x0002) // Interrupt + __SOCKET_REGISTER8(SnSR, 0x0003) // Status + __SOCKET_REGISTER16(SnPORT, 0x0004) // Source Port + __SOCKET_REGISTER_N(SnDHAR, 0x0006, 6) // Destination Hardw Addr + __SOCKET_REGISTER_N(SnDIPR, 0x000C, 4) // Destination IP Addr + __SOCKET_REGISTER16(SnDPORT, 0x0010) // Destination Port + __SOCKET_REGISTER16(SnMSSR, 0x0012) // Max Segment Size + __SOCKET_REGISTER8(SnPROTO, 0x0014) // Protocol in IP RAW Mode + __SOCKET_REGISTER8(SnTOS, 0x0015) // IP TOS + __SOCKET_REGISTER8(SnTTL, 0x0016) // IP TTL + __SOCKET_REGISTER8(SnRX_SIZE, 0x001E) // RX Memory Size (W5200 only) + __SOCKET_REGISTER8(SnTX_SIZE, 0x001F) // RX Memory Size (W5200 only) + __SOCKET_REGISTER16(SnTX_FSR, 0x0020) // TX Free Size + __SOCKET_REGISTER16(SnTX_RD, 0x0022) // TX Read Pointer + __SOCKET_REGISTER16(SnTX_WR, 0x0024) // TX Write Pointer + __SOCKET_REGISTER16(SnRX_RSR, 0x0026) // RX Free Size + __SOCKET_REGISTER16(SnRX_RD, 0x0028) // RX Read Pointer + __SOCKET_REGISTER16(SnRX_WR, 0x002A) // RX Write Pointer (supported?) + +#undef __SOCKET_REGISTER8 +#undef __SOCKET_REGISTER16 +#undef __SOCKET_REGISTER_N + + +private: + // KH + bool initialized = false; + static uint8_t chip; + static uint8_t ss_pin; + + static uint8_t isW5100(void); + static uint8_t isW5200(void); + static uint8_t isW5500(void); + +public: + // KH + static uint8_t softReset(void); + static uint8_t getChip(void) { return chip; } +#ifdef ETHERNET_LARGE_BUFFERS + static uint16_t SSIZE; + static uint16_t SMASK; +#else + static const uint16_t SSIZE = 2048; + static const uint16_t SMASK = 0x07FF; +#endif + static uint16_t SBASE(uint8_t socknum) + { + if (chip == 51) + { + return socknum * SSIZE + 0x4000; + } + else + { + return socknum * SSIZE + 0x8000; + } + } + + static uint16_t RBASE(uint8_t socknum) + { + if (chip == 51) { + return socknum * SSIZE + 0x6000; + } + else + { + return socknum * SSIZE + 0xC000; + } + } + + static bool hasOffsetAddressMapping(void) + { + if (chip == 55) + return true; + + return false; + } + + static void setSS(uint8_t pin) { ss_pin = pin; } + +private: +#if defined(__AVR__) + +#warning Use AVR architecture + + static volatile uint8_t *ss_pin_reg; + static uint8_t ss_pin_mask; + + inline static void initSS() + { + ss_pin_reg = portOutputRegister(digitalPinToPort(ss_pin)); + ss_pin_mask = digitalPinToBitMask(ss_pin); + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + *(ss_pin_reg) &= ~ss_pin_mask; + } + + inline static void resetSS() + { + *(ss_pin_reg) |= ss_pin_mask; + } +#elif defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK66FX1M0__) || defined(__MK64FX512__) + +#warning Use MK architecture + + static volatile uint8_t *ss_pin_reg; + + inline static void initSS() + { + ss_pin_reg = portOutputRegister(ss_pin); + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + *(ss_pin_reg+256) = 1; + } + + inline static void resetSS() + { + *(ss_pin_reg+128) = 1; + } +#elif defined(__IMXRT1062__) + +#warning Use Teensy architecture + + static volatile uint32_t *ss_pin_reg; + static uint32_t ss_pin_mask; + + inline static void initSS() + { + ss_pin_reg = portOutputRegister(digitalPinToPort(ss_pin)); + ss_pin_mask = digitalPinToBitMask(ss_pin); + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + *(ss_pin_reg+34) = ss_pin_mask; + } + + inline static void resetSS() + { + *(ss_pin_reg+33) = ss_pin_mask; + + // Check https://forum.pjrc.com/threads/66758-Teensy-4-0-and-Ethernet-(WIZ5100-and-WIZ812) + if (chip == 51) + delayNanoseconds(10); // <-- fixes W5100 on Teensy 4 + } +#elif defined(__MKL26Z64__) + static volatile uint8_t *ss_pin_reg; + static uint8_t ss_pin_mask; + inline static void initSS() + { + ss_pin_reg = portOutputRegister(digitalPinToPort(ss_pin)); + ss_pin_mask = digitalPinToBitMask(ss_pin); + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + *(ss_pin_reg+8) = ss_pin_mask; + } + + inline static void resetSS() + { + *(ss_pin_reg+4) = ss_pin_mask; + } +#elif defined(__SAM3X8E__) || defined(__SAM3A8C__) || defined(__SAM3A4C__) + +#warning Use SAM3 architecture + + static volatile uint32_t *ss_pin_reg; + static uint32_t ss_pin_mask; + + inline static void initSS() + { + ss_pin_reg = &(digitalPinToPort(ss_pin)->PIO_PER); + ss_pin_mask = digitalPinToBitMask(ss_pin); + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + *(ss_pin_reg+13) = ss_pin_mask; + } + + inline static void resetSS() + { + *(ss_pin_reg+12) = ss_pin_mask; + } +#elif defined(__PIC32MX__) + static volatile uint32_t *ss_pin_reg; + static uint32_t ss_pin_mask; + + inline static void initSS() + { + ss_pin_reg = portModeRegister(digitalPinToPort(ss_pin)); + ss_pin_mask = digitalPinToBitMask(ss_pin); + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + *(ss_pin_reg+8+1) = ss_pin_mask; + } + + inline static void resetSS() + { + *(ss_pin_reg+8+2) = ss_pin_mask; + } + +#elif defined(ARDUINO_ARCH_ESP8266) + +#warning Use ARDUINO_ARCH_ESP8266 architecture + + static volatile uint32_t *ss_pin_reg; + static uint32_t ss_pin_mask; + + inline static void initSS() + { + ss_pin_reg = (volatile uint32_t*)GPO; + ss_pin_mask = 1 << ss_pin; + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + GPOC = ss_pin_mask; + } + + inline static void resetSS() + { + GPOS = ss_pin_mask; + } + +#elif defined(__SAMD21G18A__) + +#warning Use SAMD21 architecture + + static volatile uint32_t *ss_pin_reg; + static uint32_t ss_pin_mask; + + inline static void initSS() + { + ss_pin_reg = portModeRegister(digitalPinToPort(ss_pin)); + ss_pin_mask = digitalPinToBitMask(ss_pin); + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + *(ss_pin_reg+5) = ss_pin_mask; + } + + inline static void resetSS() + { + *(ss_pin_reg+6) = ss_pin_mask; + } +#else + +#warning Use Default architecture + + inline static void initSS() + { + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + digitalWrite(ss_pin, LOW); + } + + inline static void resetSS() + { + digitalWrite(ss_pin, HIGH); + } +#endif +}; + +extern W5100Class W5100; + +#endif + +#ifndef UTIL_H +#define UTIL_H + +#ifndef htons +#define htons(x) ( (((x)<<8)&0xFF00) | (((x)>>8)&0xFF) ) +#endif + +#ifndef ntohs +#define ntohs(x) htons(x) +#endif + +#ifndef htonl +#define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \ + ((x)<< 8 & 0x00FF0000UL) | \ + ((x)>> 8 & 0x0000FF00UL) | \ + ((x)>>24 & 0x000000FFUL) ) +#endif + +#ifndef ntohl +#define ntohl(x) htonl(x) +#endif + +#endif //W5100_H_INCLUDED diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet2/src/Ethernet2.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet2/src/Ethernet2.cpp new file mode 100644 index 0000000..f90be20 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet2/src/Ethernet2.cpp @@ -0,0 +1,262 @@ +/* + modified 12 Aug 2013 + by Soohwan Kim (suhwan@wiznet.co.kr) + +- 10 Apr. 2015 + Added support for Arduino Ethernet Shield 2 + by Arduino.org team + + */ + +#include "Ethernet2.h" +#include "Dhcp.h" + +// XXX: don't make assumptions about the value of MAX_SOCK_NUM. +uint8_t EthernetClass::_state[MAX_SOCK_NUM] = { 0, }; +uint16_t EthernetClass::_server_port[MAX_SOCK_NUM] = { 0, }; + + + +#if defined(WIZ550io_WITH_MACADDRESS) +int EthernetClass::begin(void) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var _mac_address + //byte mac_address[6] ={0,}; + ////// + + if (_dhcp != NULL) { + delete _dhcp; + } + _dhcp = new DhcpClass(); + + // Initialise the basic info + w5500.init(w5500_cspin); + w5500.setIPAddress(IPAddress(0,0,0,0).raw_address()); + + // KH mod + w5500.getMACAddress(_mac_address); + + // Now try to get our config info from a DHCP server + int ret = _dhcp->beginWithDHCP(_mac_address); + ////// + + if(ret == 1) + { + // We've successfully found a DHCP server and got our configuration info, so set things + // accordingly + w5500.setIPAddress(_dhcp->getLocalIp().raw_address()); + w5500.setGatewayIp(_dhcp->getGatewayIp().raw_address()); + w5500.setSubnetMask(_dhcp->getSubnetMask().raw_address()); + _dnsServerAddress = _dhcp->getDnsServerIp(); + _dnsDomainName = _dhcp->getDnsDomainName(); + _hostName = _dhcp->getHostName(); + } + + return ret; +} + +void EthernetClass::begin(IPAddress local_ip) +{ + // Assume the DNS server will be the machine on the same network as the local IP + // but with last octet being '1' + IPAddress dns_server = local_ip; + dns_server[3] = 1; + begin(local_ip, dns_server); +} + +void EthernetClass::begin(IPAddress local_ip, IPAddress dns_server) +{ + // Assume the gateway will be the machine on the same network as the local IP + // but with last octet being '1' + IPAddress gateway = local_ip; + gateway[3] = 1; + begin(local_ip, dns_server, gateway); +} + +void EthernetClass::begin(IPAddress local_ip, IPAddress dns_server, IPAddress gateway) +{ + IPAddress subnet(255, 255, 255, 0); + begin(local_ip, dns_server, gateway, subnet); +} + +void EthernetClass::begin(IPAddress local_ip, IPAddress dns_server, IPAddress gateway, IPAddress subnet) +{ + w5500.init(w5500_cspin); + w5500.setIPAddress(local_ip.raw_address()); + w5500.setGatewayIp(gateway.raw_address()); + w5500.setSubnetMask(subnet.raw_address()); + _dnsServerAddress = dns_server; +} +#else +int EthernetClass::begin(uint8_t *mac_address) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac_address, sizeof(_mac_address)); + ////// + + if (_dhcp != NULL) { + delete _dhcp; + } + _dhcp = new DhcpClass(); + // Initialise the basic info + w5500.init(w5500_cspin); + w5500.setMACAddress(mac_address); + w5500.setIPAddress(IPAddress(0,0,0,0).raw_address()); + + // Now try to get our config info from a DHCP server + int ret = _dhcp->beginWithDHCP(mac_address); + if(ret == 1) + { + // We've successfully found a DHCP server and got our configuration info, so set things + // accordingly + w5500.setIPAddress(_dhcp->getLocalIp().raw_address()); + w5500.setGatewayIp(_dhcp->getGatewayIp().raw_address()); + w5500.setSubnetMask(_dhcp->getSubnetMask().raw_address()); + _dnsServerAddress = _dhcp->getDnsServerIp(); + _dnsDomainName = _dhcp->getDnsDomainName(); + _hostName = _dhcp->getHostName(); + } + + return ret; +} + +void EthernetClass::begin(uint8_t *mac_address, IPAddress local_ip) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac_address, sizeof(_mac_address)); + ////// + + // Assume the DNS server will be the machine on the same network as the local IP + // but with last octet being '1' + IPAddress dns_server = local_ip; + dns_server[3] = 1; + begin(mac_address, local_ip, dns_server); +} + +void EthernetClass::begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac_address, sizeof(_mac_address)); + ////// + + // Assume the gateway will be the machine on the same network as the local IP + // but with last octet being '1' + IPAddress gateway = local_ip; + gateway[3] = 1; + begin(mac_address, local_ip, dns_server, gateway); +} + +void EthernetClass::begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server, IPAddress gateway) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac_address, sizeof(_mac_address)); + ////// + + IPAddress subnet(255, 255, 255, 0); + begin(mac_address, local_ip, dns_server, gateway, subnet); +} + +void EthernetClass::begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server, IPAddress gateway, IPAddress subnet) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac_address, sizeof(_mac_address)); + ////// + + w5500.init(w5500_cspin); + w5500.setMACAddress(mac_address); + w5500.setIPAddress(local_ip.raw_address()); + w5500.setGatewayIp(gateway.raw_address()); + w5500.setSubnetMask(subnet.raw_address()); + _dnsServerAddress = dns_server; +} + +#endif + +int EthernetClass::maintain(){ + int rc = DHCP_CHECK_NONE; + if(_dhcp != NULL){ + //we have a pointer to dhcp, use it + rc = _dhcp->checkLease(); + switch ( rc ){ + case DHCP_CHECK_NONE: + //nothing done + break; + case DHCP_CHECK_RENEW_OK: + case DHCP_CHECK_REBIND_OK: + //we might have got a new IP. + w5500.setIPAddress(_dhcp->getLocalIp().raw_address()); + w5500.setGatewayIp(_dhcp->getGatewayIp().raw_address()); + w5500.setSubnetMask(_dhcp->getSubnetMask().raw_address()); + _dnsServerAddress = _dhcp->getDnsServerIp(); + _dnsDomainName = _dhcp->getDnsDomainName(); + _hostName = _dhcp->getHostName(); + break; + default: + //this is actually a error, it will retry though + break; + } + } + return rc; +} + +// KH add to report link status +uint8_t EthernetClass::link() +{ + return bitRead(w5500.getPHYCFGR(), 0); +} + +const char* EthernetClass::linkReport() +{ + if (bitRead(w5500.getPHYCFGR(), 0) == 1) + return "LINK"; + else + return "NO LINK"; +} +////// + +IPAddress EthernetClass::localIP() +{ + IPAddress ret; + w5500.getIPAddress(ret.raw_address()); + return ret; +} + +IPAddress EthernetClass::subnetMask() +{ + IPAddress ret; + w5500.getSubnetMask(ret.raw_address()); + return ret; +} + +IPAddress EthernetClass::gatewayIP() +{ + IPAddress ret; + w5500.getGatewayIp(ret.raw_address()); + return ret; +} + +IPAddress EthernetClass::dnsServerIP() +{ + return _dnsServerAddress; +} + +char* EthernetClass::dnsDomainName(){ + return _dnsDomainName; +} + +char* EthernetClass::hostName(){ + return _hostName; +} + +EthernetClass Ethernet; diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet2/src/Ethernet2.h b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet2/src/Ethernet2.h new file mode 100644 index 0000000..7a5a25f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet2/src/Ethernet2.h @@ -0,0 +1,92 @@ +/* + modified 12 Aug 2013 + by Soohwan Kim (suhwan@wiznet.co.kr) + + - 10 Apr. 2015 + Added support for Arduino Ethernet Shield 2 + by Arduino.org team + + */ +#ifndef ethernet_h +#define ethernet_h + +#include +#include "utility/w5500.h" +#include "IPAddress.h" +#include "EthernetClient.h" +#include "EthernetServer.h" +#include "Dhcp.h" + + + +class EthernetClass { +private: + IPAddress _dnsServerAddress; + char* _dnsDomainName; + char* _hostName; + DhcpClass* _dhcp; + + // KH add to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + uint8_t _mac_address[6] ={0,}; + ////// + +public: + uint8_t w5500_cspin; + + static uint8_t _state[MAX_SOCK_NUM]; + static uint16_t _server_port[MAX_SOCK_NUM]; + + EthernetClass() { _dhcp = NULL; w5500_cspin = 10; } + void init(uint8_t _cspin = 10) { w5500_cspin = _cspin; } + +#if defined(WIZ550io_WITH_MACADDRESS) + // Initialize function when use the ioShield serise (included WIZ550io) + // WIZ550io has a MAC address which is written after reset. + // Default IP, Gateway and subnet address are also writen. + // so, It needs some initial time. please refer WIZ550io Datasheet in details. + int begin(void); + void begin(IPAddress local_ip); + void begin(IPAddress local_ip, IPAddress dns_server); + void begin(IPAddress local_ip, IPAddress dns_server, IPAddress gateway); + void begin(IPAddress local_ip, IPAddress dns_server, IPAddress gateway, IPAddress subnet); +#else + // Initialize the Ethernet shield to use the provided MAC address and gain the rest of the + // configuration through DHCP. + // Returns 0 if the DHCP configuration failed, and 1 if it succeeded + int begin(uint8_t *mac_address); + void begin(uint8_t *mac_address, IPAddress local_ip); + void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server); + void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server, IPAddress gateway); + void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server, IPAddress gateway, IPAddress subnet); + +#endif + + int maintain(); + + // KH add to report link status + uint8_t link(); // returns the linkstate, 1 = linked, 0 = no link + const char* linkReport(); // returns the linkstate as a string + ////// + + // KH add to have similar function to Ethernet lib + // Certainly we can use void macAddress(uint8_t mac[]) to read from W5x00. + void MACAddress(uint8_t *mac_address) + { + memcpy(mac_address, _mac_address, sizeof(_mac_address)); + } + ////// + + IPAddress localIP(); + IPAddress subnetMask(); + IPAddress gatewayIP(); + IPAddress dnsServerIP(); + char* dnsDomainName(); + char* hostName(); + + friend class EthernetClient; + friend class EthernetServer; +}; + +extern EthernetClass Ethernet; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet2/src/EthernetUdp2.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet2/src/EthernetUdp2.cpp new file mode 100644 index 0000000..d8671cd --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet2/src/EthernetUdp2.cpp @@ -0,0 +1,290 @@ +/* + * Udp.cpp: Library to send/receive UDP packets with the Arduino ethernet shield. + * This version only offers minimal wrapping of socket.c/socket.h + * Drop Udp.h/.cpp into the Ethernet library directory at hardware/libraries/Ethernet/ + * + * MIT License: + * Copyright (c) 2008 Bjoern Hartmann + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * bjoern@cs.stanford.edu 12/30/2008 + * + * - 10 Apr. 2015 + * Added support for Arduino Ethernet Shield 2 + * by Arduino.org team + */ + +#include "utility/w5500.h" +#include "utility/socket.h" +#include "Ethernet2.h" +#include "Udp.h" +#include "Dns.h" + +#define ETHERNET2_DEBUG 0 + +/* Constructor */ +EthernetUDP::EthernetUDP() : _sock(MAX_SOCK_NUM) {} + +/* Start EthernetUDP socket, listening at local port PORT */ +uint8_t EthernetUDP::begin(uint16_t port) { + if (_sock != MAX_SOCK_NUM) + return 0; + + for (int i = 0; i < MAX_SOCK_NUM; i++) { + uint8_t s = w5500.readSnSR(i); + if (s == SnSR::CLOSED || s == SnSR::FIN_WAIT) { + _sock = i; + break; + } + } + + if (_sock == MAX_SOCK_NUM) + return 0; + + _port = port; + _remaining = 0; + socket(_sock, SnMR::UDP, _port, 0); + + return 1; +} + +//KH, to add Multicast support +/* Start EthernetUDP socket, listening at local port PORT */ +uint8_t EthernetUDP::beginMulticast(IPAddress ip, uint16_t port) +{ + if (_sock != MAX_SOCK_NUM) + return 0; + + for (int i = 0; i < MAX_SOCK_NUM; i++) { + uint8_t s = w5500.readSnSR(i); + if (s == SnSR::CLOSED || s == SnSR::FIN_WAIT) { + _sock = i; + break; + } + } + + if (_sock == MAX_SOCK_NUM) + return 0; + + // Calculate MAC address from Multicast IP Address + byte mac[] = { 0x01, 0x00, 0x5E, 0x00, 0x00, 0x00 }; + + mac[3] = ip[1] & 0x7F; + mac[4] = ip[2]; + mac[5] = ip[3]; + + w5500.writeSnDIPR(_sock, rawIPAddress(ip)); //239.255.0.1 + w5500.writeSnDPORT(_sock, port); + w5500.writeSnDHAR(_sock,mac); + + _remaining = 0; + socket(_sock, SnMR::UDP, port, SnMR::MULTI); + return 1; +} +////// + + + +/* return number of bytes available in the current packet, + will return zero if parsePacket hasn't been called yet */ +int EthernetUDP::available() { + return _remaining; +} + +/* Release any resources being used by this EthernetUDP instance */ +void EthernetUDP::stop() +{ + if (_sock == MAX_SOCK_NUM) + return; + + close(_sock); + + EthernetClass::_server_port[_sock] = 0; + _sock = MAX_SOCK_NUM; +} + +int EthernetUDP::beginPacket(const char *host, uint16_t port) +{ + // Look up the host first + int ret = 0; + DNSClient dns; + IPAddress remote_addr; + + dns.begin(Ethernet.dnsServerIP()); + ret = dns.getHostByName(host, remote_addr); + if (ret == 1) { + return beginPacket(remote_addr, port); + } else { + return ret; + } +} + +int EthernetUDP::beginPacket(IPAddress ip, uint16_t port) +{ + _offset = 0; + +// KH debug +#if (ETHERNET2_DEBUG > 1) + Serial.print("Ethernet2UDP::beginPacket: ip="); + Serial.print(ip); + Serial.print(", port="); + Serial.println(port); +#endif + + return startUDP(_sock, rawIPAddress(ip), port); +} + +int EthernetUDP::endPacket() +{ + return sendUDP(_sock); +} + +size_t EthernetUDP::write(uint8_t byte) +{ + return write(&byte, 1); +} + +size_t EthernetUDP::write(const uint8_t *buffer, size_t size) +{ + // KH debug +#if (ETHERNET2_DEBUG > 1) + Serial.print("Ethernet2UDP:write, size="); + Serial.println(size); +#endif + + uint16_t bytes_written = bufferData(_sock, _offset, buffer, size); + _offset += bytes_written; + + // KH debug +#if (ETHERNET2_DEBUG > 1) + Serial.print("Ethernet2UDP: bytes written="); + Serial.println(bytes_written); +#endif + + return bytes_written; +} + +int EthernetUDP::parsePacket() +{ + // discard any remaining bytes in the last packet + flush(); + + if (w5500.getRXReceivedSize(_sock) > 0) + { + //HACK - hand-parse the UDP packet using TCP recv method + uint8_t tmpBuf[8]; + int ret =0; + //read 8 header bytes and get IP and port from it + ret = recv(_sock,tmpBuf,8); + if (ret > 0) + { + _remoteIP = tmpBuf; + _remotePort = tmpBuf[4]; + _remotePort = (_remotePort << 8) + tmpBuf[5]; + _remaining = tmpBuf[6]; + _remaining = (_remaining << 8) + tmpBuf[7]; + + // When we get here, any remaining bytes are the data + ret = _remaining; + } + + // KH debug +#if (ETHERNET2_DEBUG > 1) + Serial.print("Ethernet2UDP:parsePacket OK, datasize="); + Serial.println(ret); +#endif + + return ret; + } + // There aren't any packets available + return 0; +} + +int EthernetUDP::read() +{ + uint8_t byte; + + if ((_remaining > 0) && (recv(_sock, &byte, 1) > 0)) + { + // We read things without any problems + _remaining--; + return byte; + } + + // If we get here, there's no data available + return -1; +} + +int EthernetUDP::read(unsigned char* buffer, size_t len) +{ + + if (_remaining > 0) + { + + int got; + + if (_remaining <= len) + { + // data should fit in the buffer + got = recv(_sock, buffer, _remaining); + } + else + { + // too much data for the buffer, + // grab as much as will fit + got = recv(_sock, buffer, len); + } + + if (got > 0) + { + _remaining -= got; + return got; + } + + } + + // If we get here, there's no data available or recv failed + return -1; + +} + +int EthernetUDP::peek() +{ + uint8_t b; + // Unlike recv, peek doesn't check to see if there's any data available, so we must. + // If the user hasn't called parsePacket yet then return nothing otherwise they + // may get the UDP header + if (!_remaining) + return -1; + ::peek(_sock, &b); + return b; +} + +void EthernetUDP::flush() +{ + // could this fail (loop endlessly) if _remaining > 0 and recv in read fails? + // should only occur if recv fails after telling us the data is there, lets + // hope the w5500 always behaves :) + + while (_remaining) + { + read(); + } +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet2/src/EthernetUdp2.h b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet2/src/EthernetUdp2.h new file mode 100644 index 0000000..fe8d110 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet2/src/EthernetUdp2.h @@ -0,0 +1,110 @@ +/* + * Udp.cpp: Library to send/receive UDP packets with the Arduino ethernet shield. + * This version only offers minimal wrapping of socket.c/socket.h + * Drop Udp.h/.cpp into the Ethernet library directory at hardware/libraries/Ethernet/ + * + * NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these) + * 1) UDP does not guarantee the order in which assembled UDP packets are received. This + * might not happen often in practice, but in larger network topologies, a UDP + * packet can be received out of sequence. + * 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being + * aware of it. Again, this may not be a concern in practice on small local networks. + * For more information, see http://www.cafeaulait.org/course/week12/35.html + * + * MIT License: + * Copyright (c) 2008 Bjoern Hartmann + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * bjoern@cs.stanford.edu 12/30/2008 + * + * - 10 Apr. 2015 + * Added support for Arduino Ethernet Shield 2 + * by Arduino.org team + * + */ + + +#ifndef ethernetudp_h +#define ethernetudp_h + +#include + +#define UDP_TX_PACKET_MAX_SIZE 24 + +class EthernetUDP : public UDP { +private: + uint8_t _sock; // socket ID for Wiz5100 + uint16_t _port; // local port to listen on + IPAddress _remoteIP; // remote IP address for the incoming packet whilst it's being processed + uint16_t _remotePort; // remote port for the incoming packet whilst it's being processed + uint16_t _offset; // offset into the packet being sent + uint16_t _remaining; // remaining bytes of incoming packet yet to be processed + +public: + EthernetUDP(); // Constructor + virtual uint8_t begin(uint16_t); // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + + //KH, to add Multicast support + virtual uint8_t beginMulticast(IPAddress, uint16_t); // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + ////// + + virtual void stop(); // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port); + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char *host, uint16_t port); + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket(); + // Write a single byte into the packet + virtual size_t write(uint8_t); + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t *buffer, size_t size); + + using Print::write; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket(); + // Number of bytes remaining in the current packet + virtual int available(); + // Read a single byte from the current packet + virtual int read(); + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len); + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) { return read((unsigned char*)buffer, len); }; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek(); + virtual void flush(); // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP() { return _remoteIP; }; + // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort() { return _remotePort; }; +}; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet3/src/Ethernet3.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet3/src/Ethernet3.cpp new file mode 100644 index 0000000..ec28896 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet3/src/Ethernet3.cpp @@ -0,0 +1,431 @@ +/* + modified 12 Aug 2013 + by Soohwan Kim (suhwan@wiznet.co.kr) + +- 10 Apr. 2015 + Added support for Arduino Ethernet Shield 2 + by Arduino.org team + + */ + +#include "Ethernet3.h" +#include "Dhcp.h" + +// XXX: don't make assumptions about the value of MAX_SOCK_NUM. +uint8_t EthernetClass::_state[MAX_SOCK_NUM] = { 0, }; +uint16_t EthernetClass::_server_port[MAX_SOCK_NUM] = { 0, }; + +void EthernetClass::setRstPin(uint8_t pinRST) { + _pinRST = pinRST; + pinMode(_pinRST, OUTPUT); + digitalWrite(_pinRST, HIGH); + } +void EthernetClass::setCsPin(uint8_t pinCS) { + _pinCS = pinCS; + } + +void EthernetClass::init(uint8_t maxSockNum) { + _maxSockNum = maxSockNum; + } + +uint8_t EthernetClass::softreset() { + return w5500.softReset(); + } + +void EthernetClass::hardreset() { + if(_pinRST != 0) { + digitalWrite(_pinRST, LOW); + delay(1); + digitalWrite(_pinRST, HIGH); + delay(150); + } + } + +#if defined(WIZ550io_WITH_MACADDRESS) + +int EthernetClass::begin(void) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var _mac_address + //uint8_t mac_address[6] ={0,}; + ////// + + _dhcp = new DhcpClass(); + + // Initialise the basic info + w5500.init(_maxSockNum, _pinCS); + w5500.setIPAddress(IPAddress(0,0,0,0).raw_address()); + + // KH mod + w5500.getMACAddress(_mac_address); + ////// + + if (strlen(_customHostname) != 0) + { + _dhcp->setCustomHostname(_customHostname); + } + + // Now try to get our config info from a DHCP server + // KH mod + int ret = _dhcp->beginWithDHCP(_mac_address); + ////// + + if(ret == 1) + { + // We've successfully found a DHCP server and got our configuration info, so set things + // accordingly + w5500.setIPAddress(_dhcp->getLocalIp().raw_address()); + w5500.setGatewayIp(_dhcp->getGatewayIp().raw_address()); + w5500.setSubnetMask(_dhcp->getSubnetMask().raw_address()); + _dnsServerAddress = _dhcp->getDnsServerIp(); + } + return ret; +} + +void EthernetClass::begin(IPAddress local_ip) +{ + IPAddress subnet(255, 255, 255, 0); + begin(local_ip, subnet); +} + +void EthernetClass::begin(IPAddress local_ip, IPAddress subnet) +{ + // Assume the gateway will be the machine on the same network as the local IP + // but with last octet being '1' + IPAddress gateway = local_ip; + gateway[3] = 1; + begin(local_ip, subnet, gateway); +} + +void EthernetClass::begin(IPAddress local_ip, IPAddress subnet, IPAddress gateway) +{ + // Assume the DNS server will be the machine on the same network as the local IP + // but with last octet being '1' + IPAddress dns_server = local_ip; + dns_server[3] = 1; + begin(local_ip, subnet, gateway, dns_server); +} + +void EthernetClass::begin(IPAddress local_ip, IPAddress subnet, IPAddress gateway, IPAddress dns_server) +{ + w5500.init(_maxSockNum, _pinCS); + w5500.setIPAddress(local_ip.raw_address()); + w5500.setGatewayIp(gateway.raw_address()); + w5500.setSubnetMask(subnet.raw_address()); + _dnsServerAddress = dns_server; +} + +#else +int EthernetClass::begin(uint8_t *mac_address) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac_address, sizeof(_mac_address)); + ////// + + _dhcp = new DhcpClass(); + // Initialise the basic info + w5500.init(_maxSockNum, _pinCS); + w5500.setMACAddress(mac_address); + w5500.setIPAddress(IPAddress(0,0,0,0).raw_address()); + + if (strlen(_customHostname) != 0) + { + _dhcp->setCustomHostname(_customHostname); + } + + // Now try to get our config info from a DHCP server + int ret = _dhcp->beginWithDHCP(mac_address); + if(ret == 1) + { + // We've successfully found a DHCP server and got our configuration info, so set things + // accordingly + w5500.setIPAddress(_dhcp->getLocalIp().raw_address()); + w5500.setGatewayIp(_dhcp->getGatewayIp().raw_address()); + w5500.setSubnetMask(_dhcp->getSubnetMask().raw_address()); + _dnsServerAddress = _dhcp->getDnsServerIp(); + } + + return ret; +} + +void EthernetClass::begin(uint8_t *mac_address, IPAddress local_ip) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac_address, sizeof(_mac_address)); + ////// + + IPAddress subnet(255, 255, 255, 0); + begin(mac_address, local_ip, subnet); +} + +void EthernetClass::begin(uint8_t *mac_address, IPAddress local_ip, IPAddress subnet) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac_address, sizeof(_mac_address)); + ////// + + // Assume the gateway will be the machine on the same network as the local IP + // but with last octet being '1' + IPAddress gateway = local_ip; + gateway[3] = 1; + begin(mac_address, local_ip, subnet, gateway); +} + +void EthernetClass::begin(uint8_t *mac_address, IPAddress local_ip, IPAddress subnet, IPAddress gateway) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac_address, sizeof(_mac_address)); + ////// + + // Assume the DNS server will be the machine on the same network as the local IP + // but with last octet being '1' + IPAddress dns_server = local_ip; + dns_server[3] = 1; + begin(mac_address, local_ip, subnet, gateway, dns_server); +} + +void EthernetClass::begin(uint8_t *mac_address, IPAddress local_ip, IPAddress subnet, IPAddress gateway, IPAddress dns_server) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac_address, sizeof(_mac_address)); + ////// + + w5500.init(_maxSockNum, _pinCS); + w5500.setMACAddress(mac_address); + w5500.setIPAddress(local_ip.raw_address()); + w5500.setGatewayIp(gateway.raw_address()); + w5500.setSubnetMask(subnet.raw_address()); + _dnsServerAddress = dns_server; +} + +#endif + +int EthernetClass::maintain(){ + int rc = DHCP_CHECK_NONE; + if(_dhcp != NULL){ + //we have a pointer to dhcp, use it + rc = _dhcp->checkLease(); + switch ( rc ){ + case DHCP_CHECK_NONE: + //nothing done + break; + case DHCP_CHECK_RENEW_OK: + case DHCP_CHECK_REBIND_OK: + //we might have got a new IP. + w5500.setIPAddress(_dhcp->getLocalIp().raw_address()); + w5500.setGatewayIp(_dhcp->getGatewayIp().raw_address()); + w5500.setSubnetMask(_dhcp->getSubnetMask().raw_address()); + _dnsServerAddress = _dhcp->getDnsServerIp(); + break; + default: + //this is actually a error, it will retry though + break; + } + } + return rc; +} + +void EthernetClass::WoL(bool wol) { + uint8_t val = w5500.readMR(); + bitWrite(val, 5, wol); + w5500.writeMR(val); + } + +bool EthernetClass::WoL() { + uint8_t val = w5500.readMR(); + return bitRead(val, 5); + } + +void EthernetClass::phyMode(phyMode_t mode) { + uint8_t val = w5500.getPHYCFGR(); + bitWrite(val, 6, 1); + if (mode == HALF_DUPLEX_10) { + bitWrite(val, 3, 0); + bitWrite(val, 4, 0); + bitWrite(val, 5, 0); + w5500.setPHYCFGR(val); + } + else if (mode == FULL_DUPLEX_10) { + bitWrite(val, 3, 1); + bitWrite(val, 4, 0); + bitWrite(val, 5, 0); + w5500.setPHYCFGR(val); + } + else if (mode == HALF_DUPLEX_100) { + bitWrite(val, 3, 0); + bitWrite(val, 4, 1); + bitWrite(val, 5, 0); + w5500.setPHYCFGR(val); + } + else if (mode == FULL_DUPLEX_100) { + bitWrite(val, 3, 1); + bitWrite(val, 4, 1); + bitWrite(val, 5, 0); + w5500.setPHYCFGR(val); + } + else if (mode == FULL_DUPLEX_100_AUTONEG) { + bitWrite(val, 3, 0); + bitWrite(val, 4, 0); + bitWrite(val, 5, 1); + w5500.setPHYCFGR(val); + } + else if (mode == POWER_DOWN) { + bitWrite(val, 3, 0); + bitWrite(val, 4, 1); + bitWrite(val, 5, 1); + w5500.setPHYCFGR(val); + } + else if (mode == ALL_AUTONEG) { + bitWrite(val, 3, 1); + bitWrite(val, 4, 1); + bitWrite(val, 5, 1); + w5500.setPHYCFGR(val); + } + bitWrite(val, 7, 0); + w5500.setPHYCFGR(val); + bitWrite(val, 7, 1); + w5500.setPHYCFGR(val); + } + +void EthernetClass::setHostname(const char* hostname) { + memset(_customHostname, 0, 32); + memcpy((void*)_customHostname, (void*)hostname, strlen(hostname) >= 31 ? 31 : strlen(hostname)); + } + +uint8_t EthernetClass::phyState() { + return w5500.getPHYCFGR(); + } + +uint8_t EthernetClass::link() { + return bitRead(w5500.getPHYCFGR(), 0); + } + +const char* EthernetClass::linkReport() +{ + if (bitRead(w5500.getPHYCFGR(), 0) == 1) + return "LINK"; + else + return "NO LINK"; + } + +uint8_t EthernetClass::speed() +{ + if (bitRead(w5500.getPHYCFGR(), 0) == 1) + { + if (bitRead(w5500.getPHYCFGR(), 1) == 1) + return 100; + + if (bitRead(w5500.getPHYCFGR(), 1) == 0) + return 10; + } + + return 0; +} + +const char* EthernetClass::speedReport() +{ + if (bitRead(w5500.getPHYCFGR(), 0) == 1) + { + if (bitRead(w5500.getPHYCFGR(), 1) == 1) + return "100 MB"; + + if (bitRead(w5500.getPHYCFGR(), 1) == 0) + return "10 MB"; + } + + return "NO LINK"; +} + +uint8_t EthernetClass::duplex() +{ + if(bitRead(w5500.getPHYCFGR(), 0) == 1) + { + if (bitRead(w5500.getPHYCFGR(), 2) == 1) + return 2; + + if (bitRead(w5500.getPHYCFGR(), 2) == 0) + return 1; + } + + return 0; +} + +const char* EthernetClass::duplexReport() +{ + if (bitRead(w5500.getPHYCFGR(), 0) == 1) + { + if(bitRead(w5500.getPHYCFGR(), 2) == 1) + return "FULL DUPLEX"; + + if (bitRead(w5500.getPHYCFGR(), 2) == 0) + return "HALF DUPLEX"; + } + + return "NO LINK"; +} + +void EthernetClass::setRtTimeOut(uint16_t timeout) { + w5500.setRetransmissionTime(timeout); + } + +uint16_t EthernetClass::getRtTimeOut() { + return w5500.getRetransmissionTime(); + } + +void EthernetClass::setRtCount(uint8_t count) { + w5500.setRetransmissionCount(count); + } + +uint8_t EthernetClass::getRtCount() { + return w5500.getRetransmissionCount(); + } + +void EthernetClass::macAddress(uint8_t mac[]) { + w5500.getMACAddress(mac); + } + +const char* EthernetClass::macAddressReport() { + uint8_t mac[6]; + static char str[18]; + w5500.getMACAddress(mac); + sprintf(str, "%02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + return str; + } + +IPAddress EthernetClass::localIP() +{ + IPAddress ret; + w5500.getIPAddress(ret.raw_address()); + return ret; +} + +IPAddress EthernetClass::subnetMask() +{ + IPAddress ret; + w5500.getSubnetMask(ret.raw_address()); + return ret; +} + +IPAddress EthernetClass::gatewayIP() +{ + IPAddress ret; + w5500.getGatewayIp(ret.raw_address()); + return ret; +} + +IPAddress EthernetClass::dnsServerIP() +{ + return _dnsServerAddress; +} + +EthernetClass Ethernet; diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet3/src/Ethernet3.h b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet3/src/Ethernet3.h new file mode 100644 index 0000000..dab54f4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/Ethernet3/src/Ethernet3.h @@ -0,0 +1,127 @@ +/* + modified 12 Aug 2013 + by Soohwan Kim (suhwan@wiznet.co.kr) + + - 10 Apr. 2015 + Added support for Arduino Ethernet Shield 2 + by Arduino.org team + + */ +#ifndef ethernet3_h +#define ethernet3_h + +#include +#include "utility/w5500.h" +#include "IPAddress.h" +#include "EthernetClient.h" +#include "EthernetServer.h" +#include "Dhcp.h" + +enum phyMode_t { + HALF_DUPLEX_10, + FULL_DUPLEX_10, + HALF_DUPLEX_100, + FULL_DUPLEX_100, + FULL_DUPLEX_100_AUTONEG, + POWER_DOWN, + ALL_AUTONEG + }; + +class EthernetClass { +private: + IPAddress _dnsServerAddress; + DhcpClass* _dhcp; + char _customHostname[32]; + + // KH add to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + uint8_t _mac_address[6] ={0,}; + ////// + +public: + uint8_t _maxSockNum; + uint8_t _pinCS; + uint8_t _pinRST; + + static uint8_t _state[MAX_SOCK_NUM]; + static uint16_t _server_port[MAX_SOCK_NUM]; + + EthernetClass() { _dhcp = NULL; _pinCS = 10; _maxSockNum = 8; } + + void setRstPin(uint8_t pinRST = 9); // for WIZ550io or USR-ES1, must set befor Ethernet.begin + void setCsPin(uint8_t pinCS = 10); // must set befor Ethernet.begin + + // Initialize with less sockets but more RX/TX Buffer + // maxSockNum = 1 Socket 0 -> RX/TX Buffer 16k + // maxSockNum = 2 Socket 0, 1 -> RX/TX Buffer 8k + // maxSockNum = 4 Socket 0...3 -> RX/TX Buffer 4k + // maxSockNum = 8 (Standard) all sockets -> RX/TX Buffer 2k + // be carefull of the MAX_SOCK_NUM, because in the moment it can't dynamicly changed + void init(uint8_t maxSockNum = 8); + + uint8_t softreset(); // can set only after Ethernet.begin + void hardreset(); // You need to set the Rst pin + +#if defined(WIZ550io_WITH_MACADDRESS) + + // Initialize function when use the ioShield serise (included WIZ550io) + // WIZ550io has a MAC address which is written after reset. + // Default IP, Gateway and subnet address are also writen. + // so, It needs some initial time. please refer WIZ550io Datasheet in details. + int begin(void); + void begin(IPAddress local_ip); + void begin(IPAddress local_ip, IPAddress subnet); + void begin(IPAddress local_ip, IPAddress subnet, IPAddress gateway); + void begin(IPAddress local_ip, IPAddress subnet, IPAddress gateway, IPAddress dns_server); +#else + // Initialize the Ethernet shield to use the provided MAC address and gain the rest of the + // configuration through DHCP. + // Returns 0 if the DHCP configuration failed, and 1 if it succeeded + int begin(uint8_t *mac_address); + void begin(uint8_t *mac_address, IPAddress local_ip); + void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress subnet); + void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress subnet, IPAddress gateway); + void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress subnet, IPAddress gateway, IPAddress dns_server); +#endif + + int maintain(); + void WoL(bool wol); // set Wake on LAN + bool WoL(); // get the WoL state + void phyMode(phyMode_t mode); // set PHYCFGR + uint8_t phyState(); // returns the PHYCFGR + uint8_t link(); // returns the linkstate, 1 = linked, 0 = no link + const char* linkReport(); // returns the linkstate as a string + uint8_t speed(); // returns speed in MB/s + const char* speedReport(); // returns speed as a string + uint8_t duplex(); // returns duplex mode 0 = no link, 1 = Half Duplex, 2 = Full Duplex + const char* duplexReport(); // returns duplex mode as a string + + void setRtTimeOut(uint16_t timeout = 2000); // set the retransmission timout *100us + uint16_t getRtTimeOut(); // get the retransmission timout + void setRtCount(uint8_t count = 8); // set the retransmission count + uint8_t getRtCount(); // get the retransmission count + + void macAddress(uint8_t mac[]); // get the MAC Address + const char* macAddressReport(); // returns the the MAC Address as a string + + void setHostname(const char* hostname); + + // KH add to have similar function to Ethernet lib + // Certainly we can use void macAddress(uint8_t mac[]) to read from W5x00. + void MACAddress(uint8_t *mac_address) + { + memcpy(mac_address, _mac_address, sizeof(_mac_address)); + } + ////// + + IPAddress localIP(); + IPAddress subnetMask(); + IPAddress gatewayIP(); + IPAddress dnsServerIP(); + + friend class EthernetClient; + friend class EthernetServer; +}; + +extern EthernetClass Ethernet; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/EthernetLarge.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/EthernetLarge.cpp new file mode 100644 index 0000000..4357b3c --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/EthernetLarge.cpp @@ -0,0 +1,318 @@ +/**************************************************************************************************************************** + EthernetLarge.cpp + + EthernetWebServer is a library for the Ethernet shields to run WebServer + + Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases + Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer + Licensed under MIT license + Version: 1.0.9 + + Copyright 2018 Paul Stoffregen + + Permission is hereby granted, free of charge, to any person obtaining a copy of this + software and associated documentation files (the "Software"), to deal in the Software + without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/02/2020 Initial coding for Arduino Mega, Teensy, etc to support Ethernetx libraries + 1.0.1 K Hoang 20/02/2020 Add support to lambda functions + 1.0.2 K Hoang 20/02/2020 Add support to UIPEthernet library for ENC28J60 + 1.0.3 K Hoang 23/02/2020 Add support to SAM DUE / SAMD21 boards + 1.0.4 K Hoang 16/04/2020 Add support to SAMD51 boards + 1.0.5 K Hoang 24/04/2020 Add support to nRF52 boards, such as AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, + Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B30_ublox, etc. + More Custom Ethernet libraries supported such as Ethernet2, Ethernet3, EthernetLarge + 1.0.6 K Hoang 27/04/2020 Add support to ESP32/ESP8266 boards + 1.0.7 K Hoang 30/04/2020 Add ENC28J60 support to ESP32/ESP8266 boards + 1.0.8 K Hoang 12/05/2020 Fix W5x00 support for ESP8266 boards. + 1.0.9 K Hoang 15/05/2020 Add EthernetWrapper.h for easier W5x00 support as well as more Ethernet libs in the future. + *****************************************************************************************************************************/ + +#include +#include "EthernetLarge.h" +#include "utility/w5100.h" +#include "Dhcp.h" + +#define ETHERNET_DEBUG 1 + +IPAddress EthernetClass::_dnsServerAddress; +DhcpClass* EthernetClass::_dhcp = NULL; + +// KH +void EthernetClass::setRstPin(uint8_t pinRST) +{ + _pinRST = pinRST; + pinMode(_pinRST, OUTPUT); + digitalWrite(_pinRST, HIGH); +} +void EthernetClass::setCsPin(uint8_t pinCS) +{ + _pinCS = pinCS; + W5100.setSS(pinCS); + +#if ( ETHERNET_DEBUG > 0 ) + Serial.print("Input pinCS = "); + Serial.println(pinCS); + Serial.print("_pinCS = "); + Serial.println(_pinCS); +#endif +} + +void EthernetClass::initMaxSockNum(uint8_t maxSockNum) +{ + _maxSockNum = maxSockNum; +} + +uint8_t EthernetClass::softreset() +{ + return W5100.softReset(); +} + +void EthernetClass::hardreset() +{ + if(_pinRST != 0) + { + digitalWrite(_pinRST, LOW); + delay(1); + digitalWrite(_pinRST, HIGH); + delay(150); + } +} + +int EthernetClass::begin(uint8_t *mac, unsigned long timeout, unsigned long responseTimeout) +{ + static DhcpClass s_dhcp; + _dhcp = &s_dhcp; + +#if ( ETHERNET_DEBUG > 0 ) + Serial.print("_pinCS = "); + Serial.print(_pinCS); +#endif + + // Initialise the basic info + if (W5100.init() == 0) + return 0; + + + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.setMACAddress(mac); + W5100.setIPAddress(IPAddress(0,0,0,0).raw_address()); + SPI.endTransaction(); + + // Now try to get our config info from a DHCP server + int ret = _dhcp->beginWithDHCP(mac, timeout, responseTimeout); + if (ret == 1) { + // We've successfully found a DHCP server and got our configuration + // info, so set things accordingly + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.setIPAddress(_dhcp->getLocalIp().raw_address()); + W5100.setGatewayIp(_dhcp->getGatewayIp().raw_address()); + W5100.setSubnetMask(_dhcp->getSubnetMask().raw_address()); + SPI.endTransaction(); + _dnsServerAddress = _dhcp->getDnsServerIp(); + socketPortRand(micros()); + } + return ret; +} + +void EthernetClass::begin(uint8_t *mac, IPAddress ip) +{ + // Assume the DNS server will be the machine on the same network as the local IP + // but with last octet being '1' + IPAddress dns = ip; + dns[3] = 1; + begin(mac, ip, dns); +} + +void EthernetClass::begin(uint8_t *mac, IPAddress ip, IPAddress dns) +{ + // Assume the gateway will be the machine on the same network as the local IP + // but with last octet being '1' + IPAddress gateway = ip; + gateway[3] = 1; + begin(mac, ip, dns, gateway); +} + +void EthernetClass::begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway) +{ + IPAddress subnet(255, 255, 255, 0); + begin(mac, ip, dns, gateway, subnet); +} + +void EthernetClass::begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) +{ + // Initialise the basic info + if (W5100.init() == 0) + return; + + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.setMACAddress(mac); +#if ( defined(ESP8266) || defined(ESP32) ) + W5100.setIPAddress(&ip[0]); + W5100.setGatewayIp(&gateway[0]); + W5100.setSubnetMask(&subnet[0]); +#elif ARDUINO > 106 || TEENSYDUINO > 121 + W5100.setIPAddress(ip._address.bytes); + W5100.setGatewayIp(gateway._address.bytes); + W5100.setSubnetMask(subnet._address.bytes); +#else + W5100.setIPAddress(ip._address); + W5100.setGatewayIp(gateway._address); + W5100.setSubnetMask(subnet._address); +#endif + SPI.endTransaction(); + _dnsServerAddress = dns; +} + +void EthernetClass::init(uint8_t sspin) +{ + W5100.setSS(sspin); +} + +EthernetLinkStatus EthernetClass::linkStatus() +{ + switch (W5100.getLinkStatus()) { + case UNKNOWN: return Unknown; + case LINK_ON: return LinkON; + case LINK_OFF: return LinkOFF; + default: return Unknown; + } +} + +EthernetHardwareStatus EthernetClass::hardwareStatus() +{ + switch (W5100.getChip()) { + case 51: return EthernetW5100; + case 52: return EthernetW5200; + case 55: return EthernetW5500; + default: return EthernetNoHardware; + } +} + +int EthernetClass::maintain() +{ + int rc = DHCP_CHECK_NONE; + if (_dhcp != NULL) { + // we have a pointer to dhcp, use it + rc = _dhcp->checkLease(); + switch (rc) + { + case DHCP_CHECK_NONE: + //nothing done + break; + case DHCP_CHECK_RENEW_OK: + case DHCP_CHECK_REBIND_OK: + //we might have got a new IP. + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.setIPAddress(_dhcp->getLocalIp().raw_address()); + W5100.setGatewayIp(_dhcp->getGatewayIp().raw_address()); + W5100.setSubnetMask(_dhcp->getSubnetMask().raw_address()); + SPI.endTransaction(); + _dnsServerAddress = _dhcp->getDnsServerIp(); + break; + default: + //this is actually an error, it will retry though + break; + } + } + return rc; +} + + +void EthernetClass::MACAddress(uint8_t *mac_address) +{ + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.getMACAddress(mac_address); + SPI.endTransaction(); +} + +IPAddress EthernetClass::localIP() +{ + IPAddress ret; + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.getIPAddress(ret.raw_address()); + SPI.endTransaction(); + return ret; +} + +IPAddress EthernetClass::subnetMask() +{ + IPAddress ret; + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.getSubnetMask(ret.raw_address()); + SPI.endTransaction(); + return ret; +} + +IPAddress EthernetClass::gatewayIP() +{ + IPAddress ret; + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.getGatewayIp(ret.raw_address()); + SPI.endTransaction(); + return ret; +} + +void EthernetClass::setMACAddress(const uint8_t *mac_address) +{ + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.setMACAddress(mac_address); + SPI.endTransaction(); +} + +void EthernetClass::setLocalIP(const IPAddress local_ip) +{ + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + IPAddress ip = local_ip; + W5100.setIPAddress(ip.raw_address()); + SPI.endTransaction(); +} + +void EthernetClass::setSubnetMask(const IPAddress subnet) +{ + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + IPAddress ip = subnet; + W5100.setSubnetMask(ip.raw_address()); + SPI.endTransaction(); +} + +void EthernetClass::setGatewayIP(const IPAddress gateway) +{ + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + IPAddress ip = gateway; + W5100.setGatewayIp(ip.raw_address()); + SPI.endTransaction(); +} + +void EthernetClass::setRetransmissionTimeout(uint16_t milliseconds) +{ + if (milliseconds > 6553) milliseconds = 6553; + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.setRetransmissionTime(milliseconds * 10); + SPI.endTransaction(); +} + +void EthernetClass::setRetransmissionCount(uint8_t num) +{ + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + W5100.setRetransmissionCount(num); + SPI.endTransaction(); +} + + +EthernetClass Ethernet; diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/EthernetLarge.h b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/EthernetLarge.h new file mode 100644 index 0000000..4a18a2d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/EthernetLarge.h @@ -0,0 +1,362 @@ +/**************************************************************************************************************************** + EthernetLarge.h + + EthernetWebServer is a library for the Ethernet shields to run WebServer + + Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases + Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer + Licensed under MIT license + Version: 1.0.9 + + Copyright 2018 Paul Stoffregen + + Permission is hereby granted, free of charge, to any person obtaining a copy of this + software and associated documentation files (the "Software"), to deal in the Software + without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/02/2020 Initial coding for Arduino Mega, Teensy, etc to support Ethernetx libraries + 1.0.1 K Hoang 20/02/2020 Add support to lambda functions + 1.0.2 K Hoang 20/02/2020 Add support to UIPEthernet library for ENC28J60 + 1.0.3 K Hoang 23/02/2020 Add support to SAM DUE / SAMD21 boards + 1.0.4 K Hoang 16/04/2020 Add support to SAMD51 boards + 1.0.5 K Hoang 24/04/2020 Add support to nRF52 boards, such as AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, + Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B30_ublox, etc. + More Custom Ethernet libraries supported such as Ethernet2, Ethernet3, EthernetLarge + 1.0.6 K Hoang 27/04/2020 Add support to ESP32/ESP8266 boards + 1.0.7 K Hoang 30/04/2020 Add ENC28J60 support to ESP32/ESP8266 boards + 1.0.8 K Hoang 12/05/2020 Fix W5x00 support for ESP8266 boards. + 1.0.9 K Hoang 15/05/2020 Add EthernetWrapper.h for easier W5x00 support as well as more Ethernet libs in the future. + *****************************************************************************************************************************/ + +#ifndef ethernet_h_ +#define ethernet_h_ + +// All symbols exposed to Arduino sketches are contained in this header file +// +// Older versions had much of this stuff in EthernetClient.h, EthernetServer.h, +// and socket.h. Including headers in different order could cause trouble, so +// these "friend" classes are now defined in the same header file. socket.h +// was removed to avoid possible conflict with the C library header files. + + +// Configure the maximum number of sockets to support. W5100 chips can have +// up to 4 sockets. W5200 & W5500 can have up to 8 sockets. Several bytes +// of RAM are used for each socket. Reducing the maximum can save RAM, but +// you are limited to fewer simultaneous connections. +#define MAX_SOCK_NUM 2 + +// By default, each socket uses 2K buffers inside the Wiznet chip. If +// MAX_SOCK_NUM is set to fewer than the chip's maximum, uncommenting +// this will use larger buffers within the Wiznet chip. Large buffers +// can really help with UDP protocols like Artnet. In theory larger +// buffers should allow faster TCP over high-latency links, but this +// does not always seem to work in practice (maybe Wiznet bugs?) +#define ETHERNET_LARGE_BUFFERS + + +#include +#include "Client.h" +#include "Server.h" +#include "Udp.h" + +enum EthernetLinkStatus { + Unknown, + LinkON, + LinkOFF +}; + +enum EthernetHardwareStatus { + EthernetNoHardware, + EthernetW5100, + EthernetW5200, + EthernetW5500 +}; + +class EthernetUDP; +class EthernetClient; +class EthernetServer; +class DhcpClass; + +class EthernetClass { +private: + static IPAddress _dnsServerAddress; + static DhcpClass* _dhcp; +public: + // KH + uint8_t _maxSockNum; + uint8_t _pinCS; + uint8_t _pinRST; + + void setRstPin(uint8_t pinRST = 9); // for WIZ550io or USR-ES1, must set befor Ethernet.begin + void setCsPin(uint8_t pinCS = 10); // must set befor Ethernet.begin + + // Initialize with less sockets but more RX/TX Buffer + // maxSockNum = 1 Socket 0 -> RX/TX Buffer 16k + // maxSockNum = 2 Socket 0, 1 -> RX/TX Buffer 8k + // maxSockNum = 4 Socket 0...3 -> RX/TX Buffer 4k + // maxSockNum = 8 (Standard) all sockets -> RX/TX Buffer 2k + // be carefull of the MAX_SOCK_NUM, because in the moment it can't dynamicly changed + void initMaxSockNum(uint8_t maxSockNum = 8); + + uint8_t softreset(); // can set only after Ethernet.begin + void hardreset(); // You need to set the Rst pin + + // Initialise the Ethernet shield to use the provided MAC address and + // gain the rest of the configuration through DHCP. + // Returns 0 if the DHCP configuration failed, and 1 if it succeeded + int begin(uint8_t *mac, unsigned long timeout = 60000, unsigned long responseTimeout = 4000); + int maintain(); + EthernetLinkStatus linkStatus(); + EthernetHardwareStatus hardwareStatus(); + + // Manual configuration + void begin(uint8_t *mac, IPAddress ip); + void begin(uint8_t *mac, IPAddress ip, IPAddress dns); + void begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway); + void begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet); + void init(uint8_t sspin = 10); + + void MACAddress(uint8_t *mac_address); + IPAddress localIP(); + IPAddress subnetMask(); + IPAddress gatewayIP(); + IPAddress dnsServerIP() { return _dnsServerAddress; } + + void setMACAddress(const uint8_t *mac_address); + void setLocalIP(const IPAddress local_ip); + void setSubnetMask(const IPAddress subnet); + void setGatewayIP(const IPAddress gateway); + void setDnsServerIP(const IPAddress dns_server) { _dnsServerAddress = dns_server; } + void setRetransmissionTimeout(uint16_t milliseconds); + void setRetransmissionCount(uint8_t num); + + friend class EthernetClient; + friend class EthernetServer; + friend class EthernetUDP; +private: + // Opens a socket(TCP or UDP or IP_RAW mode) + uint8_t socketBegin(uint8_t protocol, uint16_t port); + uint8_t socketBeginMulticast(uint8_t protocol, IPAddress ip,uint16_t port); + uint8_t socketStatus(uint8_t s); + // Close socket + void socketClose(uint8_t s); + // Establish TCP connection (Active connection) + void socketConnect(uint8_t s, uint8_t * addr, uint16_t port); + // disconnect the connection + void socketDisconnect(uint8_t s); + // Establish TCP connection (Passive connection) + uint8_t socketListen(uint8_t s); + // Send data (TCP) + uint16_t socketSend(uint8_t s, const uint8_t * buf, uint16_t len); + uint16_t socketSendAvailable(uint8_t s); + // Receive data (TCP) + int socketRecv(uint8_t s, uint8_t * buf, int16_t len); + uint16_t socketRecvAvailable(uint8_t s); + uint8_t socketPeek(uint8_t s); + // sets up a UDP datagram, the data for which will be provided by one + // or more calls to bufferData and then finally sent with sendUDP. + // return true if the datagram was successfully set up, or false if there was an error + bool socketStartUDP(uint8_t s, uint8_t* addr, uint16_t port); + // copy up to len bytes of data from buf into a UDP datagram to be + // sent later by sendUDP. Allows datagrams to be built up from a series of bufferData calls. + // return Number of bytes successfully buffered + uint16_t socketBufferData(uint8_t s, uint16_t offset, const uint8_t* buf, uint16_t len); + // Send a UDP datagram built up from a sequence of startUDP followed by one or more + // calls to bufferData. + // return true if the datagram was successfully sent, or false if there was an error + bool socketSendUDP(uint8_t s); + // Initialize the "random" source port number + void socketPortRand(uint16_t n); +}; + +extern EthernetClass Ethernet; + + +#define UDP_TX_PACKET_MAX_SIZE 24 + +class EthernetUDP : public UDP { +private: + uint16_t _port; // local port to listen on + IPAddress _remoteIP; // remote IP address for the incoming packet whilst it's being processed + uint16_t _remotePort; // remote port for the incoming packet whilst it's being processed + uint16_t _offset; // offset into the packet being sent + +protected: + uint8_t sockindex; + uint16_t _remaining; // remaining bytes of incoming packet yet to be processed + +public: + EthernetUDP() : sockindex(MAX_SOCK_NUM) {} // Constructor + virtual uint8_t begin(uint16_t); // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + virtual uint8_t beginMulticast(IPAddress, uint16_t); // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + virtual void stop(); // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port); + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char *host, uint16_t port); + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket(); + // Write a single byte into the packet + virtual size_t write(uint8_t); + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t *buffer, size_t size); + + using Print::write; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket(); + // Number of bytes remaining in the current packet + virtual int available(); + // Read a single byte from the current packet + virtual int read(); + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len); + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) { return read((unsigned char*)buffer, len); }; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek(); + virtual void flush(); // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP() { return _remoteIP; }; + // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort() { return _remotePort; }; + virtual uint16_t localPort() { return _port; } +}; + + + + +class EthernetClient : public Client { +public: + EthernetClient() : sockindex(MAX_SOCK_NUM), _timeout(1000) { } + EthernetClient(uint8_t s) : sockindex(s), _timeout(1000) { } + + uint8_t status(); + virtual int connect(IPAddress ip, uint16_t port); + virtual int connect(const char *host, uint16_t port); + virtual int availableForWrite(void); + virtual size_t write(uint8_t); + virtual size_t write(const uint8_t *buf, size_t size); + virtual int available(); + virtual int read(); + virtual int read(uint8_t *buf, size_t size); + virtual int peek(); + virtual void flush(); + virtual void stop(); + virtual uint8_t connected(); + virtual operator bool() { return sockindex < MAX_SOCK_NUM; } + virtual bool operator==(const bool value) { return bool() == value; } + virtual bool operator!=(const bool value) { return bool() != value; } + virtual bool operator==(const EthernetClient&); + virtual bool operator!=(const EthernetClient& rhs) { return !this->operator==(rhs); } + uint8_t getSocketNumber() const { return sockindex; } + virtual uint16_t localPort(); + virtual IPAddress remoteIP(); + virtual uint16_t remotePort(); + virtual void setConnectionTimeout(uint16_t timeout) { _timeout = timeout; } + + friend class EthernetServer; + + using Print::write; + +private: + uint8_t sockindex; // MAX_SOCK_NUM means client not in use + uint16_t _timeout; +}; + + +class EthernetServer : public Server { +private: + uint16_t _port; +public: + EthernetServer(uint16_t port) : _port(port) { } + EthernetClient available(); + EthernetClient accept(); + virtual void begin(); + virtual size_t write(uint8_t); + virtual size_t write(const uint8_t *buf, size_t size); + virtual operator bool(); + using Print::write; + //void statusreport(); + + // TODO: make private when socket allocation moves to EthernetClass + static uint16_t server_port[MAX_SOCK_NUM]; +}; + + +class DhcpClass { +private: + uint32_t _dhcpInitialTransactionId; + uint32_t _dhcpTransactionId; + uint8_t _dhcpMacAddr[6]; +#ifdef __arm__ + uint8_t _dhcpLocalIp[4] __attribute__((aligned(4))); + uint8_t _dhcpSubnetMask[4] __attribute__((aligned(4))); + uint8_t _dhcpGatewayIp[4] __attribute__((aligned(4))); + uint8_t _dhcpDhcpServerIp[4] __attribute__((aligned(4))); + uint8_t _dhcpDnsServerIp[4] __attribute__((aligned(4))); +#else + uint8_t _dhcpLocalIp[4]; + uint8_t _dhcpSubnetMask[4]; + uint8_t _dhcpGatewayIp[4]; + uint8_t _dhcpDhcpServerIp[4]; + uint8_t _dhcpDnsServerIp[4]; +#endif + uint32_t _dhcpLeaseTime; + uint32_t _dhcpT1, _dhcpT2; + uint32_t _renewInSec; + uint32_t _rebindInSec; + unsigned long _timeout; + unsigned long _responseTimeout; + unsigned long _lastCheckLeaseMillis; + uint8_t _dhcp_state; + EthernetUDP _dhcpUdpSocket; + + int request_DHCP_lease(); + void reset_DHCP_lease(); + void presend_DHCP(); + void send_DHCP_MESSAGE(uint8_t, uint16_t); + void printByte(char *, uint8_t); + + uint8_t parseDHCPResponse(unsigned long responseTimeout, uint32_t& transactionId); +public: + IPAddress getLocalIp(); + IPAddress getSubnetMask(); + IPAddress getGatewayIp(); + IPAddress getDhcpServerIp(); + IPAddress getDnsServerIp(); + + int beginWithDHCP(uint8_t *, unsigned long timeout = 60000, unsigned long responseTimeout = 4000); + int checkLease(); +}; + + + + + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/EthernetServer.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/EthernetServer.cpp new file mode 100644 index 0000000..a77b569 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/EthernetServer.cpp @@ -0,0 +1,240 @@ +/**************************************************************************************************************************** + EthernetServer.cpp + + EthernetWebServer is a library for the Ethernet shields to run WebServer + + Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases + Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer + Licensed under MIT license + Version: 1.0.9 + + Copyright 2018 Paul Stoffregen + + Permission is hereby granted, free of charge, to any person obtaining a copy of this + software and associated documentation files (the "Software"), to deal in the Software + without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/02/2020 Initial coding for Arduino Mega, Teensy, etc to support Ethernetx libraries + 1.0.1 K Hoang 20/02/2020 Add support to lambda functions + 1.0.2 K Hoang 20/02/2020 Add support to UIPEthernet library for ENC28J60 + 1.0.3 K Hoang 23/02/2020 Add support to SAM DUE / SAMD21 boards + 1.0.4 K Hoang 16/04/2020 Add support to SAMD51 boards + 1.0.5 K Hoang 24/04/2020 Add support to nRF52 boards, such as AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, + Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B30_ublox, etc. + More Custom Ethernet libraries supported such as Ethernet2, Ethernet3, EthernetLarge + 1.0.6 K Hoang 27/04/2020 Add support to ESP32/ESP8266 boards + 1.0.7 K Hoang 30/04/2020 Add ENC28J60 support to ESP32/ESP8266 boards + 1.0.8 K Hoang 12/05/2020 Fix W5x00 support for ESP8266 boards. + 1.0.9 K Hoang 15/05/2020 Add EthernetWrapper.h for easier W5x00 support as well as more Ethernet libs in the future. + *****************************************************************************************************************************/ + +#include +#include "EthernetLarge.h" +#include "utility/w5100.h" + +uint16_t EthernetServer::server_port[MAX_SOCK_NUM]; + + +void EthernetServer::begin() +{ + uint8_t sockindex = Ethernet.socketBegin(SnMR::TCP, _port); + if (sockindex < MAX_SOCK_NUM) { + if (Ethernet.socketListen(sockindex)) { + server_port[sockindex] = _port; + } else { + Ethernet.socketDisconnect(sockindex); + } + } +} + +EthernetClient EthernetServer::available() +{ + bool listening = false; + uint8_t sockindex = MAX_SOCK_NUM; + uint8_t chip, maxindex=MAX_SOCK_NUM; + + chip = W5100.getChip(); + if (!chip) return EthernetClient(MAX_SOCK_NUM); +#if MAX_SOCK_NUM > 4 + if (chip == 51) maxindex = 4; // W5100 chip never supports more than 4 sockets +#endif + + for (uint8_t i=0; i < maxindex; i++) + { + if (server_port[i] == _port) + { + uint8_t stat = Ethernet.socketStatus(i); + if (stat == SnSR::ESTABLISHED || stat == SnSR::CLOSE_WAIT) + { + if (Ethernet.socketRecvAvailable(i) > 0) + { + sockindex = i; + } + else + { + // remote host closed connection, our end still open + if (stat == SnSR::CLOSE_WAIT) + { + Ethernet.socketDisconnect(i); + // status becomes LAST_ACK for short time + } + } + } + else if (stat == SnSR::LISTEN) + { + listening = true; + } + else if (stat == SnSR::CLOSED) + { + server_port[i] = 0; + } + } + } + + if (!listening) + { + begin(); + } + + return EthernetClient(sockindex); +} + +EthernetClient EthernetServer::accept() +{ + bool listening = false; + uint8_t sockindex = MAX_SOCK_NUM; + uint8_t chip, maxindex=MAX_SOCK_NUM; + + chip = W5100.getChip(); + if (!chip) return EthernetClient(MAX_SOCK_NUM); +#if MAX_SOCK_NUM > 4 + if (chip == 51) maxindex = 4; // W5100 chip never supports more than 4 sockets +#endif + + for (uint8_t i=0; i < maxindex; i++) + { + if (server_port[i] == _port) + { + uint8_t stat = Ethernet.socketStatus(i); + + if (sockindex == MAX_SOCK_NUM && (stat == SnSR::ESTABLISHED || stat == SnSR::CLOSE_WAIT)) + { + // Return the connected client even if no data received. + // Some protocols like FTP expect the server to send the + // first data. + sockindex = i; + server_port[i] = 0; // only return the client once + } + else if (stat == SnSR::LISTEN) + { + listening = true; + } + else if (stat == SnSR::CLOSED) + { + server_port[i] = 0; + } + } + } + + if (!listening) + begin(); + + return EthernetClient(sockindex); +} + +EthernetServer::operator bool() +{ + uint8_t maxindex=MAX_SOCK_NUM; +#if MAX_SOCK_NUM > 4 + if (W5100.getChip() == 51) maxindex = 4; // W5100 chip never supports more than 4 sockets +#endif + + for (uint8_t i=0; i < maxindex; i++) + { + if (server_port[i] == _port) + { + if (Ethernet.socketStatus(i) == SnSR::LISTEN) + { + return true; // server is listening for incoming clients + } + } + } + return false; +} + +#if 0 +void EthernetServer::statusreport() +{ + Serial.printf("EthernetServer, port=%d\n", _port); + for (uint8_t i=0; i < MAX_SOCK_NUM; i++) { + uint16_t port = server_port[i]; + uint8_t stat = Ethernet.socketStatus(i); + const char *name; + switch (stat) { + case 0x00: name = "CLOSED"; break; + case 0x13: name = "INIT"; break; + case 0x14: name = "LISTEN"; break; + case 0x15: name = "SYNSENT"; break; + case 0x16: name = "SYNRECV"; break; + case 0x17: name = "ESTABLISHED"; break; + case 0x18: name = "FIN_WAIT"; break; + case 0x1A: name = "CLOSING"; break; + case 0x1B: name = "TIME_WAIT"; break; + case 0x1C: name = "CLOSE_WAIT"; break; + case 0x1D: name = "LAST_ACK"; break; + case 0x22: name = "UDP"; break; + case 0x32: name = "IPRAW"; break; + case 0x42: name = "MACRAW"; break; + case 0x5F: name = "PPPOE"; break; + default: name = "???"; + } + int avail = Ethernet.socketRecvAvailable(i); + Serial.printf(" %d: port=%d, status=%s (0x%02X), avail=%d\n", + i, port, name, stat, avail); + } +} +#endif + +size_t EthernetServer::write(uint8_t b) +{ + return write(&b, 1); +} + +size_t EthernetServer::write(const uint8_t *buffer, size_t size) +{ + uint8_t chip, maxindex=MAX_SOCK_NUM; + + chip = W5100.getChip(); + if (!chip) return 0; +#if MAX_SOCK_NUM > 4 + if (chip == 51) maxindex = 4; // W5100 chip never supports more than 4 sockets +#endif + available(); + + for (uint8_t i=0; i < maxindex; i++) + { + if (server_port[i] == _port) + { + if (Ethernet.socketStatus(i) == SnSR::ESTABLISHED) + { + Ethernet.socketSend(i, buffer, size); + } + } + } + return size; +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/utility/w5100.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/utility/w5100.cpp new file mode 100644 index 0000000..2e2e5a6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/utility/w5100.cpp @@ -0,0 +1,703 @@ +/**************************************************************************************************************************** + w5100.cpp - Driver for W5x00 + + EthernetWebServer is a library for the Ethernet shields to run WebServer + + Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases + Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer + Licensed under MIT license + Version: 1.0.9 + + Copyright 2018 Paul Stoffregen + Copyright (c) 2010 by Cristian Maglie + + This file is free software; you can redistribute it and/or modify + it under the terms of either the GNU General Public License version 2 + or the GNU Lesser General Public License version 2.1, both as + published by the Free Software Foundation. + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/02/2020 Initial coding for Arduino Mega, Teensy, etc to support Ethernetx libraries + 1.0.1 K Hoang 20/02/2020 Add support to lambda functions + 1.0.2 K Hoang 20/02/2020 Add support to UIPEthernet library for ENC28J60 + 1.0.3 K Hoang 23/02/2020 Add support to SAM DUE / SAMD21 boards + 1.0.4 K Hoang 16/04/2020 Add support to SAMD51 boards + 1.0.5 K Hoang 24/04/2020 Add support to nRF52 boards, such as AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, + Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B30_ublox, etc. + More Custom Ethernet libraries supported such as Ethernet2, Ethernet3, EthernetLarge + 1.0.6 K Hoang 27/04/2020 Add support to ESP32/ESP8266 boards + 1.0.7 K Hoang 30/04/2020 Add ENC28J60 support to ESP32/ESP8266 boards + 1.0.8 K Hoang 12/05/2020 Fix W5x00 support for ESP8266 boards. + 1.0.9 K Hoang 15/05/2020 Add EthernetWrapper.h for easier W5x00 support as well as more Ethernet libs in the future. + *****************************************************************************************************************************/ + +#include +#include "EthernetLarge.h" +#include "w5100.h" + +#define W5100_DEBUG 1 + +/***************************************************/ +/** Default SS pin setting **/ +/***************************************************/ + +// If variant.h or other headers specifically define the +// default SS pin for ethernet, use it. +#if defined(PIN_SPI_SS_ETHERNET_LIB) + +#define SS_PIN_DEFAULT PIN_SPI_SS_ETHERNET_LIB +//KH +#warning w5100.cpp Use PIN_SPI_SS_ETHERNET_LIB defined, change SS_PIN_DEFAULT to PIN_SPI_SS_ETHERNET_LIB + +// MKR boards default to pin 5 for MKR ETH +// Pins 8-10 are MOSI/SCK/MISO on MRK, so don't use pin 10 +#elif defined(USE_ARDUINO_MKR_PIN_LAYOUT) || defined(ARDUINO_SAMD_MKRZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRWAN1300) + +#define SS_PIN_DEFAULT 5 +//KH +#warning w5100.cpp Use MKR, change SS_PIN_DEFAULT to 5 + +// For boards using AVR, assume shields with SS on pin 10 +// will be used. This allows for Arduino Mega (where +// SS is pin 53) and Arduino Leonardo (where SS is pin 17) +// to work by default with Arduino Ethernet Shield R2 & R3. +#elif defined(__AVR__) + +#define SS_PIN_DEFAULT 10 +//KH +#warning w5100.cpp Use __AVR__, change SS_PIN_DEFAULT to 10 + +// If variant.h or other headers define these names +// use them if none of the other cases match +#elif defined(PIN_SPI_SS) + +#if defined(__SAMD21G18A__) +//10 - 2 (6 conflict) all not OK for Nano 33 IoT !!! SPI corrupted??? +#warning w5100.cpp Use __SAMD21G18A__, change SS_PIN_DEFAULT to 10 +#define SS_PIN_DEFAULT 10 +#else +#define SS_PIN_DEFAULT PIN_SPI_SS + +//KH +#warning w5100.cpp Use PIN_SPI_SS defined, change SS_PIN_DEFAULT to PIN_SPI_SS +#endif + +#elif defined(CORE_SS0_PIN) +#define SS_PIN_DEFAULT CORE_SS0_PIN + +//KH +#warning w5100.cpp Use CORE_SS0_PIN defined, change SS_PIN_DEFAULT to CORE_SS0_PIN + +//KH for ESP32 +#elif defined(ESP32) +//pin SS already defined in ESP32 as pin 5, don't use this as conflict with SPIFFS, EEPROM, etc. +// Use in GPIO22 +#warning w5100.cpp Use ESP32, change SS_PIN_DEFAULT to GPIO22, MOSI(23), MISO(19), SCK(18) +#define SS_PIN_DEFAULT 22 //SS +/////// + +//KH for ESP8266 +#elif defined(ESP8266) +//pin SS already defined in ESP8266 as pin 15. Conflict => Move to pin GPIO4 (D2) +#warning w5100.cpp Use ESP8266, change SS_PIN_DEFAULT to SS(4), MOSI(13), MISO(12), SCK(14) +#define SS_PIN_DEFAULT D2 // GPIO4, SS + +/////// + +// As a final fallback, use pin 10 +#else +#define SS_PIN_DEFAULT 10 + +//KH +#warning w5100.cpp Use fallback, change SS_PIN_DEFAULT to 10 + +#endif + +// W5100 controller instance +uint8_t W5100Class::chip = 0; +uint8_t W5100Class::CH_BASE_MSB; +uint8_t W5100Class::ss_pin = SS_PIN_DEFAULT; +#ifdef ETHERNET_LARGE_BUFFERS +uint16_t W5100Class::SSIZE = 2048; +uint16_t W5100Class::SMASK = 0x07FF; +#endif +W5100Class W5100; + +// pointers and bitmasks for optimized SS pin +#if defined(__AVR__) + volatile uint8_t * W5100Class::ss_pin_reg; + uint8_t W5100Class::ss_pin_mask; +#elif defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK66FX1M0__) || defined(__MK64FX512__) + volatile uint8_t * W5100Class::ss_pin_reg; +#elif defined(__IMXRT1062__) + volatile uint32_t * W5100Class::ss_pin_reg; + uint32_t W5100Class::ss_pin_mask; +#elif defined(__MKL26Z64__) + volatile uint8_t * W5100Class::ss_pin_reg; + uint8_t W5100Class::ss_pin_mask; +#elif defined(__SAM3X8E__) || defined(__SAM3A8C__) || defined(__SAM3A4C__) + volatile uint32_t * W5100Class::ss_pin_reg; + uint32_t W5100Class::ss_pin_mask; +#elif defined(__PIC32MX__) + volatile uint32_t * W5100Class::ss_pin_reg; + uint32_t W5100Class::ss_pin_mask; +#elif defined(ARDUINO_ARCH_ESP8266) + volatile uint32_t * W5100Class::ss_pin_reg; + uint32_t W5100Class::ss_pin_mask; +#elif defined(__SAMD21G18A__) + volatile uint32_t * W5100Class::ss_pin_reg; + uint32_t W5100Class::ss_pin_mask; + #warning w5100.cpp Use __SAMD21G18A__ +#endif + +// KH +uint8_t W5100Class::init(uint8_t socketNumbers, uint8_t new_ss_pin) +{ + // KH + uint8_t i; + + if (initialized) return 1; + + // Many Ethernet shields have a CAT811 or similar reset chip + // connected to W5100 or W5200 chips. The W5200 will not work at + // all, and may even drive its MISO pin, until given an active low + // reset pulse! The CAT811 has a 240 ms typical pulse length, and + // a 400 ms worst case maximum pulse length. MAX811 has a worst + // case maximum 560 ms pulse length. This delay is meant to wait + // until the reset pulse is ended. If your hardware has a shorter + // reset time, this can be edited or removed. + delay(560); + + //W5100Class::ss_pin = new_ss_pin; + +#if ( W5100_DEBUG > 0 ) + //KH + Serial.print("\nW5100 init, using SS_PIN_DEFAULT = "); + Serial.print(SS_PIN_DEFAULT); + Serial.print(", new ss_pin = "); + Serial.print(new_ss_pin); + Serial.print(", W5100Class::ss_pin = "); + Serial.println(W5100Class::ss_pin); +#endif + + SPI.begin(); + + initSS(); + resetSS(); + + // From #define SPI_ETHERNET_SETTINGS SPISettings(14000000, MSBFIRST, SPI_MODE0) + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + + // Attempt W5200 detection first, because W5200 does not properly + // reset its SPI state when CS goes high (inactive). Communication + // from detecting the other chips can leave the W5200 in a state + // where it won't recover, unless given a reset pulse. + if (isW5200()) + { + CH_BASE_MSB = 0x40; +#ifdef ETHERNET_LARGE_BUFFERS +#if MAX_SOCK_NUM <= 1 + SSIZE = 16384; +#elif MAX_SOCK_NUM <= 2 + SSIZE = 8192; +#elif MAX_SOCK_NUM <= 4 + SSIZE = 4096; +#else + SSIZE = 2048; +#endif + SMASK = SSIZE - 1; +#endif + for (i=0; i> 10); + writeSnTX_SIZE(i, SSIZE >> 10); + } + for (; i<8; i++) + { + writeSnRX_SIZE(i, 0); + writeSnTX_SIZE(i, 0); + } + +#if ( W5100_DEBUG > 0 ) + Serial.print("W5100::init: W5200, SSIZE ="); + Serial.println(SSIZE); +#endif + + // Try W5500 next. Wiznet finally seems to have implemented + // SPI well with this chip. It appears to be very resilient, + // so try it after the fragile W5200 + } + else if (isW5500()) + { + CH_BASE_MSB = 0x10; +#ifdef ETHERNET_LARGE_BUFFERS +#if MAX_SOCK_NUM <= 1 + SSIZE = 16384; +#elif MAX_SOCK_NUM <= 2 + SSIZE = 8192; +#elif MAX_SOCK_NUM <= 4 + SSIZE = 4096; +#else + SSIZE = 2048; +#endif + SMASK = SSIZE - 1; + for (i=0; i> 10); + writeSnTX_SIZE(i, SSIZE >> 10); + } + for (; i<8; i++) + { + writeSnRX_SIZE(i, 0); + writeSnTX_SIZE(i, 0); + } +#endif + +#if ( W5100_DEBUG > 0 ) + Serial.print("W5100::init: W5500, SSIZE ="); + Serial.println(SSIZE); +#endif + + + // Try W5100 last. This simple chip uses fixed 4 byte frames + // for every 8 bit access. Terribly inefficient, but so simple + // it recovers from "hearing" unsuccessful W5100 or W5200 + // communication. W5100 is also the only chip without a VERSIONR + // register for identification, so we check this last. + } else if (isW5100()) + { + CH_BASE_MSB = 0x04; +#ifdef ETHERNET_LARGE_BUFFERS +#if MAX_SOCK_NUM <= 1 + SSIZE = 8192; + writeTMSR(0x03); + writeRMSR(0x03); +#elif MAX_SOCK_NUM <= 2 + SSIZE = 4096; + writeTMSR(0x0A); + writeRMSR(0x0A); +#else + SSIZE = 2048; + writeTMSR(0x55); + writeRMSR(0x55); +#endif + SMASK = SSIZE - 1; +#else + writeTMSR(0x55); + writeRMSR(0x55); +#endif + +#if ( W5100_DEBUG > 0 ) + Serial.print("W5100::init: W5100, SSIZE ="); + Serial.println(SSIZE); +#endif + + // No hardware seems to be present. Or it could be a W5200 + // that's heard other SPI communication if its chip select + // pin wasn't high when a SD card or other SPI chip was used. + } + else + { +#if ( W5100_DEBUG > 0 ) + Serial.println("no chip :-("); +#endif + + chip = 0; + SPI.endTransaction(); + return 0; // no known chip is responding :-( + } + SPI.endTransaction(); + initialized = true; + return 1; // successful init +} + +// Soft reset the Wiznet chip, by writing to its MR register reset bit +uint8_t W5100Class::softReset(void) +{ + uint16_t count=0; + +#if ( W5100_DEBUG > 1 ) + Serial.println("EthernetLarge:Wiznet soft reset"); +#endif + + // write to reset bit + writeMR(0x80); + // then wait for soft reset to complete + do + { + uint8_t mr = readMR(); + +#if ( W5100_DEBUG > 2 ) + Serial.print("mr="); + Serial.println(mr, HEX); +#endif + + if (mr == 0) + return 1; + + delay(1); + } while (++count < 20); + return 0; +} + + +uint8_t W5100Class::isW5100(void) +{ + chip = 51; + +#if ( W5100_DEBUG > 1 ) + Serial.println("W5100.cpp: detect W5100 chip"); +#endif + + if (!softReset()) + return 0; + + writeMR(0x10); + if (readMR() != 0x10) + return 0; + + writeMR(0x12); + if (readMR() != 0x12) + return 0; + + writeMR(0x00); + if (readMR() != 0x00) + return 0; + +#if ( W5100_DEBUG > 1 ) + Serial.println("chip is W5100"); +#endif + + return 1; +} + +uint8_t W5100Class::isW5200(void) +{ + chip = 52; + +#if ( W5100_DEBUG > 1 ) + Serial.println("W5100.cpp: detect W5200 chip"); +#endif + + if (!softReset()) + return 0; + + writeMR(0x08); + if (readMR() != 0x08) + return 0; + + writeMR(0x10); + if (readMR() != 0x10) + return 0; + + writeMR(0x00); + if (readMR() != 0x00) + return 0; + + int ver = readVERSIONR_W5200(); + +#if ( W5100_DEBUG > 1 ) + Serial.print("version="); + Serial.println(ver); +#endif + + if (ver != 3) + return 0; + +#if ( W5100_DEBUG > 1 ) + Serial.println("chip is W5200"); +#endif + + return 1; +} + +uint8_t W5100Class::isW5500(void) +{ + chip = 55; + +#if ( W5100_DEBUG > 1 ) + Serial.println("W5100.cpp: detect W5500 chip"); +#endif + + if (!softReset()) + return 0; + + writeMR(0x08); + if (readMR() != 0x08) + return 0; + + writeMR(0x10); + if (readMR() != 0x10) + return 0; + + writeMR(0x00); + if (readMR() != 0x00) + return 0; + + int ver = readVERSIONR_W5500(); + +#if ( W5100_DEBUG > 1 ) + Serial.print("version="); + Serial.println(ver); +#endif + + if (ver != 4) + return 0; + +#if ( W5100_DEBUG > 1 ) + Serial.println("chip is W5500"); +#endif + + return 1; +} + +W5100Linkstatus W5100Class::getLinkStatus() +{ + uint8_t phystatus; + + // KH + if (!initialized) return UNKNOWN; + + switch (chip) + { + case 52: + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + phystatus = readPSTATUS_W5200(); + SPI.endTransaction(); + if (phystatus & 0x20) + return LINK_ON; + + return LINK_OFF; + + case 55: + SPI.beginTransaction(SPI_ETHERNET_SETTINGS); + phystatus = readPHYCFGR_W5500(); + SPI.endTransaction(); + if (phystatus & 0x01) + return LINK_ON; + + return LINK_OFF; + + default: + return UNKNOWN; + } +} + +uint16_t W5100Class::write(uint16_t addr, const uint8_t *buf, uint16_t len) +{ + uint8_t cmd[8]; + + if (chip == 51) + { + for (uint16_t i=0; i> 8); + SPI.transfer(addr & 0xFF); + addr++; + SPI.transfer(buf[i]); + resetSS(); + } + } + else if (chip == 52) + { + setSS(); + cmd[0] = addr >> 8; + cmd[1] = addr & 0xFF; + cmd[2] = ((len >> 8) & 0x7F) | 0x80; + cmd[3] = len & 0xFF; + SPI.transfer(cmd, 4); + +#ifdef SPI_HAS_TRANSFER_BUF + SPI.transfer(buf, NULL, len); +#else + // TODO: copy 8 bytes at a time to cmd[] and block transfer + for (uint16_t i=0; i < len; i++) + { + SPI.transfer(buf[i]); + } +#endif + resetSS(); + } + else + { + // chip == 55 + setSS(); + if (addr < 0x100) + { + // common registers 00nn + cmd[0] = 0; + cmd[1] = addr & 0xFF; + cmd[2] = 0x04; + } + else if (addr < 0x8000) + { + // socket registers 10nn, 11nn, 12nn, 13nn, etc + cmd[0] = 0; + cmd[1] = addr & 0xFF; + cmd[2] = ((addr >> 3) & 0xE0) | 0x0C; + } + else if (addr < 0xC000) + { + // transmit buffers 8000-87FF, 8800-8FFF, 9000-97FF, etc + // 10## #nnn nnnn nnnn + cmd[0] = addr >> 8; + cmd[1] = addr & 0xFF; + #if defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 1 + cmd[2] = 0x14; // 16K buffers + #elif defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 2 + cmd[2] = ((addr >> 8) & 0x20) | 0x14; // 8K buffers + #elif defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 4 + cmd[2] = ((addr >> 7) & 0x60) | 0x14; // 4K buffers + #else + cmd[2] = ((addr >> 6) & 0xE0) | 0x14; // 2K buffers + #endif + } + else + { + // receive buffers + cmd[0] = addr >> 8; + cmd[1] = addr & 0xFF; + #if defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 1 + cmd[2] = 0x1C; // 16K buffers + #elif defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 2 + cmd[2] = ((addr >> 8) & 0x20) | 0x1C; // 8K buffers + #elif defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 4 + cmd[2] = ((addr >> 7) & 0x60) | 0x1C; // 4K buffers + #else + cmd[2] = ((addr >> 6) & 0xE0) | 0x1C; // 2K buffers + #endif + } + + if (len <= 5) + { + for (uint8_t i=0; i < len; i++) + { + cmd[i + 3] = buf[i]; + } + + SPI.transfer(cmd, len + 3); + } + else + { + SPI.transfer(cmd, 3); +#ifdef SPI_HAS_TRANSFER_BUF + SPI.transfer(buf, NULL, len); +#else + // TODO: copy 8 bytes at a time to cmd[] and block transfer + for (uint16_t i=0; i < len; i++) + { + SPI.transfer(buf[i]); + } +#endif + } + resetSS(); + } + return len; +} + +uint16_t W5100Class::read(uint16_t addr, uint8_t *buf, uint16_t len) +{ + uint8_t cmd[4]; + + if (chip == 51) + { + for (uint16_t i=0; i < len; i++) + { + setSS(); + #if 1 + SPI.transfer(0x0F); + SPI.transfer(addr >> 8); + SPI.transfer(addr & 0xFF); + addr++; + buf[i] = SPI.transfer(0); + #else + cmd[0] = 0x0F; + cmd[1] = addr >> 8; + cmd[2] = addr & 0xFF; + cmd[3] = 0; + SPI.transfer(cmd, 4); // TODO: why doesn't this work? + buf[i] = cmd[3]; + addr++; + #endif + resetSS(); + } + } + else if (chip == 52) + { + setSS(); + cmd[0] = addr >> 8; + cmd[1] = addr & 0xFF; + cmd[2] = (len >> 8) & 0x7F; + cmd[3] = len & 0xFF; + SPI.transfer(cmd, 4); + memset(buf, 0, len); + SPI.transfer(buf, len); + resetSS(); + } + else + { + // chip == 55 + setSS(); + + if (addr < 0x100) + { + // common registers 00nn + cmd[0] = 0; + cmd[1] = addr & 0xFF; + cmd[2] = 0x00; + } + else if (addr < 0x8000) + { + // socket registers 10nn, 11nn, 12nn, 13nn, etc + cmd[0] = 0; + cmd[1] = addr & 0xFF; + cmd[2] = ((addr >> 3) & 0xE0) | 0x08; + } + else if (addr < 0xC000) + { + // transmit buffers 8000-87FF, 8800-8FFF, 9000-97FF, etc + // 10## #nnn nnnn nnnn + cmd[0] = addr >> 8; + cmd[1] = addr & 0xFF; + #if defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 1 + cmd[2] = 0x10; // 16K buffers + #elif defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 2 + cmd[2] = ((addr >> 8) & 0x20) | 0x10; // 8K buffers + #elif defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 4 + cmd[2] = ((addr >> 7) & 0x60) | 0x10; // 4K buffers + #else + cmd[2] = ((addr >> 6) & 0xE0) | 0x10; // 2K buffers + #endif + } else + { + // receive buffers + cmd[0] = addr >> 8; + cmd[1] = addr & 0xFF; + #if defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 1 + cmd[2] = 0x18; // 16K buffers + #elif defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 2 + cmd[2] = ((addr >> 8) & 0x20) | 0x18; // 8K buffers + #elif defined(ETHERNET_LARGE_BUFFERS) && MAX_SOCK_NUM <= 4 + cmd[2] = ((addr >> 7) & 0x60) | 0x18; // 4K buffers + #else + cmd[2] = ((addr >> 6) & 0xE0) | 0x18; // 2K buffers + #endif + } + SPI.transfer(cmd, 3); + memset(buf, 0, len); + SPI.transfer(buf, len); + resetSS(); + } + return len; +} + +void W5100Class::execCmdSn(SOCKET s, SockCMD _cmd) +{ + // Send command to socket + writeSnCR(s, _cmd); + // Wait for command to complete + while (readSnCR(s)) ; +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/utility/w5100.h b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/utility/w5100.h new file mode 100644 index 0000000..e5a71c0 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/EthernetLarge/src/utility/w5100.h @@ -0,0 +1,632 @@ +/**************************************************************************************************************************** + w5100.cpp - Driver for W5x00 + + EthernetWebServer is a library for the Ethernet shields to run WebServer + + Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases + Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer + Licensed under MIT license + Version: 1.0.9 + + Copyright 2018 Paul Stoffregen + Copyright (c) 2010 by Cristian Maglie + + This file is free software; you can redistribute it and/or modify + it under the terms of either the GNU General Public License version 2 + or the GNU Lesser General Public License version 2.1, both as + published by the Free Software Foundation. + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/02/2020 Initial coding for Arduino Mega, Teensy, etc to support Ethernetx libraries + 1.0.1 K Hoang 20/02/2020 Add support to lambda functions + 1.0.2 K Hoang 20/02/2020 Add support to UIPEthernet library for ENC28J60 + 1.0.3 K Hoang 23/02/2020 Add support to SAM DUE / SAMD21 boards + 1.0.4 K Hoang 16/04/2020 Add support to SAMD51 boards + 1.0.5 K Hoang 24/04/2020 Add support to nRF52 boards, such as AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, + Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B30_ublox, etc. + More Custom Ethernet libraries supported such as Ethernet2, Ethernet3, EthernetLarge + 1.0.6 K Hoang 27/04/2020 Add support to ESP32/ESP8266 boards + 1.0.7 K Hoang 30/04/2020 Add ENC28J60 support to ESP32/ESP8266 boards + 1.0.8 K Hoang 12/05/2020 Fix W5x00 support for ESP8266 boards. + 1.0.9 K Hoang 15/05/2020 Add EthernetWrapper.h for easier W5x00 support as well as more Ethernet libs in the future. + *****************************************************************************************************************************/ + +// w5100.h contains private W5x00 hardware "driver" level definitions +// which are not meant to be exposed to other libraries or Arduino users + +#ifndef W5100_H_INCLUDED +#define W5100_H_INCLUDED + +#include +#include + +#ifndef USE_W5100 +#define USE_W5100 false +#else +#define USE_W5100 true +#endif + +#if !USE_W5100 + +// Safe for W5200 and W5500, but also tested OK on W5100 +// Use 14MHz if you know your W5100 can't run +// Higher SPI clock results in faster transfer to hosts on a LAN +// or with very low packet latency. With ordinary internet latency, +// the TCP window size & packet loss determine your overall speed. +#warning Use 25MHz clock for W5200/W5500. Not for W5100 +#define SPI_ETHERNET_SETTINGS SPISettings(25000000, MSBFIRST, SPI_MODE0) + +#else + +// Safe for all chips but too slow +#define SPI_ETHERNET_SETTINGS SPISettings(14000000, MSBFIRST, SPI_MODE0) +#warning Use 14MHz clock for W5100/W5200/W5500. Slow. + +#endif + + +// Require Ethernet.h, because we need MAX_SOCK_NUM +#ifndef ethernet_h_ +#error "EthernetLarge.h must be included before w5100.h" +#endif + + +// Arduino 101's SPI can not run faster than 8 MHz. +#if defined(ARDUINO_ARCH_ARC32) +#undef SPI_ETHERNET_SETTINGS +#define SPI_ETHERNET_SETTINGS SPISettings(8000000, MSBFIRST, SPI_MODE0) +#endif + +// Arduino Zero can't use W5100-based shields faster than 8 MHz +// https://github.com/arduino-libraries/Ethernet/issues/37#issuecomment-408036848 +// W5500 does seem to work at 12 MHz. Delete this if only using W5500 +#if defined(__SAMD21G18A__) +#undef SPI_ETHERNET_SETTINGS +//#warning Use SAMD21 architecture SPISettings(8000000, MSBFIRST, SPI_MODE3) => IP OK +#warning Use SAMD21 architecture SPISettings(30000000, MSBFIRST, SPI_MODE3) => IP OK +// Still not working !!! Original SPI_MODE0 not OK at all +//#define SPI_ETHERNET_SETTINGS SPISettings(8000000, MSBFIRST, SPI_MODE3) +#define SPI_ETHERNET_SETTINGS SPISettings(30000000, MSBFIRST, SPI_MODE3) +#endif + + +typedef uint8_t SOCKET; + +class SnMR { +public: + static const uint8_t CLOSE = 0x00; + static const uint8_t TCP = 0x21; + static const uint8_t UDP = 0x02; + static const uint8_t IPRAW = 0x03; + static const uint8_t MACRAW = 0x04; + static const uint8_t PPPOE = 0x05; + static const uint8_t ND = 0x20; + static const uint8_t MULTI = 0x80; +}; + +enum SockCMD { + Sock_OPEN = 0x01, + Sock_LISTEN = 0x02, + Sock_CONNECT = 0x04, + Sock_DISCON = 0x08, + Sock_CLOSE = 0x10, + Sock_SEND = 0x20, + Sock_SEND_MAC = 0x21, + Sock_SEND_KEEP = 0x22, + Sock_RECV = 0x40 +}; + +class SnIR { +public: + static const uint8_t SEND_OK = 0x10; + static const uint8_t TIMEOUT = 0x08; + static const uint8_t RECV = 0x04; + static const uint8_t DISCON = 0x02; + static const uint8_t CON = 0x01; +}; + +class SnSR { +public: + static const uint8_t CLOSED = 0x00; + static const uint8_t INIT = 0x13; + static const uint8_t LISTEN = 0x14; + static const uint8_t SYNSENT = 0x15; + static const uint8_t SYNRECV = 0x16; + static const uint8_t ESTABLISHED = 0x17; + static const uint8_t FIN_WAIT = 0x18; + static const uint8_t CLOSING = 0x1A; + static const uint8_t TIME_WAIT = 0x1B; + static const uint8_t CLOSE_WAIT = 0x1C; + static const uint8_t LAST_ACK = 0x1D; + static const uint8_t UDP = 0x22; + static const uint8_t IPRAW = 0x32; + static const uint8_t MACRAW = 0x42; + static const uint8_t PPPOE = 0x5F; +}; + +class IPPROTO { +public: + static const uint8_t IP = 0; + static const uint8_t ICMP = 1; + static const uint8_t IGMP = 2; + static const uint8_t GGP = 3; + static const uint8_t TCP = 6; + static const uint8_t PUP = 12; + static const uint8_t UDP = 17; + static const uint8_t IDP = 22; + static const uint8_t ND = 77; + static const uint8_t RAW = 255; +}; + +enum W5100Linkstatus { + UNKNOWN, + LINK_ON, + LINK_OFF +}; + +class W5100Class { + +public: + // KH + uint8_t init(uint8_t socketNumbers = MAX_SOCK_NUM, uint8_t new_ss_pin = 10); + + inline void setGatewayIp(const uint8_t * addr) { writeGAR(addr); } + inline void getGatewayIp(uint8_t * addr) { readGAR(addr); } + + inline void setSubnetMask(const uint8_t * addr) { writeSUBR(addr); } + inline void getSubnetMask(uint8_t * addr) { readSUBR(addr); } + + inline void setMACAddress(const uint8_t * addr) { writeSHAR(addr); } + inline void getMACAddress(uint8_t * addr) { readSHAR(addr); } + + inline void setIPAddress(const uint8_t * addr) { writeSIPR(addr); } + inline void getIPAddress(uint8_t * addr) { readSIPR(addr); } + + inline void setRetransmissionTime(uint16_t timeout) { writeRTR(timeout); } + inline void setRetransmissionCount(uint8_t retry) { writeRCR(retry); } + + static void execCmdSn(SOCKET s, SockCMD _cmd); + + + // W5100 Registers + // --------------- +//private: +public: + static uint16_t write(uint16_t addr, const uint8_t *buf, uint16_t len); + + static uint8_t write(uint16_t addr, uint8_t data) + { + return write(addr, &data, 1); + } + + static uint16_t read(uint16_t addr, uint8_t *buf, uint16_t len); + + static uint8_t read(uint16_t addr) + { + uint8_t data; + read(addr, &data, 1); + return data; + } + +#define __GP_REGISTER8(name, address) \ + static inline void write##name(uint8_t _data) { \ + write(address, _data); \ + } \ + static inline uint8_t read##name() { \ + return read(address); \ + } +#define __GP_REGISTER16(name, address) \ + static void write##name(uint16_t _data) { \ + uint8_t buf[2]; \ + buf[0] = _data >> 8; \ + buf[1] = _data & 0xFF; \ + write(address, buf, 2); \ + } \ + static uint16_t read##name() { \ + uint8_t buf[2]; \ + read(address, buf, 2); \ + return (buf[0] << 8) | buf[1]; \ + } +#define __GP_REGISTER_N(name, address, size) \ + static uint16_t write##name(const uint8_t *_buff) { \ + return write(address, _buff, size); \ + } \ + static uint16_t read##name(uint8_t *_buff) { \ + return read(address, _buff, size); \ + } + + // KH + W5100Linkstatus getLinkStatus(); + + +public: + __GP_REGISTER8 (MR, 0x0000); // Mode + __GP_REGISTER_N(GAR, 0x0001, 4); // Gateway IP address + __GP_REGISTER_N(SUBR, 0x0005, 4); // Subnet mask address + __GP_REGISTER_N(SHAR, 0x0009, 6); // Source MAC address + __GP_REGISTER_N(SIPR, 0x000F, 4); // Source IP address + __GP_REGISTER8 (IR, 0x0015); // Interrupt + __GP_REGISTER8 (IMR, 0x0016); // Interrupt Mask + __GP_REGISTER16(RTR, 0x0017); // Timeout address + __GP_REGISTER8 (RCR, 0x0019); // Retry count + __GP_REGISTER8 (RMSR, 0x001A); // Receive memory size (W5100 only) + __GP_REGISTER8 (TMSR, 0x001B); // Transmit memory size (W5100 only) + __GP_REGISTER8 (PATR, 0x001C); // Authentication type address in PPPoE mode + __GP_REGISTER8 (PTIMER, 0x0028); // PPP LCP Request Timer + __GP_REGISTER8 (PMAGIC, 0x0029); // PPP LCP Magic Number + __GP_REGISTER_N(UIPR, 0x002A, 4); // Unreachable IP address in UDP mode (W5100 only) + __GP_REGISTER16(UPORT, 0x002E); // Unreachable Port address in UDP mode (W5100 only) + __GP_REGISTER8 (VERSIONR_W5200,0x001F); // Chip Version Register (W5200 only) + __GP_REGISTER8 (VERSIONR_W5500,0x0039); // Chip Version Register (W5500 only) + __GP_REGISTER8 (PSTATUS_W5200, 0x0035); // PHY Status + __GP_REGISTER8 (PHYCFGR_W5500, 0x002E); // PHY Configuration register, default: 10111xxx + + +#undef __GP_REGISTER8 +#undef __GP_REGISTER16 +#undef __GP_REGISTER_N + + // W5100 Socket registers + // ---------------------- +private: + static uint16_t CH_BASE(void) { + //if (chip == 55) return 0x1000; + //if (chip == 52) return 0x4000; + //return 0x0400; + return CH_BASE_MSB << 8; + } + static uint8_t CH_BASE_MSB; // 1 redundant byte, saves ~80 bytes code on AVR + static const uint16_t CH_SIZE = 0x0100; + + static inline uint8_t readSn(SOCKET s, uint16_t addr) + { + return read(CH_BASE() + s * CH_SIZE + addr); + } + static inline uint8_t writeSn(SOCKET s, uint16_t addr, uint8_t data) + { + return write(CH_BASE() + s * CH_SIZE + addr, data); + } + static inline uint16_t readSn(SOCKET s, uint16_t addr, uint8_t *buf, uint16_t len) + { + return read(CH_BASE() + s * CH_SIZE + addr, buf, len); + } + static inline uint16_t writeSn(SOCKET s, uint16_t addr, uint8_t *buf, uint16_t len) + { + return write(CH_BASE() + s * CH_SIZE + addr, buf, len); + } + +#define __SOCKET_REGISTER8(name, address) \ + static inline void write##name(SOCKET _s, uint8_t _data) { \ + writeSn(_s, address, _data); \ + } \ + static inline uint8_t read##name(SOCKET _s) { \ + return readSn(_s, address); \ + } +#define __SOCKET_REGISTER16(name, address) \ + static void write##name(SOCKET _s, uint16_t _data) { \ + uint8_t buf[2]; \ + buf[0] = _data >> 8; \ + buf[1] = _data & 0xFF; \ + writeSn(_s, address, buf, 2); \ + } \ + static uint16_t read##name(SOCKET _s) { \ + uint8_t buf[2]; \ + readSn(_s, address, buf, 2); \ + return (buf[0] << 8) | buf[1]; \ + } +#define __SOCKET_REGISTER_N(name, address, size) \ + static uint16_t write##name(SOCKET _s, uint8_t *_buff) { \ + return writeSn(_s, address, _buff, size); \ + } \ + static uint16_t read##name(SOCKET _s, uint8_t *_buff) { \ + return readSn(_s, address, _buff, size); \ + } + +public: + __SOCKET_REGISTER8(SnMR, 0x0000) // Mode + __SOCKET_REGISTER8(SnCR, 0x0001) // Command + __SOCKET_REGISTER8(SnIR, 0x0002) // Interrupt + __SOCKET_REGISTER8(SnSR, 0x0003) // Status + __SOCKET_REGISTER16(SnPORT, 0x0004) // Source Port + __SOCKET_REGISTER_N(SnDHAR, 0x0006, 6) // Destination Hardw Addr + __SOCKET_REGISTER_N(SnDIPR, 0x000C, 4) // Destination IP Addr + __SOCKET_REGISTER16(SnDPORT, 0x0010) // Destination Port + __SOCKET_REGISTER16(SnMSSR, 0x0012) // Max Segment Size + __SOCKET_REGISTER8(SnPROTO, 0x0014) // Protocol in IP RAW Mode + __SOCKET_REGISTER8(SnTOS, 0x0015) // IP TOS + __SOCKET_REGISTER8(SnTTL, 0x0016) // IP TTL + __SOCKET_REGISTER8(SnRX_SIZE, 0x001E) // RX Memory Size (W5200 only) + __SOCKET_REGISTER8(SnTX_SIZE, 0x001F) // RX Memory Size (W5200 only) + __SOCKET_REGISTER16(SnTX_FSR, 0x0020) // TX Free Size + __SOCKET_REGISTER16(SnTX_RD, 0x0022) // TX Read Pointer + __SOCKET_REGISTER16(SnTX_WR, 0x0024) // TX Write Pointer + __SOCKET_REGISTER16(SnRX_RSR, 0x0026) // RX Free Size + __SOCKET_REGISTER16(SnRX_RD, 0x0028) // RX Read Pointer + __SOCKET_REGISTER16(SnRX_WR, 0x002A) // RX Write Pointer (supported?) + +#undef __SOCKET_REGISTER8 +#undef __SOCKET_REGISTER16 +#undef __SOCKET_REGISTER_N + + +private: + // KH + bool initialized = false; + static uint8_t chip; + static uint8_t ss_pin; + + static uint8_t isW5100(void); + static uint8_t isW5200(void); + static uint8_t isW5500(void); + +public: + // KH + static uint8_t softReset(void); + static uint8_t getChip(void) { return chip; } +#ifdef ETHERNET_LARGE_BUFFERS + static uint16_t SSIZE; + static uint16_t SMASK; +#else + static const uint16_t SSIZE = 2048; + static const uint16_t SMASK = 0x07FF; +#endif + static uint16_t SBASE(uint8_t socknum) + { + if (chip == 51) + { + return socknum * SSIZE + 0x4000; + } + else + { + return socknum * SSIZE + 0x8000; + } + } + + static uint16_t RBASE(uint8_t socknum) + { + if (chip == 51) { + return socknum * SSIZE + 0x6000; + } + else + { + return socknum * SSIZE + 0xC000; + } + } + + static bool hasOffsetAddressMapping(void) + { + if (chip == 55) + return true; + + return false; + } + + static void setSS(uint8_t pin) { ss_pin = pin; } + +private: +#if defined(__AVR__) + +#warning Use AVR architecture + + static volatile uint8_t *ss_pin_reg; + static uint8_t ss_pin_mask; + + inline static void initSS() + { + ss_pin_reg = portOutputRegister(digitalPinToPort(ss_pin)); + ss_pin_mask = digitalPinToBitMask(ss_pin); + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + *(ss_pin_reg) &= ~ss_pin_mask; + } + + inline static void resetSS() + { + *(ss_pin_reg) |= ss_pin_mask; + } +#elif defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK66FX1M0__) || defined(__MK64FX512__) + +#warning Use MK architecture + + static volatile uint8_t *ss_pin_reg; + + inline static void initSS() + { + ss_pin_reg = portOutputRegister(ss_pin); + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + *(ss_pin_reg+256) = 1; + } + + inline static void resetSS() + { + *(ss_pin_reg+128) = 1; + } +#elif defined(__IMXRT1062__) + +#warning Use Teensy architecture + + static volatile uint32_t *ss_pin_reg; + static uint32_t ss_pin_mask; + + inline static void initSS() + { + ss_pin_reg = portOutputRegister(digitalPinToPort(ss_pin)); + ss_pin_mask = digitalPinToBitMask(ss_pin); + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + *(ss_pin_reg+34) = ss_pin_mask; + } + + inline static void resetSS() + { + *(ss_pin_reg+33) = ss_pin_mask; + } +#elif defined(__MKL26Z64__) + static volatile uint8_t *ss_pin_reg; + static uint8_t ss_pin_mask; + inline static void initSS() + { + ss_pin_reg = portOutputRegister(digitalPinToPort(ss_pin)); + ss_pin_mask = digitalPinToBitMask(ss_pin); + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + *(ss_pin_reg+8) = ss_pin_mask; + } + + inline static void resetSS() + { + *(ss_pin_reg+4) = ss_pin_mask; + } +#elif defined(__SAM3X8E__) || defined(__SAM3A8C__) || defined(__SAM3A4C__) + +#warning Use SAM3 architecture + + static volatile uint32_t *ss_pin_reg; + static uint32_t ss_pin_mask; + + inline static void initSS() + { + ss_pin_reg = &(digitalPinToPort(ss_pin)->PIO_PER); + ss_pin_mask = digitalPinToBitMask(ss_pin); + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + *(ss_pin_reg+13) = ss_pin_mask; + } + + inline static void resetSS() + { + *(ss_pin_reg+12) = ss_pin_mask; + } +#elif defined(__PIC32MX__) + static volatile uint32_t *ss_pin_reg; + static uint32_t ss_pin_mask; + + inline static void initSS() + { + ss_pin_reg = portModeRegister(digitalPinToPort(ss_pin)); + ss_pin_mask = digitalPinToBitMask(ss_pin); + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + *(ss_pin_reg+8+1) = ss_pin_mask; + } + + inline static void resetSS() + { + *(ss_pin_reg+8+2) = ss_pin_mask; + } + +#elif defined(ARDUINO_ARCH_ESP8266) + +#warning Use ARDUINO_ARCH_ESP8266 architecture + + static volatile uint32_t *ss_pin_reg; + static uint32_t ss_pin_mask; + + inline static void initSS() + { + ss_pin_reg = (volatile uint32_t*)GPO; + ss_pin_mask = 1 << ss_pin; + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + GPOC = ss_pin_mask; + } + + inline static void resetSS() + { + GPOS = ss_pin_mask; + } + +#elif defined(__SAMD21G18A__) + +#warning Use SAMD21 architecture + + static volatile uint32_t *ss_pin_reg; + static uint32_t ss_pin_mask; + + inline static void initSS() + { + ss_pin_reg = portModeRegister(digitalPinToPort(ss_pin)); + ss_pin_mask = digitalPinToBitMask(ss_pin); + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + *(ss_pin_reg+5) = ss_pin_mask; + } + + inline static void resetSS() + { + *(ss_pin_reg+6) = ss_pin_mask; + } +#else + +#warning Use Default architecture + + inline static void initSS() + { + pinMode(ss_pin, OUTPUT); + } + + inline static void setSS() + { + digitalWrite(ss_pin, LOW); + } + + inline static void resetSS() + { + digitalWrite(ss_pin, HIGH); + } +#endif +}; + +extern W5100Class W5100; + +#endif + +#ifndef UTIL_H +#define UTIL_H + +#ifndef htons +#define htons(x) ( (((x)<<8)&0xFF00) | (((x)>>8)&0xFF) ) +#endif + +#ifndef ntohs +#define ntohs(x) htons(x) +#endif + +#ifndef htonl +#define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \ + ((x)<< 8 & 0x00FF0000UL) | \ + ((x)>> 8 & 0x0000FF00UL) | \ + ((x)>>24 & 0x000000FFUL) ) +#endif + +#ifndef ntohl +#define ntohl(x) htonl(x) +#endif + +#endif //W5100_H_INCLUDED diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet-2.0.9/UIPEthernet.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet-2.0.9/UIPEthernet.cpp new file mode 100644 index 0000000..2af3cfb --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet-2.0.9/UIPEthernet.cpp @@ -0,0 +1,625 @@ +/* + UIPEthernet.cpp - Arduino implementation of a uIP wrapper class. + Copyright (c) 2013 Norbert Truchsess + All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + +#if defined(ARDUINO) + #include +#endif +#if defined(__MBED__) + #include + #include "mbed/millis.h" +#endif +#include "UIPEthernet.h" +#include "utility/logging.h" +#include "utility/Enc28J60Network.h" + +#include "UIPUdp.h" + +extern "C" +{ +#include "utility/uipopt.h" +#include "utility/uip.h" +#include "utility/uip_arp.h" +} + +#define ETH_HDR ((struct uip_eth_hdr *)&uip_buf[0]) + +memhandle UIPEthernetClass::in_packet(NOBLOCK); +memhandle UIPEthernetClass::uip_packet(NOBLOCK); +uint8_t UIPEthernetClass::uip_hdrlen(0); +uint8_t UIPEthernetClass::packetstate(0); + +unsigned long UIPEthernetClass::periodic_timer; + +IPAddress UIPEthernetClass::_dnsServerAddress; +#if UIP_UDP + DhcpClass* UIPEthernetClass::_dhcp(NULL); + static DhcpClass s_dhcp; // Placing this instance here is saving 40K to final *.bin (see bug below) +#endif + +// Because uIP isn't encapsulated within a class we have to use global +// variables, so we can only have one TCP/IP stack per program. + +UIPEthernetClass::UIPEthernetClass() +{ +} + +void UIPEthernetClass::init(const uint8_t pin) +{ + ENC28J60ControlCS = pin; +} + +#if UIP_UDP +int +UIPEthernetClass::begin(const uint8_t* mac) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var _mac_address + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac, sizeof(_mac_address)); + ////// + + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::begin(const uint8_t* mac) DEBUG_V3:Function started")); + #endif + //static DhcpClass s_dhcp; // <-- this is a bug ! + // I leave it there commented for history. It is bring all GCC "new" memory allocation code, making the *.bin almost 40K bigger. I've move it globally. + _dhcp = &s_dhcp; + // Initialise the basic info + netInit(mac); + + // Now try to get our config info from a DHCP server + int ret = _dhcp->beginWithDHCP((uint8_t*)mac); + if(ret == 1) + { + // We've successfully found a DHCP server and got our configuration info, so set things + // accordingly + configure(_dhcp->getLocalIp(),_dhcp->getDnsServerIp(),_dhcp->getGatewayIp(),_dhcp->getSubnetMask()); + } + return ret; +} +#endif + +void +UIPEthernetClass::begin(const uint8_t* mac, IPAddress ip) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var _mac_address + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac, sizeof(_mac_address)); + ////// + + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::begin(const uint8_t* mac, IPAddress ip) DEBUG_V3:Function started")); + #endif + IPAddress dns = ip; + dns[3] = 1; + begin(mac, ip, dns); +} + +void +UIPEthernetClass::begin(const uint8_t* mac, IPAddress ip, IPAddress dns) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var _mac_address + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac, sizeof(_mac_address)); + ////// + + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::begin(const uint8_t* mac, IPAddress ip, IPAddress dns) DEBUG_V3:Function started")); + #endif + IPAddress gateway = ip; + gateway[3] = 1; + begin(mac, ip, dns, gateway); +} + +void +UIPEthernetClass::begin(const uint8_t* mac, IPAddress ip, IPAddress dns, IPAddress gateway) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var _mac_address + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac, sizeof(_mac_address)); + ////// + + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::begin(const uint8_t* mac, IPAddress ip, IPAddress dns, IPAddress gateway) DEBUG_V3:Function started")); + #endif + IPAddress subnet(255, 255, 255, 0); + begin(mac, ip, dns, gateway, subnet); +} + +void +UIPEthernetClass::begin(const uint8_t* mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var _mac_address + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac, sizeof(_mac_address)); + ////// + + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::begin(const uint8_t* mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) DEBUG_V3:Function started")); + #endif + netInit(mac); + configure(ip,dns,gateway,subnet); +} + +int UIPEthernetClass::maintain(){ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::maintain() DEBUG_V3:Function started")); + #endif + tick(); + int rc = DHCP_CHECK_NONE; +#if UIP_UDP + if(_dhcp != NULL){ + //we have a pointer to dhcp, use it + rc = _dhcp->checkLease(); + switch ( rc ){ + case DHCP_CHECK_NONE: + //nothing done + break; + case DHCP_CHECK_RENEW_OK: + case DHCP_CHECK_REBIND_OK: + //we might have got a new IP. + configure(_dhcp->getLocalIp(),_dhcp->getDnsServerIp(),_dhcp->getGatewayIp(),_dhcp->getSubnetMask()); + break; + default: + //this is actually a error, it will retry though + break; + } + } + return rc; +#endif +} + +EthernetLinkStatus UIPEthernetClass::linkStatus() +{ + if (!Enc28J60Network::geterevid()) + return Unknown; + return Enc28J60Network::linkStatus() ? LinkON : LinkOFF; +} + +EthernetHardwareStatus UIPEthernetClass::hardwareStatus() { + if (!Enc28J60Network::geterevid()) + return EthernetNoHardware; + return EthernetENC28J60; +} + +IPAddress UIPEthernetClass::localIP() +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::localIP() DEBUG_V3:Function started")); + #endif + IPAddress ret; + uip_ipaddr_t a; + uip_gethostaddr(a); + return ip_addr_uip(a); +} + +IPAddress UIPEthernetClass::subnetMask() +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::subnetMask() DEBUG_V3:Function started")); + #endif + IPAddress ret; + uip_ipaddr_t a; + uip_getnetmask(a); + return ip_addr_uip(a); +} + +IPAddress UIPEthernetClass::gatewayIP() +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::gatewayIP() DEBUG_V3:Function started")); + #endif + IPAddress ret; + uip_ipaddr_t a; + uip_getdraddr(a); + return ip_addr_uip(a); +} + +IPAddress UIPEthernetClass::dnsServerIP() +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::dnsServerIP() DEBUG_V3:Function started")); + #endif + return _dnsServerAddress; +} + +void +UIPEthernetClass::tick() +{ +#if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::tick() DEBUG_V3:Function started")); +#endif +if (Enc28J60Network::geterevid()==0) + { + #if ACTLOGLEVEL>=LOG_ERR + LogObject.uart_send_strln(F("UIPEthernetClass::tick() ERROR:EREVID=0 -> Not found ENC28j60 device !! Function ended !!")); + #endif + return; + } +#if defined(ESP8266) + wdt_reset(); +#endif + if (in_packet == NOBLOCK) + { + in_packet = Enc28J60Network::receivePacket(); + #if ACTLOGLEVEL>=LOG_DEBUG + if (in_packet != NOBLOCK) + { + LogObject.uart_send_str(F("UIPEthernetClass::tick() DEBUG:receivePacket: ")); + LogObject.uart_send_decln(in_packet); + } + #endif + } + if (in_packet != NOBLOCK) + { + packetstate = UIPETHERNET_FREEPACKET; + uip_len = Enc28J60Network::blockSize(in_packet); + if (uip_len > 0) + { + Enc28J60Network::readPacket(in_packet,0,(uint8_t*)uip_buf,UIP_BUFSIZE); + if (ETH_HDR ->type == HTONS(UIP_ETHTYPE_IP)) + { + uip_packet = in_packet; //required for upper_layer_checksum of in_packet! + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("UIPEthernetClass::tick() DEBUG:readPacket type IP, uip_len: ")); + LogObject.uart_send_decln(uip_len); + #endif + uip_arp_ipin(); + uip_input(); + if (uip_len > 0) + { + uip_arp_out(); + network_send(); + } + } + else if (ETH_HDR ->type == HTONS(UIP_ETHTYPE_ARP)) + { + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("UIPEthernetClass::tick() DEBUG:readPacket type ARP, uip_len: ")); + LogObject.uart_send_decln(uip_len); + #endif + uip_arp_arpin(); + if (uip_len > 0) + { + network_send(); + } + } + } + if (in_packet != NOBLOCK && (packetstate & UIPETHERNET_FREEPACKET)) + { + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("UIPEthernetClass::tick() DEBUG:freeing packet: ")); + LogObject.uart_send_decln(in_packet); + #endif + Enc28J60Network::freePacket(); + in_packet = NOBLOCK; + } + } + + unsigned long now = millis(); + +#if UIP_CLIENT_TIMER >= 0 + bool periodic = (long)( now - periodic_timer ) >= 0; + for (int i = 0; i < UIP_CONNS; i++) + { +#else + if ((long)( now - periodic_timer ) >= 0) + { + periodic_timer = now + UIP_PERIODIC_TIMER; + + for (int i = 0; i < UIP_CONNS; i++) + { +#endif + + uip_conn = &uip_conns[i]; + +#if UIP_CLIENT_TIMER >= 0 + if (periodic) + { +#endif + + uip_process(UIP_TIMER); + +#if UIP_CLIENT_TIMER >= 0 + } + else + { + if (((uip_userdata_t*)uip_conn->appstate)!=NULL) + { + if ((long)( now - ((uip_userdata_t*)uip_conn->appstate)->timer) >= 0) + { + uip_process(UIP_POLL_REQUEST); + ((uip_userdata_t*)uip_conn->appstate)->timer = millis() + UIP_CLIENT_TIMER; + } + else + { + continue; + } + } + else + continue; + } +#endif + // If the above function invocation resulted in data that + // should be sent out on the Enc28J60Network, the global variable + // uip_len is set to a value > 0. + if (uip_len > 0) + { + uip_arp_out(); + network_send(); + } + } +#if UIP_CLIENT_TIMER >= 0 + if (periodic) + { + periodic_timer = now + UIP_PERIODIC_TIMER; +#endif +#if UIP_UDP + for (int i = 0; i < UIP_UDP_CONNS; i++) + { + uip_udp_periodic(i); + // If the above function invocation resulted in data that + // should be sent out on the Enc28J60Network, the global variable + // uip_len is set to a value > 0. */ + if (uip_len > 0) + { + UIPUDP::_send((uip_udp_userdata_t *)(uip_udp_conns[i].appstate)); + } + } +#endif /* UIP_UDP */ + } +} + +bool UIPEthernetClass::network_send() +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::network_send() DEBUG_V3:Function started")); + #endif + if (packetstate & UIPETHERNET_SENDPACKET) + { +#if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("UIPEthernetClass::network_send() DEBUG:uip_packet: ")); + LogObject.uart_send_dec(uip_packet); + LogObject.uart_send_str(F(", hdrlen: ")); + LogObject.uart_send_decln(uip_hdrlen); +#endif + Enc28J60Network::writePacket(uip_packet, UIP_SENDBUFFER_OFFSET,uip_buf,uip_hdrlen); + packetstate &= ~ UIPETHERNET_SENDPACKET; + goto sendandfree; + } + uip_packet = Enc28J60Network::allocBlock(uip_len + UIP_SENDBUFFER_OFFSET + UIP_SENDBUFFER_PADDING); + if (uip_packet != NOBLOCK) + { +#if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("UIPEthernetClass::network_send() DEBUG:uip_buf (uip_len): ")); + LogObject.uart_send_dec(uip_len); + LogObject.uart_send_str(F(", packet: ")); + LogObject.uart_send_decln(uip_packet); +#endif + Enc28J60Network::writePacket(uip_packet, UIP_SENDBUFFER_OFFSET,uip_buf,uip_len); + goto sendandfree; + } + return false; +sendandfree: + bool success = Enc28J60Network::sendPacket(uip_packet); + Enc28J60Network::freeBlock(uip_packet); + uip_packet = NOBLOCK; + return success; +} + +void UIPEthernetClass::netInit(const uint8_t* mac) { + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::netInit(const uint8_t* mac) DEBUG_V3:Function started")); + #endif + periodic_timer = millis() + UIP_PERIODIC_TIMER; + + Enc28J60Network::init((uint8_t*)mac); + uip_seteth_addr(mac); + + uip_init(); + uip_arp_init(); +} + +void UIPEthernetClass::configure(IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) { + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::configure(IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) DEBUG_V3:Function started")); + #endif + uip_ipaddr_t ipaddr; + + uip_ip_addr(ipaddr, ip); + uip_sethostaddr(ipaddr); + + uip_ip_addr(ipaddr, gateway); + uip_setdraddr(ipaddr); + + uip_ip_addr(ipaddr, subnet); + uip_setnetmask(ipaddr); + + _dnsServerAddress = dns; +} + +UIPEthernetClass UIPEthernet; + +/*---------------------------------------------------------------------------*/ +uint16_t +UIPEthernetClass::chksum(uint16_t sum, const uint8_t *data, uint16_t len) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::chksum(uint16_t sum, const uint8_t *data, uint16_t len) DEBUG_V3:Function started")); + #endif + uint16_t t; + const uint8_t *dataptr; + const uint8_t *last_byte; + + dataptr = data; + last_byte = data + len - 1; + + while(dataptr < last_byte) { /* At least two more bytes */ + t = (dataptr[0] << 8) + dataptr[1]; + sum += t; + if(sum < t) { + sum++; /* carry */ + } + dataptr += 2; + } + + if(dataptr == last_byte) { + t = (dataptr[0] << 8) + 0; + sum += t; + if(sum < t) { + sum++; /* carry */ + } + } + + /* Return sum in host byte order. */ + return sum; +} + +/*---------------------------------------------------------------------------*/ + +uint16_t +UIPEthernetClass::ipchksum(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::ipchksum(void) DEBUG_V3:Function started")); + #endif + uint16_t sum; + + sum = chksum(0, &uip_buf[UIP_LLH_LEN], UIP_IPH_LEN); + return (sum == 0) ? 0xffff : htons(sum); +} + +/*---------------------------------------------------------------------------*/ +uint16_t +#if UIP_UDP +UIPEthernetClass::upper_layer_chksum(uint8_t proto) +#else +uip_tcpchksum(void) +#endif +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + #if UIP_UDP + LogObject.uart_send_strln(F("UIPEthernetClass::upper_layer_chksum(uint8_t proto) DEBUG_V3:Function started")); + #else + LogObject.uart_send_strln(F("uip_tcpchksum(void) INFO:Function started")); + #endif + #endif + uint16_t upper_layer_len; + uint16_t sum; + +#if UIP_CONF_IPV6 + upper_layer_len = (((u16_t)(BUF->len[0]) << 8) + BUF->len[1]); +#else /* UIP_CONF_IPV6 */ + upper_layer_len = (((u16_t)(BUF->len[0]) << 8) + BUF->len[1]) - UIP_IPH_LEN; +#endif /* UIP_CONF_IPV6 */ + + /* First sum pseudoheader. */ + + /* IP protocol and length fields. This addition cannot carry. */ +#if UIP_UDP + sum = upper_layer_len + proto; +#else + sum = upper_layer_len + UIP_PROTO_TCP; +#endif + /* Sum IP source and destination addresses. */ + sum = UIPEthernetClass::chksum(sum, (u8_t *)&BUF->srcipaddr[0], 2 * sizeof(uip_ipaddr_t)); + + uint8_t upper_layer_memlen; +#if UIP_UDP + switch(proto) + { +// case UIP_PROTO_ICMP: +// case UIP_PROTO_ICMP6: +// upper_layer_memlen = upper_layer_len; +// break; + case UIP_PROTO_UDP: + upper_layer_memlen = UIP_UDPH_LEN; + break; + default: +// case UIP_PROTO_TCP: +#endif + upper_layer_memlen = (BUF->tcpoffset >> 4) << 2; +#if UIP_UDP + break; + } +#endif + sum = UIPEthernetClass::chksum(sum, &uip_buf[UIP_IPH_LEN + UIP_LLH_LEN], upper_layer_memlen); +#if ACTLOGLEVEL>=LOG_DEBUG + #if UIP_UDP + LogObject.uart_send_str(F("UIPEthernetClass::upper_layer_chksum(uint8_t proto) DEBUG:uip_buf[")); + #else + LogObject.uart_send_str(F("uip_tcpchksum(void) DEBUG:uip_buf[")); + #endif + LogObject.uart_send_dec(UIP_IPH_LEN + UIP_LLH_LEN); + LogObject.uart_send_str(F("-")); + LogObject.uart_send_dec(UIP_IPH_LEN + UIP_LLH_LEN + upper_layer_memlen); + LogObject.uart_send_str(F("]: ")); + LogObject.uart_send_hexln(htons(sum)); +#endif + if (upper_layer_memlen < upper_layer_len) + { + sum = Enc28J60Network::chksum( + sum, + UIPEthernetClass::uip_packet, + (UIPEthernetClass::packetstate & UIPETHERNET_SENDPACKET ? UIP_IPH_LEN + UIP_LLH_LEN + UIP_SENDBUFFER_OFFSET : UIP_IPH_LEN + UIP_LLH_LEN) + upper_layer_memlen, + upper_layer_len - upper_layer_memlen + ); +#if ACTLOGLEVEL>=LOG_DEBUG + #if UIP_UDP + LogObject.uart_send_str(F("UIPEthernetClass::upper_layer_chksum(uint8_t proto) DEBUG:uip_packet(")); + #else + LogObject.uart_send_str(F("uip_tcpchksum(void) DEBUG:uip_packet(")); + #endif + LogObject.uart_send_dec(UIPEthernetClass::uip_packet); + LogObject.uart_send_str(F(")[")); + LogObject.uart_send_dec(UIP_IPH_LEN + UIP_LLH_LEN + upper_layer_memlen); + LogObject.uart_send_str(F("-")); + LogObject.uart_send_dec(UIP_IPH_LEN + UIP_LLH_LEN + upper_layer_len); + LogObject.uart_send_str(F("]: ")); + LogObject.uart_send_hexln(htons(sum)); +#endif + } + return (sum == 0) ? 0xffff : htons(sum); +} + +uint16_t +uip_ipchksum(void) +{ + return UIPEthernet.ipchksum(); +} + +#if UIP_UDP +uint16_t +uip_tcpchksum(void) +{ + uint16_t sum = UIPEthernet.upper_layer_chksum(UIP_PROTO_TCP); + return sum; +} + +uint16_t +uip_udpchksum(void) +{ + uint16_t sum = UIPEthernet.upper_layer_chksum(UIP_PROTO_UDP); + return sum; +} +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet-2.0.9/UIPEthernet.h b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet-2.0.9/UIPEthernet.h new file mode 100644 index 0000000..4d3e0eb --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet-2.0.9/UIPEthernet.h @@ -0,0 +1,166 @@ +/* + UIPEthernet.h - Arduino implementation of a uIP wrapper class. + Copyright (c) 2013 Norbert Truchsess + All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + +#ifndef UIPETHERNET_H +#define UIPETHERNET_H + +#include "ethernet_comp.h" +#if defined(__MBED__) + #include +#endif +#if defined(ARDUINO) + #include + #if defined(__STM32F3__) || (!defined(ARDUINO_ARCH_STM32) && defined(STM32F3)) || defined(__RFduino__) + #include "mbed/IPAddress.h" + #else + #include "IPAddress.h" + #endif +#endif +#include "utility/Enc28J60Network.h" +#include "utility/uipopt.h" +#include "Dhcp.h" +#if UIP_UDP + #include "UIPUdp.h" +#endif +#include "UIPClient.h" +#include "UIPServer.h" + +extern "C" +{ +#include "utility/uip.h" +} + +#define UIPETHERNET_FREEPACKET 1 +#define UIPETHERNET_SENDPACKET 2 +#define UIPETHERNET_BUFFERREAD 4 + +#define uip_ip_addr(addr, ip) do { \ + ((u16_t *)(addr))[0] = HTONS(((ip[0]) << 8) | (ip[1])); \ + ((u16_t *)(addr))[1] = HTONS(((ip[2]) << 8) | (ip[3])); \ + } while(0) + +#define ip_addr_uip(a) IPAddress(a[0] & 0xFF, a[0] >> 8 , a[1] & 0xFF, a[1] >> 8) //TODO this is not IPV6 capable + +#define uip_seteth_addr(eaddr) do {uip_ethaddr.addr[0] = eaddr[0]; \ + uip_ethaddr.addr[1] = eaddr[1];\ + uip_ethaddr.addr[2] = eaddr[2];\ + uip_ethaddr.addr[3] = eaddr[3];\ + uip_ethaddr.addr[4] = eaddr[4];\ + uip_ethaddr.addr[5] = eaddr[5];} while(0) + +#define BUF ((struct uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN]) + +enum EthernetLinkStatus { + Unknown, + LinkON, + LinkOFF +}; + +enum EthernetHardwareStatus { + EthernetNoHardware, + EthernetW5100, + EthernetW5200, + EthernetW5500, + EthernetENC28J60 = 10 +}; + +class UIPEthernetClass +{ +public: + UIPEthernetClass(); + + void init(const uint8_t pin); + + int begin(const uint8_t* mac); + void begin(const uint8_t* mac, IPAddress ip); + void begin(const uint8_t* mac, IPAddress ip, IPAddress dns); + void begin(const uint8_t* mac, IPAddress ip, IPAddress dns, IPAddress gateway); + void begin(const uint8_t* mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet); + + // maintain() must be called at regular intervals to process the incoming serial + // data and issue IP events to the sketch. It does not return until all IP + // events have been processed. Renews dhcp-lease if required. + int maintain(); + + EthernetLinkStatus linkStatus(); + EthernetHardwareStatus hardwareStatus(); + + // KH add to have similar function to Ethernet lib + // Certainly we can use void macAddress(uint8_t mac[]) to read from W5x00. + void MACAddress(uint8_t *mac_address) + { + memcpy(mac_address, _mac_address, sizeof(_mac_address)); + } + ////// + + IPAddress localIP(); + IPAddress subnetMask(); + IPAddress gatewayIP(); + IPAddress dnsServerIP(); + +private: + + // KH add to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + uint8_t _mac_address[6] ={0,}; + ////// + + static memhandle in_packet; + static memhandle uip_packet; + static uint8_t uip_hdrlen; + static uint8_t packetstate; + + static IPAddress _dnsServerAddress; + #if UIP_UDP + static DhcpClass* _dhcp; + #endif + static unsigned long periodic_timer; + + static void netInit(const uint8_t* mac); + static void configure(IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet); + + static void tick(); + + static bool network_send(); + + friend class UIPServer; + + friend class UIPClient; + + friend class UIPUDP; + + static uint16_t chksum(uint16_t sum, const uint8_t* data, uint16_t len); + static uint16_t ipchksum(void); +#if UIP_UDP + static uint16_t upper_layer_chksum(uint8_t proto); +#endif + friend uint16_t uip_ipchksum(void); + friend uint16_t uip_tcpchksum(void); + friend uint16_t uip_udpchksum(void); + + friend void uipclient_appcall(void); + friend void uipudp_appcall(void); + +#if UIP_CONF_IPV6 + uint16_t uip_icmp6chksum(void); +#endif /* UIP_CONF_IPV6 */ +}; + +extern UIPEthernetClass UIPEthernet; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet-2.0.9/utility/Enc28J60Network.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet-2.0.9/utility/Enc28J60Network.cpp new file mode 100644 index 0000000..8c405d6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet-2.0.9/utility/Enc28J60Network.cpp @@ -0,0 +1,1216 @@ +/* + Enc28J60NetworkClass.h + UIPEthernet network driver for Microchip ENC28J60 Ethernet Interface. + + Copyright (c) 2013 Norbert Truchsess + All rights reserved. + + based on enc28j60.c file from the AVRlib library by Pascal Stang. + For AVRlib See http://www.procyonengineering.com/ + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + +#include "Enc28J60Network.h" +#if defined(ARDUINO) + #include "Arduino.h" +#endif +#if defined(__MBED__) + #include + #include "mbed/millis.h" + #define delay(x) wait_ms(x) +#endif +#include "logging.h" + +// KH, For nRF52 +//#define ENC28J60_USE_SPILIB true + +uint8_t ENC28J60ControlCS = ENC28J60_CONTROL_CS; + +#if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + #if defined(STM32F2) + #include + #elif (defined(ARDUINO_ARCH_STM32) || !defined(STM32F3)) && !defined(__STM32F4__) + #include + extern SPIClass SPI; + //#elif defined(ARDUINO_ARCH_AMEBA) + //SPIClass SPI((void *)(&spi_obj), 11, 12, 13, 10); + //SPI _spi(SPI_MOSI,SPI_MISO,SPI_SCK,ENC28J60ControlCS); + #else + #include "HardwareSPI.h" + extern HardwareSPI SPI(1); + #endif + #endif + #if defined(__MBED__) + SPI _spi(SPI_MOSI,SPI_MISO,SPI_SCK); + DigitalOut _cs(ENC28J60ControlCS); + Serial LogObject(SERIAL_TX,SERIAL_RX); + #endif +#endif + +extern "C" { + #if defined(ARDUINO_ARCH_AVR) + // AVR-specific code + #include + #elif defined(ARDUINO_ARCH_SAM) + // SAM-specific code + #elif defined(ARDUINO_ARCH_SAMD) + // SAMD-specific code + #else + // generic, non-platform specific code + #endif +#include "enc28j60.h" +#include "uip.h" +} + +#if defined(ARDUINO) + // set CS to 0 = active + #define CSACTIVE digitalWrite(ENC28J60ControlCS, LOW) + // set CS to 1 = passive + #define CSPASSIVE digitalWrite(ENC28J60ControlCS, HIGH) +#endif +#if defined(__MBED__) + // set CS to 0 = active + #define CSACTIVE _cs=0 + // set CS to 1 = passive + #define CSPASSIVE _cs=1 +#endif + +// +#if defined(ARDUINO_ARCH_AVR) +#define waitspi() while(!(SPSR&(1<=LOG_DEBUG + LogObject.uart_send_str(F("ENC28J60::init DEBUG:csPin = ")); + LogObject.uart_send_decln(ENC28J60ControlCS); + LogObject.uart_send_str(F("ENC28J60::init DEBUG:miso = ")); + LogObject.uart_send_decln(SPI_MISO); + LogObject.uart_send_str(F("ENC28J60::init DEBUG:mosi = ")); + LogObject.uart_send_decln(SPI_MOSI); + LogObject.uart_send_str(F("ENC28J60::init DEBUG:sck = ")); + LogObject.uart_send_decln(SPI_SCK); + #endif +#if ENC28J60_USE_SPILIB + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_strln(F("ENC28J60::init DEBUG:Use SPI lib SPI.begin()")); + #endif + #if defined(ARDUINO) + #if defined(__STM32F3__) || (!defined(ARDUINO_ARCH_STM32) && defined(STM32F3)) || defined(__STM32F4__) + SPI.begin(SPI_9MHZ, MSBFIRST, 0); + #else + SPI.begin(); + #endif + #endif + #if defined(ARDUINO_ARCH_AVR) + // AVR-specific code + SPI.setClockDivider(SPI_CLOCK_DIV2); //results in 8MHZ at 16MHZ system clock. + #elif defined(ARDUINO_ARCH_SAM) + // SAM-specific code + SPI.setClockDivider(10); //defaults to 21 which results in aprox. 4MHZ. A 10 should result in a little more than 8MHZ. + #elif defined(ARDUINO_ARCH_SAMD) + // SAMD-specific code + // Should we set clock divider? + SPI.setClockDivider(10); + #elif defined(__STM32F1__) || defined(__STM32F3__) + // generic, non-platform specific code + #define USE_STM32F1_DMAC 1 //on STM32 + // BOARD_NR_SPI >= 1 BOARD_SPI1_NSS_PIN, BOARD_SPI1_SCK_PIN, BOARD_SPI1_MISO_PIN, BOARD_SPI1_MOSI_PIN + SPI.setBitOrder(MSBFIRST); + SPI.setDataMode(SPI_MODE0); + SPI.setClockDivider(SPI_CLOCK_DIV8); //value 8 the result is 9MHz at 72MHz clock. + #else + #if defined(ARDUINO) + #if !defined(__STM32F3__) && !defined(STM32F3) && !defined(__STM32F4__) + SPI.setBitOrder(MSBFIRST); + #endif + //Settings for ESP8266 + //SPI.setDataMode(SPI_MODE0); + //SPI.setClockDivider(SPI_CLOCK_DIV16); + #endif + #if defined(__MBED__) + _spi.format(8, 0); // 8bit, mode 0 + _spi.frequency(7000000); // 7MHz + #endif + #endif +#else + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_strln(F("ENC28J60::init DEBUG:Use Native hardware SPI")); + #endif + pinMode(SPI_MOSI, OUTPUT); + pinMode(SPI_SCK, OUTPUT); + pinMode(SPI_MISO, INPUT); + //Hardware SS must be configured as OUTPUT to enable SPI-master (regardless of which pin is configured as ENC28J60ControlCS) + pinMode(SS, OUTPUT); + digitalWrite(SS,HIGH); + + digitalWrite(SPI_MOSI, LOW); + digitalWrite(SPI_SCK, LOW); + + // initialize SPI interface + // master mode and Fosc/2 clock: + SPCR = (1<=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:Before readOp(ENC28J60_READ_CTRL_REG, ESTAT)")); + #endif + nextPacketPtr = RXSTART_INIT; + while ((!readOp(ENC28J60_READ_CTRL_REG, ESTAT) & ESTAT_CLKRDY) && (timeout>0)) + { + timeout=timeout-1; + delay(10); + #if defined(ESP8266) + wdt_reset(); + #endif + } + #if ACTLOGLEVEL>=LOG_ERR + if (timeout==0) {LogObject.uart_send_strln(F("ENC28J60::init ERROR:TIMEOUT !!"));} + #endif + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:After readOp(ENC28J60_READ_CTRL_REG, ESTAT)")); + #endif + // Rx start + writeRegPair(ERXSTL, RXSTART_INIT); + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:After writeRegPair(ERXSTL, RXSTART_INIT)")); + #endif + // set receive pointer address + writeRegPair(ERXRDPTL, RXSTART_INIT); + // RX end + writeRegPair(ERXNDL, RXSTOP_INIT); + // TX start + //writeRegPair(ETXSTL, TXSTART_INIT); + // TX end + //writeRegPair(ETXNDL, TXSTOP_INIT); + // do bank 1 stuff, packet filter: + // For broadcast packets we allow only ARP packtets + // All other packets should be unicast only for our mac (MAADR) + // + // The pattern to match on is therefore + // Type ETH.DST + // ARP BROADCAST + // 06 08 -- ff ff ff ff ff ff -> ip checksum for theses bytes=f7f9 + // in binary these poitions are:11 0000 0011 1111 + // This is hex 303F->EPMM0=0x3f,EPMM1=0x30 + //TODO define specific pattern to receive dhcp-broadcast packages instead of setting ERFCON_BCEN! +// enableBroadcast(); // change to add ERXFCON_BCEN recommended by epam + writeReg(ERXFCON, ERXFCON_UCEN|ERXFCON_CRCEN|ERXFCON_PMEN|ERXFCON_BCEN); + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:After writeReg(ERXFCON, ERXFCON_UCEN|ERXFCON_CRCEN|ERXFCON_PMEN|ERXFCON_BCEN)")); + #endif + #if defined(ESP8266) + wdt_reset(); + #endif + writeRegPair(EPMM0, 0x303f); + writeRegPair(EPMCSL, 0xf7f9); + // + // + // do bank 2 stuff + // enable MAC receive + // and bring MAC out of reset (writes 0x00 to MACON2) + writeRegPair(MACON1, MACON1_MARXEN|MACON1_TXPAUS|MACON1_RXPAUS); + // enable automatic padding to 60bytes and CRC operations + writeOp(ENC28J60_BIT_FIELD_SET, MACON3, MACON3_PADCFG0|MACON3_TXCRCEN|MACON3_FRMLNEN); + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:After writeOp(ENC28J60_BIT_FIELD_SET, MACON3, MACON3_PADCFG0|MACON3_TXCRCEN|MACON3_FRMLNEN)")); + #endif + // set inter-frame gap (non-back-to-back) + writeRegPair(MAIPGL, 0x0C12); + // set inter-frame gap (back-to-back) + writeReg(MABBIPG, 0x12); + // Set the maximum packet size which the controller will accept + // Do not send packets longer than MAX_FRAMELEN: + writeRegPair(MAMXFLL, MAX_FRAMELEN); + // do bank 3 stuff + // write MAC address + // NOTE: MAC address in ENC28J60 is byte-backward + writeReg(MAADR5, macaddr[0]); + writeReg(MAADR4, macaddr[1]); + writeReg(MAADR3, macaddr[2]); + writeReg(MAADR2, macaddr[3]); + writeReg(MAADR1, macaddr[4]); + writeReg(MAADR0, macaddr[5]); + // no loopback of transmitted frames + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:Before phyWrite(PHCON2, PHCON2_HDLDIS)")); + #endif + phyWrite(PHCON2, PHCON2_HDLDIS); + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:After phyWrite(PHCON2, PHCON2_HDLDIS)")); + #endif + // switch to bank 0 + setBank(ECON1); + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:After setBank(ECON1)")); + #endif + // enable interrutps + writeOp(ENC28J60_BIT_FIELD_SET, EIE, EIE_INTIE|EIE_PKTIE); + // enable packet reception + writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_RXEN); + //Configure leds + phyWrite(PHLCON,0x476); + + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:Before readReg(EREVID);")); + #endif + erevid=readReg(EREVID); + if (erevid==0xFF) {erevid=0;} + // microchip forgot to step the number on the silcon when they + // released the revision B7. 6 is now rev B7. We still have + // to see what they do when they release B8. At the moment + // there is no B8 out yet + //if (erevid > 5) ++erevid; + #if ACTLOGLEVEL>=LOG_INFO + LogObject.uart_send_str(F("ENC28J60::init INFO: Chip erevid=")); + LogObject.uart_send_dec(erevid); + LogObject.uart_send_strln(F(" initialization completed.")); + #endif + +// return Enc28J60Network::erevid; +} + +memhandle +Enc28J60Network::receivePacket(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::receivePacket(void) DEBUG_V3:Function started")); + #endif + #if defined(ESP8266) + wdt_reset(); + #endif + uint8_t rxstat; + uint16_t len; + // check if a packet has been received and buffered + //if( !(readReg(EIR) & EIR_PKTIF) ){ + // The above does not work. See Rev. B4 Silicon Errata point 6. + #if ACTLOGLEVEL>=LOG_ERR + if (erevid==0) + { + LogObject.uart_send_strln(F("Enc28J60Network::receivePacket(void) ERROR:ENC28j50 Device not found !! Bypass receivePacket function !!")); + } + #endif + uint8_t epktcnt=readReg(EPKTCNT); + if ((erevid!=0) && (epktcnt!=0)) + { + uint16_t readPtr = nextPacketPtr+6 > RXSTOP_INIT ? nextPacketPtr+6-((RXSTOP_INIT + 1)-RXSTART_INIT) : nextPacketPtr+6; + // Set the read pointer to the start of the received packet + writeRegPair(ERDPTL, nextPacketPtr); + // read the next packet pointer + nextPacketPtr = readOp(ENC28J60_READ_BUF_MEM, 0); + nextPacketPtr |= readOp(ENC28J60_READ_BUF_MEM, 0) << 8; + // read the packet length (see datasheet page 43) + len = readOp(ENC28J60_READ_BUF_MEM, 0); + len |= readOp(ENC28J60_READ_BUF_MEM, 0) << 8; + len -= 4; //remove the CRC count + // read the receive status (see datasheet page 43) + rxstat = readOp(ENC28J60_READ_BUF_MEM, 0); + //rxstat |= readOp(ENC28J60_READ_BUF_MEM, 0) << 8; + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("Enc28J60Network::receivePacket(void) DEBUG:receivePacket [")); + LogObject.uart_send_hex(readPtr); + LogObject.uart_send_str(F("-")); + LogObject.uart_send_hex((readPtr+len) % (RXSTOP_INIT+1)); + LogObject.uart_send_str(F("], next: ")); + LogObject.uart_send_hex(nextPacketPtr); + LogObject.uart_send_str(F(", stat: ")); + LogObject.uart_send_hex(rxstat); + LogObject.uart_send_str(F(", Packet count: ")); + LogObject.uart_send_dec(epktcnt); + LogObject.uart_send_str(F(" -> ")); + LogObject.uart_send_strln((rxstat & 0x80)!=0 ? "OK" : "failed"); + #endif + // decrement the packet counter indicate we are done with this packet + writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_PKTDEC); + // check CRC and symbol errors (see datasheet page 44, table 7-3): + // The ERXFCON.CRCEN is set by default. Normally we should not + // need to check this. + if (((rxstat & 0x80) != 0) && (nextPacketPtr<=RXSTOP_INIT)) + { + receivePkt.begin = readPtr; + receivePkt.size = len; + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("Enc28J60Network::receivePacket(void) DEBUG: rxstat OK. receivePkt.size=")); + LogObject.uart_send_decln(len); + #endif + return UIP_RECEIVEBUFFERHANDLE; + } + // Move the RX read pointer to the start of the next received packet + // This frees the memory we just read out + setERXRDPT(); + } + return (NOBLOCK); +} + +void +Enc28J60Network::setERXRDPT(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::setERXRDPT(void) DEBUG_V3:Function started")); + #endif + // Make sure the value is odd. See Rev. B1,B4,B5,B7 Silicon Errata issues 14 + uint16_t actnextPacketPtr = nextPacketPtr == RXSTART_INIT ? RXSTOP_INIT : nextPacketPtr-1; + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("Enc28J60Network::setERXRDPT(void) DEBUG:Set actnextPacketPtr:")); + LogObject.uart_send_hexln(actnextPacketPtr); + #endif + // datasheet: The ENC28J60 will always write up to, but not including + writeRegPair(ERXRDPTL, actnextPacketPtr); +} + +memaddress +Enc28J60Network::blockSize(memhandle handle) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::blockSize(memhandle handle) DEBUG_V3:Function started")); + #endif + return ((handle == NOBLOCK) || (erevid==0)) ? 0 : handle == UIP_RECEIVEBUFFERHANDLE ? receivePkt.size : blocks[handle].size; +} + +bool +Enc28J60Network::sendPacket(memhandle handle) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::sendPacket(memhandle handle) INFO:Function started")); + #endif + #if defined(ESP8266) + wdt_reset(); + #endif + if (erevid==0) + { + #if ACTLOGLEVEL>=LOG_ERR + LogObject.uart_send_strln(F("Enc28J60Network::sendPacket(memhandle handle) ERROR:ENC28j50 Device not found !! Bypass sendPacket function !!")); + #endif + return false; + } + + memblock *packet = &blocks[handle]; + uint16_t start = packet->begin; // includes the UIP_SENDBUFFER_OFFSET for control byte + uint16_t end = start + packet->size - 1 - UIP_SENDBUFFER_PADDING; // end = start + size - 1 and padding for TSV is no included + + // write control-byte (if not 0 anyway) + writeByte(start, 0); + + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("Enc28J60Network::sendPacket(memhandle handle) DEBUG:sendPacket(")); + LogObject.uart_send_dec(handle); + LogObject.uart_send_str(F(") [")); + LogObject.uart_send_hex(start); + LogObject.uart_send_str(F("-")); + LogObject.uart_send_hex(end); + LogObject.uart_send_str(F("]: ")); + for (uint16_t i=start; i<=end; i++) + { + LogObject.uart_send_hex(readByte(i)); + LogObject.uart_send_str(F(" ")); + } + LogObject.uart_send_strln(F("")); + #endif + + // TX start + writeRegPair(ETXSTL, start); + // Set the TXND pointer to correspond to the packet size given + writeRegPair(ETXNDL, end); + + bool success = false; + // See Rev. B7 Silicon Errata issues 12 and 13 + for (uint8_t retry = 0; retry < TX_COLLISION_RETRY_COUNT; retry++) + { + // Reset the transmit logic problem. Errata 12 + writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_TXRST); + writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_TXRST); + writeOp(ENC28J60_BIT_FIELD_CLR, EIR, EIR_TXERIF | EIR_TXIF); + + // send the contents of the transmit buffer onto the network + writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_TXRTS); + + uint8_t eir; + // wait for transmission to complete or fail + while (((eir = readReg(EIR)) & (EIR_TXIF | EIR_TXERIF)) == 0); + writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_TXRTS); + success = ((eir & EIR_TXERIF) == 0); + if (success) + break; // usual exit of the for(retry) loop + + // Errata 13 detection + uint8_t tsv4 = readByte(end + 4); + if (!(tsv4 & 0b00100000)) // is it "late collision" indicated in bit 29 of TSV? + break; // other fail, not the Errata 13 situation + #if ACTLOGLEVEL>=LOG_ERROR + LogObject.uart_send_strln(F("Enc28J60Network::sendPacket(memhandle handle) Errata 13 LATE COLLISION !!")); + #endif + } + + return success; +} + +uint16_t +Enc28J60Network::setReadPtr(memhandle handle, memaddress position, uint16_t len) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::setReadPtr(memhandle handle, memaddress position, uint16_t len) DEBUG_V3:Function started")); + #endif + memblock *packet = handle == UIP_RECEIVEBUFFERHANDLE ? &receivePkt : &blocks[handle]; + memaddress start = handle == UIP_RECEIVEBUFFERHANDLE && packet->begin + position > RXSTOP_INIT ? packet->begin + position-((RXSTOP_INIT + 1)-RXSTART_INIT) : packet->begin + position; + + writeRegPair(ERDPTL, start); + + if (len > packet->size - position) + len = packet->size - position; + return len; +} + +uint16_t +Enc28J60Network::readPacket(memhandle handle, memaddress position, uint8_t* buffer, uint16_t len) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::readPacket(memhandle handle, memaddress position, uint8_t* buffer, uint16_t len) DEBUG_V3:Function started")); + #endif + #if defined(ESP8266) + wdt_reset(); + #endif + len = setReadPtr(handle, position, len); + readBuffer(len, buffer); + #if ACTLOGLEVEL>=LOG_DEBUG_V2 + LogObject.uart_send_str(F("Enc28J60Network::readPacket(memhandle handle, memaddress position, uint8_t* buffer, uint16_t len) DEBUG_V2: Read bytes:")); + LogObject.uart_send_dec(len); + LogObject.uart_send_str(F(" save to block(")); + LogObject.uart_send_dec(handle); + LogObject.uart_send_str(F(") [")); + LogObject.uart_send_hex(position); + LogObject.uart_send_str(F("]: ")); + for (uint16_t i=0; i=LOG_DEBUG_V3 + LogObject.uart_send_str(F("Enc28J60Network::writePacket(memhandle handle, memaddress position, uint8_t* buffer, uint16_t len) DEBUG_V3:Function started with len:")); + LogObject.uart_send_decln(len); + #endif + #if defined(ESP8266) + wdt_reset(); + #endif + memblock *packet = &blocks[handle]; + uint16_t start = packet->begin + position; + + writeRegPair(EWRPTL, start); + + if (len > packet->size - position) + len = packet->size - position; + writeBuffer(len, buffer); + #if ACTLOGLEVEL>=LOG_DEBUG_V2 + LogObject.uart_send_str(F("Enc28J60Network::writePacket(memhandle handle, memaddress position, uint8_t* buffer, uint16_t len) DEBUG_V2: Write bytes:")); + LogObject.uart_send_dec(len); + LogObject.uart_send_str(F(" save to block(")); + LogObject.uart_send_dec(handle); + LogObject.uart_send_str(F(") [")); + LogObject.uart_send_hex(start); + LogObject.uart_send_str(F("]: ")); + for (uint16_t i=0; i=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::enableBroadcast (bool temporary) DEBUG_V3:Function started")); + #endif + writeRegByte(ERXFCON, readRegByte(ERXFCON) | ERXFCON_BCEN); + if(!temporary) + broadcast_enabled = true; +} + +void Enc28J60Network::disableBroadcast (bool temporary) { + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::disableBroadcast (bool temporary) DEBUG_V3:Function started")); + #endif + if(!temporary) + broadcast_enabled = false; + if(!broadcast_enabled) + writeRegByte(ERXFCON, readRegByte(ERXFCON) & ~ERXFCON_BCEN); +} + +void Enc28J60Network::enableMulticast (void) { + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::enableMulticast (void) DEBUG_V3:Function started")); + #endif + writeRegByte(ERXFCON, readRegByte(ERXFCON) | ERXFCON_MCEN); +} + +void Enc28J60Network::disableMulticast (void) { + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::disableMulticast (void) DEBUG_V3:Function started")); + #endif + writeRegByte(ERXFCON, readRegByte(ERXFCON) & ~ERXFCON_MCEN); +} + +uint8_t Enc28J60Network::readRegByte (uint8_t address) { + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::readRegByte (uint8_t address) DEBUG_V3:Function started")); + #endif + setBank(address); + return readOp(ENC28J60_READ_CTRL_REG, address); +} + +void Enc28J60Network::writeRegByte (uint8_t address, uint8_t data) { + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::writeRegByte (uint8_t address, uint8_t data) DEBUG_V3:Function started")); + #endif + setBank(address); + writeOp(ENC28J60_WRITE_CTRL_REG, address, data); +} + + +uint8_t Enc28J60Network::readByte(uint16_t addr) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::readByte(uint16_t addr) DEBUG_V3:Function started")); + #endif + #if defined(ESP8266) + wdt_reset(); + #endif + writeRegPair(ERDPTL, addr); + + CSACTIVE; + #if ENC28J60_USE_SPILIB + // issue read command + #if defined(ARDUINO) + SPI.transfer(ENC28J60_READ_BUF_MEM); + // read data + uint8_t c = SPI.transfer(0x00); + #endif + #if defined(__MBED__) + _spi.write(ENC28J60_READ_BUF_MEM); + // read data + uint8_t c = _spi.write(0x00); + #endif + CSPASSIVE; + return (c); + #else + // issue read command + SPDR = ENC28J60_READ_BUF_MEM; + waitspi(); + // read data + SPDR = 0x00; + waitspi(); + CSPASSIVE; + return (SPDR); + #endif +} + +void Enc28J60Network::writeByte(uint16_t addr, uint8_t data) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::writeByte(uint16_t addr, uint8_t data) DEBUG_V3:Function started")); + #endif + #if defined(ESP8266) + wdt_reset(); + #endif + writeRegPair(EWRPTL, addr); + + CSACTIVE; + #if ENC28J60_USE_SPILIB + // issue write command + #if defined(ARDUINO) + SPI.transfer(ENC28J60_WRITE_BUF_MEM); + // write data + SPI.transfer(data); + #endif + #if defined(__MBED__) + _spi.write(ENC28J60_WRITE_BUF_MEM); + // write data + _spi.write(data); + #endif + #else + // issue write command + SPDR = ENC28J60_WRITE_BUF_MEM; + waitspi(); + // write data + SPDR = data; + waitspi(); + #endif + CSPASSIVE; +} + +void +Enc28J60Network::copyPacket(memhandle dest_pkt, memaddress dest_pos, memhandle src_pkt, memaddress src_pos, uint16_t len) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::copyPacket(memhandle dest_pkt, memaddress dest_pos, memhandle src_pkt, memaddress src_pos, uint16_t len) DEBUG_V3:Function started")); + #endif + memblock *dest = &blocks[dest_pkt]; + memblock *src = src_pkt == UIP_RECEIVEBUFFERHANDLE ? &receivePkt : &blocks[src_pkt]; + memaddress start = src_pkt == UIP_RECEIVEBUFFERHANDLE && src->begin + src_pos > RXSTOP_INIT ? src->begin + src_pos-((RXSTOP_INIT + 1)-RXSTART_INIT) : src->begin + src_pos; + enc28J60_mempool_block_move_callback(dest->begin+dest_pos,start,len); + // setERXRDPT(); let it to freePacket after all packets are saved +} + +void +enc28J60_mempool_block_move_callback(memaddress dest, memaddress src, memaddress len) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("enc28J60_mempool_block_move_callback(memaddress dest, memaddress src, memaddress len) DEBUG_V3:Function started")); + #endif +//void +//Enc28J60Network::memblock_mv_cb(uint16_t dest, uint16_t src, uint16_t len) +//{ + //as ENC28J60 DMA is unable to copy single bytes: + if (len == 1) + { + Enc28J60Network::writeByte(dest,Enc28J60Network::readByte(src)); + } + else + { + // calculate address of last byte + len += src - 1; + + /* 1. Appropriately program the EDMAST, EDMAND + and EDMADST register pairs. The EDMAST + registers should point to the first byte to copy + from, the EDMAND registers should point to the + last byte to copy and the EDMADST registers + should point to the first byte in the destination + range. The destination range will always be + linear, never wrapping at any values except from + 8191 to 0 (the 8-Kbyte memory boundary). + Extreme care should be taken when + programming the start and end pointers to + prevent a never ending DMA operation which + would overwrite the entire 8-Kbyte buffer. + */ + Enc28J60Network::writeRegPair(EDMASTL, src); + Enc28J60Network::writeRegPair(EDMADSTL, dest); + + if ((src <= RXSTOP_INIT)&& (len > RXSTOP_INIT))len -= ((RXSTOP_INIT + 1)-RXSTART_INIT); + Enc28J60Network::writeRegPair(EDMANDL, len); + + /* + 2. If an interrupt at the end of the copy process is + desired, set EIE.DMAIE and EIE.INTIE and + clear EIR.DMAIF. + + 3. Verify that ECON1.CSUMEN is clear. */ + Enc28J60Network::writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_CSUMEN); + + /* 4. Start the DMA copy by setting ECON1.DMAST. */ + Enc28J60Network::writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_DMAST); + + // wait until runnig DMA is completed + while (Enc28J60Network::readOp(ENC28J60_READ_CTRL_REG, ECON1) & ECON1_DMAST) + { + delay(1); + } + } +} + +void +Enc28J60Network::freePacket(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::freePacket(void) DEBUG_V3:Function started")); + #endif + setERXRDPT(); +} + +uint8_t +Enc28J60Network::readOp(uint8_t op, uint8_t address) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::readOp(uint8_t op, uint8_t address) DEBUG_V3:Function started")); + #endif + CSACTIVE; + // issue read command + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + SPI.transfer(op | (address & ADDR_MASK)); + // read data + if(address & 0x80) + { + // do dummy read if needed (for mac and mii, see datasheet page 29) + SPI.transfer(0x00); + } + uint8_t c = SPI.transfer(0x00); + #endif + #if defined(__MBED__) + _spi.write(op | (address & ADDR_MASK)); + // read data + if(address & 0x80) + { + // do dummy read if needed (for mac and mii, see datasheet page 29) + _spi.write(0x00); + } + uint8_t c = _spi.write(0x00); + #endif + // release CS + CSPASSIVE; + return(c); + #else + // issue read command + SPDR = op | (address & ADDR_MASK); + waitspi(); + // read data + SPDR = 0x00; + waitspi(); + // do dummy read if needed (for mac and mii, see datasheet page 29) + if(address & 0x80) + { + SPDR = 0x00; + waitspi(); + } + // release CS + CSPASSIVE; + return(SPDR); + #endif + #if defined(ESP8266) + yield(); + #endif +} + +void +Enc28J60Network::writeOp(uint8_t op, uint8_t address, uint8_t data) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::writeOp(uint8_t op, uint8_t address, uint8_t data) DEBUG_V3:Function started")); + #endif + CSACTIVE; + // issue write command + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + SPI.transfer(op | (address & ADDR_MASK)); + // write data + SPI.transfer(data); + #endif + #if defined(__MBED__) + _spi.write(op | (address & ADDR_MASK)); + // write data + _spi.write(data); + #endif + #else + // issue write command + SPDR = op | (address & ADDR_MASK); + waitspi(); + // write data + SPDR = data; + waitspi(); + #endif + CSPASSIVE; + #if defined(ESP8266) + yield(); + #endif +} + +void +Enc28J60Network::readBuffer(uint16_t len, uint8_t* data) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::readBuffer(uint16_t len, uint8_t* data) DEBUG_V3:Function started")); + #endif + CSACTIVE; + // issue read command + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + SPI.transfer(ENC28J60_READ_BUF_MEM); + #endif + #if defined(__MBED__) + _spi.write(ENC28J60_READ_BUF_MEM); + #endif + #else + SPDR = ENC28J60_READ_BUF_MEM; + waitspi(); + #endif + while(len) + { + len--; + // read data + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + *data = SPI.transfer(0x00); + #endif + #if defined(__MBED__) + *data = _spi.write(0x00); + #endif + #else + SPDR = 0x00; + waitspi(); + *data = SPDR; + #endif + data++; + } + //*data='\0'; + CSPASSIVE; +} + +void +Enc28J60Network::writeBuffer(uint16_t len, uint8_t* data) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::writeBuffer(uint16_t len, uint8_t* data) DEBUG_V3:Function started")); + #endif + CSACTIVE; + // issue write command + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + SPI.transfer(ENC28J60_WRITE_BUF_MEM); + #endif + #if defined(__MBED__) + _spi.write(ENC28J60_WRITE_BUF_MEM); + #endif + #else + SPDR = ENC28J60_WRITE_BUF_MEM; + waitspi(); + #endif + while(len) + { + len--; + // write data + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + SPI.transfer(*data); + #endif + #if defined(__MBED__) + _spi.write(*data); + #endif + data++; + #else + SPDR = *data; + data++; + waitspi(); + #endif + } + CSPASSIVE; +} + +void +Enc28J60Network::setBank(uint8_t address) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::setBank(uint8_t address) DEBUG_V3:Function started")); + #endif + // set the bank (if needed) + if((address & BANK_MASK) != bank) + { + // set the bank + writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, (ECON1_BSEL1|ECON1_BSEL0)); + writeOp(ENC28J60_BIT_FIELD_SET, ECON1, (address & BANK_MASK)>>5); + bank = (address & BANK_MASK); + } +} + +uint8_t +Enc28J60Network::readReg(uint8_t address) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::readReg(uint8_t address) DEBUG_V3:Function started")); + #endif + // set the bank + setBank(address); + // do the read + return readOp(ENC28J60_READ_CTRL_REG, address); +} + +void +Enc28J60Network::writeReg(uint8_t address, uint8_t data) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::writeReg(uint8_t address, uint8_t data) DEBUG_V3:Function started")); + #endif + // set the bank + setBank(address); + // do the write + writeOp(ENC28J60_WRITE_CTRL_REG, address, data); +} + +void +Enc28J60Network::writeRegPair(uint8_t address, uint16_t data) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::writeRegPair(uint8_t address, uint16_t data) DEBUG_V3:Function started")); + #endif + // set the bank + setBank(address); + // do the write + writeOp(ENC28J60_WRITE_CTRL_REG, address, (data&0xFF)); + writeOp(ENC28J60_WRITE_CTRL_REG, address+1, (data) >> 8); +} + +void +Enc28J60Network::phyWrite(uint8_t address, uint16_t data) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::phyWrite(uint8_t address, uint16_t data) DEBUG_V3:Function started")); + #endif + unsigned int timeout = 15; + // set the PHY register address + writeReg(MIREGADR, address); + // write the PHY data + writeRegPair(MIWRL, data); + // wait until the PHY write completes + while (readReg(MISTAT) & MISTAT_BUSY) + { + delay(10); + #if defined(ESP8266) + wdt_reset(); + #endif + if (--timeout == 0) + { + #if ACTLOGLEVEL>=LOG_ERR + LogObject.uart_send_strln(F("Enc28J60Network::phyWrite ERROR:TIMEOUT !!")); + #endif + return; + } + } +} + +uint16_t +Enc28J60Network::phyRead(uint8_t address) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::phyRead(uint8_t address) DEBUG_V3:Function started")); + #endif + unsigned int timeout = 15; + writeReg(MIREGADR,address); + writeReg(MICMD, MICMD_MIIRD); + // wait until the PHY read completes + while(readReg(MISTAT) & MISTAT_BUSY) + { + delay(10); + #if defined(ESP8266) + wdt_reset(); + #endif + if (--timeout == 0) + { + #if ACTLOGLEVEL>=LOG_ERR + LogObject.uart_send_strln(F("Enc28J60Network::phyRead ERROR:TIMEOUT !!")); + #endif + return 0; + } + } + writeReg(MICMD, 0); + return (readReg(MIRDL) | readReg(MIRDH) << 8); +} + +void +Enc28J60Network::clkout(uint8_t clk) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::clkout(uint8_t clk) DEBUG_V3:Function started")); + #endif + //setup clkout: 2 is 12.5MHz: + writeReg(ECOCON, clk & 0x7); +} + +uint16_t +Enc28J60Network::chksum(uint16_t sum, memhandle handle, memaddress pos, uint16_t len) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::chksum(uint16_t sum, memhandle handle, memaddress pos, uint16_t len) DEBUG_V3:Function started")); + #endif + uint16_t t; + len = setReadPtr(handle, pos, len)-1; + CSACTIVE; + // issue read command + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + SPI.transfer(ENC28J60_READ_BUF_MEM); + #endif + #if defined(__MBED__) + _spi.write(ENC28J60_READ_BUF_MEM); + #endif + #else + SPDR = ENC28J60_READ_BUF_MEM; + waitspi(); + #endif + uint16_t i; + for (i = 0; i < len; i+=2) + { + // read data + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + t = SPI.transfer(0x00) << 8; + t += SPI.transfer(0x00); + #endif + #if defined(__MBED__) + t = _spi.write(0x00) << 8; + t += _spi.write(0x00); + #endif + #else + SPDR = 0x00; + waitspi(); + t = SPDR << 8; + SPDR = 0x00; + waitspi(); + t += SPDR; + #endif + sum += t; + if(sum < t) + { + sum++; /* carry */ + } + } + if(i == len) + { + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + t = (SPI.transfer(0x00) << 8) + 0; + #endif + #if defined(__MBED__) + t = (_spi.write(0x00) << 8) + 0; + #endif + #else + SPDR = 0x00; + waitspi(); + t = (SPDR << 8) + 0; + #endif + sum += t; + if(sum < t) + { + sum++; /* carry */ + } + } + CSPASSIVE; + + /* Return sum in host byte order. */ + return sum; +} + +void +Enc28J60Network::powerOff(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::powerOff(void) DEBUG_V3:Function started")); + #endif + writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_RXEN); + delay(50); + writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_VRPS); + delay(50); + writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_PWRSV); +} + +void +Enc28J60Network::powerOn(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::powerOn(void) DEBUG_V3:Function started")); + #endif + writeOp(ENC28J60_BIT_FIELD_CLR, ECON2, ECON2_PWRSV); + delay(50); + writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_RXEN); + delay(50); +} + +// read erevid from object: +uint8_t +Enc28J60Network::geterevid(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_str(F("Enc28J60Network::geterevid(void) DEBUG_V3:Function started and return:")); + LogObject.uart_send_decln(erevid); + #endif + return(erevid); +} + +// read the phstat2 of the chip: +uint16_t +Enc28J60Network::PhyStatus(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_str(F("Enc28J60Network::PhyStatus(void) DEBUG_V3:Function started")); + LogObject.uart_send_decln(erevid); + #endif + uint16_t phstat2; + phstat2=phyRead(PHSTAT2); + if ((phstat2 & 0x20) > 0) {phstat2=phstat2 &0x100;} + phstat2=(phstat2 & 0xFF00) | erevid; + if ((phstat2 & 0x8000) > 0) {phstat2=0;} + return phstat2; +} + +bool +Enc28J60Network::linkStatus(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::linkStatus(void) DEBUG_V3:Function started")); + #endif + return (phyRead(PHSTAT2) & 0x0400) > 0; +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet-2.0.9/utility/Enc28J60Network.h b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet-2.0.9/utility/Enc28J60Network.h new file mode 100644 index 0000000..5174462 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet-2.0.9/utility/Enc28J60Network.h @@ -0,0 +1,337 @@ +/* + Enc28J60NetworkClass.h + UIPEthernet network driver for Microchip ENC28J60 Ethernet Interface. + + Copyright (c) 2013 Norbert Truchsess + All rights reserved. + + inspired by enc28j60.c file from the AVRlib library by Pascal Stang. + For AVRlib See http://www.procyonengineering.com/ + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + +#ifndef Enc28J60Network_H_ +#define Enc28J60Network_H_ + +// KH mod +#if defined(ESP32) + //pin SS already defined in ESP32 as pin 5, don't use this as conflict with SPIFFS, EEPROM, etc. + // Use in GPIO13 + #warning ENC28J60Network.h => use ESP32, change ENC28J60_CONTROL_CS/SS_PIN_DEFAULT to GPIO13, MOSI(23), MISO(19), SCK(18) + #define ENC28J60_CONTROL_CS 13 +#endif + +// KH, For nRF52 +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #include + #define ENC28J60_USE_SPILIB 1 + + #ifndef USE_THIS_SS_PIN + // default to pin 10 + #define ENC28J60_CONTROL_CS 10 + #else + #warning Using USE_THIS_SS_PIN in Enc28J60Network.h for nRF52 + #define ENC28J60_CONTROL_CS USE_THIS_SS_PIN + #endif +#endif + +// KH, For SAMD21/SAMD51 +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #include + #define ENC28J60_USE_SPILIB 1 + + #ifndef USE_THIS_SS_PIN + // default to pin 10 + #define ENC28J60_CONTROL_CS 10 + #else + #warning Using USE_THIS_SS_PIN in Enc28J60Network.h for SAMD + #define ENC28J60_CONTROL_CS USE_THIS_SS_PIN + #endif +#endif +////// + +#include "mempool.h" +#if defined(__MBED__) + #include + //UIPEthernet(SPI_MOSI, SPI_MISO, SPI_SCK, SPI_CS); + #if defined(TARGET_LPC1768) + #define SPI_MOSI p11 + #define SPI_MISO p12 + #define SPI_SCK p13 + #define SPI_CS p8 + #elif defined(TARGET_LPC1114) + #define SPI_MOSI dp2 + #define SPI_MISO dp1 + #define SPI_SCK dp6 + #define SPI_CS dp25 + #elif defined(TARGET_LPC11U68) + #define SPI_MOSI P0_9 + #define SPI_MISO P0_8 + #define SPI_SCK P1_29 + #define SPI_CS P0_2 + #elif defined(TARGET_NUCLEO_F103RB) || defined(TARGET_NUCLEO_L152RE) || defined(TARGET_NUCLEO_F030R8) \ + || defined(TARGET_NUCLEO_F401RE) || defined(TARGET_NUCLEO_F302R8) || defined(TARGET_NUCLEO_L053R8) \ + || defined(TARGET_NUCLEO_F411RE) || defined(TARGET_NUCLEO_F334R8) || defined(TARGET_NUCLEO_F072RB) \ + || defined(TARGET_NUCLEO_F091RC) || defined(TARGET_NUCLEO_F303RE) || defined(TARGET_NUCLEO_F070RB) + #define SPI_MOSI D4 + #define SPI_MISO D5 + #define SPI_SCK D3 + #define SPI_CS D2 + #endif + #define ENC28J60_CONTROL_CS SPI_CS +#endif + +#if defined(STM32F3) || defined(STM32F2) //This is workaround for stm32duino STM32F2, and adafruit wiced feather STM32F2 + #define BOARD_SPI1_NSS_PIN PA4 + #define BOARD_SPI1_SCK_PIN PA5 + #define BOARD_SPI1_MISO_PIN PA6 + #define BOARD_SPI1_MOSI_PIN PA7 +#endif //This is workaround for stm32duino STM32F3, and adafruit wiced feather STM32F2 + +#if defined(BOARD_discovery_f4) + #define __STM32F4__ +#endif +#if defined(__MK20DX128__) || defined(__MKL26Z64__) + #include +#endif + +#if !defined(ENC28J60_CONTROL_CS) + #if defined(__AVR__) || defined(ESP8266) || defined(__RFduino__) + // Arduino Uno (__AVR__) SS defined to pin 10 + // Arduino Leonardo (ARDUINO_AVR_LEONARDO) SS defined to LED_BUILTIN_RX (17) + // Arduino Mega(__AVR_ATmega2560__) SS defined to pin 53 + // ESP8266 (ESP8266) SS defined to pin 15 + #if defined(ARDUINO_AVR_LEONARDO) || defined(ARDUINO_AVR_MICRO) + #define ENC28J60_CONTROL_CS PIN_A10 + #warning "Using LEONARDO borad PIN_A10 for ENC28J60_CONTROL_CS. Use UIPEthernet::init(uint8_t) to change it." + #else + #define ENC28J60_CONTROL_CS SS + #endif + #elif defined(ARDUINO_ARCH_AMEBA) //Defined SS to pin 10 + #define ENC28J60_CONTROL_CS SS //PC_0 A5 10 + #elif defined(ARDUINO_ARCH_SAM) + // Arduino Due (ARDUINO_ARCH_SAM) BOARD_SPI_DEFAULT_SS (SS3) defined to pin 78 + //#define ENC28J60_CONTROL_CS BOARD_SPI_DEFAULT_SS + #define ENC28J60_CONTROL_CS BOARD_SPI_SS0 + #elif defined(ARDUINO_ARCH_SAMD) + #define ENC28J60_CONTROL_CS SS + #elif defined(__ARDUINO_ARC__) //Intel ARC32 Genuino 101 + #define ENC28J60_CONTROL_CS SS + #elif defined(__RFduino__) //RFduino + #define ENC28J60_CONTROL_CS SS + #elif defined(ARDUINO_ARCH_STM32) // STM32duino core + #define ENC28J60_CONTROL_CS SS + #elif defined(ARDUINO_ARCH_ESP32) // arduino-esp32 + #define ENC28J60_CONTROL_CS SS + #elif defined(STM32_MCU_SERIES) || defined(__STM32F1__) || defined(__STM32F3__) || defined(STM32F3) || defined(__STM32F4__) || defined(STM32F2) + #if defined(BOARD_SPI1_NSS_PIN) + #define ENC28J60_CONTROL_CS BOARD_SPI1_NSS_PIN + #elif defined(ARDUINO_STM32F4_NETDUINO2PLUS) + #define ENC28J60_CONTROL_CS PC8 + #else + #define ENC28J60_CONTROL_CS SPI.nssPin() + //#define ENC28J60_CONTROL_CS PA4 + #endif + #elif defined(__MK20DX128__) || defined(__MKL26Z64__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) || defined(__IMXRT1062__) + #define ENC28J60_CONTROL_CS PIN_SPI_SS + #endif +#endif +#if !defined(ENC28J60_CONTROL_CS) + #warning "Default ENC28J60_CONTROL_CS could not be defined! Use UIPEthernet::init(uint8_t) to set it." + #define ENC28J60_CONTROL_CS 0 +#endif + +extern uint8_t ENC28J60ControlCS; + +#if !defined(SPI_MOSI) + #if defined(__AVR__) || defined(ESP8266) || defined(__RFduino__) + #define SPI_MOSI MOSI + #elif defined(ARDUINO_ARCH_AMEBA) + #define SPI_MOSI 11 //PC_2 + #elif defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) + #define SPI_MOSI PIN_SPI_MOSI + #elif defined(__ARDUINO_ARC__) //Intel ARC32 Genuino 101 + #define SPI_MOSI MOSI + #elif defined(__RFduino__) //RFduino + #define SPI_MOSI MOSI + #elif defined(ARDUINO_ARCH_STM32) // STM32duino core + #define SPI_MOSI MOSI + #elif defined(ARDUINO_ARCH_ESP32) // arduino-esp32 + #define SPI_MOSI MOSI + #elif defined(STM32_MCU_SERIES) || defined(__STM32F1__) || defined(__STM32F3__) || defined(STM32F3) || defined(__STM32F4__) || defined(STM32F2) + #if defined(BOARD_SPI1_MOSI_PIN) + #define SPI_MOSI BOARD_SPI1_MOSI_PIN + #else + #define SPI_MOSI SPI.mosiPin() + #endif + #elif defined(__MK20DX128__) || defined(__MKL26Z64__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) || defined(__IMXRT1062__) + #define SPI_MOSI PIN_SPI_MOSI + #endif +#endif +#if !defined(SPI_MOSI) + // KH mod + //#error "Not defined SPI_MOSI!" + #define SPI_MOSI MOSI + ////// +#endif + +#if !defined(SPI_MISO) + #if defined(__AVR__) || defined(ESP8266) || defined(__RFduino__) + #define SPI_MISO MISO + #elif defined(ARDUINO_ARCH_AMEBA) + #define SPI_MISO 12 //PC_3 + #elif defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) + #define SPI_MISO PIN_SPI_MISO + #elif defined(__ARDUINO_ARC__) //Intel ARC32 Genuino 101 + #define SPI_MISO MISO + #elif defined(__RFduino__) //RFduino + #define SPI_MISO MISO + #elif defined(ARDUINO_ARCH_STM32) // STM32duino core + #define SPI_MISO MISO + #elif defined(ARDUINO_ARCH_ESP32) // arduino-esp32 + #define SPI_MISO MISO + #elif defined(STM32_MCU_SERIES) || defined(__STM32F1__) || defined(__STM32F3__) || defined(STM32F3) || defined(__STM32F4__) || defined(STM32F2) + #if defined(BOARD_SPI1_MISO_PIN) + #define SPI_MISO BOARD_SPI1_MISO_PIN + #else + #define SPI_MISO SPI.misoPin() + #endif + #elif defined(__MK20DX128__) || defined(__MKL26Z64__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) || defined(__IMXRT1062__) + #define SPI_MISO PIN_SPI_MISO + #endif +#endif +#if !defined(SPI_MISO) + // KH mod + //#error "Not defined SPI_MISO!" + #define SPI_MISO MISO + ////// +#endif +#if !defined(SPI_SCK) + #if defined(__AVR__) || defined(ESP8266) || defined(__RFduino__) + #define SPI_SCK SCK + #elif defined(ARDUINO_ARCH_AMEBA) + #define SPI_SCK 13 //PC_1 A4 + #elif defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) + #define SPI_SCK PIN_SPI_SCK + #elif defined(__ARDUINO_ARC__) //Intel ARC32 Genuino 101 + #define SPI_SCK SCK + #elif defined(__RFduino__) //RFduino + #define SPI_SCK SCK + #elif defined(ARDUINO_ARCH_STM32) // STM32duino core + #define SPI_SCK SCK + #elif defined(ARDUINO_ARCH_ESP32) // arduino-esp32 + #define SPI_SCK SCK + #elif defined(STM32_MCU_SERIES) || defined(__STM32F1__) || defined(__STM32F3__) || defined(STM32F3) || defined(__STM32F4__) || defined(STM32F2) + #if defined(BOARD_SPI1_SCK_PIN) + #define SPI_SCK BOARD_SPI1_SCK_PIN + #else + #define SPI_SCK SPI.sckPin() + #endif + #elif defined(__MK20DX128__) || defined(__MKL26Z64__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) || defined(__IMXRT1062__) + #define SPI_SCK PIN_SPI_SCK + #endif +#endif +#if !defined(SPI_SCK) + // KH, For nRF52 + //#error "Not defined SPI_SCK!" + #define SPI_SCK SCK + ////// +#endif + +#if defined(__MBED__) || defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) || defined(__ARDUINO_ARC__) || defined(__STM32F1__) || defined(__STM32F3__) || defined(STM32F3) || defined(__STM32F4__) || defined(STM32F2) || defined(ESP8266) || defined(ARDUINO_ARCH_AMEBA) || defined(__MK20DX128__) || defined(__MKL26Z64__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) || defined(__IMXRT1062__) || defined(__RFduino__) || defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) + #if defined(ARDUINO) && (!defined(ARDUINO_ARCH_STM32) && defined(STM32F3)) + #include "HardwareSPI.h" + #else + #include + #endif + #define ENC28J60_USE_SPILIB 1 +#endif + +#define UIP_RECEIVEBUFFERHANDLE 0xff + +#define UIP_SENDBUFFER_PADDING 7 +#define UIP_SENDBUFFER_OFFSET 1 + +/* + * Empfangen von ip-header, arp etc... + * wenn tcp/udp -> tcp/udp-callback -> assign new packet to connection + */ + +#define TX_COLLISION_RETRY_COUNT 10 + +class Enc28J60Network : public MemoryPool +{ + +private: + static uint16_t nextPacketPtr; + static uint8_t bank; + static uint8_t erevid; + + static struct memblock receivePkt; + + static bool broadcast_enabled; //!< True if broadcasts enabled (used to allow temporary disable of broadcast for DHCP or other internal functions) + + static uint8_t readOp(uint8_t op, uint8_t address); + static void writeOp(uint8_t op, uint8_t address, uint8_t data); + static uint16_t setReadPtr(memhandle handle, memaddress position, uint16_t len); + static void setERXRDPT(void); + static void readBuffer(uint16_t len, uint8_t* data); + static void writeBuffer(uint16_t len, uint8_t* data); + static uint8_t readByte(uint16_t addr); + static void writeByte(uint16_t addr, uint8_t data); + static void setBank(uint8_t address); + static uint8_t readReg(uint8_t address); + static void writeReg(uint8_t address, uint8_t data); + static void writeRegPair(uint8_t address, uint16_t data); + static void phyWrite(uint8_t address, uint16_t data); + static uint16_t phyRead(uint8_t address); + static void clkout(uint8_t clk); + + static void enableBroadcast (bool temporary); + static void disableBroadcast (bool temporary); + static void enableMulticast (void); + static void disableMulticast (void); + + static uint8_t readRegByte (uint8_t address); + static void writeRegByte (uint8_t address, uint8_t data); + + friend void enc28J60_mempool_block_move_callback(memaddress,memaddress,memaddress); + +public: + + void powerOn(void); + void powerOff(void); + static uint8_t geterevid(void); + uint16_t PhyStatus(void); + static bool linkStatus(void); + + static void init(uint8_t* macaddr); + static memhandle receivePacket(void); + static void freePacket(void); + static memaddress blockSize(memhandle handle); + static bool sendPacket(memhandle handle); + static uint16_t readPacket(memhandle handle, memaddress position, uint8_t* buffer, uint16_t len); + static uint16_t writePacket(memhandle handle, memaddress position, uint8_t* buffer, uint16_t len); + static void copyPacket(memhandle dest, memaddress dest_pos, memhandle src, memaddress src_pos, uint16_t len); + static uint16_t chksum(uint16_t sum, memhandle handle, memaddress pos, uint16_t len); +}; + +#endif /* Enc28J60NetworkClass_H_ */ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet/UIPEthernet.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet/UIPEthernet.cpp new file mode 100644 index 0000000..df35732 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet/UIPEthernet.cpp @@ -0,0 +1,641 @@ +/* + UIPEthernet.cpp - Arduino implementation of a uIP wrapper class. + Copyright (c) 2013 Norbert Truchsess + All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + +#if defined(ARDUINO) + #include +#endif +#if defined(__MBED__) + #include + #include "mbed/millis.h" +#endif +#include "UIPEthernet.h" +#include "utility/logging.h" +#include "utility/Enc28J60Network.h" + +#include "UIPUdp.h" + +extern "C" +{ +#include "utility/uipopt.h" +#include "utility/uip.h" +#include "utility/uip_arp.h" +#include "utility/uip_timer.h" +} + +#define ETH_HDR ((struct uip_eth_hdr *)&uip_buf[0]) + +memhandle UIPEthernetClass::in_packet(NOBLOCK); +memhandle UIPEthernetClass::uip_packet(NOBLOCK); +uint8_t UIPEthernetClass::uip_hdrlen(0); +uint8_t UIPEthernetClass::packetstate(0); + +unsigned long UIPEthernetClass::periodic_timer; + +IPAddress UIPEthernetClass::_dnsServerAddress; +#if UIP_UDP + DhcpClass* UIPEthernetClass::_dhcp(NULL); + static DhcpClass s_dhcp; // Placing this instance here is saving 40K to final *.bin (see bug below) +#endif + +// Because uIP isn't encapsulated within a class we have to use global +// variables, so we can only have one TCP/IP stack per program. + +UIPEthernetClass::UIPEthernetClass() +{ +} + +void UIPEthernetClass::init(const uint8_t pin) +{ + ENC28J60ControlCS = pin; +} + +#if UIP_UDP +int +UIPEthernetClass::begin(const uint8_t* mac) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var _mac_address + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac, sizeof(_mac_address)); + ////// + + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::begin(const uint8_t* mac) DEBUG_V3:Function started")); + #endif + //static DhcpClass s_dhcp; // <-- this is a bug ! + // I leave it there commented for history. It is bring all GCC "new" memory allocation code, making the *.bin almost 40K bigger. I've move it globally. + _dhcp = &s_dhcp; + // Initialise the basic info + netInit(mac); + + // Now try to get our config info from a DHCP server + int ret = _dhcp->beginWithDHCP((uint8_t*)mac); + if(ret == 1) + { + // We've successfully found a DHCP server and got our configuration info, so set things + // accordingly + configure(_dhcp->getLocalIp(),_dhcp->getDnsServerIp(),_dhcp->getGatewayIp(),_dhcp->getSubnetMask()); + } + return ret; +} +#endif + +void +UIPEthernetClass::begin(const uint8_t* mac, IPAddress ip) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var _mac_address + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac, sizeof(_mac_address)); + ////// + + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::begin(const uint8_t* mac, IPAddress ip) DEBUG_V3:Function started")); + #endif + IPAddress dns = ip; + dns[3] = 1; + begin(mac, ip, dns); +} + +void +UIPEthernetClass::begin(const uint8_t* mac, IPAddress ip, IPAddress dns) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var _mac_address + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac, sizeof(_mac_address)); + ////// + + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::begin(const uint8_t* mac, IPAddress ip, IPAddress dns) DEBUG_V3:Function started")); + #endif + IPAddress gateway = ip; + gateway[3] = 1; + begin(mac, ip, dns, gateway); +} + +void +UIPEthernetClass::begin(const uint8_t* mac, IPAddress ip, IPAddress dns, IPAddress gateway) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var _mac_address + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac, sizeof(_mac_address)); + ////// + + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::begin(const uint8_t* mac, IPAddress ip, IPAddress dns, IPAddress gateway) DEBUG_V3:Function started")); + #endif + IPAddress subnet(255, 255, 255, 0); + begin(mac, ip, dns, gateway, subnet); +} + +void +UIPEthernetClass::begin(const uint8_t* mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) +{ + // KH mod to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + // Now store to private var _mac_address + //uint8_t _mac_address[6] ={0,}; + memcpy(_mac_address, mac, sizeof(_mac_address)); + ////// + + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::begin(const uint8_t* mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) DEBUG_V3:Function started")); + #endif + netInit(mac); + configure(ip,dns,gateway,subnet); +} + +int UIPEthernetClass::maintain(){ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::maintain() DEBUG_V3:Function started")); + #endif + tick(); + int rc = DHCP_CHECK_NONE; +#if UIP_UDP + if(_dhcp != NULL){ + //we have a pointer to dhcp, use it + rc = _dhcp->checkLease(); + switch ( rc ){ + case DHCP_CHECK_NONE: + //nothing done + break; + case DHCP_CHECK_RENEW_OK: + case DHCP_CHECK_REBIND_OK: + //we might have got a new IP. + configure(_dhcp->getLocalIp(),_dhcp->getDnsServerIp(),_dhcp->getGatewayIp(),_dhcp->getSubnetMask()); + break; + default: + //this is actually a error, it will retry though + break; + } + } + return rc; +#endif +} + +EthernetLinkStatus UIPEthernetClass::linkStatus() +{ + if (!Enc28J60.geterevid()) + return Unknown; + return Enc28J60.linkStatus() ? LinkON : LinkOFF; +} + +IPAddress UIPEthernetClass::localIP() +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::localIP() DEBUG_V3:Function started")); + #endif + IPAddress ret; + uip_ipaddr_t a; + uip_gethostaddr(a); + return ip_addr_uip(a); +} + +IPAddress UIPEthernetClass::subnetMask() +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::subnetMask() DEBUG_V3:Function started")); + #endif + IPAddress ret; + uip_ipaddr_t a; + uip_getnetmask(a); + return ip_addr_uip(a); +} + +IPAddress UIPEthernetClass::gatewayIP() +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::gatewayIP() DEBUG_V3:Function started")); + #endif + IPAddress ret; + uip_ipaddr_t a; + uip_getdraddr(a); + return ip_addr_uip(a); +} + +IPAddress UIPEthernetClass::dnsServerIP() +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::dnsServerIP() DEBUG_V3:Function started")); + #endif + return _dnsServerAddress; +} + +void +UIPEthernetClass::tick() +{ +#if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::tick() DEBUG_V3:Function started")); +#endif +if (Enc28J60Network::geterevid()==0) + { + #if ACTLOGLEVEL>=LOG_ERR + LogObject.uart_send_strln(F("UIPEthernetClass::tick() ERROR:EREVID=0 -> Not found ENC28j60 device !! Function ended !!")); + #endif + return; + } +#if defined(ESP8266) + wdt_reset(); +#endif + if (in_packet == NOBLOCK) + { + in_packet = Enc28J60Network::receivePacket(); + #if ACTLOGLEVEL>=LOG_DEBUG + if (in_packet != NOBLOCK) + { + LogObject.uart_send_str(F("UIPEthernetClass::tick() DEBUG:receivePacket: ")); + LogObject.uart_send_decln(in_packet); + } + #endif + } + if (in_packet != NOBLOCK) + { + packetstate = UIPETHERNET_FREEPACKET; + uip_len = Enc28J60Network::blockSize(in_packet); + if (uip_len > 0) + { + Enc28J60Network::readPacket(in_packet,0,(uint8_t*)uip_buf,UIP_BUFSIZE); + if (ETH_HDR ->type == HTONS(UIP_ETHTYPE_IP)) + { + uip_packet = in_packet; //required for upper_layer_checksum of in_packet! + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("UIPEthernetClass::tick() DEBUG:readPacket type IP, uip_len: ")); + LogObject.uart_send_decln(uip_len); + #endif + uip_arp_ipin(); + uip_input(); + if (uip_len > 0) + { + uip_arp_out(); + network_send(); + } + } + else if (ETH_HDR ->type == HTONS(UIP_ETHTYPE_ARP)) + { + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("UIPEthernetClass::tick() DEBUG:readPacket type ARP, uip_len: ")); + LogObject.uart_send_decln(uip_len); + #endif + uip_arp_arpin(); + if (uip_len > 0) + { + network_send(); + } + } + } + if (in_packet != NOBLOCK && (packetstate & UIPETHERNET_FREEPACKET)) + { + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("UIPEthernetClass::tick() DEBUG:freeing packet: ")); + LogObject.uart_send_decln(in_packet); + #endif + Enc28J60Network::freePacket(); + in_packet = NOBLOCK; + } + } + + unsigned long now = millis(); + +#if UIP_CLIENT_TIMER >= 0 + bool periodic = (long)( now - periodic_timer ) >= 0; + for (int i = 0; i < UIP_CONNS; i++) + { +#else + if ((long)( now - periodic_timer ) >= 0) + { + periodic_timer = now + UIP_PERIODIC_TIMER; + + for (int i = 0; i < UIP_CONNS; i++) + { +#endif + + uip_conn = &uip_conns[i]; + +#if UIP_CLIENT_TIMER >= 0 + if (periodic) + { +#endif + + uip_process(UIP_TIMER); + +#if UIP_CLIENT_TIMER >= 0 + } + else + { + if (uip_conn!=NULL) + { + if (((uip_userdata_t*)uip_conn->appstate)!=NULL) + { + if ((long)( now - ((uip_userdata_t*)uip_conn->appstate)->timer) >= 0) + { + uip_process(UIP_POLL_REQUEST); + } + else + { + continue; + } + } + else + { + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::tick() DEBUG_V3:((uip_userdata_t*)uip_conn->appstate) is NULL")); + #endif + if ((long)( now - ((uip_userdata_t*)uip_conn)->timer) >= 0) + { + uip_process(UIP_POLL_REQUEST); + } + else + { + continue; + } + } + } + else + { + #if ACTLOGLEVEL>=LOG_ERR + LogObject.uart_send_strln(F("UIPEthernetClass::tick() ERROR:uip_conn is NULL")); + #endif + continue; + } + } +#endif + // If the above function invocation resulted in data that + // should be sent out on the Enc28J60Network, the global variable + // uip_len is set to a value > 0. + if (uip_len > 0) + { + uip_arp_out(); + network_send(); + } + } +#if UIP_CLIENT_TIMER >= 0 + if (periodic) + { + periodic_timer = now + UIP_PERIODIC_TIMER; +#endif +#if UIP_UDP + for (int i = 0; i < UIP_UDP_CONNS; i++) + { + uip_udp_periodic(i); + // If the above function invocation resulted in data that + // should be sent out on the Enc28J60Network, the global variable + // uip_len is set to a value > 0. */ + if (uip_len > 0) + { + UIPUDP::_send((uip_udp_userdata_t *)(uip_udp_conns[i].appstate)); + } + } +#endif /* UIP_UDP */ + } +} + +bool UIPEthernetClass::network_send() +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::network_send() DEBUG_V3:Function started")); + #endif + if (packetstate & UIPETHERNET_SENDPACKET) + { +#if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("UIPEthernetClass::network_send() DEBUG:uip_packet: ")); + LogObject.uart_send_dec(uip_packet); + LogObject.uart_send_str(F(", hdrlen: ")); + LogObject.uart_send_decln(uip_hdrlen); +#endif + Enc28J60Network::writePacket(uip_packet,0,uip_buf,uip_hdrlen); + packetstate &= ~ UIPETHERNET_SENDPACKET; + goto sendandfree; + } + uip_packet = Enc28J60Network::allocBlock(uip_len); + if (uip_packet != NOBLOCK) + { +#if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("UIPEthernetClass::network_send() DEBUG:uip_buf (uip_len): ")); + LogObject.uart_send_dec(uip_len); + LogObject.uart_send_str(F(", packet: ")); + LogObject.uart_send_decln(uip_packet); +#endif + Enc28J60Network::writePacket(uip_packet,0,uip_buf,uip_len); + goto sendandfree; + } + return false; +sendandfree: + Enc28J60Network::sendPacket(uip_packet); + Enc28J60Network::freeBlock(uip_packet); + uip_packet = NOBLOCK; + return true; +} + +void UIPEthernetClass::netInit(const uint8_t* mac) { + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::netInit(const uint8_t* mac) DEBUG_V3:Function started")); + #endif + periodic_timer = millis() + UIP_PERIODIC_TIMER; + + Enc28J60Network::init((uint8_t*)mac); + uip_seteth_addr(mac); + + uip_init(); + uip_arp_init(); +} + +void UIPEthernetClass::configure(IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) { + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::configure(IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) DEBUG_V3:Function started")); + #endif + uip_ipaddr_t ipaddr; + + uip_ip_addr(ipaddr, ip); + uip_sethostaddr(ipaddr); + + uip_ip_addr(ipaddr, gateway); + uip_setdraddr(ipaddr); + + uip_ip_addr(ipaddr, subnet); + uip_setnetmask(ipaddr); + + _dnsServerAddress = dns; +} + +UIPEthernetClass UIPEthernet; + +/*---------------------------------------------------------------------------*/ +uint16_t +UIPEthernetClass::chksum(uint16_t sum, const uint8_t *data, uint16_t len) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::chksum(uint16_t sum, const uint8_t *data, uint16_t len) DEBUG_V3:Function started")); + #endif + uint16_t t; + const uint8_t *dataptr; + const uint8_t *last_byte; + + dataptr = data; + last_byte = data + len - 1; + + while(dataptr < last_byte) { /* At least two more bytes */ + t = (dataptr[0] << 8) + dataptr[1]; + sum += t; + if(sum < t) { + sum++; /* carry */ + } + dataptr += 2; + } + + if(dataptr == last_byte) { + t = (dataptr[0] << 8) + 0; + sum += t; + if(sum < t) { + sum++; /* carry */ + } + } + + /* Return sum in host byte order. */ + return sum; +} + +/*---------------------------------------------------------------------------*/ + +uint16_t +UIPEthernetClass::ipchksum(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("UIPEthernetClass::ipchksum(void) DEBUG_V3:Function started")); + #endif + uint16_t sum; + + sum = chksum(0, &uip_buf[UIP_LLH_LEN], UIP_IPH_LEN); + return (sum == 0) ? 0xffff : htons(sum); +} + +/*---------------------------------------------------------------------------*/ +uint16_t +#if UIP_UDP +UIPEthernetClass::upper_layer_chksum(uint8_t proto) +#else +uip_tcpchksum(void) +#endif +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + #if UIP_UDP + LogObject.uart_send_strln(F("UIPEthernetClass::upper_layer_chksum(uint8_t proto) DEBUG_V3:Function started")); + #else + LogObject.uart_send_strln(F("uip_tcpchksum(void) INFO:Function started")); + #endif + #endif + uint16_t upper_layer_len; + uint16_t sum; + +#if UIP_CONF_IPV6 + upper_layer_len = (((u16_t)(BUF->len[0]) << 8) + BUF->len[1]); +#else /* UIP_CONF_IPV6 */ + upper_layer_len = (((u16_t)(BUF->len[0]) << 8) + BUF->len[1]) - UIP_IPH_LEN; +#endif /* UIP_CONF_IPV6 */ + + /* First sum pseudoheader. */ + + /* IP protocol and length fields. This addition cannot carry. */ +#if UIP_UDP + sum = upper_layer_len + proto; +#else + sum = upper_layer_len + UIP_PROTO_TCP; +#endif + /* Sum IP source and destination addresses. */ + sum = UIPEthernetClass::chksum(sum, (u8_t *)&BUF->srcipaddr[0], 2 * sizeof(uip_ipaddr_t)); + + uint8_t upper_layer_memlen; +#if UIP_UDP + switch(proto) + { +// case UIP_PROTO_ICMP: +// case UIP_PROTO_ICMP6: +// upper_layer_memlen = upper_layer_len; +// break; + case UIP_PROTO_UDP: + upper_layer_memlen = UIP_UDPH_LEN; + break; + default: +// case UIP_PROTO_TCP: +#endif + upper_layer_memlen = (BUF->tcpoffset >> 4) << 2; +#if UIP_UDP + break; + } +#endif + sum = UIPEthernetClass::chksum(sum, &uip_buf[UIP_IPH_LEN + UIP_LLH_LEN], upper_layer_memlen); +#if ACTLOGLEVEL>=LOG_DEBUG + #if UIP_UDP + LogObject.uart_send_str(F("UIPEthernetClass::upper_layer_chksum(uint8_t proto) DEBUG:uip_buf[")); + #else + LogObject.uart_send_str(F("uip_tcpchksum(void) DEBUG:uip_buf[")); + #endif + LogObject.uart_send_dec(UIP_IPH_LEN + UIP_LLH_LEN); + LogObject.uart_send_str(F("-")); + LogObject.uart_send_dec(UIP_IPH_LEN + UIP_LLH_LEN + upper_layer_memlen); + LogObject.uart_send_str(F("]: ")); + LogObject.uart_send_hexln(htons(sum)); +#endif + if (upper_layer_memlen < upper_layer_len) + { + sum = Enc28J60Network::chksum( + sum, + UIPEthernetClass::uip_packet, + UIP_IPH_LEN + UIP_LLH_LEN + upper_layer_memlen, + upper_layer_len - upper_layer_memlen + ); +#if ACTLOGLEVEL>=LOG_DEBUG + #if UIP_UDP + LogObject.uart_send_str(F("UIPEthernetClass::upper_layer_chksum(uint8_t proto) DEBUG:uip_packet(")); + #else + LogObject.uart_send_str(F("uip_tcpchksum(void) DEBUG:uip_packet(")); + #endif + LogObject.uart_send_dec(UIPEthernetClass::uip_packet); + LogObject.uart_send_str(F(")[")); + LogObject.uart_send_dec(UIP_IPH_LEN + UIP_LLH_LEN + upper_layer_memlen); + LogObject.uart_send_str(F("-")); + LogObject.uart_send_dec(UIP_IPH_LEN + UIP_LLH_LEN + upper_layer_len); + LogObject.uart_send_str(F("]: ")); + LogObject.uart_send_hexln(htons(sum)); +#endif + } + return (sum == 0) ? 0xffff : htons(sum); +} + +uint16_t +uip_ipchksum(void) +{ + return UIPEthernet.ipchksum(); +} + +#if UIP_UDP +uint16_t +uip_tcpchksum(void) +{ + uint16_t sum = UIPEthernet.upper_layer_chksum(UIP_PROTO_TCP); + return sum; +} + +uint16_t +uip_udpchksum(void) +{ + uint16_t sum = UIPEthernet.upper_layer_chksum(UIP_PROTO_UDP); + return sum; +} +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet/UIPEthernet.h b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet/UIPEthernet.h new file mode 100644 index 0000000..d02e538 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet/UIPEthernet.h @@ -0,0 +1,158 @@ +/* + UIPEthernet.h - Arduino implementation of a uIP wrapper class. + Copyright (c) 2013 Norbert Truchsess + All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + +#ifndef UIPETHERNET_H +#define UIPETHERNET_H + +#include "ethernet_comp.h" +#if defined(__MBED__) + #include +#endif +#if defined(ARDUINO) + #include + #if defined(__STM32F3__) || defined(STM32F3) || defined(__RFduino__) + #include "mbed/IPAddress.h" + #else + #include "IPAddress.h" + #endif +#endif +#include "utility/Enc28J60Network.h" +#include "utility/uipopt.h" +#include "Dhcp.h" +#if UIP_UDP + #include "UIPUdp.h" +#endif +#include "UIPClient.h" +#include "UIPServer.h" + +extern "C" +{ +#include "utility/uip_timer.h" +#include "utility/uip.h" +} + +#define UIPETHERNET_FREEPACKET 1 +#define UIPETHERNET_SENDPACKET 2 +#define UIPETHERNET_BUFFERREAD 4 + +#define uip_ip_addr(addr, ip) do { \ + ((u16_t *)(addr))[0] = HTONS(((ip[0]) << 8) | (ip[1])); \ + ((u16_t *)(addr))[1] = HTONS(((ip[2]) << 8) | (ip[3])); \ + } while(0) + +#define ip_addr_uip(a) IPAddress(a[0] & 0xFF, a[0] >> 8 , a[1] & 0xFF, a[1] >> 8) //TODO this is not IPV6 capable + +#define uip_seteth_addr(eaddr) do {uip_ethaddr.addr[0] = eaddr[0]; \ + uip_ethaddr.addr[1] = eaddr[1];\ + uip_ethaddr.addr[2] = eaddr[2];\ + uip_ethaddr.addr[3] = eaddr[3];\ + uip_ethaddr.addr[4] = eaddr[4];\ + uip_ethaddr.addr[5] = eaddr[5];} while(0) + +#define BUF ((struct uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN]) + +enum EthernetLinkStatus { + Unknown, + LinkON, + LinkOFF +}; + +class UIPEthernetClass +{ +public: + UIPEthernetClass(); + + void init(const uint8_t pin); + + int begin(const uint8_t* mac); + void begin(const uint8_t* mac, IPAddress ip); + void begin(const uint8_t* mac, IPAddress ip, IPAddress dns); + void begin(const uint8_t* mac, IPAddress ip, IPAddress dns, IPAddress gateway); + void begin(const uint8_t* mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet); + + // maintain() must be called at regular intervals to process the incoming serial + // data and issue IP events to the sketch. It does not return until all IP + // events have been processed. Renews dhcp-lease if required. + int maintain(); + + EthernetLinkStatus linkStatus(); + + // KH add to have similar function to Ethernet lib + // Certainly we can use void macAddress(uint8_t mac[]) to read from W5x00. + void MACAddress(uint8_t *mac_address) + { + memcpy(mac_address, _mac_address, sizeof(_mac_address)); + } + ////// + + IPAddress localIP(); + IPAddress subnetMask(); + IPAddress gatewayIP(); + IPAddress dnsServerIP(); + +private: + + // KH add to work with new func void MACAddress(uint8_t *mac_address); and SinricPro v2.5.1+ + uint8_t _mac_address[6] ={0,}; + ////// + + static memhandle in_packet; + static memhandle uip_packet; + static uint8_t uip_hdrlen; + static uint8_t packetstate; + + static IPAddress _dnsServerAddress; + #if UIP_UDP + static DhcpClass* _dhcp; + #endif + static unsigned long periodic_timer; + + static void netInit(const uint8_t* mac); + static void configure(IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet); + + static void tick(); + + static bool network_send(); + + friend class UIPServer; + + friend class UIPClient; + + friend class UIPUDP; + + static uint16_t chksum(uint16_t sum, const uint8_t* data, uint16_t len); + static uint16_t ipchksum(void); +#if UIP_UDP + static uint16_t upper_layer_chksum(uint8_t proto); +#endif + friend uint16_t uip_ipchksum(void); + friend uint16_t uip_tcpchksum(void); + friend uint16_t uip_udpchksum(void); + + friend void uipclient_appcall(void); + friend void uipudp_appcall(void); + +#if UIP_CONF_IPV6 + uint16_t uip_icmp6chksum(void); +#endif /* UIP_CONF_IPV6 */ +}; + +extern UIPEthernetClass UIPEthernet; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet/utility/Enc28J60Network.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet/utility/Enc28J60Network.cpp new file mode 100644 index 0000000..a280225 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet/utility/Enc28J60Network.cpp @@ -0,0 +1,1244 @@ +/* + Enc28J60NetworkClass.h + UIPEthernet network driver for Microchip ENC28J60 Ethernet Interface. + + Copyright (c) 2013 Norbert Truchsess + All rights reserved. + + based on enc28j60.c file from the AVRlib library by Pascal Stang. + For AVRlib See http://www.procyonengineering.com/ + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + + +#include "Enc28J60Network.h" +#if defined(ARDUINO) + #include "Arduino.h" +#endif +#if defined(__MBED__) + #include + #include "mbed/millis.h" + #define delay(x) wait_ms(x) +#endif +#include "logging.h" + +// KH, For nRF52 +//#define ENC28J60_USE_SPILIB true + +uint8_t ENC28J60ControlCS = ENC28J60_CONTROL_CS; + +#if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + #if defined(STM32F2) + #include + #elif !defined(STM32F3) && !defined(__STM32F4__) + #include + extern SPIClass SPI; + //#elif defined(ARDUINO_ARCH_AMEBA) + //SPIClass SPI((void *)(&spi_obj), 11, 12, 13, 10); + //SPI _spi(SPI_MOSI,SPI_MISO,SPI_SCK,ENC28J60ControlCS); + #else + #include "HardwareSPI.h" + extern HardwareSPI SPI(1); + #endif + #endif + #if defined(__MBED__) + SPI _spi(SPI_MOSI,SPI_MISO,SPI_SCK); + DigitalOut _cs(ENC28J60ControlCS); + Serial LogObject(SERIAL_TX,SERIAL_RX); + #endif +#endif + +extern "C" { + #if defined(ARDUINO_ARCH_AVR) + // AVR-specific code + #include + #elif defined(ARDUINO_ARCH_SAM) + // SAM-specific code + #elif defined(ARDUINO_ARCH_SAMD) + // SAMD-specific code + #else + // generic, non-platform specific code + #endif +#include "enc28j60.h" +#include "uip.h" +} + +#if defined(ARDUINO) + // set CS to 0 = active + #define CSACTIVE digitalWrite(ENC28J60ControlCS, LOW) + // set CS to 1 = passive + #define CSPASSIVE digitalWrite(ENC28J60ControlCS, HIGH) +#endif +#if defined(__MBED__) + // set CS to 0 = active + #define CSACTIVE _cs=0 + // set CS to 1 = passive + #define CSPASSIVE _cs=1 +#endif + +// +#if defined(ARDUINO_ARCH_AVR) +#define waitspi() while(!(SPSR&(1<=LOG_DEBUG + LogObject.uart_send_str(F("ENC28J60::init DEBUG:csPin = ")); + LogObject.uart_send_decln(ENC28J60ControlCS); + LogObject.uart_send_str(F("ENC28J60::init DEBUG:miso = ")); + LogObject.uart_send_decln(SPI_MISO); + LogObject.uart_send_str(F("ENC28J60::init DEBUG:mosi = ")); + LogObject.uart_send_decln(SPI_MOSI); + LogObject.uart_send_str(F("ENC28J60::init DEBUG:sck = ")); + LogObject.uart_send_decln(SPI_SCK); + #endif +#if ENC28J60_USE_SPILIB + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_strln(F("ENC28J60::init DEBUG:Use SPI lib SPI.begin()")); + #endif + #if defined(ARDUINO) + #if defined(__STM32F3__) || defined(STM32F3) || defined(__STM32F4__) + SPI.begin(SPI_9MHZ, MSBFIRST, 0); + #else + SPI.begin(); + #endif + #endif + #if defined(ARDUINO_ARCH_AVR) + // AVR-specific code + SPI.setClockDivider(SPI_CLOCK_DIV2); //results in 8MHZ at 16MHZ system clock. + #elif defined(ARDUINO_ARCH_SAM) + // SAM-specific code + SPI.setClockDivider(10); //defaults to 21 which results in aprox. 4MHZ. A 10 should result in a little more than 8MHZ. + #elif defined(ARDUINO_ARCH_SAMD) + // SAMD-specific code + // Should we set clock divider? + SPI.setClockDivider(10); + #elif defined(__STM32F1__) || defined(__STM32F3__) + // generic, non-platform specific code + #define USE_STM32F1_DMAC 1 //on STM32 + // BOARD_NR_SPI >= 1 BOARD_SPI1_NSS_PIN, BOARD_SPI1_SCK_PIN, BOARD_SPI1_MISO_PIN, BOARD_SPI1_MOSI_PIN + SPI.setBitOrder(MSBFIRST); + SPI.setDataMode(SPI_MODE0); + SPI.setClockDivider(SPI_CLOCK_DIV8); //value 8 the result is 9MHz at 72MHz clock. + #else + #if defined(ARDUINO) + #if !defined(__STM32F3__) && !defined(STM32F3) && !defined(__STM32F4__) + SPI.setBitOrder(MSBFIRST); + #endif + //Settings for ESP8266 + //SPI.setDataMode(SPI_MODE0); + //SPI.setClockDivider(SPI_CLOCK_DIV16); + #endif + #if defined(__MBED__) + _spi.format(8, 0); // 8bit, mode 0 + _spi.frequency(7000000); // 7MHz + #endif + #endif +#else + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_strln(F("ENC28J60::init DEBUG:Use Native hardware SPI")); + #endif + pinMode(SPI_MOSI, OUTPUT); + pinMode(SPI_SCK, OUTPUT); + pinMode(SPI_MISO, INPUT); + //Hardware SS must be configured as OUTPUT to enable SPI-master (regardless of which pin is configured as ENC28J60ControlCS) + pinMode(SS, OUTPUT); + digitalWrite(SS,HIGH); + + digitalWrite(SPI_MOSI, LOW); + digitalWrite(SPI_SCK, LOW); + + // initialize SPI interface + // master mode and Fosc/2 clock: + SPCR = (1<=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:Before readOp(ENC28J60_READ_CTRL_REG, ESTAT)")); + #endif + nextPacketPtr = RXSTART_INIT; + while ((!readOp(ENC28J60_READ_CTRL_REG, ESTAT) & ESTAT_CLKRDY) && (timeout>0)) + { + timeout=timeout-1; + delay(10); + #if defined(ESP8266) + wdt_reset(); + #endif + } + #if ACTLOGLEVEL>=LOG_ERR + if (timeout==0) {LogObject.uart_send_strln(F("ENC28J60::init ERROR:TIMEOUT !!"));} + #endif + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:After readOp(ENC28J60_READ_CTRL_REG, ESTAT)")); + #endif + // Rx start + writeRegPair(ERXSTL, RXSTART_INIT); + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:After writeRegPair(ERXSTL, RXSTART_INIT)")); + #endif + // set receive pointer address + writeRegPair(ERXRDPTL, RXSTART_INIT); + // RX end + writeRegPair(ERXNDL, RXSTOP_INIT); + // TX start + //writeRegPair(ETXSTL, TXSTART_INIT); + // TX end + //writeRegPair(ETXNDL, TXSTOP_INIT); + // do bank 1 stuff, packet filter: + // For broadcast packets we allow only ARP packtets + // All other packets should be unicast only for our mac (MAADR) + // + // The pattern to match on is therefore + // Type ETH.DST + // ARP BROADCAST + // 06 08 -- ff ff ff ff ff ff -> ip checksum for theses bytes=f7f9 + // in binary these poitions are:11 0000 0011 1111 + // This is hex 303F->EPMM0=0x3f,EPMM1=0x30 + //TODO define specific pattern to receive dhcp-broadcast packages instead of setting ERFCON_BCEN! +// enableBroadcast(); // change to add ERXFCON_BCEN recommended by epam + writeReg(ERXFCON, ERXFCON_UCEN|ERXFCON_CRCEN|ERXFCON_PMEN|ERXFCON_BCEN); + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:After writeReg(ERXFCON, ERXFCON_UCEN|ERXFCON_CRCEN|ERXFCON_PMEN|ERXFCON_BCEN)")); + #endif + #if defined(ESP8266) + wdt_reset(); + #endif + writeRegPair(EPMM0, 0x303f); + writeRegPair(EPMCSL, 0xf7f9); + // + // + // do bank 2 stuff + // enable MAC receive + // and bring MAC out of reset (writes 0x00 to MACON2) + writeRegPair(MACON1, MACON1_MARXEN|MACON1_TXPAUS|MACON1_RXPAUS); + // enable automatic padding to 60bytes and CRC operations + writeOp(ENC28J60_BIT_FIELD_SET, MACON3, MACON3_PADCFG0|MACON3_TXCRCEN|MACON3_FRMLNEN); + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:After writeOp(ENC28J60_BIT_FIELD_SET, MACON3, MACON3_PADCFG0|MACON3_TXCRCEN|MACON3_FRMLNEN)")); + #endif + // set inter-frame gap (non-back-to-back) + writeRegPair(MAIPGL, 0x0C12); + // set inter-frame gap (back-to-back) + writeReg(MABBIPG, 0x12); + // Set the maximum packet size which the controller will accept + // Do not send packets longer than MAX_FRAMELEN: + writeRegPair(MAMXFLL, MAX_FRAMELEN); + // do bank 3 stuff + // write MAC address + // NOTE: MAC address in ENC28J60 is byte-backward + writeReg(MAADR5, macaddr[0]); + writeReg(MAADR4, macaddr[1]); + writeReg(MAADR3, macaddr[2]); + writeReg(MAADR2, macaddr[3]); + writeReg(MAADR1, macaddr[4]); + writeReg(MAADR0, macaddr[5]); + // no loopback of transmitted frames + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:Before phyWrite(PHCON2, PHCON2_HDLDIS)")); + #endif + phyWrite(PHCON2, PHCON2_HDLDIS); + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:After phyWrite(PHCON2, PHCON2_HDLDIS)")); + #endif + // switch to bank 0 + setBank(ECON1); + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:After setBank(ECON1)")); + #endif + // enable interrutps + writeOp(ENC28J60_BIT_FIELD_SET, EIE, EIE_INTIE|EIE_PKTIE); + // enable packet reception + writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_RXEN); + //Configure leds + phyWrite(PHLCON,0x476); + + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("ENC28J60::init DEBUG_V3:Before readReg(EREVID);")); + #endif + erevid=readReg(EREVID); + if (erevid==0xFF) {erevid=0;} + // microchip forgot to step the number on the silcon when they + // released the revision B7. 6 is now rev B7. We still have + // to see what they do when they release B8. At the moment + // there is no B8 out yet + //if (erevid > 5) ++erevid; + #if ACTLOGLEVEL>=LOG_INFO + LogObject.uart_send_str(F("ENC28J60::init INFO: Chip erevid=")); + LogObject.uart_send_dec(erevid); + LogObject.uart_send_strln(F(" initialization completed.")); + #endif + +// return Enc28J60Network::erevid; +} + +memhandle +Enc28J60Network::receivePacket(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::receivePacket(void) DEBUG_V3:Function started")); + #endif + #if defined(ESP8266) + wdt_reset(); + #endif + uint8_t rxstat; + uint16_t len; + // check if a packet has been received and buffered + //if( !(readReg(EIR) & EIR_PKTIF) ){ + // The above does not work. See Rev. B4 Silicon Errata point 6. + #if ACTLOGLEVEL>=LOG_ERR + if (erevid==0) + { + LogObject.uart_send_strln(F("Enc28J60Network::receivePacket(void) ERROR:ENC28j50 Device not found !! Bypass receivePacket function !!")); + } + #endif + uint8_t epktcnt=readReg(EPKTCNT); + if ((erevid!=0) && (epktcnt!=0)) + { + uint16_t readPtr = nextPacketPtr+6 > RXSTOP_INIT ? nextPacketPtr+6-RXSTOP_INIT+RXSTART_INIT : nextPacketPtr+6; + // Set the read pointer to the start of the received packet + writeRegPair(ERDPTL, nextPacketPtr); + // read the next packet pointer + nextPacketPtr = readOp(ENC28J60_READ_BUF_MEM, 0); + nextPacketPtr |= readOp(ENC28J60_READ_BUF_MEM, 0) << 8; + // read the packet length (see datasheet page 43) + len = readOp(ENC28J60_READ_BUF_MEM, 0); + len |= readOp(ENC28J60_READ_BUF_MEM, 0) << 8; + len -= 4; //remove the CRC count + // read the receive status (see datasheet page 43) + rxstat = readOp(ENC28J60_READ_BUF_MEM, 0); + //rxstat |= readOp(ENC28J60_READ_BUF_MEM, 0) << 8; + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("Enc28J60Network::receivePacket(void) DEBUG:receivePacket [")); + LogObject.uart_send_hex(readPtr); + LogObject.uart_send_str(F("-")); + LogObject.uart_send_hex((readPtr+len) % (RXSTOP_INIT+1)); + LogObject.uart_send_str(F("], next: ")); + LogObject.uart_send_hex(nextPacketPtr); + LogObject.uart_send_str(F(", stat: ")); + LogObject.uart_send_hex(rxstat); + LogObject.uart_send_str(F(", Packet count: ")); + LogObject.uart_send_dec(epktcnt); + LogObject.uart_send_str(F(" -> ")); + LogObject.uart_send_strln((rxstat & 0x80)!=0 ? "OK" : "failed"); + #endif + // decrement the packet counter indicate we are done with this packet + writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_PKTDEC); + // check CRC and symbol errors (see datasheet page 44, table 7-3): + // The ERXFCON.CRCEN is set by default. Normally we should not + // need to check this. + if (((rxstat & 0x80) != 0) && (nextPacketPtr<=RXSTOP_INIT)) + { + receivePkt.begin = readPtr; + receivePkt.size = len; + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("Enc28J60Network::receivePacket(void) DEBUG: rxstat OK. receivePkt.size=")); + LogObject.uart_send_decln(len); + #endif + return UIP_RECEIVEBUFFERHANDLE; + } + // Move the RX read pointer to the start of the next received packet + // This frees the memory we just read out + setERXRDPT(); + } + return (NOBLOCK); +} + +void +Enc28J60Network::setERXRDPT(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::setERXRDPT(void) DEBUG_V3:Function started")); + #endif + // Make sure the value is odd. See Rev. B1,B4,B5,B7 Silicon Errata issues 14 + uint16_t actnextPacketPtr = nextPacketPtr == RXSTART_INIT ? RXSTOP_INIT : nextPacketPtr-1; + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("Enc28J60Network::setERXRDPT(void) DEBUG:Set actnextPacketPtr:")); + LogObject.uart_send_hexln(actnextPacketPtr); + #endif + // datasheet: The ENC28J60 will always write up to, but not including + writeRegPair(ERXRDPTL, actnextPacketPtr); +} + +memaddress +Enc28J60Network::blockSize(memhandle handle) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::blockSize(memhandle handle) DEBUG_V3:Function started")); + #endif + return ((handle == NOBLOCK) || (erevid==0)) ? 0 : handle == UIP_RECEIVEBUFFERHANDLE ? receivePkt.size : blocks[handle].size; +} + +void +Enc28J60Network::sendPacket(memhandle handle) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::sendPacket(memhandle handle) INFO:Function started")); + #endif + #if defined(ESP8266) + wdt_reset(); + #endif + if (erevid==0) + { + #if ACTLOGLEVEL>=LOG_ERR + LogObject.uart_send_strln(F("Enc28J60Network::sendPacket(memhandle handle) ERROR:ENC28j50 Device not found !! Bypass sendPacket function !!")); + #endif + return; + } + + memblock *packet = &blocks[handle]; + uint16_t start = packet->begin-1; + uint16_t end = start + packet->size; + + // backup data at control-byte position + uint8_t data = readByte(start); + // write control-byte (if not 0 anyway) + if (data) + writeByte(start, 0); + + #if ACTLOGLEVEL>=LOG_DEBUG + LogObject.uart_send_str(F("Enc28J60Network::sendPacket(memhandle handle) DEBUG:sendPacket(")); + LogObject.uart_send_dec(handle); + LogObject.uart_send_str(F(") [")); + LogObject.uart_send_hex(start); + LogObject.uart_send_str(F("-")); + LogObject.uart_send_hex(end); + LogObject.uart_send_str(F("]: ")); + for (uint16_t i=start; i<=end; i++) + { + LogObject.uart_send_hex(readByte(i)); + LogObject.uart_send_str(F(" ")); + } + LogObject.uart_send_strln(F("")); + #endif + + // TX start + writeRegPair(ETXSTL, start); + // Set the TXND pointer to correspond to the packet size given + writeRegPair(ETXNDL, end); + // send the contents of the transmit buffer onto the network + + unsigned int retry = TX_COLLISION_RETRY_COUNT; + unsigned int timeout = 100; + do + { + // seydamir added + // Reset the transmit logic problem. See Rev. B7 Silicon Errata issues 12 and 13 + writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_TXRST); + writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_TXRST); + writeOp(ENC28J60_BIT_FIELD_CLR, EIR, EIR_TXERIF | EIR_TXIF); + // end + + writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_TXRTS); + // Reset the transmit logic problem. See Rev. B4 Silicon Errata point 12. + //if( (readReg(EIR) & EIR_TXERIF) ) + // { + // writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_TXRTS); + // } + + timeout = 100; + while (((readReg(EIR) & (EIR_TXIF | EIR_TXERIF)) == 0) && (timeout>0)) + { + timeout=timeout-1; + delay(10); + #if defined(ESP8266) + wdt_reset(); + #endif + } + if (timeout==0) + { + /* Transmit hardware probably hung, try again later. */ + /* Shouldn't happen according to errata 12 and 13. */ + writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_TXRTS); + #if ACTLOGLEVEL>=LOG_WARN + LogObject.uart_send_strln(F("Enc28J60Network::sendPacket(memhandle handle) WARNING:Collision")); + #endif + retry=retry-1; + } + } while ((timeout == 0) && (retry != 0)); + + //restore data on control-byte position + if (data) + writeByte(start, data); + + if (retry == 0) + { + #if ACTLOGLEVEL>=LOG_ERROR + LogObject.uart_send_strln(F("Enc28J60Network::sendPacket(memhandle handle) ERROR:COLLISION !!")); + #endif + return; + } +} + +uint16_t +Enc28J60Network::setReadPtr(memhandle handle, memaddress position, uint16_t len) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::setReadPtr(memhandle handle, memaddress position, uint16_t len) DEBUG_V3:Function started")); + #endif + memblock *packet = handle == UIP_RECEIVEBUFFERHANDLE ? &receivePkt : &blocks[handle]; + memaddress start = handle == UIP_RECEIVEBUFFERHANDLE && packet->begin + position > RXSTOP_INIT ? packet->begin + position-RXSTOP_INIT+RXSTART_INIT : packet->begin + position; + + writeRegPair(ERDPTL, start); + + if (len > packet->size - position) + len = packet->size - position; + return len; +} + +uint16_t +Enc28J60Network::readPacket(memhandle handle, memaddress position, uint8_t* buffer, uint16_t len) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::readPacket(memhandle handle, memaddress position, uint8_t* buffer, uint16_t len) DEBUG_V3:Function started")); + #endif + #if defined(ESP8266) + wdt_reset(); + #endif + len = setReadPtr(handle, position, len); + readBuffer(len, buffer); + #if ACTLOGLEVEL>=LOG_DEBUG_V2 + LogObject.uart_send_str(F("Enc28J60Network::readPacket(memhandle handle, memaddress position, uint8_t* buffer, uint16_t len) DEBUG_V2: Read bytes:")); + LogObject.uart_send_dec(len); + LogObject.uart_send_str(F(" save to block(")); + LogObject.uart_send_dec(handle); + LogObject.uart_send_str(F(") [")); + LogObject.uart_send_hex(position); + LogObject.uart_send_str(F("]: ")); + for (uint16_t i=0; i=LOG_DEBUG_V3 + LogObject.uart_send_str(F("Enc28J60Network::writePacket(memhandle handle, memaddress position, uint8_t* buffer, uint16_t len) DEBUG_V3:Function started with len:")); + LogObject.uart_send_decln(len); + #endif + #if defined(ESP8266) + wdt_reset(); + #endif + memblock *packet = &blocks[handle]; + uint16_t start = packet->begin + position; + + writeRegPair(EWRPTL, start); + + if (len > packet->size - position) + len = packet->size - position; + writeBuffer(len, buffer); + #if ACTLOGLEVEL>=LOG_DEBUG_V2 + LogObject.uart_send_str(F("Enc28J60Network::writePacket(memhandle handle, memaddress position, uint8_t* buffer, uint16_t len) DEBUG_V2: Write bytes:")); + LogObject.uart_send_dec(len); + LogObject.uart_send_str(F(" save to block(")); + LogObject.uart_send_dec(handle); + LogObject.uart_send_str(F(") [")); + LogObject.uart_send_hex(start); + LogObject.uart_send_str(F("]: ")); + for (uint16_t i=0; i=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::enableBroadcast (bool temporary) DEBUG_V3:Function started")); + #endif + writeRegByte(ERXFCON, readRegByte(ERXFCON) | ERXFCON_BCEN); + if(!temporary) + broadcast_enabled = true; +} + +void Enc28J60Network::disableBroadcast (bool temporary) { + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::disableBroadcast (bool temporary) DEBUG_V3:Function started")); + #endif + if(!temporary) + broadcast_enabled = false; + if(!broadcast_enabled) + writeRegByte(ERXFCON, readRegByte(ERXFCON) & ~ERXFCON_BCEN); +} + +void Enc28J60Network::enableMulticast (void) { + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::enableMulticast (void) DEBUG_V3:Function started")); + #endif + writeRegByte(ERXFCON, readRegByte(ERXFCON) | ERXFCON_MCEN); +} + +void Enc28J60Network::disableMulticast (void) { + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::disableMulticast (void) DEBUG_V3:Function started")); + #endif + writeRegByte(ERXFCON, readRegByte(ERXFCON) & ~ERXFCON_MCEN); +} + +uint8_t Enc28J60Network::readRegByte (uint8_t address) { + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::readRegByte (uint8_t address) DEBUG_V3:Function started")); + #endif + setBank(address); + return readOp(ENC28J60_READ_CTRL_REG, address); +} + +void Enc28J60Network::writeRegByte (uint8_t address, uint8_t data) { + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::writeRegByte (uint8_t address, uint8_t data) DEBUG_V3:Function started")); + #endif + setBank(address); + writeOp(ENC28J60_WRITE_CTRL_REG, address, data); +} + + +uint8_t Enc28J60Network::readByte(uint16_t addr) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::readByte(uint16_t addr) DEBUG_V3:Function started")); + #endif + #if defined(ESP8266) + wdt_reset(); + #endif + writeRegPair(ERDPTL, addr); + + CSACTIVE; + #if ENC28J60_USE_SPILIB + // issue read command + #if defined(ARDUINO) + SPI.transfer(ENC28J60_READ_BUF_MEM); + // read data + uint8_t c = SPI.transfer(0x00); + #endif + #if defined(__MBED__) + _spi.write(ENC28J60_READ_BUF_MEM); + // read data + uint8_t c = _spi.write(0x00); + #endif + CSPASSIVE; + return (c); + #else + // issue read command + SPDR = ENC28J60_READ_BUF_MEM; + waitspi(); + // read data + SPDR = 0x00; + waitspi(); + CSPASSIVE; + return (SPDR); + #endif +} + +void Enc28J60Network::writeByte(uint16_t addr, uint8_t data) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::writeByte(uint16_t addr, uint8_t data) DEBUG_V3:Function started")); + #endif + #if defined(ESP8266) + wdt_reset(); + #endif + writeRegPair(EWRPTL, addr); + + CSACTIVE; + #if ENC28J60_USE_SPILIB + // issue write command + #if defined(ARDUINO) + SPI.transfer(ENC28J60_WRITE_BUF_MEM); + // write data + SPI.transfer(data); + #endif + #if defined(__MBED__) + _spi.write(ENC28J60_WRITE_BUF_MEM); + // write data + _spi.write(data); + #endif + #else + // issue write command + SPDR = ENC28J60_WRITE_BUF_MEM; + waitspi(); + // write data + SPDR = data; + waitspi(); + #endif + CSPASSIVE; +} + +void +Enc28J60Network::copyPacket(memhandle dest_pkt, memaddress dest_pos, memhandle src_pkt, memaddress src_pos, uint16_t len) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::copyPacket(memhandle dest_pkt, memaddress dest_pos, memhandle src_pkt, memaddress src_pos, uint16_t len) DEBUG_V3:Function started")); + #endif + memblock *dest = &blocks[dest_pkt]; + memblock *src = src_pkt == UIP_RECEIVEBUFFERHANDLE ? &receivePkt : &blocks[src_pkt]; + memaddress start = src_pkt == UIP_RECEIVEBUFFERHANDLE && src->begin + src_pos > RXSTOP_INIT ? src->begin + src_pos-RXSTOP_INIT+RXSTART_INIT : src->begin + src_pos; + enc28J60_mempool_block_move_callback(dest->begin+dest_pos,start,len); + // setERXRDPT(); let it to freePacket after all packets are saved +} + +void +enc28J60_mempool_block_move_callback(memaddress dest, memaddress src, memaddress len) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("enc28J60_mempool_block_move_callback(memaddress dest, memaddress src, memaddress len) DEBUG_V3:Function started")); + #endif +//void +//Enc28J60Network::memblock_mv_cb(uint16_t dest, uint16_t src, uint16_t len) +//{ + //as ENC28J60 DMA is unable to copy single bytes: + if (len == 1) + { + Enc28J60Network::writeByte(dest,Enc28J60Network::readByte(src)); + } + else + { + // calculate address of last byte + len += src - 1; + + /* 1. Appropriately program the EDMAST, EDMAND + and EDMADST register pairs. The EDMAST + registers should point to the first byte to copy + from, the EDMAND registers should point to the + last byte to copy and the EDMADST registers + should point to the first byte in the destination + range. The destination range will always be + linear, never wrapping at any values except from + 8191 to 0 (the 8-Kbyte memory boundary). + Extreme care should be taken when + programming the start and end pointers to + prevent a never ending DMA operation which + would overwrite the entire 8-Kbyte buffer. + */ + Enc28J60Network::writeRegPair(EDMASTL, src); + Enc28J60Network::writeRegPair(EDMADSTL, dest); + + if ((src <= RXSTOP_INIT)&& (len > RXSTOP_INIT))len -= ((RXSTOP_INIT + 1)-RXSTART_INIT); + Enc28J60Network::writeRegPair(EDMANDL, len); + + /* + 2. If an interrupt at the end of the copy process is + desired, set EIE.DMAIE and EIE.INTIE and + clear EIR.DMAIF. + + 3. Verify that ECON1.CSUMEN is clear. */ + Enc28J60Network::writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_CSUMEN); + + /* 4. Start the DMA copy by setting ECON1.DMAST. */ + Enc28J60Network::writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_DMAST); + + // wait until runnig DMA is completed + while (Enc28J60Network::readOp(ENC28J60_READ_CTRL_REG, ECON1) & ECON1_DMAST) + { + delay(1); + } + } +} + +void +Enc28J60Network::freePacket(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::freePacket(void) DEBUG_V3:Function started")); + #endif + setERXRDPT(); +} + +uint8_t +Enc28J60Network::readOp(uint8_t op, uint8_t address) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::readOp(uint8_t op, uint8_t address) DEBUG_V3:Function started")); + #endif + CSACTIVE; + // issue read command + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + SPI.transfer(op | (address & ADDR_MASK)); + // read data + if(address & 0x80) + { + // do dummy read if needed (for mac and mii, see datasheet page 29) + SPI.transfer(0x00); + } + uint8_t c = SPI.transfer(0x00); + #endif + #if defined(__MBED__) + _spi.write(op | (address & ADDR_MASK)); + // read data + if(address & 0x80) + { + // do dummy read if needed (for mac and mii, see datasheet page 29) + _spi.write(0x00); + } + uint8_t c = _spi.write(0x00); + #endif + // release CS + CSPASSIVE; + return(c); + #else + // issue read command + SPDR = op | (address & ADDR_MASK); + waitspi(); + // read data + SPDR = 0x00; + waitspi(); + // do dummy read if needed (for mac and mii, see datasheet page 29) + if(address & 0x80) + { + SPDR = 0x00; + waitspi(); + } + // release CS + CSPASSIVE; + return(SPDR); + #endif + #if defined(ESP8266) + yield(); + #endif +} + +void +Enc28J60Network::writeOp(uint8_t op, uint8_t address, uint8_t data) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::writeOp(uint8_t op, uint8_t address, uint8_t data) DEBUG_V3:Function started")); + #endif + CSACTIVE; + // issue write command + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + SPI.transfer(op | (address & ADDR_MASK)); + // write data + SPI.transfer(data); + #endif + #if defined(__MBED__) + _spi.write(op | (address & ADDR_MASK)); + // write data + _spi.write(data); + #endif + #else + // issue write command + SPDR = op | (address & ADDR_MASK); + waitspi(); + // write data + SPDR = data; + waitspi(); + #endif + CSPASSIVE; + #if defined(ESP8266) + yield(); + #endif +} + +void +Enc28J60Network::readBuffer(uint16_t len, uint8_t* data) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::readBuffer(uint16_t len, uint8_t* data) DEBUG_V3:Function started")); + #endif + CSACTIVE; + // issue read command + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + SPI.transfer(ENC28J60_READ_BUF_MEM); + #endif + #if defined(__MBED__) + _spi.write(ENC28J60_READ_BUF_MEM); + #endif + #else + SPDR = ENC28J60_READ_BUF_MEM; + waitspi(); + #endif + while(len) + { + len--; + // read data + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + *data = SPI.transfer(0x00); + #endif + #if defined(__MBED__) + *data = _spi.write(0x00); + #endif + #else + SPDR = 0x00; + waitspi(); + *data = SPDR; + #endif + data++; + } + //*data='\0'; + CSPASSIVE; +} + +void +Enc28J60Network::writeBuffer(uint16_t len, uint8_t* data) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::writeBuffer(uint16_t len, uint8_t* data) DEBUG_V3:Function started")); + #endif + CSACTIVE; + // issue write command + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + SPI.transfer(ENC28J60_WRITE_BUF_MEM); + #endif + #if defined(__MBED__) + _spi.write(ENC28J60_WRITE_BUF_MEM); + #endif + #else + SPDR = ENC28J60_WRITE_BUF_MEM; + waitspi(); + #endif + while(len) + { + len--; + // write data + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + SPI.transfer(*data); + #endif + #if defined(__MBED__) + _spi.write(*data); + #endif + data++; + #else + SPDR = *data; + data++; + waitspi(); + #endif + } + CSPASSIVE; +} + +void +Enc28J60Network::setBank(uint8_t address) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::setBank(uint8_t address) DEBUG_V3:Function started")); + #endif + // set the bank (if needed) + if((address & BANK_MASK) != bank) + { + // set the bank + writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, (ECON1_BSEL1|ECON1_BSEL0)); + writeOp(ENC28J60_BIT_FIELD_SET, ECON1, (address & BANK_MASK)>>5); + bank = (address & BANK_MASK); + } +} + +uint8_t +Enc28J60Network::readReg(uint8_t address) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::readReg(uint8_t address) DEBUG_V3:Function started")); + #endif + // set the bank + setBank(address); + // do the read + return readOp(ENC28J60_READ_CTRL_REG, address); +} + +void +Enc28J60Network::writeReg(uint8_t address, uint8_t data) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::writeReg(uint8_t address, uint8_t data) DEBUG_V3:Function started")); + #endif + // set the bank + setBank(address); + // do the write + writeOp(ENC28J60_WRITE_CTRL_REG, address, data); +} + +void +Enc28J60Network::writeRegPair(uint8_t address, uint16_t data) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::writeRegPair(uint8_t address, uint16_t data) DEBUG_V3:Function started")); + #endif + // set the bank + setBank(address); + // do the write + writeOp(ENC28J60_WRITE_CTRL_REG, address, (data&0xFF)); + writeOp(ENC28J60_WRITE_CTRL_REG, address+1, (data) >> 8); +} + +void +Enc28J60Network::phyWrite(uint8_t address, uint16_t data) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::phyWrite(uint8_t address, uint16_t data) DEBUG_V3:Function started")); + #endif + unsigned int timeout = 15; + // set the PHY register address + writeReg(MIREGADR, address); + // write the PHY data + writeRegPair(MIWRL, data); + // wait until the PHY write completes + while (readReg(MISTAT) & MISTAT_BUSY) + { + delay(10); + #if defined(ESP8266) + wdt_reset(); + #endif + if (--timeout == 0) + { + #if ACTLOGLEVEL>=LOG_ERR + LogObject.uart_send_strln(F("Enc28J60Network::phyWrite ERROR:TIMEOUT !!")); + #endif + return; + } + } +} + +uint16_t +Enc28J60Network::phyRead(uint8_t address) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::phyRead(uint8_t address) DEBUG_V3:Function started")); + #endif + unsigned int timeout = 15; + writeReg(MIREGADR,address); + writeReg(MICMD, MICMD_MIIRD); + // wait until the PHY read completes + while(readReg(MISTAT) & MISTAT_BUSY) + { + delay(10); + #if defined(ESP8266) + wdt_reset(); + #endif + if (--timeout == 0) + { + #if ACTLOGLEVEL>=LOG_ERR + LogObject.uart_send_strln(F("Enc28J60Network::phyRead ERROR:TIMEOUT !!")); + #endif + return 0; + } + } + writeReg(MICMD, 0); + return (readReg(MIRDL) | readReg(MIRDH) << 8); +} + +void +Enc28J60Network::clkout(uint8_t clk) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::clkout(uint8_t clk) DEBUG_V3:Function started")); + #endif + //setup clkout: 2 is 12.5MHz: + writeReg(ECOCON, clk & 0x7); +} + +uint16_t +Enc28J60Network::chksum(uint16_t sum, memhandle handle, memaddress pos, uint16_t len) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::chksum(uint16_t sum, memhandle handle, memaddress pos, uint16_t len) DEBUG_V3:Function started")); + #endif + uint16_t t; + len = setReadPtr(handle, pos, len)-1; + CSACTIVE; + // issue read command + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + SPI.transfer(ENC28J60_READ_BUF_MEM); + #endif + #if defined(__MBED__) + _spi.write(ENC28J60_READ_BUF_MEM); + #endif + #else + SPDR = ENC28J60_READ_BUF_MEM; + waitspi(); + #endif + uint16_t i; + for (i = 0; i < len; i+=2) + { + // read data + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + t = SPI.transfer(0x00) << 8; + t += SPI.transfer(0x00); + #endif + #if defined(__MBED__) + t = _spi.write(0x00) << 8; + t += _spi.write(0x00); + #endif + #else + SPDR = 0x00; + waitspi(); + t = SPDR << 8; + SPDR = 0x00; + waitspi(); + t += SPDR; + #endif + sum += t; + if(sum < t) + { + sum++; /* carry */ + } + } + if(i == len) + { + #if ENC28J60_USE_SPILIB + #if defined(ARDUINO) + t = (SPI.transfer(0x00) << 8) + 0; + #endif + #if defined(__MBED__) + t = (_spi.write(0x00) << 8) + 0; + #endif + #else + SPDR = 0x00; + waitspi(); + t = (SPDR << 8) + 0; + #endif + sum += t; + if(sum < t) + { + sum++; /* carry */ + } + } + CSPASSIVE; + + /* Return sum in host byte order. */ + return sum; +} + +void +Enc28J60Network::powerOff(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::powerOff(void) DEBUG_V3:Function started")); + #endif + writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_RXEN); + delay(50); + writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_VRPS); + delay(50); + writeOp(ENC28J60_BIT_FIELD_SET, ECON2, ECON2_PWRSV); +} + +void +Enc28J60Network::powerOn(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::powerOn(void) DEBUG_V3:Function started")); + #endif + writeOp(ENC28J60_BIT_FIELD_CLR, ECON2, ECON2_PWRSV); + delay(50); + writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_RXEN); + delay(50); +} + +// read erevid from object: +uint8_t +Enc28J60Network::geterevid(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_str(F("Enc28J60Network::geterevid(void) DEBUG_V3:Function started and return:")); + LogObject.uart_send_decln(erevid); + #endif + return(erevid); +} + +// read the phstat2 of the chip: +uint16_t +Enc28J60Network::PhyStatus(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_str(F("Enc28J60Network::PhyStatus(void) DEBUG_V3:Function started")); + LogObject.uart_send_decln(erevid); + #endif + uint16_t phstat2; + phstat2=phyRead(PHSTAT2); + if ((phstat2 & 0x20) > 0) {phstat2=phstat2 &0x100;} + phstat2=(phstat2 & 0xFF00) | erevid; + if ((phstat2 & 0x8000) > 0) {phstat2=0;} + return phstat2; +} + +bool +Enc28J60Network::linkStatus(void) +{ + #if ACTLOGLEVEL>=LOG_DEBUG_V3 + LogObject.uart_send_strln(F("Enc28J60Network::linkStatus(void) DEBUG_V3:Function started")); + #endif + return (phyRead(PHSTAT2) & 0x0400) > 0; +} + +Enc28J60Network Enc28J60; diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet/utility/Enc28J60Network.h b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet/utility/Enc28J60Network.h new file mode 100644 index 0000000..8f5e446 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/UIPEthernet/utility/Enc28J60Network.h @@ -0,0 +1,331 @@ +/* + Enc28J60NetworkClass.h + UIPEthernet network driver for Microchip ENC28J60 Ethernet Interface. + + Copyright (c) 2013 Norbert Truchsess + All rights reserved. + + inspired by enc28j60.c file from the AVRlib library by Pascal Stang. + For AVRlib See http://www.procyonengineering.com/ + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + +#ifndef Enc28J60Network_H_ +#define Enc28J60Network_H_ + +#if defined(ESP32) + //pin SS already defined in ESP32 as pin 5, don't use this as conflict with SPIFFS, EEPROM, etc. + // Use in GPIO13 + #warning ENC28J60Network.h => use ESP32, change ENC28J60_CONTROL_CS/SS_PIN_DEFAULT to GPIO13, MOSI(23), MISO(19), SCK(18) + #define ENC28J60_CONTROL_CS 13 +#endif + +// KH, For nRF52 +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #include + #define ENC28J60_USE_SPILIB 1 + + #ifndef USE_THIS_SS_PIN + // default to pin 10 + #define ENC28J60_CONTROL_CS 10 + #else + #warning Using USE_THIS_SS_PIN in Enc28J60Network.h for nRF52 + #define ENC28J60_CONTROL_CS USE_THIS_SS_PIN + #endif +#endif + +// KH, For SAMD21/SAMD51 +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #include + #define ENC28J60_USE_SPILIB 1 + + #ifndef USE_THIS_SS_PIN + // default to pin 10 + #define ENC28J60_CONTROL_CS 10 + #else + #warning Using USE_THIS_SS_PIN in Enc28J60Network.h for SAMD + #define ENC28J60_CONTROL_CS USE_THIS_SS_PIN + #endif +#endif + +#include "mempool.h" +#if defined(__MBED__) + #include + //UIPEthernet(SPI_MOSI, SPI_MISO, SPI_SCK, SPI_CS); + #if defined(TARGET_LPC1768) + #define SPI_MOSI p11 + #define SPI_MISO p12 + #define SPI_SCK p13 + #define SPI_CS p8 + #elif defined(TARGET_LPC1114) + #define SPI_MOSI dp2 + #define SPI_MISO dp1 + #define SPI_SCK dp6 + #define SPI_CS dp25 + #elif defined(TARGET_LPC11U68) + #define SPI_MOSI P0_9 + #define SPI_MISO P0_8 + #define SPI_SCK P1_29 + #define SPI_CS P0_2 + #elif defined(TARGET_NUCLEO_F103RB) || defined(TARGET_NUCLEO_L152RE) || defined(TARGET_NUCLEO_F030R8) \ + || defined(TARGET_NUCLEO_F401RE) || defined(TARGET_NUCLEO_F302R8) || defined(TARGET_NUCLEO_L053R8) \ + || defined(TARGET_NUCLEO_F411RE) || defined(TARGET_NUCLEO_F334R8) || defined(TARGET_NUCLEO_F072RB) \ + || defined(TARGET_NUCLEO_F091RC) || defined(TARGET_NUCLEO_F303RE) || defined(TARGET_NUCLEO_F070RB) + #define SPI_MOSI D4 + #define SPI_MISO D5 + #define SPI_SCK D3 + #define SPI_CS D2 + #endif + #define ENC28J60_CONTROL_CS SPI_CS +#endif + +#if defined(STM32F3) || defined(STM32F2) //This is workaround for stm32duino STM32F2, and adafruit wiced feather STM32F2 + #define BOARD_SPI1_NSS_PIN PA4 + #define BOARD_SPI1_SCK_PIN PA5 + #define BOARD_SPI1_MISO_PIN PA6 + #define BOARD_SPI1_MOSI_PIN PA7 +#endif //This is workaround for stm32duino STM32F3, and adafruit wiced feather STM32F2 + +#if defined(BOARD_discovery_f4) + #define __STM32F4__ +#endif +#if defined(__MK20DX128__) || defined(__MKL26Z64__) + #include +#endif + +#if !defined(ENC28J60_CONTROL_CS) + #if defined(__AVR__) || defined(ESP8266) || defined(__RFduino__) + // Arduino Uno (__AVR__) SS defined to pin 10 + // Arduino Leonardo (ARDUINO_AVR_LEONARDO) SS defined to LED_BUILTIN_RX (17) + // Arduino Mega(__AVR_ATmega2560__) SS defined to pin 53 + // ESP8266 (ESP8266) SS defined to pin 15 + #if defined(ARDUINO_AVR_LEONARDO) || defined(ARDUINO_AVR_MICRO) + #define ENC28J60_CONTROL_CS PIN_A10 + #warning "Using LEONARDO borad PIN_A10 for ENC28J60_CONTROL_CS. Use UIPEthernet::init(uint8_t) to change it." + #else + #define ENC28J60_CONTROL_CS SS + #endif + #elif defined(ARDUINO_ARCH_AMEBA) //Defined SS to pin 10 + #define ENC28J60_CONTROL_CS SS //PC_0 A5 10 + #elif defined(ARDUINO_ARCH_SAM) + // Arduino Due (ARDUINO_ARCH_SAM) BOARD_SPI_DEFAULT_SS (SS3) defined to pin 78 + //#define ENC28J60_CONTROL_CS BOARD_SPI_DEFAULT_SS + #define ENC28J60_CONTROL_CS BOARD_SPI_SS0 + #elif defined(ARDUINO_ARCH_SAMD) + #define ENC28J60_CONTROL_CS SS + #elif defined(__ARDUINO_ARC__) //Intel ARC32 Genuino 101 + #define ENC28J60_CONTROL_CS SS + #elif defined(__RFduino__) //RFduino + #define ENC28J60_CONTROL_CS SS + #elif defined(ARDUINO_ARCH_STM32) // STM32duino core + #define ENC28J60_CONTROL_CS SS + #elif defined(ARDUINO_ARCH_ESP32) // arduino-esp32 + #define ENC28J60_CONTROL_CS SS + #elif defined(STM32_MCU_SERIES) || defined(__STM32F1__) || defined(__STM32F3__) || defined(STM32F3) || defined(__STM32F4__) || defined(STM32F2) + #if defined(BOARD_SPI1_NSS_PIN) + #define ENC28J60_CONTROL_CS BOARD_SPI1_NSS_PIN + #elif defined(ARDUINO_STM32F4_NETDUINO2PLUS) + #define ENC28J60_CONTROL_CS PC8 + #else + #define ENC28J60_CONTROL_CS SPI.nssPin() + //#define ENC28J60_CONTROL_CS PA4 + #endif + #elif defined(__MK20DX128__) || defined(__MKL26Z64__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) || defined(__IMXRT1062__) + #define ENC28J60_CONTROL_CS PIN_SPI_SS + #endif +#endif +#if !defined(ENC28J60_CONTROL_CS) + #warning "Default ENC28J60_CONTROL_CS could not be defined! Use UIPEthernet::init(uint8_t) to set it." + #define ENC28J60_CONTROL_CS 0 +#endif + +extern uint8_t ENC28J60ControlCS; + +#if !defined(SPI_MOSI) + #if defined(__AVR__) || defined(ESP8266) || defined(__RFduino__) + #define SPI_MOSI MOSI + #elif defined(ARDUINO_ARCH_AMEBA) + #define SPI_MOSI 11 //PC_2 + #elif defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) + #define SPI_MOSI PIN_SPI_MOSI + #elif defined(__ARDUINO_ARC__) //Intel ARC32 Genuino 101 + #define SPI_MOSI MOSI + #elif defined(__RFduino__) //RFduino + #define SPI_MOSI MOSI + #elif defined(ARDUINO_ARCH_STM32) // STM32duino core + #define SPI_MOSI MOSI + #elif defined(ARDUINO_ARCH_ESP32) // arduino-esp32 + #define SPI_MOSI MOSI + #elif defined(STM32_MCU_SERIES) || defined(__STM32F1__) || defined(__STM32F3__) || defined(STM32F3) || defined(__STM32F4__) || defined(STM32F2) + #if defined(BOARD_SPI1_MOSI_PIN) + #define SPI_MOSI BOARD_SPI1_MOSI_PIN + #else + #define SPI_MOSI SPI.mosiPin() + #endif + #elif defined(__MK20DX128__) || defined(__MKL26Z64__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) || defined(__IMXRT1062__) + #define SPI_MOSI PIN_SPI_MOSI + #endif +#endif +#if !defined(SPI_MOSI) + //#error "Not defined SPI_MOSI!" + #define SPI_MOSI MOSI +#endif + +#if !defined(SPI_MISO) + #if defined(__AVR__) || defined(ESP8266) || defined(__RFduino__) + #define SPI_MISO MISO + #elif defined(ARDUINO_ARCH_AMEBA) + #define SPI_MISO 12 //PC_3 + #elif defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) + #define SPI_MISO PIN_SPI_MISO + #elif defined(__ARDUINO_ARC__) //Intel ARC32 Genuino 101 + #define SPI_MISO MISO + #elif defined(__RFduino__) //RFduino + #define SPI_MISO MISO + #elif defined(ARDUINO_ARCH_STM32) // STM32duino core + #define SPI_MISO MISO + #elif defined(ARDUINO_ARCH_ESP32) // arduino-esp32 + #define SPI_MISO MISO + #elif defined(STM32_MCU_SERIES) || defined(__STM32F1__) || defined(__STM32F3__) || defined(STM32F3) || defined(__STM32F4__) || defined(STM32F2) + #if defined(BOARD_SPI1_MISO_PIN) + #define SPI_MISO BOARD_SPI1_MISO_PIN + #else + #define SPI_MISO SPI.misoPin() + #endif + #elif defined(__MK20DX128__) || defined(__MKL26Z64__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) || defined(__IMXRT1062__) + #define SPI_MISO PIN_SPI_MISO + #endif +#endif +#if !defined(SPI_MISO) + //#error "Not defined SPI_MISO!" + #define SPI_MISO MISO +#endif +#if !defined(SPI_SCK) + #if defined(__AVR__) || defined(ESP8266) || defined(__RFduino__) + #define SPI_SCK SCK + #elif defined(ARDUINO_ARCH_AMEBA) + #define SPI_SCK 13 //PC_1 A4 + #elif defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) + #define SPI_SCK PIN_SPI_SCK + #elif defined(__ARDUINO_ARC__) //Intel ARC32 Genuino 101 + #define SPI_SCK SCK + #elif defined(__RFduino__) //RFduino + #define SPI_SCK SCK + #elif defined(ARDUINO_ARCH_STM32) // STM32duino core + #define SPI_SCK SCK + #elif defined(ARDUINO_ARCH_ESP32) // arduino-esp32 + #define SPI_SCK SCK + #elif defined(STM32_MCU_SERIES) || defined(__STM32F1__) || defined(__STM32F3__) || defined(STM32F3) || defined(__STM32F4__) || defined(STM32F2) + #if defined(BOARD_SPI1_SCK_PIN) + #define SPI_SCK BOARD_SPI1_SCK_PIN + #else + #define SPI_SCK SPI.sckPin() + #endif + #elif defined(__MK20DX128__) || defined(__MKL26Z64__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) || defined(__IMXRT1062__) + #define SPI_SCK PIN_SPI_SCK + #endif +#endif + +#if !defined(SPI_SCK) + // For nRF52 + //#error "Not defined SPI_SCK!" + #define SPI_SCK SCK +#endif + +#if defined(__MBED__) || defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) || defined(__ARDUINO_ARC__) || defined(__STM32F1__) || defined(__STM32F3__) || defined(STM32F3) || defined(__STM32F4__) || defined(STM32F2) || defined(ESP8266) || defined(ARDUINO_ARCH_AMEBA) || defined(__MK20DX128__) || defined(__MKL26Z64__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) || defined(__IMXRT1062__) || defined(__RFduino__) || defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) + #if defined(ARDUINO) && defined(STM32F3) + #include "HardwareSPI.h" + #else + #include + #endif + #define ENC28J60_USE_SPILIB 1 +#endif + + + +#define UIP_RECEIVEBUFFERHANDLE 0xff + +/* + * Empfangen von ip-header, arp etc... + * wenn tcp/udp -> tcp/udp-callback -> assign new packet to connection + */ + +#define TX_COLLISION_RETRY_COUNT 10 + +class Enc28J60Network : public MemoryPool +{ + +private: + static uint16_t nextPacketPtr; + static uint8_t bank; + static uint8_t erevid; + + static struct memblock receivePkt; + + static bool broadcast_enabled; //!< True if broadcasts enabled (used to allow temporary disable of broadcast for DHCP or other internal functions) + + static uint8_t readOp(uint8_t op, uint8_t address); + static void writeOp(uint8_t op, uint8_t address, uint8_t data); + static uint16_t setReadPtr(memhandle handle, memaddress position, uint16_t len); + static void setERXRDPT(void); + static void readBuffer(uint16_t len, uint8_t* data); + static void writeBuffer(uint16_t len, uint8_t* data); + static uint8_t readByte(uint16_t addr); + static void writeByte(uint16_t addr, uint8_t data); + static void setBank(uint8_t address); + static uint8_t readReg(uint8_t address); + static void writeReg(uint8_t address, uint8_t data); + static void writeRegPair(uint8_t address, uint16_t data); + static void phyWrite(uint8_t address, uint16_t data); + static uint16_t phyRead(uint8_t address); + static void clkout(uint8_t clk); + + static void enableBroadcast (bool temporary); + static void disableBroadcast (bool temporary); + static void enableMulticast (void); + static void disableMulticast (void); + + static uint8_t readRegByte (uint8_t address); + static void writeRegByte (uint8_t address, uint8_t data); + + friend void enc28J60_mempool_block_move_callback(memaddress,memaddress,memaddress); + +public: + + void powerOn(void); + void powerOff(void); + static uint8_t geterevid(void); + uint16_t PhyStatus(void); + static bool linkStatus(void); + + static void init(uint8_t* macaddr); + static memhandle receivePacket(void); + static void freePacket(void); + static memaddress blockSize(memhandle handle); + static void sendPacket(memhandle handle); + static uint16_t readPacket(memhandle handle, memaddress position, uint8_t* buffer, uint16_t len); + static uint16_t writePacket(memhandle handle, memaddress position, uint8_t* buffer, uint16_t len); + static void copyPacket(memhandle dest, memaddress dest_pos, memhandle src, memaddress src_pos, uint16_t len); + static uint16_t chksum(uint16_t sum, memhandle handle, memaddress pos, uint16_t len); +}; + +extern Enc28J60Network Enc28J60; +#endif /* Enc28J60NetworkClass_H_ */ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/esp32/cores/esp32/Server.h b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/esp32/cores/esp32/Server.h new file mode 100644 index 0000000..e1e299d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/LibraryPatches/esp32/cores/esp32/Server.h @@ -0,0 +1,35 @@ +/* + Server.h - Base class that provides Server + Copyright (c) 2011 Adrian McEwen. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef server_h +#define server_h + +#include "Print.h" + +class Server: public Print +{ +public: + // KH, change to fix compiler error for EthernetWebServer + // error: cannot declare field 'EthernetWebServer::_server' to be of abstract type 'EthernetServer' + // virtual void begin(uint16_t port=0) =0; + //virtual void begin() = 0; + void begin() {}; +}; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Fab_SAM_Arduino/hardware/samd/1.6.18-alpha2/boards.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Fab_SAM_Arduino/hardware/samd/1.6.18-alpha2/boards.txt new file mode 100644 index 0000000..ec3f9ff --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Fab_SAM_Arduino/hardware/samd/1.6.18-alpha2/boards.txt @@ -0,0 +1,1730 @@ +# Copyright (c) 2014-2017 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +menu.cpu=Microcontroller +menu.clock=Clock Source +menu.usb=USB Config +menu.serial=Serial Config +menu.bootloader=Bootloader Size +menu.timer=Timer PWM Frequency +menu.float=Floating Point +menu.config=Build Options + +# Generic D11C14A +d11c14a.name=Generic D11C14A +d11c14a.vid.0=0x16D0 +d11c14a.pid.0=0x1557 +d11c14a.vid.1=0x16D0 +d11c14a.pid.1=0x1856 +d11c14a.vid.2=0x16D0 +d11c14a.pid.2=0x1B41 +d11c14a.vid.3=0x16D0 +d11c14a.pid.3=0x1B40 +d11c14a.vid.4=0x16D0 +d11c14a.pid.4=0x1A0C +d11c14a.vid.5=0x16D0 +d11c14a.pid.5=0x1856 +d11c14a.build.mcu=cortex-m0plus +d11c14a.build.mathlib=arm_cortexM0l_math +d11c14a.build.f_cpu=48000000L +d11c14a.build.usb_product="D11C14A" +d11c14a.build.usb_manufacturer="Fab Foundation" +d11c14a.build.board=SAMD_ZERO +d11c14a.build.core=arduino +d11c14a.build.variant=Generic_D11C14A +d11c14a.build.variant_system_lib= +d11c14a.build.vid=0x16D0 +d11c14a.upload.protocol=sam-ba +d11c14a.bootloader.tool=openocd +d11c14a.menu.float.default=Print & String use auto-promoted doubles only +d11c14a.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY +d11c14a.menu.float.print=Print uses separate singles and doubles +d11c14a.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES +d11c14a.menu.float.string=String uses separate singles and doubles +d11c14a.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES +d11c14a.menu.float.both=Print & String use separate singles and doubles +d11c14a.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES +d11c14a.menu.config.disabled=config.h disabled +d11c14a.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED +d11c14a.menu.config.enabled=config.h enabled (mostly code size reductions) +d11c14a.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED +d11c14a.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR +d11c14a.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB +d11c14a.menu.clock.internal=INTERNAL_OSCILLATOR +d11c14a.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL +d11c14a.menu.clock.crystal_32k=32KHZ_CRYSTAL +d11c14a.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL +d11c14a.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL +d11c14a.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL +d11c14a.menu.timer.timer_732Hz=732.4Hz (16-bit) +d11c14a.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz +d11c14a.menu.timer.timer_366Hz=366.2Hz (16-bit) +d11c14a.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz +d11c14a.menu.timer.timer_244Hz=244.1Hz (16-bit) +d11c14a.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz +d11c14a.menu.timer.timer_183Hz=183.1Hz (16-bit) +d11c14a.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz +d11c14a.menu.timer.timer_146Hz=146.5Hz (16-bit) +d11c14a.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz +d11c14a.menu.timer.timer_122Hz=122.1Hz (16-bit) +d11c14a.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz +d11c14a.menu.timer.timer_105Hz=104.6Hz (16-bit) +d11c14a.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz +d11c14a.menu.timer.timer_81Hz=81.38Hz (16-bit) +d11c14a.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz +d11c14a.menu.timer.timer_61Hz=61.04Hz (16-bit) +d11c14a.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz +d11c14a.menu.timer.timer_31Hz=30.52Hz (16-bit) +d11c14a.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz +d11c14a.menu.timer.timer_187500Hz=187500Hz (8-bit) +d11c14a.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz +d11c14a.menu.timer.timer_93750Hz=93750Hz (8-bit) +d11c14a.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz +d11c14a.menu.timer.timer_62500Hz=62500Hz (8-bit) +d11c14a.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz +d11c14a.menu.timer.timer_37500Hz=37500Hz (8-bit) +d11c14a.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz +d11c14a.menu.timer.timer_20833Hz=20833Hz (8-bit) +d11c14a.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz +d11c14a.menu.timer.timer_12500Hz=12500Hz (8-bit) +d11c14a.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz +d11c14a.menu.timer.timer_7500Hz=7500Hz (8-bit) +d11c14a.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz +d11c14a.menu.timer.timer_4166Hz=4166Hz (8-bit) +d11c14a.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz +d11c14a.menu.timer.timer_2930Hz=2930Hz (8-bit) +d11c14a.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz +d11c14a.menu.timer.timer_1465Hz=1465Hz (8-bit) +d11c14a.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz +d11c14a.build.extra_flags=-D__SAMD11C14A__ {build.usb_flags} -DARM_MATH_CM0PLUS +d11c14a.build.ldscript=flash_16KB.ld +d11c14a.build.openocdscript=openocd_scripts/SAMD11C14A.cfg +d11c14a.bootloader.file=zero/binaries/sam_ba_SAMD11C14A.bin +d11c14a.menu.bootloader.4kb=4KB_BOOTLOADER +d11c14a.menu.bootloader.4kb.build.bootloader_size=__4KB_BOOTLOADER__ +d11c14a.menu.bootloader.4kb.build.ldscript_path=linker_scripts/gcc/4KB_Bootloader +d11c14a.menu.bootloader.4kb.upload.tool=Fab_SAM_Arduino:bossac +d11c14a.menu.bootloader.4kb.upload.use_1200bps_touch=true +d11c14a.menu.bootloader.4kb.upload.wait_for_upload_port=true +d11c14a.menu.bootloader.4kb.upload.native_usb=true +d11c14a.menu.bootloader.4kb.upload.maximum_size=12288 +d11c14a.menu.bootloader.0kb=NO_BOOTLOADER +d11c14a.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ +d11c14a.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader +d11c14a.menu.bootloader.0kb.upload.tool=openocd +d11c14a.menu.bootloader.0kb.upload.use_1200bps_touch=false +d11c14a.menu.bootloader.0kb.upload.wait_for_upload_port=false +d11c14a.menu.bootloader.0kb.upload.native_usb=false +d11c14a.menu.bootloader.0kb.upload.maximum_size=16384 +d11c14a.menu.serial.one_uart=ONE_UART_ONE_WIRE_NO_SPI +d11c14a.menu.serial.one_uart.build.serialcom_uart=ONE_UART +d11c14a.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE +d11c14a.menu.serial.one_uart.build.serialcom_spi=NO_SPI +d11c14a.menu.serial.two_uart=TWO_UART_NO_WIRE_NO_SPI +d11c14a.menu.serial.two_uart.build.serialcom_uart=TWO_UART +d11c14a.menu.serial.two_uart.build.serialcom_wire=NO_WIRE +d11c14a.menu.serial.two_uart.build.serialcom_spi=NO_SPI +d11c14a.menu.serial.one_uart_no_wire_one_spi=ONE_UART_NO_WIRE_ONE_SPI +d11c14a.menu.serial.one_uart_no_wire_one_spi.build.serialcom_uart=ONE_UART +d11c14a.menu.serial.one_uart_no_wire_one_spi.build.serialcom_wire=NO_WIRE +d11c14a.menu.serial.one_uart_no_wire_one_spi.build.serialcom_spi=ONE_SPI +d11c14a.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI +d11c14a.menu.serial.no_uart.build.serialcom_uart=NO_UART +d11c14a.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE +d11c14a.menu.serial.no_uart.build.serialcom_spi=ONE_SPI +d11c14a.menu.usb.cdc=CDC_ONLY +d11c14a.menu.usb.cdc.build.usbcom=CDC_ONLY +d11c14a.menu.usb.cdc.build.pid=0x1557 +d11c14a.menu.usb.cdc_hid=CDC_HID +d11c14a.menu.usb.cdc_hid.build.usbcom=CDC_HID +d11c14a.menu.usb.cdc_hid.build.pid=0x1856 +d11c14a.menu.usb.withcdc=WITH_CDC +d11c14a.menu.usb.withcdc.build.usbcom=WITH_CDC +d11c14a.menu.usb.withcdc.build.pid=0x1B41 +d11c14a.menu.usb.hid=HID_ONLY +d11c14a.menu.usb.hid.build.usbcom=HID_ONLY +d11c14a.menu.usb.hid.build.pid=0x1B40 +d11c14a.menu.usb.nocdc=WITHOUT_CDC +d11c14a.menu.usb.nocdc.build.usbcom=WITHOUT_CDC +d11c14a.menu.usb.nocdc.build.pid=0x1A0C +d11c14a.menu.usb.none=USB_DISABLED +d11c14a.menu.usb.none.build.usbcom=USB_DISABLED +d11c14a.menu.usb.none.build.pid=0x1856 + +# Generic D11D14AS +d11d14as.name=Generic D11D14AS +d11d14as.vid.0=0x16D0 +d11d14as.pid.0=0x2557 +d11d14as.vid.1=0x16D0 +d11d14as.pid.1=0x2856 +d11d14as.vid.2=0x16D0 +d11d14as.pid.2=0x2B41 +d11d14as.vid.3=0x16D0 +d11d14as.pid.3=0x2B40 +d11d14as.vid.4=0x16D0 +d11d14as.pid.4=0x2A0C +d11d14as.vid.5=0x16D0 +d11d14as.pid.5=0x2856 +d11d14as.build.mcu=cortex-m0plus +d11d14as.build.mathlib=arm_cortexM0l_math +d11d14as.build.f_cpu=48000000L +d11d14as.build.usb_product="D11D14AS" +d11d14as.build.usb_manufacturer="Fab Foundation" +d11d14as.build.board=SAMD_ZERO +d11d14as.build.core=arduino +d11d14as.build.variant=Generic_D11D14AS +d11d14as.build.variant_system_lib= +d11d14as.build.vid=0x16D0 +d11d14as.upload.protocol=sam-ba +d11d14as.bootloader.tool=openocd +d11d14as.menu.float.default=Print & String use auto-promoted doubles only +d11d14as.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY +d11d14as.menu.float.print=Print uses separate singles and doubles +d11d14as.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES +d11d14as.menu.float.string=String uses separate singles and doubles +d11d14as.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES +d11d14as.menu.float.both=Print & String use separate singles and doubles +d11d14as.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES +d11d14as.menu.config.disabled=config.h disabled +d11d14as.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED +d11d14as.menu.config.enabled=config.h enabled (mostly code size reductions) +d11d14as.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED +d11d14as.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR +d11d14as.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB +d11d14as.menu.clock.internal=INTERNAL_OSCILLATOR +d11d14as.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL +d11d14as.menu.clock.crystal_32k=32KHZ_CRYSTAL +d11d14as.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL +d11d14as.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL +d11d14as.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL +d11d14as.menu.timer.timer_732Hz=732.4Hz (16-bit) +d11d14as.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz +d11d14as.menu.timer.timer_366Hz=366.2Hz (16-bit) +d11d14as.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz +d11d14as.menu.timer.timer_244Hz=244.1Hz (16-bit) +d11d14as.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz +d11d14as.menu.timer.timer_183Hz=183.1Hz (16-bit) +d11d14as.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz +d11d14as.menu.timer.timer_146Hz=146.5Hz (16-bit) +d11d14as.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz +d11d14as.menu.timer.timer_122Hz=122.1Hz (16-bit) +d11d14as.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz +d11d14as.menu.timer.timer_105Hz=104.6Hz (16-bit) +d11d14as.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz +d11d14as.menu.timer.timer_81Hz=81.38Hz (16-bit) +d11d14as.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz +d11d14as.menu.timer.timer_61Hz=61.04Hz (16-bit) +d11d14as.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz +d11d14as.menu.timer.timer_31Hz=30.52Hz (16-bit) +d11d14as.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz +d11d14as.menu.timer.timer_187500Hz=187500Hz (8-bit) +d11d14as.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz +d11d14as.menu.timer.timer_93750Hz=93750Hz (8-bit) +d11d14as.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz +d11d14as.menu.timer.timer_62500Hz=62500Hz (8-bit) +d11d14as.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz +d11d14as.menu.timer.timer_37500Hz=37500Hz (8-bit) +d11d14as.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz +d11d14as.menu.timer.timer_20833Hz=20833Hz (8-bit) +d11d14as.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz +d11d14as.menu.timer.timer_12500Hz=12500Hz (8-bit) +d11d14as.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz +d11d14as.menu.timer.timer_7500Hz=7500Hz (8-bit) +d11d14as.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz +d11d14as.menu.timer.timer_4166Hz=4166Hz (8-bit) +d11d14as.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz +d11d14as.menu.timer.timer_2930Hz=2930Hz (8-bit) +d11d14as.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz +d11d14as.menu.timer.timer_1465Hz=1465Hz (8-bit) +d11d14as.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz +d11d14as.build.extra_flags=-D__SAMD11D14AS__ {build.usb_flags} -DARM_MATH_CM0PLUS +d11d14as.build.ldscript=flash_16KB.ld +d11d14as.build.openocdscript=openocd_scripts/SAMD11D14AS.cfg +d11d14as.bootloader.file=zero/binaries/sam_ba_SAMD11D14AS.bin +d11d14as.menu.bootloader.4kb=4KB_BOOTLOADER +d11d14as.menu.bootloader.4kb.build.bootloader_size=__4KB_BOOTLOADER__ +d11d14as.menu.bootloader.4kb.build.ldscript_path=linker_scripts/gcc/4KB_Bootloader +d11d14as.menu.bootloader.4kb.upload.tool=Fab_SAM_Arduino:bossac +d11d14as.menu.bootloader.4kb.upload.use_1200bps_touch=true +d11d14as.menu.bootloader.4kb.upload.wait_for_upload_port=true +d11d14as.menu.bootloader.4kb.upload.native_usb=true +d11d14as.menu.bootloader.4kb.upload.maximum_size=12288 +d11d14as.menu.bootloader.0kb=NO_BOOTLOADER +d11d14as.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ +d11d14as.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader +d11d14as.menu.bootloader.0kb.upload.tool=openocd +d11d14as.menu.bootloader.0kb.upload.use_1200bps_touch=false +d11d14as.menu.bootloader.0kb.upload.wait_for_upload_port=false +d11d14as.menu.bootloader.0kb.upload.native_usb=false +d11d14as.menu.bootloader.0kb.upload.maximum_size=16384 +d11d14as.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI +d11d14as.menu.serial.one_uart.build.serialcom_uart=ONE_UART +d11d14as.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE +d11d14as.menu.serial.one_uart.build.serialcom_spi=ONE_SPI +d11d14as.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI +d11d14as.menu.serial.no_uart.build.serialcom_uart=NO_UART +d11d14as.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE +d11d14as.menu.serial.no_uart.build.serialcom_spi=ONE_SPI +d11d14as.menu.serial.two_uart=TWO_UART_ONE_WIRE_NO_SPI +d11d14as.menu.serial.two_uart.build.serialcom_uart=TWO_UART +d11d14as.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE +d11d14as.menu.serial.two_uart.build.serialcom_spi=NO_SPI +d11d14as.menu.usb.cdc=CDC_ONLY +d11d14as.menu.usb.cdc.build.usbcom=CDC_ONLY +d11d14as.menu.usb.cdc.build.pid=0x2557 +d11d14as.menu.usb.cdc_hid=CDC_HID +d11d14as.menu.usb.cdc_hid.build.usbcom=CDC_HID +d11d14as.menu.usb.cdc_hid.build.pid=0x2856 +d11d14as.menu.usb.withcdc=WITH_CDC +d11d14as.menu.usb.withcdc.build.usbcom=WITH_CDC +d11d14as.menu.usb.withcdc.build.pid=0x2B41 +d11d14as.menu.usb.hid=HID_ONLY +d11d14as.menu.usb.hid.build.usbcom=HID_ONLY +d11d14as.menu.usb.hid.build.pid=0x2B40 +d11d14as.menu.usb.nocdc=WITHOUT_CDC +d11d14as.menu.usb.nocdc.build.usbcom=WITHOUT_CDC +d11d14as.menu.usb.nocdc.build.pid=0x2A0C +d11d14as.menu.usb.none=USB_DISABLED +d11d14as.menu.usb.none.build.usbcom=USB_DISABLED +d11d14as.menu.usb.none.build.pid=0x2856 + +# Generic D11D14AM +d11d14am.name=Generic D11D14AM +d11d14am.vid.0=0x16D0 +d11d14am.pid.0=0x3557 +d11d14am.vid.1=0x16D0 +d11d14am.pid.1=0x3856 +d11d14am.vid.2=0x16D0 +d11d14am.pid.2=0x3B41 +d11d14am.vid.3=0x16D0 +d11d14am.pid.3=0x3B40 +d11d14am.vid.4=0x16D0 +d11d14am.pid.4=0x3A0C +d11d14am.vid.5=0x16D0 +d11d14am.pid.5=0x3856 +d11d14am.build.mcu=cortex-m0plus +d11d14am.build.mathlib=arm_cortexM0l_math +d11d14am.build.f_cpu=48000000L +d11d14am.build.usb_product="MT-D11" +d11d14am.build.usb_manufacturer="Fab Foundation" +d11d14am.build.board=SAMD_ZERO +d11d14am.build.core=arduino +d11d14am.build.variant=Generic_D11D14AM +d11d14am.build.variant_system_lib= +d11d14am.build.vid=0x16D0 +d11d14am.upload.protocol=sam-ba +d11d14am.bootloader.tool=openocd +d11d14am.menu.float.default=Print & String use auto-promoted doubles only +d11d14am.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY +d11d14am.menu.float.print=Print uses separate singles and doubles +d11d14am.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES +d11d14am.menu.float.string=String uses separate singles and doubles +d11d14am.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES +d11d14am.menu.float.both=Print & String use separate singles and doubles +d11d14am.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES +d11d14am.menu.config.disabled=config.h disabled +d11d14am.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED +d11d14am.menu.config.enabled=config.h enabled (mostly code size reductions) +d11d14am.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED +d11d14am.menu.clock.crystal_32k=32KHZ_CRYSTAL +d11d14am.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL +d11d14am.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL +d11d14am.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL +d11d14am.menu.clock.internal=INTERNAL_OSCILLATOR +d11d14am.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL +d11d14am.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR +d11d14am.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB +d11d14am.menu.timer.timer_732Hz=732.4Hz (16-bit) +d11d14am.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz +d11d14am.menu.timer.timer_366Hz=366.2Hz (16-bit) +d11d14am.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz +d11d14am.menu.timer.timer_244Hz=244.1Hz (16-bit) +d11d14am.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz +d11d14am.menu.timer.timer_183Hz=183.1Hz (16-bit) +d11d14am.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz +d11d14am.menu.timer.timer_146Hz=146.5Hz (16-bit) +d11d14am.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz +d11d14am.menu.timer.timer_122Hz=122.1Hz (16-bit) +d11d14am.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz +d11d14am.menu.timer.timer_105Hz=104.6Hz (16-bit) +d11d14am.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz +d11d14am.menu.timer.timer_81Hz=81.38Hz (16-bit) +d11d14am.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz +d11d14am.menu.timer.timer_61Hz=61.04Hz (16-bit) +d11d14am.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz +d11d14am.menu.timer.timer_31Hz=30.52Hz (16-bit) +d11d14am.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz +d11d14am.menu.timer.timer_187500Hz=187500Hz (8-bit) +d11d14am.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz +d11d14am.menu.timer.timer_93750Hz=93750Hz (8-bit) +d11d14am.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz +d11d14am.menu.timer.timer_62500Hz=62500Hz (8-bit) +d11d14am.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz +d11d14am.menu.timer.timer_37500Hz=37500Hz (8-bit) +d11d14am.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz +d11d14am.menu.timer.timer_20833Hz=20833Hz (8-bit) +d11d14am.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz +d11d14am.menu.timer.timer_12500Hz=12500Hz (8-bit) +d11d14am.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz +d11d14am.menu.timer.timer_7500Hz=7500Hz (8-bit) +d11d14am.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz +d11d14am.menu.timer.timer_4166Hz=4166Hz (8-bit) +d11d14am.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz +d11d14am.menu.timer.timer_2930Hz=2930Hz (8-bit) +d11d14am.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz +d11d14am.menu.timer.timer_1465Hz=1465Hz (8-bit) +d11d14am.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz +d11d14am.build.extra_flags=-D__SAMD11D14AM__ {build.usb_flags} -DARM_MATH_CM0PLUS +d11d14am.build.ldscript=flash_16KB.ld +d11d14am.build.openocdscript=openocd_scripts/SAMD11D14AM.cfg +d11d14am.bootloader.file=zero/binaries/sam_ba_SAMD11D14AM.bin +d11d14am.menu.bootloader.4kb=4KB_BOOTLOADER +d11d14am.menu.bootloader.4kb.build.bootloader_size=__4KB_BOOTLOADER__ +d11d14am.menu.bootloader.4kb.build.ldscript_path=linker_scripts/gcc/4KB_Bootloader +d11d14am.menu.bootloader.4kb.upload.tool=Fab_SAM_Arduino:bossac +d11d14am.menu.bootloader.4kb.upload.use_1200bps_touch=true +d11d14am.menu.bootloader.4kb.upload.wait_for_upload_port=true +d11d14am.menu.bootloader.4kb.upload.native_usb=true +d11d14am.menu.bootloader.4kb.upload.maximum_size=12288 +d11d14am.menu.bootloader.0kb=NO_BOOTLOADER +d11d14am.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ +d11d14am.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader +d11d14am.menu.bootloader.0kb.upload.tool=openocd +d11d14am.menu.bootloader.0kb.upload.use_1200bps_touch=false +d11d14am.menu.bootloader.0kb.upload.wait_for_upload_port=false +d11d14am.menu.bootloader.0kb.upload.native_usb=false +d11d14am.menu.bootloader.0kb.upload.maximum_size=16384 +d11d14am.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI +d11d14am.menu.serial.one_uart.build.serialcom_uart=ONE_UART +d11d14am.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE +d11d14am.menu.serial.one_uart.build.serialcom_spi=ONE_SPI +d11d14am.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI +d11d14am.menu.serial.no_uart.build.serialcom_uart=NO_UART +d11d14am.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE +d11d14am.menu.serial.no_uart.build.serialcom_spi=ONE_SPI +d11d14am.menu.serial.two_uart=TWO_UART_ONE_WIRE_NO_SPI +d11d14am.menu.serial.two_uart.build.serialcom_uart=TWO_UART +d11d14am.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE +d11d14am.menu.serial.two_uart.build.serialcom_spi=NO_SPI +d11d14am.menu.usb.cdc=CDC_ONLY +d11d14am.menu.usb.cdc.build.usbcom=CDC_ONLY +d11d14am.menu.usb.cdc.build.pid=0x3557 +d11d14am.menu.usb.cdc_hid=CDC_HID +d11d14am.menu.usb.cdc_hid.build.usbcom=CDC_HID +d11d14am.menu.usb.cdc_hid.build.pid=0x3856 +d11d14am.menu.usb.withcdc=WITH_CDC +d11d14am.menu.usb.withcdc.build.usbcom=WITH_CDC +d11d14am.menu.usb.withcdc.build.pid=0x3B41 +d11d14am.menu.usb.hid=HID_ONLY +d11d14am.menu.usb.hid.build.usbcom=HID_ONLY +d11d14am.menu.usb.hid.build.pid=0x3B40 +d11d14am.menu.usb.nocdc=WITHOUT_CDC +d11d14am.menu.usb.nocdc.build.usbcom=WITHOUT_CDC +d11d14am.menu.usb.nocdc.build.pid=0x3A0C +d11d14am.menu.usb.none=USB_DISABLED +d11d14am.menu.usb.none.build.usbcom=USB_DISABLED +d11d14am.menu.usb.none.build.pid=0x3856 + +# Generic x21E +x21e.name=Generic x21E +x21e.vid.0=0x16D0 +x21e.pid.0=0x4557 +x21e.vid.1=0x16D0 +x21e.pid.1=0x4856 +x21e.vid.2=0x16D0 +x21e.pid.2=0x4B41 +x21e.vid.3=0x16D0 +x21e.pid.3=0x4B40 +x21e.vid.4=0x16D0 +x21e.pid.4=0x4A0C +x21e.vid.5=0x16D0 +x21e.pid.5=0x4856 +x21e.build.mcu=cortex-m0plus +x21e.build.mathlib=arm_cortexM0l_math +x21e.build.f_cpu=48000000L +x21e.build.usb_product="x21E" +x21e.build.usb_manufacturer="Fab Foundation" +x21e.build.board=SAMD_ZERO +x21e.build.core=arduino +x21e.build.variant=Generic_x21E +x21e.build.variant_system_lib= +x21e.build.vid=0x16D0 +x21e.upload.protocol=sam-ba +x21e.bootloader.tool=openocd +x21e.menu.float.default=Print & String use auto-promoted doubles only +x21e.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY +x21e.menu.float.print=Print uses separate singles and doubles +x21e.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES +x21e.menu.float.string=String uses separate singles and doubles +x21e.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES +x21e.menu.float.both=Print & String use separate singles and doubles +x21e.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES +x21e.menu.config.disabled=config.h disabled +x21e.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED +x21e.menu.config.enabled=config.h enabled (mostly code size reductions) +x21e.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED +x21e.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR +x21e.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB +x21e.menu.clock.internal=INTERNAL_OSCILLATOR +x21e.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL +x21e.menu.clock.crystal_32k=32KHZ_CRYSTAL +x21e.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL +x21e.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL +x21e.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL +x21e.menu.timer.timer_732Hz=732.4Hz (16-bit) +x21e.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz +x21e.menu.timer.timer_366Hz=366.2Hz (16-bit) +x21e.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz +x21e.menu.timer.timer_244Hz=244.1Hz (16-bit) +x21e.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz +x21e.menu.timer.timer_183Hz=183.1Hz (16-bit) +x21e.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz +x21e.menu.timer.timer_146Hz=146.5Hz (16-bit) +x21e.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz +x21e.menu.timer.timer_122Hz=122.1Hz (16-bit) +x21e.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz +x21e.menu.timer.timer_105Hz=104.6Hz (16-bit) +x21e.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz +x21e.menu.timer.timer_81Hz=81.38Hz (16-bit) +x21e.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz +x21e.menu.timer.timer_61Hz=61.04Hz (16-bit) +x21e.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz +x21e.menu.timer.timer_31Hz=30.52Hz (16-bit) +x21e.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz +x21e.menu.timer.timer_187500Hz=187500Hz (8-bit) +x21e.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz +x21e.menu.timer.timer_93750Hz=93750Hz (8-bit) +x21e.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz +x21e.menu.timer.timer_62500Hz=62500Hz (8-bit) +x21e.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz +x21e.menu.timer.timer_37500Hz=37500Hz (8-bit) +x21e.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz +x21e.menu.timer.timer_20833Hz=20833Hz (8-bit) +x21e.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz +x21e.menu.timer.timer_12500Hz=12500Hz (8-bit) +x21e.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz +x21e.menu.timer.timer_7500Hz=7500Hz (8-bit) +x21e.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz +x21e.menu.timer.timer_4166Hz=4166Hz (8-bit) +x21e.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz +x21e.menu.timer.timer_2930Hz=2930Hz (8-bit) +x21e.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz +x21e.menu.timer.timer_1465Hz=1465Hz (8-bit) +x21e.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz +x21e.menu.cpu.samd21e15a=SAMD21E15A +x21e.menu.cpu.samd21e15a.upload.maximum_size=24576 +x21e.menu.cpu.samd21e15a.build.extra_flags=-D__SAMD21E15A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21e.menu.cpu.samd21e15a.build.ldscript=flash_32KB.ld +x21e.menu.cpu.samd21e15a.build.openocdscript=openocd_scripts/SAMD21E15A.cfg +x21e.menu.cpu.samd21e15a.bootloader.file=zero/binaries/sam_ba_SAMD21E15A.bin +x21e.menu.cpu.samd21e16a=SAMD21E16A +x21e.menu.cpu.samd21e16a.upload.maximum_size=57344 +x21e.menu.cpu.samd21e16a.build.extra_flags=-D__SAMD21E16A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21e.menu.cpu.samd21e16a.build.ldscript=flash_64KB.ld +x21e.menu.cpu.samd21e16a.build.openocdscript=openocd_scripts/SAMD21E16A.cfg +x21e.menu.cpu.samd21e16a.bootloader.file=zero/binaries/sam_ba_SAMD21E16A.bin +x21e.menu.cpu.samd21e17a=SAMD21E17A +x21e.menu.cpu.samd21e17a.upload.maximum_size=122880 +x21e.menu.cpu.samd21e17a.build.extra_flags=-D__SAMD21E17A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21e.menu.cpu.samd21e17a.build.ldscript=flash_128KB.ld +x21e.menu.cpu.samd21e17a.build.openocdscript=openocd_scripts/SAMD21E17A.cfg +x21e.menu.cpu.samd21e17a.bootloader.file=zero/binaries/sam_ba_SAMD21E17A.bin +x21e.menu.cpu.samd21e18a=SAMD21E18A +x21e.menu.cpu.samd21e18a.upload.maximum_size=253952 +x21e.menu.cpu.samd21e18a.build.extra_flags=-D__SAMD21E18A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21e.menu.cpu.samd21e18a.build.ldscript=flash_256KB.ld +x21e.menu.cpu.samd21e18a.build.openocdscript=openocd_scripts/SAMD21E18A.cfg +x21e.menu.cpu.samd21e18a.bootloader.file=zero/binaries/sam_ba_SAMD21E18A.bin +x21e.menu.cpu.saml21e15b=SAML21E15B +x21e.menu.cpu.saml21e15b.upload.maximum_size=24576 +x21e.menu.cpu.saml21e15b.build.extra_flags=-D__SAML21E15B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21e.menu.cpu.saml21e15b.build.ldscript=flash_32KB.ld +x21e.menu.cpu.saml21e15b.build.openocdscript=openocd_scripts/SAML21E15B.cfg +x21e.menu.cpu.saml21e15b.bootloader.file=zero/binaries/sam_ba_SAML21E15B.bin +x21e.menu.cpu.saml21e16b=SAML21E16B +x21e.menu.cpu.saml21e16b.upload.maximum_size=57344 +x21e.menu.cpu.saml21e16b.build.extra_flags=-D__SAML21E16B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21e.menu.cpu.saml21e16b.build.ldscript=flash_64KB.ld +x21e.menu.cpu.saml21e16b.build.openocdscript=openocd_scripts/SAML21E16B.cfg +x21e.menu.cpu.saml21e16b.bootloader.file=zero/binaries/sam_ba_SAML21E16B.bin +x21e.menu.cpu.saml21e17b=SAML21E17B +x21e.menu.cpu.saml21e17b.upload.maximum_size=122880 +x21e.menu.cpu.saml21e17b.build.extra_flags=-D__SAML21E17B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21e.menu.cpu.saml21e17b.build.ldscript=flash_128KB.ld +x21e.menu.cpu.saml21e17b.build.openocdscript=openocd_scripts/SAML21E17B.cfg +x21e.menu.cpu.saml21e17b.bootloader.file=zero/binaries/sam_ba_SAML21E17B.bin +x21e.menu.cpu.saml21e18b=SAML21E18B +x21e.menu.cpu.saml21e18b.upload.maximum_size=253952 +x21e.menu.cpu.saml21e18b.build.extra_flags=-D__SAML21E18B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21e.menu.cpu.saml21e18b.build.ldscript=flash_256KB.ld +x21e.menu.cpu.saml21e18b.build.openocdscript=openocd_scripts/SAML21E18B.cfg +x21e.menu.cpu.saml21e18b.bootloader.file=zero/binaries/sam_ba_SAML21E18B.bin +x21e.menu.cpu.samc21e15a=SAMC21E15A +x21e.menu.cpu.samc21e15a.upload.maximum_size=24576 +x21e.menu.cpu.samc21e15a.build.extra_flags=-D__SAMC21E15A__ -DARM_MATH_CM0PLUS +x21e.menu.cpu.samc21e15a.build.ldscript=flash_32KB.ld +x21e.menu.cpu.samc21e15a.build.openocdscript=openocd_scripts/SAMC21E15A.cfg +x21e.menu.cpu.samc21e15a.bootloader.file=zero/binaries/sam_ba_SAMC21E15A.bin +x21e.menu.cpu.samc21e16a=SAMC21E16A +x21e.menu.cpu.samc21e16a.upload.maximum_size=57344 +x21e.menu.cpu.samc21e16a.build.extra_flags=-D__SAMC21E16A__ -DARM_MATH_CM0PLUS +x21e.menu.cpu.samc21e16a.build.ldscript=flash_64KB.ld +x21e.menu.cpu.samc21e16a.build.openocdscript=openocd_scripts/SAMC21E16A.cfg +x21e.menu.cpu.samc21e16a.bootloader.file=zero/binaries/sam_ba_SAMC21E16A.bin +x21e.menu.cpu.samc21e17a=SAMC21E17A +x21e.menu.cpu.samc21e17a.upload.maximum_size=122880 +x21e.menu.cpu.samc21e17a.build.extra_flags=-D__SAMC21E17A__ -DARM_MATH_CM0PLUS +x21e.menu.cpu.samc21e17a.build.ldscript=flash_128KB.ld +x21e.menu.cpu.samc21e17a.build.openocdscript=openocd_scripts/SAMC21E17A.cfg +x21e.menu.cpu.samc21e17a.bootloader.file=zero/binaries/sam_ba_SAMC21E17A.bin +x21e.menu.cpu.samc21e18a=SAMC21E18A +x21e.menu.cpu.samc21e18a.upload.maximum_size=253952 +x21e.menu.cpu.samc21e18a.build.extra_flags=-D__SAMC21E18A__ -DARM_MATH_CM0PLUS +x21e.menu.cpu.samc21e18a.build.ldscript=flash_256KB.ld +x21e.menu.cpu.samc21e18a.build.openocdscript=openocd_scripts/SAMC21E18A.cfg +x21e.menu.cpu.samc21e18a.bootloader.file=zero/binaries/sam_ba_SAMC21E18A.bin +x21e.menu.bootloader.8kb=8KB_BOOTLOADER +x21e.menu.bootloader.8kb.build.bootloader_size=__8KB_BOOTLOADER__ +x21e.menu.bootloader.8kb.build.ldscript_path=linker_scripts/gcc/8KB_Bootloader +x21e.menu.bootloader.8kb.upload.tool=Fab_SAM_Arduino:bossac +x21e.menu.bootloader.8kb.upload.use_1200bps_touch=true +x21e.menu.bootloader.8kb.upload.wait_for_upload_port=true +x21e.menu.bootloader.8kb.upload.native_usb=true +x21e.menu.bootloader.16kb=16KB_BOOTLOADER +x21e.menu.bootloader.16kb.build.bootloader_size=__16KB_BOOTLOADER__ +x21e.menu.bootloader.16kb.build.ldscript_path=linker_scripts/gcc/16KB_Bootloader +x21e.menu.bootloader.16kb.upload.tool=Fab_SAM_Arduino:bossac +x21e.menu.bootloader.16kb.upload.use_1200bps_touch=true +x21e.menu.bootloader.16kb.upload.wait_for_upload_port=true +x21e.menu.bootloader.16kb.upload.native_usb=true +x21e.menu.bootloader.0kb=NO_BOOTLOADER +x21e.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ +x21e.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader +x21e.menu.bootloader.0kb.upload.tool=openocd +x21e.menu.bootloader.0kb.upload.use_1200bps_touch=false +x21e.menu.bootloader.0kb.upload.wait_for_upload_port=false +x21e.menu.bootloader.0kb.upload.native_usb=false +x21e.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI +x21e.menu.serial.one_uart.build.serialcom_uart=ONE_UART +x21e.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE +x21e.menu.serial.one_uart.build.serialcom_spi=ONE_SPI +x21e.menu.serial.one_uart_one_wire_two_spi=ONE_UART_ONE_WIRE_TWO_SPI +x21e.menu.serial.one_uart_one_wire_two_spi.build.serialcom_uart=ONE_UART +x21e.menu.serial.one_uart_one_wire_two_spi.build.serialcom_wire=ONE_WIRE +x21e.menu.serial.one_uart_one_wire_two_spi.build.serialcom_spi=TWO_SPI +x21e.menu.serial.one_uart_two_wire_one_spi=ONE_UART_TWO_WIRE_ONE_SPI +x21e.menu.serial.one_uart_two_wire_one_spi.build.serialcom_uart=ONE_UART +x21e.menu.serial.one_uart_two_wire_one_spi.build.serialcom_wire=TWO_WIRE +x21e.menu.serial.one_uart_two_wire_one_spi.build.serialcom_spi=ONE_SPI +x21e.menu.serial.two_uart=TWO_UART_ONE_WIRE_ONE_SPI +x21e.menu.serial.two_uart.build.serialcom_uart=TWO_UART +x21e.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE +x21e.menu.serial.two_uart.build.serialcom_spi=ONE_SPI +x21e.menu.serial.three_uart_one_wire_no_spi=THREE_UART_ONE_WIRE_NO_SPI +x21e.menu.serial.three_uart_one_wire_no_spi.build.serialcom_uart=THREE_UART +x21e.menu.serial.three_uart_one_wire_no_spi.build.serialcom_wire=ONE_WIRE +x21e.menu.serial.three_uart_one_wire_no_spi.build.serialcom_spi=NO_SPI +x21e.menu.serial.three_uart_no_wire_one_spi=THREE_UART_NO_WIRE_ONE_SPI +x21e.menu.serial.three_uart_no_wire_one_spi.build.serialcom_uart=THREE_UART +x21e.menu.serial.three_uart_no_wire_one_spi.build.serialcom_wire=NO_WIRE +x21e.menu.serial.three_uart_no_wire_one_spi.build.serialcom_spi=ONE_SPI +x21e.menu.serial.four_uart=FOUR_UART_NO_WIRE_NO_SPI +x21e.menu.serial.four_uart.build.serialcom_uart=FOUR_UART +x21e.menu.serial.four_uart.build.serialcom_wire=NO_WIRE +x21e.menu.serial.four_uart.build.serialcom_spi=NO_SPI +x21e.menu.serial.no_uart_one_wire_two_spi=NO_UART_ONE_WIRE_TWO_SPI +x21e.menu.serial.no_uart_one_wire_two_spi.build.serialcom_uart=NO_UART +x21e.menu.serial.no_uart_one_wire_two_spi.build.serialcom_wire=ONE_WIRE +x21e.menu.serial.no_uart_one_wire_two_spi.build.serialcom_spi=TWO_SPI +x21e.menu.serial.four_uart_one_wire_one_spi=FOUR_UART_ONE_WIRE_ONE_SPI (L21 only) +x21e.menu.serial.four_uart_one_wire_one_spi.build.serialcom_uart=FOUR_UART +x21e.menu.serial.four_uart_one_wire_one_spi.build.serialcom_wire=ONE_WIRE +x21e.menu.serial.four_uart_one_wire_one_spi.build.serialcom_spi=ONE_SPI +x21e.menu.serial.five_uart_no_wire_one_spi=FIVE_UART_NO_WIRE_ONE_SPI (L21 only) +x21e.menu.serial.five_uart_no_wire_one_spi.build.serialcom_uart=FIVE_UART +x21e.menu.serial.five_uart_no_wire_one_spi.build.serialcom_wire=NO_WIRE +x21e.menu.serial.five_uart_no_wire_one_spi.build.serialcom_spi=ONE_SPI +x21e.menu.serial.five_uart_one_wire_no_spi=FIVE_UART_ONE_WIRE_NO_SPI (L21 only) +x21e.menu.serial.five_uart_one_wire_no_spi.build.serialcom_uart=FIVE_UART +x21e.menu.serial.five_uart_one_wire_no_spi.build.serialcom_wire=ONE_WIRE +x21e.menu.serial.five_uart_one_wire_no_spi.build.serialcom_spi=NO_SPI +x21e.menu.serial.six_uart=SIX_UART_NO_WIRE_NO_SPI (L21 only) +x21e.menu.serial.six_uart.build.serialcom_uart=SIX_UART +x21e.menu.serial.six_uart.build.serialcom_wire=NO_WIRE +x21e.menu.serial.six_uart.build.serialcom_spi=NO_SPI +x21e.menu.usb.cdc=CDC_ONLY +x21e.menu.usb.cdc.build.usbcom=CDC_ONLY +x21e.menu.usb.cdc.build.pid=0x4557 +x21e.menu.usb.cdc_hid=CDC_HID +x21e.menu.usb.cdc_hid.build.usbcom=CDC_HID +x21e.menu.usb.cdc_hid.build.pid=0x4856 +x21e.menu.usb.withcdc=WITH_CDC +x21e.menu.usb.withcdc.build.usbcom=WITH_CDC +x21e.menu.usb.withcdc.build.pid=0x4B41 +x21e.menu.usb.hid=HID_ONLY +x21e.menu.usb.hid.build.usbcom=HID_ONLY +x21e.menu.usb.hid.build.pid=0x4B40 +x21e.menu.usb.nocdc=WITHOUT_CDC +x21e.menu.usb.nocdc.build.usbcom=WITHOUT_CDC +x21e.menu.usb.nocdc.build.pid=0x4A0C +x21e.menu.usb.none=USB_DISABLED +x21e.menu.usb.none.build.usbcom=USB_DISABLED +x21e.menu.usb.none.build.pid=0x4856 + +# Generic x21G +x21g.name=Generic x21G +x21g.vid.0=0x16D0 +x21g.pid.0=0x5557 +x21g.vid.1=0x16D0 +x21g.pid.1=0x5856 +x21g.vid.2=0x16D0 +x21g.pid.2=0x5B41 +x21g.vid.3=0x16D0 +x21g.pid.3=0x5B40 +x21g.vid.4=0x16D0 +x21g.pid.4=0x5A0C +x21g.vid.5=0x16D0 +x21g.pid.5=0x5856 +x21g.build.usb_manufacturer="Fab Foundation" +x21g.build.board=SAMD_ZERO +x21g.build.core=arduino +x21g.build.variant=Generic_xx1G +x21g.build.variant_system_lib= +x21g.build.vid=0x16D0 +x21g.upload.protocol=sam-ba +x21g.bootloader.tool=openocd +x21g.menu.float.default=Print & String use auto-promoted doubles only +x21g.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY +x21g.menu.float.print=Print uses separate singles and doubles +x21g.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES +x21g.menu.float.string=String uses separate singles and doubles +x21g.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES +x21g.menu.float.both=Print & String use separate singles and doubles +x21g.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES +x21g.menu.config.disabled=config.h disabled +x21g.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED +x21g.menu.config.enabled=config.h enabled (mostly code size reductions) +x21g.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED +x21g.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR +x21g.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB +x21g.menu.clock.internal=INTERNAL_OSCILLATOR +x21g.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL +x21g.menu.clock.crystal_32k=32KHZ_CRYSTAL +x21g.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL +x21g.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL +x21g.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL +x21g.menu.timer.timer_732Hz=732.4Hz (16-bit) +x21g.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz +x21g.menu.timer.timer_366Hz=366.2Hz (16-bit) +x21g.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz +x21g.menu.timer.timer_244Hz=244.1Hz (16-bit) +x21g.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz +x21g.menu.timer.timer_183Hz=183.1Hz (16-bit) +x21g.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz +x21g.menu.timer.timer_146Hz=146.5Hz (16-bit) +x21g.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz +x21g.menu.timer.timer_122Hz=122.1Hz (16-bit) +x21g.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz +x21g.menu.timer.timer_105Hz=104.6Hz (16-bit) +x21g.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz +x21g.menu.timer.timer_81Hz=81.38Hz (16-bit) +x21g.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz +x21g.menu.timer.timer_61Hz=61.04Hz (16-bit) +x21g.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz +x21g.menu.timer.timer_31Hz=30.52Hz (16-bit) +x21g.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz +x21g.menu.timer.timer_187500Hz=187500Hz (8-bit) +x21g.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz +x21g.menu.timer.timer_93750Hz=93750Hz (8-bit) +x21g.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz +x21g.menu.timer.timer_62500Hz=62500Hz (8-bit) +x21g.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz +x21g.menu.timer.timer_37500Hz=37500Hz (8-bit) +x21g.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz +x21g.menu.timer.timer_20833Hz=20833Hz (8-bit) +x21g.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz +x21g.menu.timer.timer_12500Hz=12500Hz (8-bit) +x21g.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz +x21g.menu.timer.timer_7500Hz=7500Hz (8-bit) +x21g.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz +x21g.menu.timer.timer_4166Hz=4166Hz (8-bit) +x21g.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz +x21g.menu.timer.timer_2930Hz=2930Hz (8-bit) +x21g.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz +x21g.menu.timer.timer_1465Hz=1465Hz (8-bit) +x21g.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz +x21g.menu.cpu.samd21g17a=SAMD21G17A +x21g.menu.cpu.samd21g17a.upload.maximum_size=122880 +x21g.menu.cpu.samd21g17a.build.mcu=cortex-m0plus +x21g.menu.cpu.samd21g17a.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.samd21g17a.build.f_cpu=48000000L +x21g.menu.cpu.samd21g17a.build.usb_product="D21" +x21g.menu.cpu.samd21g17a.build.extra_flags=-D__SAMD21G17A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21g.menu.cpu.samd21g17a.build.ldscript=flash_128KB.ld +x21g.menu.cpu.samd21g17a.build.openocdscript=openocd_scripts/SAMD21G17A.cfg +x21g.menu.cpu.samd21g17a.bootloader.file=zero/binaries/sam_ba_SAMD21G17A.bin +x21g.menu.cpu.samd21g18a=SAMD21G18A +x21g.menu.cpu.samd21g18a.upload.maximum_size=253952 +x21g.menu.cpu.samd21g18a.build.mcu=cortex-m0plus +x21g.menu.cpu.samd21g18a.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.samd21g18a.build.f_cpu=48000000L +x21g.menu.cpu.samd21g18a.build.usb_product="D21" +x21g.menu.cpu.samd21g18a.build.extra_flags=-D__SAMD21G18A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21g.menu.cpu.samd21g18a.build.ldscript=flash_256KB.ld +x21g.menu.cpu.samd21g18a.build.openocdscript=openocd_scripts/SAMD21G18A.cfg +x21g.menu.cpu.samd21g18a.bootloader.file=zero/binaries/sam_ba_SAMD21G18A.bin +x21g.menu.cpu.samd21g15a=SAMD21G15A +x21g.menu.cpu.samd21g15a.upload.maximum_size=24576 +x21g.menu.cpu.samd21g15a.build.mcu=cortex-m0plus +x21g.menu.cpu.samd21g15a.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.samd21g15a.build.f_cpu=48000000L +x21g.menu.cpu.samd21g15a.build.usb_product="D21" +x21g.menu.cpu.samd21g15a.build.extra_flags=-D__SAMD21G15A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21g.menu.cpu.samd21g15a.build.ldscript=flash_32KB.ld +x21g.menu.cpu.samd21g15a.build.openocdscript=openocd_scripts/SAMD21G15A.cfg +x21g.menu.cpu.samd21g15a.bootloader.file=zero/binaries/sam_ba_SAMD21G15A.bin +x21g.menu.cpu.samd21g16a=SAMD21G16A +x21g.menu.cpu.samd21g16a.upload.maximum_size=57344 +x21g.menu.cpu.samd21g16a.build.mcu=cortex-m0plus +x21g.menu.cpu.samd21g16a.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.samd21g16a.build.f_cpu=48000000L +x21g.menu.cpu.samd21g16a.build.usb_product="D21" +x21g.menu.cpu.samd21g16a.build.extra_flags=-D__SAMD21G16A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21g.menu.cpu.samd21g16a.build.ldscript=flash_64KB.ld +x21g.menu.cpu.samd21g16a.build.openocdscript=openocd_scripts/SAMD21G16A.cfg +x21g.menu.cpu.samd21g16a.bootloader.file=zero/binaries/sam_ba_SAMD21G16A.bin +x21g.menu.cpu.saml21g17b=SAML21G17B +x21g.menu.cpu.saml21g17b.upload.maximum_size=122880 +x21g.menu.cpu.saml21g17b.build.mcu=cortex-m0plus +x21g.menu.cpu.saml21g17b.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.saml21g17b.build.f_cpu=48000000L +x21g.menu.cpu.saml21g17b.build.usb_product="L21" +x21g.menu.cpu.saml21g17b.build.extra_flags=-D__SAML21G17B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21g.menu.cpu.saml21g17b.build.ldscript=flash_128KB.ld +x21g.menu.cpu.saml21g17b.build.openocdscript=openocd_scripts/SAML21G17B.cfg +x21g.menu.cpu.saml21g17b.bootloader.file=zero/binaries/sam_ba_SAML21G17B.bin +x21g.menu.cpu.saml21g18b=SAML21G18B +x21g.menu.cpu.saml21g18b.upload.maximum_size=253952 +x21g.menu.cpu.saml21g18b.build.mcu=cortex-m0plus +x21g.menu.cpu.saml21g18b.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.saml21g18b.build.f_cpu=48000000L +x21g.menu.cpu.saml21g18b.build.usb_product="L21" +x21g.menu.cpu.saml21g18b.build.extra_flags=-D__SAML21G18B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21g.menu.cpu.saml21g18b.build.ldscript=flash_256KB.ld +x21g.menu.cpu.saml21g18b.build.openocdscript=openocd_scripts/SAML21G18B.cfg +x21g.menu.cpu.saml21g18b.bootloader.file=zero/binaries/sam_ba_SAML21G18B.bin +x21g.menu.cpu.saml21g15b=SAML21G15B +x21g.menu.cpu.saml21g15b.upload.maximum_size=24576 +x21g.menu.cpu.saml21g15b.build.mcu=cortex-m0plus +x21g.menu.cpu.saml21g15b.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.saml21g15b.build.f_cpu=48000000L +x21g.menu.cpu.saml21g15b.build.usb_product="L21" +x21g.menu.cpu.saml21g15b.build.extra_flags=-D__SAML21G15B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21g.menu.cpu.saml21g15b.build.ldscript=flash_32KB.ld +x21g.menu.cpu.saml21g15b.build.openocdscript=openocd_scripts/SAML21G15B.cfg +x21g.menu.cpu.saml21g15b.bootloader.file=zero/binaries/sam_ba_SAML21G15B.bin +x21g.menu.cpu.saml21g16b=SAML21G16B +x21g.menu.cpu.saml21g16b.upload.maximum_size=57344 +x21g.menu.cpu.saml21g16b.build.mcu=cortex-m0plus +x21g.menu.cpu.saml21g16b.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.saml21g16b.build.f_cpu=48000000L +x21g.menu.cpu.saml21g16b.build.usb_product="L21" +x21g.menu.cpu.saml21g16b.build.extra_flags=-D__SAML21G16B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21g.menu.cpu.saml21g16b.build.ldscript=flash_64KB.ld +x21g.menu.cpu.saml21g16b.build.openocdscript=openocd_scripts/SAML21G16B.cfg +x21g.menu.cpu.saml21g16b.bootloader.file=zero/binaries/sam_ba_SAML21G16B.bin +x21g.menu.cpu.samc21g17a=SAMC21G17A +x21g.menu.cpu.samc21g17a.upload.maximum_size=122880 +x21g.menu.cpu.samc21g17a.build.mcu=cortex-m0plus +x21g.menu.cpu.samc21g17a.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.samc21g17a.build.f_cpu=48000000L +x21g.menu.cpu.samc21g17a.build.usb_product="C21" +x21g.menu.cpu.samc21g17a.build.extra_flags=-D__SAMC21G17A__ -DARM_MATH_CM0PLUS +x21g.menu.cpu.samc21g17a.build.ldscript=flash_128KB.ld +x21g.menu.cpu.samc21g17a.build.openocdscript=openocd_scripts/SAMC21G17A.cfg +x21g.menu.cpu.samc21g17a.bootloader.file=zero/binaries/sam_ba_SAMC21G17A.bin +x21g.menu.cpu.samc21g18a=SAMC21G18A +x21g.menu.cpu.samc21g18a.upload.maximum_size=253952 +x21g.menu.cpu.samc21g18a.build.mcu=cortex-m0plus +x21g.menu.cpu.samc21g18a.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.samc21g18a.build.f_cpu=48000000L +x21g.menu.cpu.samc21g18a.build.usb_product="C21" +x21g.menu.cpu.samc21g18a.build.extra_flags=-D__SAMC21G18A__ -DARM_MATH_CM0PLUS +x21g.menu.cpu.samc21g18a.build.ldscript=flash_256KB.ld +x21g.menu.cpu.samc21g18a.build.openocdscript=openocd_scripts/SAMC21G18A.cfg +x21g.menu.cpu.samc21g18a.bootloader.file=zero/binaries/sam_ba_SAMC21G18A.bin +x21g.menu.cpu.samc21g15a=SAMC21G15A +x21g.menu.cpu.samc21g15a.upload.maximum_size=24576 +x21g.menu.cpu.samc21g15a.build.mcu=cortex-m0plus +x21g.menu.cpu.samc21g15a.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.samc21g15a.build.f_cpu=48000000L +x21g.menu.cpu.samc21g15a.build.usb_product="C21" +x21g.menu.cpu.samc21g15a.build.extra_flags=-D__SAMC21G15A__ -DARM_MATH_CM0PLUS +x21g.menu.cpu.samc21g15a.build.ldscript=flash_32KB.ld +x21g.menu.cpu.samc21g15a.build.openocdscript=openocd_scripts/SAMC21G15A.cfg +x21g.menu.cpu.samc21g15a.bootloader.file=zero/binaries/sam_ba_SAMC21G15A.bin +x21g.menu.cpu.samc21g16a=SAMC21G16A +x21g.menu.cpu.samc21g16a.upload.maximum_size=57344 +x21g.menu.cpu.samc21g16a.build.mcu=cortex-m0plus +x21g.menu.cpu.samc21g16a.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.samc21g16a.build.f_cpu=48000000L +x21g.menu.cpu.samc21g16a.build.usb_product="C21" +x21g.menu.cpu.samc21g16a.build.extra_flags=-D__SAMC21G16A__ -DARM_MATH_CM0PLUS +x21g.menu.cpu.samc21g16a.build.ldscript=flash_64KB.ld +x21g.menu.cpu.samc21g16a.build.openocdscript=openocd_scripts/SAMC21G16A.cfg +x21g.menu.cpu.samc21g16a.bootloader.file=zero/binaries/sam_ba_SAMC21G16A.bin +x21g.menu.bootloader.8kb=8KB_BOOTLOADER +x21g.menu.bootloader.8kb.build.bootloader_size=__8KB_BOOTLOADER__ +x21g.menu.bootloader.8kb.build.ldscript_path=linker_scripts/gcc/8KB_Bootloader +x21g.menu.bootloader.8kb.upload.tool=Fab_SAM_Arduino:bossac +x21g.menu.bootloader.8kb.upload.use_1200bps_touch=true +x21g.menu.bootloader.8kb.upload.wait_for_upload_port=true +x21g.menu.bootloader.8kb.upload.native_usb=true +x21g.menu.bootloader.16kb=16KB_BOOTLOADER +x21g.menu.bootloader.16kb.build.bootloader_size=__16KB_BOOTLOADER__ +x21g.menu.bootloader.16kb.build.ldscript_path=linker_scripts/gcc/16KB_Bootloader +x21g.menu.bootloader.16kb.upload.tool=Fab_SAM_Arduino:bossac +x21g.menu.bootloader.16kb.upload.use_1200bps_touch=true +x21g.menu.bootloader.16kb.upload.wait_for_upload_port=true +x21g.menu.bootloader.16kb.upload.native_usb=true +x21g.menu.bootloader.0kb=NO_BOOTLOADER +x21g.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ +x21g.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader +x21g.menu.bootloader.0kb.upload.tool=openocd +x21g.menu.bootloader.0kb.upload.use_1200bps_touch=false +x21g.menu.bootloader.0kb.upload.wait_for_upload_port=false +x21g.menu.bootloader.0kb.upload.native_usb=false +x21g.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI +x21g.menu.serial.one_uart.build.serialcom_uart=ONE_UART +x21g.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE +x21g.menu.serial.one_uart.build.serialcom_spi=ONE_SPI +x21g.menu.serial.one_uart_two_spi=ONE_UART_ONE_WIRE_TWO_SPI +x21g.menu.serial.one_uart_two_spi.build.serialcom_uart=ONE_UART +x21g.menu.serial.one_uart_two_spi.build.serialcom_wire=ONE_WIRE +x21g.menu.serial.one_uart_two_spi.build.serialcom_spi=TWO_SPI +x21g.menu.serial.one_uart_two_wire=ONE_UART_TWO_WIRE_ONE_SPI +x21g.menu.serial.one_uart_two_wire.build.serialcom_uart=ONE_UART +x21g.menu.serial.one_uart_two_wire.build.serialcom_wire=TWO_WIRE +x21g.menu.serial.one_uart_two_wire.build.serialcom_spi=ONE_SPI +x21g.menu.serial.two_uart=TWO_UART_ONE_WIRE_ONE_SPI +x21g.menu.serial.two_uart.build.serialcom_uart=TWO_UART +x21g.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE +x21g.menu.serial.two_uart.build.serialcom_spi=ONE_SPI +x21g.menu.serial.two_uart_two_spi=TWO_UART_ONE_WIRE_TWO_SPI +x21g.menu.serial.two_uart_two_spi.build.serialcom_uart=TWO_UART +x21g.menu.serial.two_uart_two_spi.build.serialcom_wire=ONE_WIRE +x21g.menu.serial.two_uart_two_spi.build.serialcom_spi=TWO_SPI +x21g.menu.serial.two_uart_two_wire=TWO_UART_TWO_WIRE_ONE_SPI +x21g.menu.serial.two_uart_two_wire.build.serialcom_uart=TWO_UART +x21g.menu.serial.two_uart_two_wire.build.serialcom_wire=TWO_WIRE +x21g.menu.serial.two_uart_two_wire.build.serialcom_spi=ONE_SPI +x21g.menu.serial.three_uart=THREE_UART_ONE_WIRE_ONE_SPI +x21g.menu.serial.three_uart.build.serialcom_uart=THREE_UART +x21g.menu.serial.three_uart.build.serialcom_wire=ONE_WIRE +x21g.menu.serial.three_uart.build.serialcom_spi=ONE_SPI +x21g.menu.serial.three_uart_two_spi=THREE_UART_ONE_WIRE_TWO_SPI +x21g.menu.serial.three_uart_two_spi.build.serialcom_uart=THREE_UART +x21g.menu.serial.three_uart_two_spi.build.serialcom_wire=ONE_WIRE +x21g.menu.serial.three_uart_two_spi.build.serialcom_spi=TWO_SPI +x21g.menu.serial.three_uart_two_wire=THREE_UART_TWO_WIRE_ONE_SPI +x21g.menu.serial.three_uart_two_wire.build.serialcom_uart=THREE_UART +x21g.menu.serial.three_uart_two_wire.build.serialcom_wire=TWO_WIRE +x21g.menu.serial.three_uart_two_wire.build.serialcom_spi=ONE_SPI +x21g.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI +x21g.menu.serial.no_uart.build.serialcom_uart=NO_UART +x21g.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE +x21g.menu.serial.no_uart.build.serialcom_spi=ONE_SPI +x21g.menu.usb.cdc=CDC_ONLY +x21g.menu.usb.cdc.build.usbcom=CDC_ONLY +x21g.menu.usb.cdc.build.pid=0x5557 +x21g.menu.usb.cdc_hid=CDC_HID +x21g.menu.usb.cdc_hid.build.usbcom=CDC_HID +x21g.menu.usb.cdc_hid.build.pid=0x5856 +x21g.menu.usb.withcdc=WITH_CDC +x21g.menu.usb.withcdc.build.usbcom=WITH_CDC +x21g.menu.usb.withcdc.build.pid=0x5B41 +x21g.menu.usb.hid=HID_ONLY +x21g.menu.usb.hid.build.usbcom=HID_ONLY +x21g.menu.usb.hid.build.pid=0x5B40 +x21g.menu.usb.nocdc=WITHOUT_CDC +x21g.menu.usb.nocdc.build.usbcom=WITHOUT_CDC +x21g.menu.usb.nocdc.build.pid=0x5A0C +x21g.menu.usb.none=USB_DISABLED +x21g.menu.usb.none.build.usbcom=USB_DISABLED +x21g.menu.usb.none.build.pid=0x5856 + +# Generic x21J +x21j.name=Generic x21J +x21j.vid.0=0x16D0 +x21j.pid.0=0x6557 +x21j.vid.1=0x16D0 +x21j.pid.1=0x6856 +x21j.vid.2=0x16D0 +x21j.pid.2=0x6B41 +x21j.vid.3=0x16D0 +x21j.pid.3=0x6B40 +x21j.vid.4=0x16D0 +x21j.pid.4=0x6A0C +x21j.vid.5=0x16D0 +x21j.pid.5=0x6856 +x21j.build.usb_manufacturer="Fab Foundation" +x21j.build.board=SAMD_ZERO +x21j.build.core=arduino +x21j.build.variant=Generic_xx1J +x21j.build.variant_system_lib= +x21j.build.vid=0x16D0 +x21j.upload.protocol=sam-ba +x21j.bootloader.tool=openocd +x21j.menu.float.default=Print & String use auto-promoted doubles only +x21j.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY +x21j.menu.float.print=Print uses separate singles and doubles +x21j.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES +x21j.menu.float.string=String uses separate singles and doubles +x21j.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES +x21j.menu.float.both=Print & String use separate singles and doubles +x21j.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES +x21j.menu.config.disabled=config.h disabled +x21j.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED +x21j.menu.config.enabled=config.h enabled (mostly code size reductions) +x21j.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED +x21j.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR +x21j.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB +x21j.menu.clock.internal=INTERNAL_OSCILLATOR +x21j.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL +x21j.menu.clock.crystal_32k=32KHZ_CRYSTAL +x21j.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL +x21j.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL +x21j.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL +x21j.menu.timer.timer_732Hz=732.4Hz (16-bit) +x21j.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz +x21j.menu.timer.timer_366Hz=366.2Hz (16-bit) +x21j.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz +x21j.menu.timer.timer_244Hz=244.1Hz (16-bit) +x21j.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz +x21j.menu.timer.timer_183Hz=183.1Hz (16-bit) +x21j.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz +x21j.menu.timer.timer_146Hz=146.5Hz (16-bit) +x21j.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz +x21j.menu.timer.timer_122Hz=122.1Hz (16-bit) +x21j.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz +x21j.menu.timer.timer_105Hz=104.6Hz (16-bit) +x21j.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz +x21j.menu.timer.timer_81Hz=81.38Hz (16-bit) +x21j.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz +x21j.menu.timer.timer_61Hz=61.04Hz (16-bit) +x21j.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz +x21j.menu.timer.timer_31Hz=30.52Hz (16-bit) +x21j.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz +x21j.menu.timer.timer_187500Hz=187500Hz (8-bit) +x21j.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz +x21j.menu.timer.timer_93750Hz=93750Hz (8-bit) +x21j.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz +x21j.menu.timer.timer_62500Hz=62500Hz (8-bit) +x21j.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz +x21j.menu.timer.timer_37500Hz=37500Hz (8-bit) +x21j.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz +x21j.menu.timer.timer_20833Hz=20833Hz (8-bit) +x21j.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz +x21j.menu.timer.timer_12500Hz=12500Hz (8-bit) +x21j.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz +x21j.menu.timer.timer_7500Hz=7500Hz (8-bit) +x21j.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz +x21j.menu.timer.timer_4166Hz=4166Hz (8-bit) +x21j.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz +x21j.menu.timer.timer_2930Hz=2930Hz (8-bit) +x21j.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz +x21j.menu.timer.timer_1465Hz=1465Hz (8-bit) +x21j.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz +x21j.menu.cpu.samd21j17a=SAMD21J17A +x21j.menu.cpu.samd21j17a.upload.maximum_size=122880 +x21j.menu.cpu.samd21j17a.build.mcu=cortex-m0plus +x21j.menu.cpu.samd21j17a.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.samd21j17a.build.f_cpu=48000000L +x21j.menu.cpu.samd21j17a.build.usb_product="Xeno D21" +x21j.menu.cpu.samd21j17a.build.extra_flags=-D__SAMD21J17A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21j.menu.cpu.samd21j17a.build.ldscript=flash_128KB.ld +x21j.menu.cpu.samd21j17a.build.openocdscript=openocd_scripts/SAMD21J17A.cfg +x21j.menu.cpu.samd21j17a.bootloader.file=zero/binaries/sam_ba_SAMD21J17A.bin +x21j.menu.cpu.samd21j18a=SAMD21J18A +x21j.menu.cpu.samd21j18a.upload.maximum_size=253952 +x21j.menu.cpu.samd21j18a.build.mcu=cortex-m0plus +x21j.menu.cpu.samd21j18a.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.samd21j18a.build.f_cpu=48000000L +x21j.menu.cpu.samd21j18a.build.usb_product="Xeno D21" +x21j.menu.cpu.samd21j18a.build.extra_flags=-D__SAMD21J18A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21j.menu.cpu.samd21j18a.build.ldscript=flash_256KB.ld +x21j.menu.cpu.samd21j18a.build.openocdscript=openocd_scripts/SAMD21J18A.cfg +x21j.menu.cpu.samd21j18a.bootloader.file=zero/binaries/sam_ba_SAMD21J18A.bin +x21j.menu.cpu.samd21j15a=SAMD21J15A +x21j.menu.cpu.samd21j15a.upload.maximum_size=24576 +x21j.menu.cpu.samd21j15a.build.mcu=cortex-m0plus +x21j.menu.cpu.samd21j15a.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.samd21j15a.build.f_cpu=48000000L +x21j.menu.cpu.samd21j15a.build.usb_product="Xeno D21" +x21j.menu.cpu.samd21j15a.build.extra_flags=-D__SAMD21J15A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21j.menu.cpu.samd21j15a.build.ldscript=flash_32KB.ld +x21j.menu.cpu.samd21j15a.build.openocdscript=openocd_scripts/SAMD21J15A.cfg +x21j.menu.cpu.samd21j15a.bootloader.file=zero/binaries/sam_ba_SAMD21J15A.bin +x21j.menu.cpu.samd21j16a=SAMD21J16A +x21j.menu.cpu.samd21j16a.upload.maximum_size=57344 +x21j.menu.cpu.samd21j16a.build.mcu=cortex-m0plus +x21j.menu.cpu.samd21j16a.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.samd21j16a.build.f_cpu=48000000L +x21j.menu.cpu.samd21j16a.build.usb_product="Xeno D21" +x21j.menu.cpu.samd21j16a.build.extra_flags=-D__SAMD21J16A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21j.menu.cpu.samd21j16a.build.ldscript=flash_64KB.ld +x21j.menu.cpu.samd21j16a.build.openocdscript=openocd_scripts/SAMD21J16A.cfg +x21j.menu.cpu.samd21j16a.bootloader.file=zero/binaries/sam_ba_SAMD21J16A.bin +x21j.menu.cpu.saml21j17b=SAML21J17B +x21j.menu.cpu.saml21j17b.upload.maximum_size=122880 +x21j.menu.cpu.saml21j17b.build.mcu=cortex-m0plus +x21j.menu.cpu.saml21j17b.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.saml21j17b.build.f_cpu=48000000L +x21j.menu.cpu.saml21j17b.build.usb_product="Xeno L21" +x21j.menu.cpu.saml21j17b.build.extra_flags=-D__SAML21J17B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21j.menu.cpu.saml21j17b.build.ldscript=flash_128KB.ld +x21j.menu.cpu.saml21j17b.build.openocdscript=openocd_scripts/SAML21J17B.cfg +x21j.menu.cpu.saml21j17b.bootloader.file=zero/binaries/sam_ba_SAML21J17B.bin +x21j.menu.cpu.saml21j18b=SAML21J18B +x21j.menu.cpu.saml21j18b.upload.maximum_size=253952 +x21j.menu.cpu.saml21j18b.build.mcu=cortex-m0plus +x21j.menu.cpu.saml21j18b.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.saml21j18b.build.f_cpu=48000000L +x21j.menu.cpu.saml21j18b.build.usb_product="Xeno L21" +x21j.menu.cpu.saml21j18b.build.extra_flags=-D__SAML21J18B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21j.menu.cpu.saml21j18b.build.ldscript=flash_256KB.ld +x21j.menu.cpu.saml21j18b.build.openocdscript=openocd_scripts/SAML21J18B.cfg +x21j.menu.cpu.saml21j18b.bootloader.file=zero/binaries/sam_ba_SAML21J18B.bin +x21j.menu.cpu.saml21j16b=SAML21J16B +x21j.menu.cpu.saml21j16b.upload.maximum_size=57344 +x21j.menu.cpu.saml21j16b.build.mcu=cortex-m0plus +x21j.menu.cpu.saml21j16b.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.saml21j16b.build.f_cpu=48000000L +x21j.menu.cpu.saml21j16b.build.usb_product="Xeno L21" +x21j.menu.cpu.saml21j16b.build.extra_flags=-D__SAML21J16B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21j.menu.cpu.saml21j16b.build.ldscript=flash_64KB.ld +x21j.menu.cpu.saml21j16b.build.openocdscript=openocd_scripts/SAML21J16B.cfg +x21j.menu.cpu.saml21j16b.bootloader.file=zero/binaries/sam_ba_SAML21J16B.bin +x21j.menu.cpu.samc21j17a=SAMC21J17A +x21j.menu.cpu.samc21j17a.upload.maximum_size=122880 +x21j.menu.cpu.samc21j17a.build.mcu=cortex-m0plus +x21j.menu.cpu.samc21j17a.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.samc21j17a.build.f_cpu=48000000L +x21j.menu.cpu.samc21j17a.build.usb_product="Xeno C21" +x21j.menu.cpu.samc21j17a.build.extra_flags=-D__SAMC21J17A__ -DARM_MATH_CM0PLUS +x21j.menu.cpu.samc21j17a.build.ldscript=flash_128KB.ld +x21j.menu.cpu.samc21j17a.build.openocdscript=openocd_scripts/SAMC21J17A.cfg +x21j.menu.cpu.samc21j17a.bootloader.file=zero/binaries/sam_ba_SAMC21J17A.bin +x21j.menu.cpu.samc21j18a=SAMC21J18A +x21j.menu.cpu.samc21j18a.upload.maximum_size=253952 +x21j.menu.cpu.samc21j18a.build.mcu=cortex-m0plus +x21j.menu.cpu.samc21j18a.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.samc21j18a.build.f_cpu=48000000L +x21j.menu.cpu.samc21j18a.build.usb_product="Xeno C21" +x21j.menu.cpu.samc21j18a.build.extra_flags=-D__SAMC21J18A__ -DARM_MATH_CM0PLUS +x21j.menu.cpu.samc21j18a.build.ldscript=flash_256KB.ld +x21j.menu.cpu.samc21j18a.build.openocdscript=openocd_scripts/SAMC21J18A.cfg +x21j.menu.cpu.samc21j18a.bootloader.file=zero/binaries/sam_ba_SAMC21J18A.bin +x21j.menu.cpu.samc21j15a=SAMC21J15A +x21j.menu.cpu.samc21j15a.upload.maximum_size=24576 +x21j.menu.cpu.samc21j15a.build.mcu=cortex-m0plus +x21j.menu.cpu.samc21j15a.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.samc21j15a.build.f_cpu=48000000L +x21j.menu.cpu.samc21j15a.build.usb_product="Xeno C21" +x21j.menu.cpu.samc21j15a.build.extra_flags=-D__SAMC21J15A__ -DARM_MATH_CM0PLUS +x21j.menu.cpu.samc21j15a.build.ldscript=flash_32KB.ld +x21j.menu.cpu.samc21j15a.build.openocdscript=openocd_scripts/SAMC21J15A.cfg +x21j.menu.cpu.samc21j15a.bootloader.file=zero/binaries/sam_ba_SAMC21J15A.bin +x21j.menu.cpu.samc21j16a=SAMC21J16A +x21j.menu.cpu.samc21j16a.upload.maximum_size=57344 +x21j.menu.cpu.samc21j16a.build.mcu=cortex-m0plus +x21j.menu.cpu.samc21j16a.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.samc21j16a.build.f_cpu=48000000L +x21j.menu.cpu.samc21j16a.build.usb_product="Xeno C21" +x21j.menu.cpu.samc21j16a.build.extra_flags=-D__SAMC21J16A__ -DARM_MATH_CM0PLUS +x21j.menu.cpu.samc21j16a.build.ldscript=flash_64KB.ld +x21j.menu.cpu.samc21j16a.build.openocdscript=openocd_scripts/SAMC21J16A.cfg +x21j.menu.cpu.samc21j16a.bootloader.file=zero/binaries/sam_ba_SAMC21J16A.bin +x21j.menu.bootloader.8kb=8KB_BOOTLOADER +x21j.menu.bootloader.8kb.build.bootloader_size=__8KB_BOOTLOADER__ +x21j.menu.bootloader.8kb.build.ldscript_path=linker_scripts/gcc/8KB_Bootloader +x21j.menu.bootloader.8kb.upload.tool=Fab_SAM_Arduino:bossac +x21j.menu.bootloader.8kb.upload.use_1200bps_touch=true +x21j.menu.bootloader.8kb.upload.wait_for_upload_port=true +x21j.menu.bootloader.8kb.upload.native_usb=true +x21j.menu.bootloader.16kb=16KB_BOOTLOADER +x21j.menu.bootloader.16kb.build.bootloader_size=__16KB_BOOTLOADER__ +x21j.menu.bootloader.16kb.build.ldscript_path=linker_scripts/gcc/16KB_Bootloader +x21j.menu.bootloader.16kb.upload.tool=Fab_SAM_Arduino:bossac +x21j.menu.bootloader.16kb.upload.use_1200bps_touch=true +x21j.menu.bootloader.16kb.upload.wait_for_upload_port=true +x21j.menu.bootloader.16kb.upload.native_usb=true +x21j.menu.bootloader.0kb=NO_BOOTLOADER +x21j.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ +x21j.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader +x21j.menu.bootloader.0kb.upload.tool=openocd +x21j.menu.bootloader.0kb.upload.use_1200bps_touch=false +x21j.menu.bootloader.0kb.upload.wait_for_upload_port=false +x21j.menu.bootloader.0kb.upload.native_usb=false +x21j.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI +x21j.menu.serial.one_uart.build.serialcom_uart=ONE_UART +x21j.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE +x21j.menu.serial.one_uart.build.serialcom_spi=ONE_SPI +x21j.menu.serial.one_uart_two_spi=ONE_UART_ONE_WIRE_TWO_SPI +x21j.menu.serial.one_uart_two_spi.build.serialcom_uart=ONE_UART +x21j.menu.serial.one_uart_two_spi.build.serialcom_wire=ONE_WIRE +x21j.menu.serial.one_uart_two_spi.build.serialcom_spi=TWO_SPI +x21j.menu.serial.one_uart_two_wire=ONE_UART_TWO_WIRE_ONE_SPI +x21j.menu.serial.one_uart_two_wire.build.serialcom_uart=ONE_UART +x21j.menu.serial.one_uart_two_wire.build.serialcom_wire=TWO_WIRE +x21j.menu.serial.one_uart_two_wire.build.serialcom_spi=ONE_SPI +x21j.menu.serial.two_uart=TWO_UART_ONE_WIRE_ONE_SPI +x21j.menu.serial.two_uart.build.serialcom_uart=TWO_UART +x21j.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE +x21j.menu.serial.two_uart.build.serialcom_spi=ONE_SPI +x21j.menu.serial.two_uart_two_spi=TWO_UART_ONE_WIRE_TWO_SPI +x21j.menu.serial.two_uart_two_spi.build.serialcom_uart=TWO_UART +x21j.menu.serial.two_uart_two_spi.build.serialcom_wire=ONE_WIRE +x21j.menu.serial.two_uart_two_spi.build.serialcom_spi=TWO_SPI +x21j.menu.serial.two_uart_two_wire=TWO_UART_TWO_WIRE_ONE_SPI +x21j.menu.serial.two_uart_two_wire.build.serialcom_uart=TWO_UART +x21j.menu.serial.two_uart_two_wire.build.serialcom_wire=TWO_WIRE +x21j.menu.serial.two_uart_two_wire.build.serialcom_spi=ONE_SPI +x21j.menu.serial.three_uart=THREE_UART_ONE_WIRE_ONE_SPI +x21j.menu.serial.three_uart.build.serialcom_uart=THREE_UART +x21j.menu.serial.three_uart.build.serialcom_wire=ONE_WIRE +x21j.menu.serial.three_uart.build.serialcom_spi=ONE_SPI +x21j.menu.serial.three_uart_two_spi=THREE_UART_ONE_WIRE_TWO_SPI +x21j.menu.serial.three_uart_two_spi.build.serialcom_uart=THREE_UART +x21j.menu.serial.three_uart_two_spi.build.serialcom_wire=ONE_WIRE +x21j.menu.serial.three_uart_two_spi.build.serialcom_spi=TWO_SPI +x21j.menu.serial.three_uart_two_wire=THREE_UART_TWO_WIRE_ONE_SPI +x21j.menu.serial.three_uart_two_wire.build.serialcom_uart=THREE_UART +x21j.menu.serial.three_uart_two_wire.build.serialcom_wire=TWO_WIRE +x21j.menu.serial.three_uart_two_wire.build.serialcom_spi=ONE_SPI +x21j.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI +x21j.menu.serial.no_uart.build.serialcom_uart=NO_UART +x21j.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE +x21j.menu.serial.no_uart.build.serialcom_spi=ONE_SPI +x21j.menu.usb.cdc=CDC_ONLY +x21j.menu.usb.cdc.build.usbcom=CDC_ONLY +x21j.menu.usb.cdc.build.pid=0x6557 +x21j.menu.usb.cdc_hid=CDC_HID +x21j.menu.usb.cdc_hid.build.usbcom=CDC_HID +x21j.menu.usb.cdc_hid.build.pid=0x6856 +x21j.menu.usb.withcdc=WITH_CDC +x21j.menu.usb.withcdc.build.usbcom=WITH_CDC +x21j.menu.usb.withcdc.build.pid=0x6B41 +x21j.menu.usb.hid=HID_ONLY +x21j.menu.usb.hid.build.usbcom=HID_ONLY +x21j.menu.usb.hid.build.pid=0x6B40 +x21j.menu.usb.nocdc=WITHOUT_CDC +x21j.menu.usb.nocdc.build.usbcom=WITHOUT_CDC +x21j.menu.usb.nocdc.build.pid=0x6A0C +x21j.menu.usb.none=USB_DISABLED +x21j.menu.usb.none.build.usbcom=USB_DISABLED +x21j.menu.usb.none.build.pid=0x6856 + +# Generic D51G +d51g.name=Generic D51G +d51g.vid.0=0x16D0 +d51g.pid.0=0x7557 +d51g.vid.1=0x16D0 +d51g.pid.1=0x7856 +d51g.vid.2=0x16D0 +d51g.pid.2=0x7B41 +d51g.vid.3=0x16D0 +d51g.pid.3=0x7B40 +d51g.vid.4=0x16D0 +d51g.pid.4=0x7A0C +d51g.vid.5=0x16D0 +d51g.pid.5=0x7856 +d51g.build.usb_manufacturer="Fab Foundation" + +# KH mod +#d51g.build.board=SAMD_ZERO +d51g.build.board=__SAMD51__ +###### + +d51g.build.core=arduino + +# KH mod +#d51g.build.variant=Generic_D51G +d51g.build.variant=Generic_xx1G +###### + +d51g.build.variant_system_lib= +d51g.build.vid=0x16D0 +d51g.upload.protocol=sam-ba +d51g.bootloader.tool=openocd +d51g.menu.float.default=Print & String use auto-promoted doubles only +d51g.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY +d51g.menu.float.print=Print uses separate singles and doubles +d51g.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES +d51g.menu.float.string=String uses separate singles and doubles +d51g.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES +d51g.menu.float.both=Print & String use separate singles and doubles +d51g.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES +d51g.menu.config.disabled=config.h disabled +d51g.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED +d51g.menu.config.enabled=config.h enabled (mostly code size reductions) +d51g.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED +d51g.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR +d51g.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB +d51g.menu.clock.internal=INTERNAL_OSCILLATOR +d51g.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL +d51g.menu.clock.crystal_32k=32KHZ_CRYSTAL +d51g.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL +d51g.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL +d51g.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL +d51g.menu.timer.timer_732Hz=732.4Hz (16-bit) +d51g.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz +d51g.menu.timer.timer_366Hz=366.2Hz (16-bit) +d51g.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz +d51g.menu.timer.timer_244Hz=244.1Hz (16-bit) +d51g.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz +d51g.menu.timer.timer_183Hz=183.1Hz (16-bit) +d51g.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz +d51g.menu.timer.timer_146Hz=146.5Hz (16-bit) +d51g.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz +d51g.menu.timer.timer_122Hz=122.1Hz (16-bit) +d51g.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz +d51g.menu.timer.timer_105Hz=104.6Hz (16-bit) +d51g.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz +d51g.menu.timer.timer_81Hz=81.38Hz (16-bit) +d51g.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz +d51g.menu.timer.timer_61Hz=61.04Hz (16-bit) +d51g.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz +d51g.menu.timer.timer_31Hz=30.52Hz (16-bit) +d51g.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz +d51g.menu.timer.timer_187500Hz=187500Hz (8-bit) +d51g.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz +d51g.menu.timer.timer_93750Hz=93750Hz (8-bit) +d51g.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz +d51g.menu.timer.timer_62500Hz=62500Hz (8-bit) +d51g.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz +d51g.menu.timer.timer_37500Hz=37500Hz (8-bit) +d51g.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz +d51g.menu.timer.timer_20833Hz=20833Hz (8-bit) +d51g.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz +d51g.menu.timer.timer_12500Hz=12500Hz (8-bit) +d51g.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz +d51g.menu.timer.timer_7500Hz=7500Hz (8-bit) +d51g.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz +d51g.menu.timer.timer_4166Hz=4166Hz (8-bit) +d51g.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz +d51g.menu.timer.timer_2930Hz=2930Hz (8-bit) +d51g.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz +d51g.menu.timer.timer_1465Hz=1465Hz (16-bit) +d51g.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz +d51g.menu.cpu.samd51g18a_120=SAMD51G18A_120MHz +d51g.menu.cpu.samd51g18a_120.upload.maximum_size=253952 +d51g.menu.cpu.samd51g18a_120.build.mcu=cortex-m4 +d51g.menu.cpu.samd51g18a_120.build.mathlib=arm_cortexM4lf_math +d51g.menu.cpu.samd51g18a_120.build.f_cpu=120000000L +d51g.menu.cpu.samd51g18a_120.build.usb_product="Xeno Mini D51" + +# KH mod +#d51g.menu.cpu.samd51g18a_120.build.extra_flags=-D__SAMD51G18A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +#d51g.menu.cpu.samd51g18a_120.build.extra_flags=-D__SAMD51G18A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -D__SAMD51__ +d51g.menu.cpu.samd51g18a_120.build.extra_flags=-D__SAMD51G18A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -D__SAMD51__ +###### + + +d51g.menu.cpu.samd51g18a_120.build.ldscript=flash_m4f_256KB.ld +d51g.menu.cpu.samd51g18a_120.build.openocdscript=openocd_scripts/SAMD51G18A.cfg +d51g.menu.cpu.samd51g18a_120.bootloader.file=zero/binaries/sam_ba_SAMD51G18A.bin +d51g.menu.cpu.samd51g18a_48=SAMD51G18A_48MHz +d51g.menu.cpu.samd51g18a_48.upload.maximum_size=253952 +d51g.menu.cpu.samd51g18a_48.build.mcu=cortex-m4 +d51g.menu.cpu.samd51g18a_48.build.mathlib=arm_cortexM4lf_math +d51g.menu.cpu.samd51g18a_48.build.f_cpu=48000000L +d51g.menu.cpu.samd51g18a_48.build.usb_product="Xeno Mini D51" + +# KH mod +#d51g.menu.cpu.samd51g18a_48.build.extra_flags=-D__SAMD51G18A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51g.menu.cpu.samd51g18a_48.build.extra_flags=-D__SAMD51G18A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -D__SAMD51__ +###### + +d51g.menu.cpu.samd51g18a_48.build.ldscript=flash_m4f_256KB.ld +d51g.menu.cpu.samd51g18a_48.build.openocdscript=openocd_scripts/SAMD51G18A.cfg +d51g.menu.cpu.samd51g18a_48.bootloader.file=zero/binaries/sam_ba_SAMD51G18A.bin +d51g.menu.cpu.samd51g19a_120=SAMD51G19A_120MHz +d51g.menu.cpu.samd51g19a_120.upload.maximum_size=516096 +d51g.menu.cpu.samd51g19a_120.build.mcu=cortex-m4 +d51g.menu.cpu.samd51g19a_120.build.mathlib=arm_cortexM4lf_math +d51g.menu.cpu.samd51g19a_120.build.f_cpu=120000000L +d51g.menu.cpu.samd51g19a_120.build.usb_product="Xeno Mini D51" + +# KH mod +#d51g.menu.cpu.samd51g19a_120.build.extra_flags=-D__SAMD51G19A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51g.menu.cpu.samd51g19a_120.build.extra_flags=-D__SAMD51G19A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -D__SAMD51__ +###### + +d51g.menu.cpu.samd51g19a_120.build.ldscript=flash_m4f_512KB.ld +d51g.menu.cpu.samd51g19a_120.build.openocdscript=openocd_scripts/SAMD51G19A.cfg +d51g.menu.cpu.samd51g19a_120.bootloader.file=zero/binaries/sam_ba_SAMD51G19A.bin +d51g.menu.cpu.samd51g19a_48=SAMD51G19A_48MHz +d51g.menu.cpu.samd51g19a_48.upload.maximum_size=516096 +d51g.menu.cpu.samd51g19a_48.build.mcu=cortex-m4 +d51g.menu.cpu.samd51g19a_48.build.mathlib=arm_cortexM4lf_math +d51g.menu.cpu.samd51g19a_48.build.f_cpu=48000000L +d51g.menu.cpu.samd51g19a_48.build.usb_product="Xeno Mini D51" + +# KH mod +#d51g.menu.cpu.samd51g19a_48.build.extra_flags=-D__SAMD51G19A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51g.menu.cpu.samd51g19a_48.build.extra_flags=-D__SAMD51G19A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -D__SAMD51__ +###### + +d51g.menu.cpu.samd51g19a_48.build.ldscript=flash_m4f_512KB.ld +d51g.menu.cpu.samd51g19a_48.build.openocdscript=openocd_scripts/SAMD51G19A.cfg +d51g.menu.cpu.samd51g19a_48.bootloader.file=zero/binaries/sam_ba_SAMD51G19A.bin +d51g.menu.bootloader.8kb=8KB_BOOTLOADER +d51g.menu.bootloader.8kb.build.bootloader_size=__8KB_BOOTLOADER__ +d51g.menu.bootloader.8kb.build.ldscript_path=linker_scripts/gcc/8KB_Bootloader +d51g.menu.bootloader.8kb.upload.tool=Fab_SAM_Arduino:bossac +d51g.menu.bootloader.8kb.upload.use_1200bps_touch=true +d51g.menu.bootloader.8kb.upload.wait_for_upload_port=true +d51g.menu.bootloader.8kb.upload.native_usb=true +d51g.menu.bootloader.16kb=16KB_BOOTLOADER +d51g.menu.bootloader.16kb.build.bootloader_size=__16KB_BOOTLOADER__ +d51g.menu.bootloader.16kb.build.ldscript_path=linker_scripts/gcc/16KB_Bootloader +d51g.menu.bootloader.16kb.upload.tool=Fab_SAM_Arduino:bossac +d51g.menu.bootloader.16kb.upload.use_1200bps_touch=true +d51g.menu.bootloader.16kb.upload.wait_for_upload_port=true +d51g.menu.bootloader.16kb.upload.native_usb=true +d51g.menu.bootloader.0kb=NO_BOOTLOADER +d51g.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ +d51g.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader +d51g.menu.bootloader.0kb.upload.tool=openocd +d51g.menu.bootloader.0kb.upload.use_1200bps_touch=false +d51g.menu.bootloader.0kb.upload.wait_for_upload_port=false +d51g.menu.bootloader.0kb.upload.native_usb=false +d51g.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI +d51g.menu.serial.one_uart.build.serialcom_uart=ONE_UART +d51g.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE +d51g.menu.serial.one_uart.build.serialcom_spi=ONE_SPI +d51g.menu.serial.one_uart_two_spi=ONE_UART_ONE_WIRE_TWO_SPI +d51g.menu.serial.one_uart_two_spi.build.serialcom_uart=ONE_UART +d51g.menu.serial.one_uart_two_spi.build.serialcom_wire=ONE_WIRE +d51g.menu.serial.one_uart_two_spi.build.serialcom_spi=TWO_SPI +d51g.menu.serial.one_uart_two_wire=ONE_UART_TWO_WIRE_ONE_SPI +d51g.menu.serial.one_uart_two_wire.build.serialcom_uart=ONE_UART +d51g.menu.serial.one_uart_two_wire.build.serialcom_wire=TWO_WIRE +d51g.menu.serial.one_uart_two_wire.build.serialcom_spi=ONE_SPI +d51g.menu.serial.two_uart=TWO_UART_ONE_WIRE_ONE_SPI +d51g.menu.serial.two_uart.build.serialcom_uart=TWO_UART +d51g.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE +d51g.menu.serial.two_uart.build.serialcom_spi=ONE_SPI +d51g.menu.serial.two_uart_two_spi=TWO_UART_ONE_WIRE_TWO_SPI +d51g.menu.serial.two_uart_two_spi.build.serialcom_uart=TWO_UART +d51g.menu.serial.two_uart_two_spi.build.serialcom_wire=ONE_WIRE +d51g.menu.serial.two_uart_two_spi.build.serialcom_spi=TWO_SPI +d51g.menu.serial.two_uart_two_wire=TWO_UART_TWO_WIRE_ONE_SPI +d51g.menu.serial.two_uart_two_wire.build.serialcom_uart=TWO_UART +d51g.menu.serial.two_uart_two_wire.build.serialcom_wire=TWO_WIRE +d51g.menu.serial.two_uart_two_wire.build.serialcom_spi=ONE_SPI +d51g.menu.serial.three_uart=THREE_UART_ONE_WIRE_ONE_SPI +d51g.menu.serial.three_uart.build.serialcom_uart=THREE_UART +d51g.menu.serial.three_uart.build.serialcom_wire=ONE_WIRE +d51g.menu.serial.three_uart.build.serialcom_spi=ONE_SPI +d51g.menu.serial.three_uart_two_spi=THREE_UART_ONE_WIRE_TWO_SPI +d51g.menu.serial.three_uart_two_spi.build.serialcom_uart=THREE_UART +d51g.menu.serial.three_uart_two_spi.build.serialcom_wire=ONE_WIRE +d51g.menu.serial.three_uart_two_spi.build.serialcom_spi=TWO_SPI +d51g.menu.serial.three_uart_two_wire=THREE_UART_TWO_WIRE_ONE_SPI +d51g.menu.serial.three_uart_two_wire.build.serialcom_uart=THREE_UART +d51g.menu.serial.three_uart_two_wire.build.serialcom_wire=TWO_WIRE +d51g.menu.serial.three_uart_two_wire.build.serialcom_spi=ONE_SPI +d51g.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI +d51g.menu.serial.no_uart.build.serialcom_uart=NO_UART +d51g.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE +d51g.menu.serial.no_uart.build.serialcom_spi=ONE_SPI +d51g.menu.usb.cdc=CDC_ONLY +d51g.menu.usb.cdc.build.usbcom=CDC_ONLY +d51g.menu.usb.cdc.build.pid=0x7557 +d51g.menu.usb.cdc_hid=CDC_HID +d51g.menu.usb.cdc_hid.build.usbcom=CDC_HID +d51g.menu.usb.cdc_hid.build.pid=0x7856 +d51g.menu.usb.withcdc=WITH_CDC +d51g.menu.usb.withcdc.build.usbcom=WITH_CDC +d51g.menu.usb.withcdc.build.pid=0x7B41 +d51g.menu.usb.hid=HID_ONLY +d51g.menu.usb.hid.build.usbcom=HID_ONLY +d51g.menu.usb.hid.build.pid=0x7B40 +d51g.menu.usb.nocdc=WITHOUT_CDC +d51g.menu.usb.nocdc.build.usbcom=WITHOUT_CDC +d51g.menu.usb.nocdc.build.pid=0x7A0C +d51g.menu.usb.none=USB_DISABLED +d51g.menu.usb.none.build.usbcom=USB_DISABLED +d51g.menu.usb.none.build.pid=0x7856 + +# Generic D51J +d51j.name=Generic D51J +d51j.vid.0=0x16D0 +d51j.pid.0=0x8557 +d51j.vid.1=0x16D0 +d51j.pid.1=0x8856 +d51j.vid.2=0x16D0 +d51j.pid.2=0x8B41 +d51j.vid.3=0x16D0 +d51j.pid.3=0x8B40 +d51j.vid.4=0x16D0 +d51j.pid.4=0x8A0C +d51j.vid.5=0x16D0 +d51j.pid.5=0x8856 +d51j.build.usb_manufacturer="Fab Foundation" + +# KH mod +#d51j.build.board=SAMD_ZERO +d51j.build.board=__SAMD51__ +###### + +d51j.build.core=arduino +d51j.build.variant=Generic_xx1J +d51j.build.variant_system_lib= +d51j.build.vid=0x16D0 +d51j.upload.protocol=sam-ba +d51j.bootloader.tool=openocd +d51j.menu.float.default=Print & String use auto-promoted doubles only +d51j.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY +d51j.menu.float.print=Print uses separate singles and doubles +d51j.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES +d51j.menu.float.string=String uses separate singles and doubles +d51j.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES +d51j.menu.float.both=Print & String use separate singles and doubles +d51j.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES +d51j.menu.config.disabled=config.h disabled +d51j.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED +d51j.menu.config.enabled=config.h enabled (mostly code size reductions) +d51j.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED +d51j.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR +d51j.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB +d51j.menu.clock.internal=INTERNAL_OSCILLATOR +d51j.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL +d51j.menu.clock.crystal_32k=32KHZ_CRYSTAL +d51j.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL +d51j.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL +d51j.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL +d51j.menu.timer.timer_732Hz=732.4Hz (16-bit) +d51j.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz +d51j.menu.timer.timer_366Hz=366.2Hz (16-bit) +d51j.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz +d51j.menu.timer.timer_244Hz=244.1Hz (16-bit) +d51j.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz +d51j.menu.timer.timer_183Hz=183.1Hz (16-bit) +d51j.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz +d51j.menu.timer.timer_146Hz=146.5Hz (16-bit) +d51j.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz +d51j.menu.timer.timer_122Hz=122.1Hz (16-bit) +d51j.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz +d51j.menu.timer.timer_105Hz=104.6Hz (16-bit) +d51j.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz +d51j.menu.timer.timer_81Hz=81.38Hz (16-bit) +d51j.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz +d51j.menu.timer.timer_61Hz=61.04Hz (16-bit) +d51j.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz +d51j.menu.timer.timer_31Hz=30.52Hz (16-bit) +d51j.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz +d51j.menu.timer.timer_187500Hz=187500Hz (8-bit) +d51j.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz +d51j.menu.timer.timer_93750Hz=93750Hz (8-bit) +d51j.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz +d51j.menu.timer.timer_62500Hz=62500Hz (8-bit) +d51j.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz +d51j.menu.timer.timer_37500Hz=37500Hz (8-bit) +d51j.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz +d51j.menu.timer.timer_20833Hz=20833Hz (8-bit) +d51j.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz +d51j.menu.timer.timer_12500Hz=12500Hz (8-bit) +d51j.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz +d51j.menu.timer.timer_7500Hz=7500Hz (8-bit) +d51j.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz +d51j.menu.timer.timer_4166Hz=4166Hz (8-bit) +d51j.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz +d51j.menu.timer.timer_2930Hz=2930Hz (8-bit) +d51j.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz +d51j.menu.timer.timer_1465Hz=1465Hz (16-bit) +d51j.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz +d51j.menu.cpu.samd51j18a_120=SAMD51J18A_120MHz +d51j.menu.cpu.samd51j18a_120.upload.maximum_size=253952 +d51j.menu.cpu.samd51j18a_120.build.mcu=cortex-m4 +d51j.menu.cpu.samd51j18a_120.build.mathlib=arm_cortexM4lf_math +d51j.menu.cpu.samd51j18a_120.build.f_cpu=120000000L +d51j.menu.cpu.samd51j18a_120.build.usb_product="Xeno D51" + +# KH mod +#d51j.menu.cpu.samd51j18a_120.build.extra_flags=-D__SAMD51J18A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51j.menu.cpu.samd51j18a_120.build.extra_flags=-D__SAMD51J18A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -D__SAMD51__ +###### + +d51j.menu.cpu.samd51j18a_120.build.ldscript=flash_m4f_256KB.ld +d51j.menu.cpu.samd51j18a_120.build.openocdscript=openocd_scripts/SAMD51J18A.cfg +d51j.menu.cpu.samd51j18a_120.bootloader.file=zero/binaries/sam_ba_SAMD51J18A.bin +d51j.menu.cpu.samd51j18a_48=SAMD51J18A_48MHz +d51j.menu.cpu.samd51j18a_48.upload.maximum_size=253952 +d51j.menu.cpu.samd51j18a_48.build.mcu=cortex-m4 +d51j.menu.cpu.samd51j18a_48.build.mathlib=arm_cortexM4lf_math +d51j.menu.cpu.samd51j18a_48.build.f_cpu=48000000L +d51j.menu.cpu.samd51j18a_48.build.usb_product="Xeno D51" + +# KH mod +#d51j.menu.cpu.samd51j18a_48.build.extra_flags=-D__SAMD51J18A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51j.menu.cpu.samd51j18a_48.build.extra_flags=-D__SAMD51J18A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -D__SAMD51__ +###### + +d51j.menu.cpu.samd51j18a_48.build.ldscript=flash_m4f_256KB.ld +d51j.menu.cpu.samd51j18a_48.build.openocdscript=openocd_scripts/SAMD51J18A.cfg +d51j.menu.cpu.samd51j18a_48.bootloader.file=zero/binaries/sam_ba_SAMD51J18A.bin +d51j.menu.cpu.samd51j19a_120=SAMD51J19A_120MHz +d51j.menu.cpu.samd51j19a_120.upload.maximum_size=516096 +d51j.menu.cpu.samd51j19a_120.build.mcu=cortex-m4 +d51j.menu.cpu.samd51j19a_120.build.mathlib=arm_cortexM4lf_math +d51j.menu.cpu.samd51j19a_120.build.f_cpu=120000000L +d51j.menu.cpu.samd51j19a_120.build.usb_product="Xeno D51" + +# KH mod +#d51j.menu.cpu.samd51j19a_120.build.extra_flags=-D__SAMD51J19A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51j.menu.cpu.samd51j19a_120.build.extra_flags=-D__SAMD51J19A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -D__SAMD51__ +###### + +d51j.menu.cpu.samd51j19a_120.build.ldscript=flash_m4f_512KB.ld +d51j.menu.cpu.samd51j19a_120.build.openocdscript=openocd_scripts/SAMD51J19A.cfg +d51j.menu.cpu.samd51j19a_120.bootloader.file=zero/binaries/sam_ba_SAMD51J19A.bin +d51j.menu.cpu.samd51j19a_48=SAMD51J19A_48MHz +d51j.menu.cpu.samd51j19a_48.upload.maximum_size=516096 +d51j.menu.cpu.samd51j19a_48.build.mcu=cortex-m4 +d51j.menu.cpu.samd51j19a_48.build.mathlib=arm_cortexM4lf_math +d51j.menu.cpu.samd51j19a_48.build.f_cpu=48000000L +d51j.menu.cpu.samd51j19a_48.build.usb_product="Xeno D51" + +# KH mod +#d51j.menu.cpu.samd51j19a_48.build.extra_flags=-D__SAMD51J19A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51j.menu.cpu.samd51j19a_48.build.extra_flags=-D__SAMD51J19A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -D__SAMD51__ +###### + +d51j.menu.cpu.samd51j19a_48.build.ldscript=flash_m4f_512KB.ld +d51j.menu.cpu.samd51j19a_48.build.openocdscript=openocd_scripts/SAMD51J19A.cfg +d51j.menu.cpu.samd51j19a_48.bootloader.file=zero/binaries/sam_ba_SAMD51J19A.bin +d51j.menu.cpu.samd51j20a_120=SAMD51J20A_120MHz +d51j.menu.cpu.samd51j20a_120.upload.maximum_size=1040384 +d51j.menu.cpu.samd51j20a_120.build.mcu=cortex-m4 +d51j.menu.cpu.samd51j20a_120.build.mathlib=arm_cortexM4lf_math +d51j.menu.cpu.samd51j20a_120.build.f_cpu=120000000L +d51j.menu.cpu.samd51j20a_120.build.usb_product="Xeno D51" + +# KH mod +#d51j.menu.cpu.samd51j20a_120.build.extra_flags=-D__SAMD51J20A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51j.menu.cpu.samd51j20a_120.build.extra_flags=-D__SAMD51J20A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -D__SAMD51__ +###### + +d51j.menu.cpu.samd51j20a_120.build.ldscript=flash_m4f_1MB.ld +d51j.menu.cpu.samd51j20a_120.build.openocdscript=openocd_scripts/SAMD51J20A.cfg +d51j.menu.cpu.samd51j20a_120.bootloader.file=zero/binaries/sam_ba_SAMD51J20A.bin +d51j.menu.cpu.samd51j20a_48=SAMD51J20A_48MHz +d51j.menu.cpu.samd51j20a_48.upload.maximum_size=1040384 +d51j.menu.cpu.samd51j20a_48.build.mcu=cortex-m4 +d51j.menu.cpu.samd51j20a_48.build.mathlib=arm_cortexM4lf_math +d51j.menu.cpu.samd51j20a_48.build.f_cpu=48000000L +d51j.menu.cpu.samd51j20a_48.build.usb_product="Xeno D51" + +# KH mod +#d51j.menu.cpu.samd51j20a_48.build.extra_flags=-D__SAMD51J20A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51j.menu.cpu.samd51j20a_48.build.extra_flags=-D__SAMD51J20A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -D__SAMD51__ +###### + +d51j.menu.cpu.samd51j20a_48.build.ldscript=flash_m4f_1MB.ld +d51j.menu.cpu.samd51j20a_48.build.openocdscript=openocd_scripts/SAMD51J20A.cfg +d51j.menu.cpu.samd51j20a_48.bootloader.file=zero/binaries/sam_ba_SAMD51J20A.bin +d51j.menu.bootloader.8kb=8KB_BOOTLOADER +d51j.menu.bootloader.8kb.build.bootloader_size=__8KB_BOOTLOADER__ +d51j.menu.bootloader.8kb.build.ldscript_path=linker_scripts/gcc/8KB_Bootloader +d51j.menu.bootloader.8kb.upload.tool=Fab_SAM_Arduino:bossac +d51j.menu.bootloader.8kb.upload.use_1200bps_touch=true +d51j.menu.bootloader.8kb.upload.wait_for_upload_port=true +d51j.menu.bootloader.8kb.upload.native_usb=true +d51j.menu.bootloader.16kb=16KB_BOOTLOADER +d51j.menu.bootloader.16kb.build.bootloader_size=__16KB_BOOTLOADER__ +d51j.menu.bootloader.16kb.build.ldscript_path=linker_scripts/gcc/16KB_Bootloader +d51j.menu.bootloader.16kb.upload.tool=Fab_SAM_Arduino:bossac +d51j.menu.bootloader.16kb.upload.use_1200bps_touch=true +d51j.menu.bootloader.16kb.upload.wait_for_upload_port=true +d51j.menu.bootloader.16kb.upload.native_usb=true +d51j.menu.bootloader.0kb=NO_BOOTLOADER +d51j.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ +d51j.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader +d51j.menu.bootloader.0kb.upload.tool=openocd +d51j.menu.bootloader.0kb.upload.use_1200bps_touch=false +d51j.menu.bootloader.0kb.upload.wait_for_upload_port=false +d51j.menu.bootloader.0kb.upload.native_usb=false +d51j.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI +d51j.menu.serial.one_uart.build.serialcom_uart=ONE_UART +d51j.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE +d51j.menu.serial.one_uart.build.serialcom_spi=ONE_SPI +d51j.menu.serial.one_uart_two_spi=ONE_UART_ONE_WIRE_TWO_SPI +d51j.menu.serial.one_uart_two_spi.build.serialcom_uart=ONE_UART +d51j.menu.serial.one_uart_two_spi.build.serialcom_wire=ONE_WIRE +d51j.menu.serial.one_uart_two_spi.build.serialcom_spi=TWO_SPI +d51j.menu.serial.one_uart_two_wire=ONE_UART_TWO_WIRE_ONE_SPI +d51j.menu.serial.one_uart_two_wire.build.serialcom_uart=ONE_UART +d51j.menu.serial.one_uart_two_wire.build.serialcom_wire=TWO_WIRE +d51j.menu.serial.one_uart_two_wire.build.serialcom_spi=ONE_SPI +d51j.menu.serial.two_uart=TWO_UART_ONE_WIRE_ONE_SPI +d51j.menu.serial.two_uart.build.serialcom_uart=TWO_UART +d51j.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE +d51j.menu.serial.two_uart.build.serialcom_spi=ONE_SPI +d51j.menu.serial.two_uart_two_spi=TWO_UART_ONE_WIRE_TWO_SPI +d51j.menu.serial.two_uart_two_spi.build.serialcom_uart=TWO_UART +d51j.menu.serial.two_uart_two_spi.build.serialcom_wire=ONE_WIRE +d51j.menu.serial.two_uart_two_spi.build.serialcom_spi=TWO_SPI +d51j.menu.serial.two_uart_two_wire=TWO_UART_TWO_WIRE_ONE_SPI +d51j.menu.serial.two_uart_two_wire.build.serialcom_uart=TWO_UART +d51j.menu.serial.two_uart_two_wire.build.serialcom_wire=TWO_WIRE +d51j.menu.serial.two_uart_two_wire.build.serialcom_spi=ONE_SPI +d51j.menu.serial.three_uart=THREE_UART_ONE_WIRE_ONE_SPI +d51j.menu.serial.three_uart.build.serialcom_uart=THREE_UART +d51j.menu.serial.three_uart.build.serialcom_wire=ONE_WIRE +d51j.menu.serial.three_uart.build.serialcom_spi=ONE_SPI +d51j.menu.serial.three_uart_two_spi=THREE_UART_ONE_WIRE_TWO_SPI +d51j.menu.serial.three_uart_two_spi.build.serialcom_uart=THREE_UART +d51j.menu.serial.three_uart_two_spi.build.serialcom_wire=ONE_WIRE +d51j.menu.serial.three_uart_two_spi.build.serialcom_spi=TWO_SPI +d51j.menu.serial.three_uart_two_wire=THREE_UART_TWO_WIRE_ONE_SPI +d51j.menu.serial.three_uart_two_wire.build.serialcom_uart=THREE_UART +d51j.menu.serial.three_uart_two_wire.build.serialcom_wire=TWO_WIRE +d51j.menu.serial.three_uart_two_wire.build.serialcom_spi=ONE_SPI +d51j.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI +d51j.menu.serial.no_uart.build.serialcom_uart=NO_UART +d51j.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE +d51j.menu.serial.no_uart.build.serialcom_spi=ONE_SPI +d51j.menu.usb.cdc=CDC_ONLY +d51j.menu.usb.cdc.build.usbcom=CDC_ONLY +d51j.menu.usb.cdc.build.pid=0x8557 +d51j.menu.usb.cdc_hid=CDC_HID +d51j.menu.usb.cdc_hid.build.usbcom=CDC_HID +d51j.menu.usb.cdc_hid.build.pid=0x8856 +d51j.menu.usb.withcdc=WITH_CDC +d51j.menu.usb.withcdc.build.usbcom=WITH_CDC +d51j.menu.usb.withcdc.build.pid=0x8B41 +d51j.menu.usb.hid=HID_ONLY +d51j.menu.usb.hid.build.usbcom=HID_ONLY +d51j.menu.usb.hid.build.pid=0x8B40 +d51j.menu.usb.nocdc=WITHOUT_CDC +d51j.menu.usb.nocdc.build.usbcom=WITHOUT_CDC +d51j.menu.usb.nocdc.build.pid=0x8A0C +d51j.menu.usb.none=USB_DISABLED +d51j.menu.usb.none.build.usbcom=USB_DISABLED +d51j.menu.usb.none.build.pid=0x8856 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Maixduino/hardware/k210/0.3.10/cores/arduino/Stream.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Maixduino/hardware/k210/0.3.10/cores/arduino/Stream.h new file mode 100644 index 0000000..a7479d0 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Maixduino/hardware/k210/0.3.10/cores/arduino/Stream.h @@ -0,0 +1,129 @@ +/* + Stream.h - base class for character-based streams. + Copyright (c) 2010 David A. Mellis. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + parsing functions based on TextFinder library by Michael Margolis +*/ + +#ifndef Stream_h +#define Stream_h + +#include +#include "Print.h" + +// compatability macros for testing +/* +#define getInt() parseInt() +#define getInt(ignore) parseInt(ignore) +#define getFloat() parseFloat() +#define getFloat(ignore) parseFloat(ignore) +#define getString( pre_string, post_string, buffer, length) +readBytesBetween( pre_string, terminator, buffer, length) +*/ + +// This enumeration provides the lookahead options for parseInt(), parseFloat() +// The rules set out here are used until either the first valid character is found +// or a time out occurs due to lack of input. +enum LookaheadMode{ + SKIP_ALL, // All invalid characters are ignored. + SKIP_NONE, // Nothing is skipped, and the stream is not touched unless the first waiting character is valid. + SKIP_WHITESPACE // Only tabs, spaces, line feeds & carriage returns are skipped. +}; + +#define NO_IGNORE_CHAR '\x01' // a char not found in a valid ASCII numeric field + +class Stream : public Print +{ + protected: + unsigned long _timeout; // number of milliseconds to wait for the next char before aborting timed read + unsigned long _startMillis = 0; // used for timeout measurement + int timedRead(); // read stream with timeout + int timedPeek(); // peek stream with timeout + int peekNextDigit(LookaheadMode lookahead, bool detectDecimal); // returns the next numeric digit in the stream or -1 if timeout + + public: + virtual int available() = 0; + virtual int read() = 0; + virtual int peek() = 0; + + Stream() {_timeout=1000;} + +// parsing methods + + void setTimeout(unsigned long timeout); // sets maximum milliseconds to wait for stream data, default is 1 second + unsigned long getTimeout(void) { return _timeout; } + + bool find(char *target); // reads data from the stream until the target string is found + bool find(uint8_t *target) { return find ((char *)target); } + // returns true if target string is found, false if timed out (see setTimeout) + + bool find(char *target, size_t length); // reads data from the stream until the target string of given length is found + bool find(uint8_t *target, size_t length) { return find ((char *)target, length); } + // returns true if target string is found, false if timed out + + bool find(char target) { return find (&target, 1); } + + bool findUntil(char *target, char *terminator); // as find but search ends if the terminator string is found + bool findUntil(uint8_t *target, char *terminator) { return findUntil((char *)target, terminator); } + + bool findUntil(char *target, size_t targetLen, char *terminate, size_t termLen); // as above but search ends if the terminate string is found + bool findUntil(uint8_t *target, size_t targetLen, char *terminate, size_t termLen) {return findUntil((char *)target, targetLen, terminate, termLen); } + + long parseInt(LookaheadMode lookahead = SKIP_ALL, char ignore = NO_IGNORE_CHAR); + // returns the first valid (long) integer value from the current position. + // lookahead determines how parseInt looks ahead in the stream. + // See LookaheadMode enumeration at the top of the file. + // Lookahead is terminated by the first character that is not a valid part of an integer. + // Once parsing commences, 'ignore' will be skipped in the stream. + + float parseFloat(LookaheadMode lookahead = SKIP_ALL, char ignore = NO_IGNORE_CHAR); + // float version of parseInt + + size_t readBytes( char *buffer, size_t length); // read chars from stream into buffer + size_t readBytes( uint8_t *buffer, size_t length) { return readBytes((char *)buffer, length); } + // terminates if length characters have been read or timeout (see setTimeout) + // returns the number of characters placed in the buffer (0 means no valid data found) + + size_t readBytesUntil( char terminator, char *buffer, size_t length); // as readBytes with terminator character + size_t readBytesUntil( char terminator, uint8_t *buffer, size_t length) { return readBytesUntil(terminator, (char *)buffer, length); } + // terminates if length characters have been read, timeout, or if the terminator character detected + // returns the number of characters placed in the buffer (0 means no valid data found) + + // Arduino String functions to be added here + String readString(); + String readStringUntil(char terminator); + + protected: + long parseInt(char ignore) { return parseInt(SKIP_ALL, ignore); } + float parseFloat(char ignore) { return parseFloat(SKIP_ALL, ignore); } + // These overload exists for compatibility with any class that has derived + // Stream and used parseFloat/Int with a custom ignore character. To keep + // the public API simple, these overload remains protected. + + struct MultiTarget { + const char *str; // string you're searching for + size_t len; // length of string you're searching for + size_t index; // index used by the search routine. + }; + + // This allows you to search for an arbitrary number of strings. + // Returns index of the target that is found first or -1 if timeout occurs. + int findMulti(struct MultiTarget *targets, int tCount); +}; + +#undef NO_IGNORE_CHAR +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Maixduino/hardware/k210/0.3.11/cores/arduino/Stream.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Maixduino/hardware/k210/0.3.11/cores/arduino/Stream.h new file mode 100644 index 0000000..a7479d0 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Maixduino/hardware/k210/0.3.11/cores/arduino/Stream.h @@ -0,0 +1,129 @@ +/* + Stream.h - base class for character-based streams. + Copyright (c) 2010 David A. Mellis. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + parsing functions based on TextFinder library by Michael Margolis +*/ + +#ifndef Stream_h +#define Stream_h + +#include +#include "Print.h" + +// compatability macros for testing +/* +#define getInt() parseInt() +#define getInt(ignore) parseInt(ignore) +#define getFloat() parseFloat() +#define getFloat(ignore) parseFloat(ignore) +#define getString( pre_string, post_string, buffer, length) +readBytesBetween( pre_string, terminator, buffer, length) +*/ + +// This enumeration provides the lookahead options for parseInt(), parseFloat() +// The rules set out here are used until either the first valid character is found +// or a time out occurs due to lack of input. +enum LookaheadMode{ + SKIP_ALL, // All invalid characters are ignored. + SKIP_NONE, // Nothing is skipped, and the stream is not touched unless the first waiting character is valid. + SKIP_WHITESPACE // Only tabs, spaces, line feeds & carriage returns are skipped. +}; + +#define NO_IGNORE_CHAR '\x01' // a char not found in a valid ASCII numeric field + +class Stream : public Print +{ + protected: + unsigned long _timeout; // number of milliseconds to wait for the next char before aborting timed read + unsigned long _startMillis = 0; // used for timeout measurement + int timedRead(); // read stream with timeout + int timedPeek(); // peek stream with timeout + int peekNextDigit(LookaheadMode lookahead, bool detectDecimal); // returns the next numeric digit in the stream or -1 if timeout + + public: + virtual int available() = 0; + virtual int read() = 0; + virtual int peek() = 0; + + Stream() {_timeout=1000;} + +// parsing methods + + void setTimeout(unsigned long timeout); // sets maximum milliseconds to wait for stream data, default is 1 second + unsigned long getTimeout(void) { return _timeout; } + + bool find(char *target); // reads data from the stream until the target string is found + bool find(uint8_t *target) { return find ((char *)target); } + // returns true if target string is found, false if timed out (see setTimeout) + + bool find(char *target, size_t length); // reads data from the stream until the target string of given length is found + bool find(uint8_t *target, size_t length) { return find ((char *)target, length); } + // returns true if target string is found, false if timed out + + bool find(char target) { return find (&target, 1); } + + bool findUntil(char *target, char *terminator); // as find but search ends if the terminator string is found + bool findUntil(uint8_t *target, char *terminator) { return findUntil((char *)target, terminator); } + + bool findUntil(char *target, size_t targetLen, char *terminate, size_t termLen); // as above but search ends if the terminate string is found + bool findUntil(uint8_t *target, size_t targetLen, char *terminate, size_t termLen) {return findUntil((char *)target, targetLen, terminate, termLen); } + + long parseInt(LookaheadMode lookahead = SKIP_ALL, char ignore = NO_IGNORE_CHAR); + // returns the first valid (long) integer value from the current position. + // lookahead determines how parseInt looks ahead in the stream. + // See LookaheadMode enumeration at the top of the file. + // Lookahead is terminated by the first character that is not a valid part of an integer. + // Once parsing commences, 'ignore' will be skipped in the stream. + + float parseFloat(LookaheadMode lookahead = SKIP_ALL, char ignore = NO_IGNORE_CHAR); + // float version of parseInt + + size_t readBytes( char *buffer, size_t length); // read chars from stream into buffer + size_t readBytes( uint8_t *buffer, size_t length) { return readBytes((char *)buffer, length); } + // terminates if length characters have been read or timeout (see setTimeout) + // returns the number of characters placed in the buffer (0 means no valid data found) + + size_t readBytesUntil( char terminator, char *buffer, size_t length); // as readBytes with terminator character + size_t readBytesUntil( char terminator, uint8_t *buffer, size_t length) { return readBytesUntil(terminator, (char *)buffer, length); } + // terminates if length characters have been read, timeout, or if the terminator character detected + // returns the number of characters placed in the buffer (0 means no valid data found) + + // Arduino String functions to be added here + String readString(); + String readStringUntil(char terminator); + + protected: + long parseInt(char ignore) { return parseInt(SKIP_ALL, ignore); } + float parseFloat(char ignore) { return parseFloat(SKIP_ALL, ignore); } + // These overload exists for compatibility with any class that has derived + // Stream and used parseFloat/Int with a custom ignore character. To keep + // the public API simple, these overload remains protected. + + struct MultiTarget { + const char *str; // string you're searching for + size_t len; // length of string you're searching for + size_t index; // index used by the search routine. + }; + + // This allows you to search for an arbitrary number of strings. + // Returns index of the target that is found first or -1 if timeout occurs. + int findMulti(struct MultiTarget *targets, int tCount); +}; + +#undef NO_IGNORE_CHAR +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/1.9.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/1.9.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h new file mode 100644 index 0000000..d133b23 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/1.9.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h @@ -0,0 +1,513 @@ +/** + ****************************************************************************** + * @file stm32f4xx_hal_conf_default.h + * @brief HAL default configuration file. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F4xx_HAL_CONF_DEFAULT_H +#define __STM32F4xx_HAL_CONF_DEFAULT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief Include the default list of modules to be used in the HAL driver + * and manage module deactivation + */ +#include "stm32yyxx_hal_conf.h" +#if 0 +/** + * @brief This is the list of modules to be used in the HAL driver + */ +#define HAL_MODULE_ENABLED +#define HAL_ADC_MODULE_ENABLED +#define HAL_CAN_MODULE_ENABLED +/*#define HAL_CAN_LEGACY_MODULE_ENABLED*/ +#define HAL_CRC_MODULE_ENABLED +#define HAL_CEC_MODULE_ENABLED +#define HAL_CRYP_MODULE_ENABLED +#define HAL_DAC_MODULE_ENABLED +#define HAL_DCMI_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_DMA2D_MODULE_ENABLED +#define HAL_ETH_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_NAND_MODULE_ENABLED +#define HAL_NOR_MODULE_ENABLED +#define HAL_PCCARD_MODULE_ENABLED +#define HAL_SRAM_MODULE_ENABLED +#define HAL_SDRAM_MODULE_ENABLED +#define HAL_HASH_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED +#define HAL_I2C_MODULE_ENABLED +#define HAL_SMBUS_MODULE_ENABLED +#define HAL_I2S_MODULE_ENABLED +#define HAL_IWDG_MODULE_ENABLED +#define HAL_LTDC_MODULE_ENABLED +#define HAL_DSI_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_QSPI_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +#define HAL_RNG_MODULE_ENABLED +#define HAL_RTC_MODULE_ENABLED +#define HAL_SAI_MODULE_ENABLED +#define HAL_SD_MODULE_ENABLED +#define HAL_SPI_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +#define HAL_UART_MODULE_ENABLED +#define HAL_USART_MODULE_ENABLED +#define HAL_IRDA_MODULE_ENABLED +#define HAL_SMARTCARD_MODULE_ENABLED +#define HAL_WWDG_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +#define HAL_PCD_MODULE_ENABLED +#define HAL_HCD_MODULE_ENABLED +#define HAL_FMPI2C_MODULE_ENABLED +#define HAL_SPDIFRX_MODULE_ENABLED +#define HAL_DFSDM_MODULE_ENABLED +#define HAL_LPTIM_MODULE_ENABLED +#define HAL_MMC_MODULE_ENABLED +#endif + +/* ########################## HSE/HSI Values adaptation ##################### */ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined (HSE_VALUE) +#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSE_STARTUP_TIMEOUT) +#define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined (HSI_VALUE) +#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz */ +#endif /* HSI_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#if !defined (LSI_VALUE) +#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz */ +#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz +The real value may vary depending on the variations +in voltage and temperature. */ +/** + * @brief External Low Speed oscillator (LSE) value. + */ +#if !defined (LSE_VALUE) +#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */ +#endif /* LSE_VALUE */ + +#if !defined (LSE_STARTUP_TIMEOUT) +#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +/** + * @brief External clock source for I2S peripheral + * This value is used by the I2S HAL module to compute the I2S clock source + * frequency, this source is inserted directly through I2S_CKIN pad. + */ +#if !defined (EXTERNAL_CLOCK_VALUE) +#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External oscillator in Hz*/ +#endif /* EXTERNAL_CLOCK_VALUE */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#if !defined (VDD_VALUE) +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#endif +#if !defined (TICK_INT_PRIORITY) +#define TICK_INT_PRIORITY 0x00U /*!< tick interrupt priority */ +#endif +#if !defined (USE_RTOS) +#define USE_RTOS 0U +#endif +#if !defined (PREFETCH_ENABLE) +#define PREFETCH_ENABLE 1U +#endif +#if !defined (INSTRUCTION_CACHE_ENABLE) +#define INSTRUCTION_CACHE_ENABLE 1U +#endif +#if !defined (DATA_CACHE_ENABLE) +#define DATA_CACHE_ENABLE 1U +#endif + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ +#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ +#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ +#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_FMPI2C_REGISTER_CALLBACKS 0U /* FMPI2C register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ +#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ +#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ +#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ +#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ +/* #define USE_FULL_ASSERT 1U */ + +/* ################## Ethernet peripheral configuration ##################### */ + +/* Section 1 : Ethernet peripheral configuration */ + +/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ +#define MAC_ADDR0 2U +#define MAC_ADDR1 0U +#define MAC_ADDR2 0U +#define MAC_ADDR3 0U +#define MAC_ADDR4 0U +#define MAC_ADDR5 0U + +/* Definition of the Ethernet driver buffers size and count */ +#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ +#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ +#define ETH_RXBUFNB (5U) /* 5 Rx buffers of size ETH_RX_BUF_SIZE */ +#define ETH_TXBUFNB (5U) /* 5 Tx buffers of size ETH_TX_BUF_SIZE */ + +/* Section 2: PHY configuration section */ +/* LAN8742A PHY Address*/ +//////////////////////////////// +//#define LAN8742A_PHY_ADDRESS 0x00U +/* Section 2: PHY configuration section */ +#if !defined (LAN8742A_PHY_ADDRESS) + /* LAN8742A PHY Address*/ + #define LAN8742A_PHY_ADDRESS 0x00U +#endif +//////////////////////////////// +/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ +#define PHY_RESET_DELAY 0x000000FFU +/* PHY Configuration delay */ +#define PHY_CONFIG_DELAY 0x00000FFFU + +#define PHY_READ_TO 0x0000FFFFU +#define PHY_WRITE_TO 0x0000FFFFU + +/* Section 3: Common PHY Registers */ + +#define PHY_BCR ((uint16_t)0x0000) /*!< Transceiver Basic Control Register */ +#define PHY_BSR ((uint16_t)0x0001) /*!< Transceiver Basic Status Register */ + +#define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */ +#define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */ +#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */ +#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */ +#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */ +#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */ +#define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */ +#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */ +#define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */ +#define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */ + +#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */ +#define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */ +#define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */ + +/* Section 4: Extended PHY Registers */ + +#define PHY_SR ((uint16_t)0x1F) /*!< PHY special control/ status register Offset */ + +#define PHY_SPEED_STATUS ((uint16_t)0x0004) /*!< PHY Speed mask */ +#define PHY_DUPLEX_STATUS ((uint16_t)0x0010) /*!< PHY Duplex mask */ + + +#define PHY_ISFR ((uint16_t)0x1D) /*!< PHY Interrupt Source Flag register Offset */ +#define PHY_IMR ((uint16_t)0x1E) /*!< PHY Interrupt Mask register Offset */ +#define PHY_ISFR_INT4 ((uint16_t)0x0010) /*!< PHY Link down inturrupt */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver +* Activated: CRC code is present inside driver +* Deactivated: CRC code cleaned from driver +*/ +#if !defined (USE_SPI_CRC) +#define USE_SPI_CRC 0U +#endif + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED +#include "stm32f4xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED +#include "stm32f4xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED +#include "stm32f4xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED +#include "stm32f4xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED +#include "stm32f4xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED +#include "stm32f4xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CAN_MODULE_ENABLED +#include "stm32f4xx_hal_can.h" +#endif /* HAL_CAN_MODULE_ENABLED */ + +#ifdef HAL_CAN_LEGACY_MODULE_ENABLED +#include "stm32f4xx_hal_can_legacy.h" +#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED +#include "stm32f4xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_CRYP_MODULE_ENABLED +#include "stm32f4xx_hal_cryp.h" +#endif /* HAL_CRYP_MODULE_ENABLED */ + +#ifdef HAL_DMA2D_MODULE_ENABLED +#include "stm32f4xx_hal_dma2d.h" +#endif /* HAL_DMA2D_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED +#include "stm32f4xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_DCMI_MODULE_ENABLED +#include "stm32f4xx_hal_dcmi.h" +#endif /* HAL_DCMI_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED +#include "stm32f4xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED +#include "stm32f4xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED +#include "stm32f4xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED +#include "stm32f4xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED +#include "stm32f4xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_PCCARD_MODULE_ENABLED +#include "stm32f4xx_hal_pccard.h" +#endif /* HAL_PCCARD_MODULE_ENABLED */ + +#ifdef HAL_SDRAM_MODULE_ENABLED +#include "stm32f4xx_hal_sdram.h" +#endif /* HAL_SDRAM_MODULE_ENABLED */ + +#ifdef HAL_HASH_MODULE_ENABLED +#include "stm32f4xx_hal_hash.h" +#endif /* HAL_HASH_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED +#include "stm32f4xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_SMBUS_MODULE_ENABLED +#include "stm32f4xx_hal_smbus.h" +#endif /* HAL_SMBUS_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED +#include "stm32f4xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED +#include "stm32f4xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_LTDC_MODULE_ENABLED +#include "stm32f4xx_hal_ltdc.h" +#endif /* HAL_LTDC_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED +#include "stm32f4xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_RNG_MODULE_ENABLED +#include "stm32f4xx_hal_rng.h" +#endif /* HAL_RNG_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED +#include "stm32f4xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SAI_MODULE_ENABLED +#include "stm32f4xx_hal_sai.h" +#endif /* HAL_SAI_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED +#include "stm32f4xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED +#include "stm32f4xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED +#include "stm32f4xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED +#include "stm32f4xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED +#include "stm32f4xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED +#include "stm32f4xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED +#include "stm32f4xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED +#include "stm32f4xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED +#include "stm32f4xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED +#include "stm32f4xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_DSI_MODULE_ENABLED +#include "stm32f4xx_hal_dsi.h" +#endif /* HAL_DSI_MODULE_ENABLED */ + +#ifdef HAL_QSPI_MODULE_ENABLED +#include "stm32f4xx_hal_qspi.h" +#endif /* HAL_QSPI_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED +#include "stm32f4xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_FMPI2C_MODULE_ENABLED +#include "stm32f4xx_hal_fmpi2c.h" +#endif /* HAL_FMPI2C_MODULE_ENABLED */ + +#ifdef HAL_SPDIFRX_MODULE_ENABLED +#include "stm32f4xx_hal_spdifrx.h" +#endif /* HAL_SPDIFRX_MODULE_ENABLED */ + +#ifdef HAL_DFSDM_MODULE_ENABLED +#include "stm32f4xx_hal_dfsdm.h" +#endif /* HAL_DFSDM_MODULE_ENABLED */ + +#ifdef HAL_LPTIM_MODULE_ENABLED +#include "stm32f4xx_hal_lptim.h" +#endif /* HAL_LPTIM_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED +#include "stm32f4xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ +#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ +void assert_failed(uint8_t *file, uint32_t line); +#else +#define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F4xx_HAL_CONF_DEFAULT_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/1.9.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/1.9.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h new file mode 100644 index 0000000..6659ec3 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/1.9.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h @@ -0,0 +1,511 @@ +/** + ****************************************************************************** + * @file stm32f7xx_hal_conf_default.h + * @brief HAL default configuration file. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F7xx_HAL_CONF_DEFAULT_H +#define __STM32F7xx_HAL_CONF_DEFAULT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief Include the default list of modules to be used in the HAL driver + * and manage module deactivation + */ +#include "stm32yyxx_hal_conf.h" +#if 0 +/** + * @brief This is the list of modules to be used in the HAL driver + */ +#define HAL_MODULE_ENABLED +#define HAL_ADC_MODULE_ENABLED +#define HAL_CAN_MODULE_ENABLED +#define HAL_CAN_LEGACY_MODULE_ENABLED +#define HAL_CEC_MODULE_ENABLED +#define HAL_CRC_MODULE_ENABLED +#define HAL_CRYP_MODULE_ENABLED +#define HAL_DAC_MODULE_ENABLED +#define HAL_DCMI_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_DMA2D_MODULE_ENABLED +#define HAL_ETH_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_NAND_MODULE_ENABLED +#define HAL_NOR_MODULE_ENABLED +#define HAL_SRAM_MODULE_ENABLED +#define HAL_SDRAM_MODULE_ENABLED +#define HAL_HASH_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +#define HAL_I2C_MODULE_ENABLED +#define HAL_I2S_MODULE_ENABLED +#define HAL_IWDG_MODULE_ENABLED +#define HAL_LPTIM_MODULE_ENABLED +#define HAL_LTDC_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_QSPI_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +#define HAL_RNG_MODULE_ENABLED +#define HAL_RTC_MODULE_ENABLED +#define HAL_SAI_MODULE_ENABLED +#define HAL_SD_MODULE_ENABLED +#define HAL_SPDIFRX_MODULE_ENABLED +#define HAL_SPI_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +#define HAL_UART_MODULE_ENABLED +#define HAL_USART_MODULE_ENABLED +#define HAL_IRDA_MODULE_ENABLED +#define HAL_SMARTCARD_MODULE_ENABLED +#define HAL_WWDG_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +#define HAL_PCD_MODULE_ENABLED +#define HAL_HCD_MODULE_ENABLED +#define HAL_DFSDM_MODULE_ENABLED +#define HAL_DSI_MODULE_ENABLED +#define HAL_JPEG_MODULE_ENABLED +#define HAL_MDIOS_MODULE_ENABLED +#define HAL_SMBUS_MODULE_ENABLED +#define HAL_MMC_MODULE_ENABLED +#endif + +/* ########################## HSE/HSI Values adaptation ##################### */ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined (HSE_VALUE) +#define HSE_VALUE 25000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSE_STARTUP_TIMEOUT) +#define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined (HSI_VALUE) +#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/ +#endif /* HSI_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#if !defined (LSI_VALUE) +#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/ +#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz +The real value may vary depending on the variations +in voltage and temperature. */ +/** + * @brief External Low Speed oscillator (LSE) value. + */ +#if !defined (LSE_VALUE) +#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */ +#endif /* LSE_VALUE */ + +#if !defined (LSE_STARTUP_TIMEOUT) +#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +/** + * @brief External clock source for I2S peripheral + * This value is used by the I2S HAL module to compute the I2S clock source + * frequency, this source is inserted directly through I2S_CKIN pad. + */ +#if !defined (EXTERNAL_CLOCK_VALUE) +#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the Internal oscillator in Hz*/ +#endif /* EXTERNAL_CLOCK_VALUE */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#if !defined (VDD_VALUE) +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#endif +#if !defined (TICK_INT_PRIORITY) +#define TICK_INT_PRIORITY 0x00U /*!< tick interrupt priority */ +#endif +#if !defined (USE_RTOS) +#define USE_RTOS 0U +#endif +#if !defined (PREFETCH_ENABLE) +#define PREFETCH_ENABLE 1U /* To enable prefetch */ +#endif +#if !defined (ART_ACCLERATOR_ENABLE) +#define ART_ACCLERATOR_ENABLE 1U /* To enable ART Accelerator */ +#endif + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ +#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ +#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ +#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_JPEG_REGISTER_CALLBACKS 0U /* JPEG register callback disabled */ +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ +#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ +#define USE_HAL_MDIOS_REGISTER_CALLBACKS 0U /* MDIOS register callback disabled */ +#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ +#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ +#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ +/* #define USE_FULL_ASSERT 1 */ + +/* ################## Ethernet peripheral configuration ##################### */ + +/* Section 1 : Ethernet peripheral configuration */ + +/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ +#define MAC_ADDR0 2U +#define MAC_ADDR1 0U +#define MAC_ADDR2 0U +#define MAC_ADDR3 0U +#define MAC_ADDR4 0U +#define MAC_ADDR5 0U + +/* Definition of the Ethernet driver buffers size and count */ +#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ +#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ +#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ +#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ + +/* Section 2: PHY configuration section */ +/* LAN8742A PHY Address*/ +//////////////////////////////// +//#define LAN8742A_PHY_ADDRESS 0x00U +/* Section 2: PHY configuration section */ +#if !defined (LAN8742A_PHY_ADDRESS) + /* LAN8742A PHY Address*/ + #define LAN8742A_PHY_ADDRESS 0x00U +#endif +//////////////////////////////// +/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ +#define PHY_RESET_DELAY 0x00000FFFU +/* PHY Configuration delay */ +#define PHY_CONFIG_DELAY 0x00000FFFU + +#define PHY_READ_TO 0x0000FFFFU +#define PHY_WRITE_TO 0x0000FFFFU + +/* Section 3: Common PHY Registers */ + +#define PHY_BCR ((uint16_t)0x00U) /*!< Transceiver Basic Control Register */ +#define PHY_BSR ((uint16_t)0x01U) /*!< Transceiver Basic Status Register */ + +#define PHY_RESET ((uint16_t)0x8000U) /*!< PHY Reset */ +#define PHY_LOOPBACK ((uint16_t)0x4000U) /*!< Select loop-back mode */ +#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100U) /*!< Set the full-duplex mode at 100 Mb/s */ +#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000U) /*!< Set the half-duplex mode at 100 Mb/s */ +#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100U) /*!< Set the full-duplex mode at 10 Mb/s */ +#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000U) /*!< Set the half-duplex mode at 10 Mb/s */ +#define PHY_AUTONEGOTIATION ((uint16_t)0x1000U) /*!< Enable auto-negotiation function */ +#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200U) /*!< Restart auto-negotiation function */ +#define PHY_POWERDOWN ((uint16_t)0x0800U) /*!< Select the power down mode */ +#define PHY_ISOLATE ((uint16_t)0x0400U) /*!< Isolate PHY from MII */ + +#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020U) /*!< Auto-Negotiation process completed */ +#define PHY_LINKED_STATUS ((uint16_t)0x0004U) /*!< Valid link established */ +#define PHY_JABBER_DETECTION ((uint16_t)0x0002U) /*!< Jabber condition detected */ + +/* Section 4: Extended PHY Registers */ + +#define PHY_SR ((uint16_t)0x1FU) /*!< PHY special control/ status register Offset */ + +#define PHY_SPEED_STATUS ((uint16_t)0x0004U) /*!< PHY Speed mask */ +#define PHY_DUPLEX_STATUS ((uint16_t)0x0010U) /*!< PHY Duplex mask */ + + +#define PHY_ISFR ((uint16_t)0x01DU) /*!< PHY Interrupt Source Flag register Offset */ +#define PHY_IMR ((uint16_t)0x001E) /*!< PHY Interrupt Mask register Offset */ +#define PHY_ISFR_INT4 ((uint16_t)0x0010U) /*!< PHY Link down inturrupt */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver +* Activated: CRC code is present inside driver +* Deactivated: CRC code cleaned from driver +*/ +#if !defined (USE_SPI_CRC) +#define USE_SPI_CRC 0U +#endif + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED +#include "stm32f7xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED +#include "stm32f7xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED +#include "stm32f7xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED +#include "stm32f7xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED +#include "stm32f7xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CAN_MODULE_ENABLED +#include "stm32f7xx_hal_can.h" +#endif /* HAL_CAN_MODULE_ENABLED */ + +#ifdef HAL_CAN_LEGACY_MODULE_ENABLED +#include "stm32f7xx_hal_can_legacy.h" +#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED +#include "stm32f7xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED +#include "stm32f7xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_CRYP_MODULE_ENABLED +#include "stm32f7xx_hal_cryp.h" +#endif /* HAL_CRYP_MODULE_ENABLED */ + +#ifdef HAL_DMA2D_MODULE_ENABLED +#include "stm32f7xx_hal_dma2d.h" +#endif /* HAL_DMA2D_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED +#include "stm32f7xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_DCMI_MODULE_ENABLED +#include "stm32f7xx_hal_dcmi.h" +#endif /* HAL_DCMI_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED +#include "stm32f7xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED +#include "stm32f7xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED +#include "stm32f7xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED +#include "stm32f7xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED +#include "stm32f7xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED +#include "stm32f7xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_SDRAM_MODULE_ENABLED +#include "stm32f7xx_hal_sdram.h" +#endif /* HAL_SDRAM_MODULE_ENABLED */ + +#ifdef HAL_HASH_MODULE_ENABLED +#include "stm32f7xx_hal_hash.h" +#endif /* HAL_HASH_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED +#include "stm32f7xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED +#include "stm32f7xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED +#include "stm32f7xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_LPTIM_MODULE_ENABLED +#include "stm32f7xx_hal_lptim.h" +#endif /* HAL_LPTIM_MODULE_ENABLED */ + +#ifdef HAL_LTDC_MODULE_ENABLED +#include "stm32f7xx_hal_ltdc.h" +#endif /* HAL_LTDC_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED +#include "stm32f7xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_QSPI_MODULE_ENABLED +#include "stm32f7xx_hal_qspi.h" +#endif /* HAL_QSPI_MODULE_ENABLED */ + +#ifdef HAL_RNG_MODULE_ENABLED +#include "stm32f7xx_hal_rng.h" +#endif /* HAL_RNG_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED +#include "stm32f7xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SAI_MODULE_ENABLED +#include "stm32f7xx_hal_sai.h" +#endif /* HAL_SAI_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED +#include "stm32f7xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_SPDIFRX_MODULE_ENABLED +#include "stm32f7xx_hal_spdifrx.h" +#endif /* HAL_SPDIFRX_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED +#include "stm32f7xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED +#include "stm32f7xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED +#include "stm32f7xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED +#include "stm32f7xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED +#include "stm32f7xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED +#include "stm32f7xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED +#include "stm32f7xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED +#include "stm32f7xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED +#include "stm32f7xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_DFSDM_MODULE_ENABLED +#include "stm32f7xx_hal_dfsdm.h" +#endif /* HAL_DFSDM_MODULE_ENABLED */ + +#ifdef HAL_DSI_MODULE_ENABLED +#include "stm32f7xx_hal_dsi.h" +#endif /* HAL_DSI_MODULE_ENABLED */ + +#ifdef HAL_JPEG_MODULE_ENABLED +#include "stm32f7xx_hal_jpeg.h" +#endif /* HAL_JPEG_MODULE_ENABLED */ + +#ifdef HAL_MDIOS_MODULE_ENABLED +#include "stm32f7xx_hal_mdios.h" +#endif /* HAL_MDIOS_MODULE_ENABLED */ + +#ifdef HAL_SMBUS_MODULE_ENABLED +#include "stm32f7xx_hal_smbus.h" +#endif /* HAL_SMBUS_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED +#include "stm32f7xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ +#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ +void assert_failed(uint8_t *file, uint32_t line); +#else +#define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F7xx_HAL_CONF_DEFAULT_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/1.9.0/variants/NUCLEO_F767ZI/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/1.9.0/variants/NUCLEO_F767ZI/variant.h new file mode 100644 index 0000000..f68b249 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/1.9.0/variants/NUCLEO_F767ZI/variant.h @@ -0,0 +1,185 @@ +/* + Copyright (c) 2011 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_ARDUINO_STM32_ +#define _VARIANT_ARDUINO_STM32_ + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/*---------------------------------------------------------------------------- + * Pins + *----------------------------------------------------------------------------*/ + +#define PG9 0 +#define PG14 1 +#define PF15 2 +#define PE13 3 +#define PF14 4 +#define PE11 5 +#define PE9 6 +#define PF13 7 +#define PF12 8 +#define PD15 9 +#define PD14 10 +#define PA7 A10 +#define PA6 A11 +#define PA5 A12 +#define PB9 14 +#define PB8 15 +#define PC6 16 +#define PB15 17 +#define PB13 18 +#define PB12 19 +#define PA15 20 +#define PC7 21 +#define PB5 22 +#define PB3 23 +#define PA4 A13 +#define PB4 25 +#define PB6 26 +#define PB2 27 +#define PD13 28 +#define PD12 29 +#define PD11 30 +#define PE2 31 +#define PA0 A14 +#define PB0 33 // LED_GREEN +#define PE0 34 +#define PB11 35 +#define PB10 36 +#define PE15 37 +#define PE14 38 +#define PE12 39 +#define PE10 40 +#define PE7 41 +#define PE8 42 +#define PC8 43 +#define PC9 44 +#define PC10 45 +#define PC11 46 +#define PC12 47 +#define PD2 48 +#define PG2 49 +#define PG3 50 +#define PD7 51 +#define PD6 52 +#define PD5 53 +#define PD4 54 +#define PD3 55 +// 56 is PE2 (31) +#define PE4 57 +#define PE5 58 +#define PE6 59 +#define PE3 60 +#define PF8 A15 +#define PF7 A16 +#define PF9 A17 +#define PG1 64 +#define PG0 65 +#define PD1 66 +#define PD0 67 +#define PF0 68 +#define PF1 69 +#define PF2 70 +// 71 is PA7 (11) +// 72 is NC +#define PB7 73 // LED_BLUE +#define PB14 74 // LED_RED +#define PC13 75 // USER_BTN +#define PD9 76 // Serial Rx +#define PD8 77 // Serial Tx +#define PA3 A0 +#define PC0 A1 +#define PC3 A2 +#define PF3 A3 +#define PF5 A4 +#define PF10 A5 +#define PB1 A6 +#define PC2 A7 +#define PF4 A8 +#define PF6 A9 + +// This must be a literal +#define NUM_DIGITAL_PINS 88 +// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS +#define NUM_ANALOG_INPUTS 18 + +// On-board LED pin number +#define LED_BUILTIN PB0 +#define LED_GREEN LED_BUILTIN +#define LED_BLUE PB7 +#define LED_RED PB14 + +// On-board user button +#define USER_BTN PC13 + +// Timer Definitions +// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin +#define TIMER_TONE TIM6 +#define TIMER_SERVO TIM7 + +// UART Definitions +#define SERIAL_UART_INSTANCE 3 //Connected to ST-Link + +// Serial pin used for console (ex: stlink) +// Rerquired by Firmata +#define PIN_SERIAL_RX PD9 +#define PIN_SERIAL_TX PD8 + +/* Extra HAL modules */ +#define HAL_DAC_MODULE_ENABLED +#define HAL_ETH_MODULE_ENABLED + +// Last Flash sector used for EEPROM emulation, address/sector depends on single/dual bank configuration. +// By default 2MB single bank +#define FLASH_BASE_ADDRESS 0x081C0000 +#define FLASH_DATA_SECTOR 11 + +#ifdef __cplusplus +} // extern "C" +#endif +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #define SERIAL_PORT_MONITOR Serial + + // KH mod to add Serial1, for ESP-AT + //#define SERIAL_PORT_HARDWARE Serial + #define SERIAL_PORT_HARDWARE Serial1 +#endif + +#endif /* _VARIANT_ARDUINO_STM32_ */ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/1.9.0/variants/NUCLEO_L053R8/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/1.9.0/variants/NUCLEO_L053R8/variant.h new file mode 100644 index 0000000..0cb2cfa --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/1.9.0/variants/NUCLEO_L053R8/variant.h @@ -0,0 +1,145 @@ +/* + Copyright (c) 2011 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_ARDUINO_STM32_ +#define _VARIANT_ARDUINO_STM32_ + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/*---------------------------------------------------------------------------- + * Pins + *----------------------------------------------------------------------------*/ + +#define PA3 0 +#define PA2 1 +#define PA10 2 +#define PB3 3 +#define PB5 4 +#define PB4 5 +#define PB10 6 +#define PA8 7 +#define PA9 8 +#define PC7 9 +#define PB6 10 +#define PA7 A6 +#define PA6 A7 +#define PA5 13 +#define PB9 14 +#define PB8 15 +// ST Morpho +// CN7 Left Side +#define PC10 16 +#define PC12 17 +// 18 is NC - BOOT0 +#define PA13 19 // SWD +#define PA14 20 // SWD +#define PA15 21 +#define PB7 22 +#define PC13 23 +#define PC14 24 +#define PC15 25 +#define PH0 26 +#define PH1 27 +#define PC2 A8 +#define PC3 A9 +// CN7 Right Side +#define PC11 30 +#define PD2 31 +// CN10 Left Side +#define PC9 32 +// CN10 Right side +#define PC8 33 +#define PC6 34 +#define PC5 A10 +#define PA12 36 +#define PA11 37 +#define PB12 38 +#define PB11 39 +#define PB2 40 +#define PB1 41 +#define PB15 42 +#define PB14 43 +#define PB13 44 +#define PC4 A11 +#define PA0 A0 +#define PA1 A1 +#define PA4 A2 +#define PB0 A3 +#define PC1 A4 +#define PC0 A5 + +// This must be a literal +#define NUM_DIGITAL_PINS 52 +// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS +#define NUM_ANALOG_INPUTS 12 + +// On-board LED pin number +#define LED_BUILTIN 13 +#define LED_GREEN LED_BUILTIN + +// On-board user button +#define USER_BTN PC13 + +// Timer Definitions +// Use TIM6 when possible as servo and tone don't need GPIO output pin +#define TIMER_TONE TIM6 +#define TIMER_SERVO TIM2 + +// UART Definitions +#define SERIAL_UART_INSTANCE 2 //Connected to ST-Link +// Default pin used for 'Serial' instance (ex: ST-Link) +// Mandatory for Firmata +#define PIN_SERIAL_RX 0 +#define PIN_SERIAL_TX 1 + +/* Extra HAL modules */ +#define HAL_DAC_MODULE_ENABLED + +#ifdef __cplusplus +} // extern "C" +#endif +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #define SERIAL_PORT_MONITOR Serial + + // KH mod to add Serial1, for ESP-AT + //#define SERIAL_PORT_HARDWARE Serial + #define SERIAL_PORT_HARDWARE Serial1 +#endif + +#endif /* _VARIANT_ARDUINO_STM32_ */ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h new file mode 100644 index 0000000..3e2bbf8 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h @@ -0,0 +1,519 @@ +/** + ****************************************************************************** + * @file stm32f4xx_hal_conf_default.h + * @brief HAL default configuration file. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F4xx_HAL_CONF_DEFAULT_H +#define __STM32F4xx_HAL_CONF_DEFAULT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief Include the default list of modules to be used in the HAL driver + * and manage module deactivation + */ +#include "stm32yyxx_hal_conf.h" +#if 0 +/** + * @brief This is the list of modules to be used in the HAL driver + */ +#define HAL_MODULE_ENABLED +#define HAL_ADC_MODULE_ENABLED +#define HAL_CAN_MODULE_ENABLED +/*#define HAL_CAN_LEGACY_MODULE_ENABLED*/ +#define HAL_CRC_MODULE_ENABLED +#define HAL_CEC_MODULE_ENABLED +#define HAL_CRYP_MODULE_ENABLED +#define HAL_DAC_MODULE_ENABLED +#define HAL_DCMI_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_DMA2D_MODULE_ENABLED +#define HAL_ETH_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_NAND_MODULE_ENABLED +#define HAL_NOR_MODULE_ENABLED +#define HAL_PCCARD_MODULE_ENABLED +#define HAL_SRAM_MODULE_ENABLED +#define HAL_SDRAM_MODULE_ENABLED +#define HAL_HASH_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED +#define HAL_I2C_MODULE_ENABLED +#define HAL_SMBUS_MODULE_ENABLED +#define HAL_I2S_MODULE_ENABLED +#define HAL_IWDG_MODULE_ENABLED +#define HAL_LTDC_MODULE_ENABLED +#define HAL_DSI_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_QSPI_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +#define HAL_RNG_MODULE_ENABLED +#define HAL_RTC_MODULE_ENABLED +#define HAL_SAI_MODULE_ENABLED +#define HAL_SD_MODULE_ENABLED +#define HAL_SPI_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +#define HAL_UART_MODULE_ENABLED +#define HAL_USART_MODULE_ENABLED +#define HAL_IRDA_MODULE_ENABLED +#define HAL_SMARTCARD_MODULE_ENABLED +#define HAL_WWDG_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +#define HAL_PCD_MODULE_ENABLED +#define HAL_HCD_MODULE_ENABLED +#define HAL_FMPI2C_MODULE_ENABLED +#define HAL_FMPSMBUS_MODULE_ENABLED +#define HAL_SPDIFRX_MODULE_ENABLED +#define HAL_DFSDM_MODULE_ENABLED +#define HAL_LPTIM_MODULE_ENABLED +#define HAL_MMC_MODULE_ENABLED +#endif + +/* ########################## HSE/HSI Values adaptation ##################### */ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined (HSE_VALUE) +#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSE_STARTUP_TIMEOUT) +#define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined (HSI_VALUE) +#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz */ +#endif /* HSI_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#if !defined (LSI_VALUE) +#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz */ +#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz +The real value may vary depending on the variations +in voltage and temperature. */ +/** + * @brief External Low Speed oscillator (LSE) value. + */ +#if !defined (LSE_VALUE) +#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */ +#endif /* LSE_VALUE */ + +#if !defined (LSE_STARTUP_TIMEOUT) +#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +/** + * @brief External clock source for I2S peripheral + * This value is used by the I2S HAL module to compute the I2S clock source + * frequency, this source is inserted directly through I2S_CKIN pad. + */ +#if !defined (EXTERNAL_CLOCK_VALUE) +#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External oscillator in Hz*/ +#endif /* EXTERNAL_CLOCK_VALUE */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#if !defined (VDD_VALUE) +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#endif +#if !defined (TICK_INT_PRIORITY) +#define TICK_INT_PRIORITY 0x00U /*!< tick interrupt priority */ +#endif +#if !defined (USE_RTOS) +#define USE_RTOS 0U +#endif +#if !defined (PREFETCH_ENABLE) +#define PREFETCH_ENABLE 1U +#endif +#if !defined (INSTRUCTION_CACHE_ENABLE) +#define INSTRUCTION_CACHE_ENABLE 1U +#endif +#if !defined (DATA_CACHE_ENABLE) +#define DATA_CACHE_ENABLE 1U +#endif + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ +#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ +#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ +#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_FMPI2C_REGISTER_CALLBACKS 0U /* FMPI2C register callback disabled */ +#define USE_HAL_FMPSMBUS_REGISTER_CALLBACKS 0U /* FMPSMBUS register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ +#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ +#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ +#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ +#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ +/* #define USE_FULL_ASSERT 1U */ + +/* ################## Ethernet peripheral configuration ##################### */ + +/* Section 1 : Ethernet peripheral configuration */ + +/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ +#define MAC_ADDR0 2U +#define MAC_ADDR1 0U +#define MAC_ADDR2 0U +#define MAC_ADDR3 0U +#define MAC_ADDR4 0U +#define MAC_ADDR5 0U + +/* Definition of the Ethernet driver buffers size and count */ +#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ +#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ +#define ETH_RXBUFNB (5U) /* 5 Rx buffers of size ETH_RX_BUF_SIZE */ +#define ETH_TXBUFNB (5U) /* 5 Tx buffers of size ETH_TX_BUF_SIZE */ + +/* Section 2: PHY configuration section */ +/* LAN8742A PHY Address*/ +//////////////////////////////// +//#define LAN8742A_PHY_ADDRESS 0x00U +/* Section 2: PHY configuration section */ +#if !defined (LAN8742A_PHY_ADDRESS) + /* LAN8742A PHY Address*/ + #define LAN8742A_PHY_ADDRESS 0x00U +#endif +//////////////////////////////// +/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ +#define PHY_RESET_DELAY 0x000000FFU +/* PHY Configuration delay */ +#define PHY_CONFIG_DELAY 0x00000FFFU + +#define PHY_READ_TO 0x0000FFFFU +#define PHY_WRITE_TO 0x0000FFFFU + +/* Section 3: Common PHY Registers */ + +#define PHY_BCR ((uint16_t)0x0000) /*!< Transceiver Basic Control Register */ +#define PHY_BSR ((uint16_t)0x0001) /*!< Transceiver Basic Status Register */ + +#define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */ +#define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */ +#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */ +#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */ +#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */ +#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */ +#define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */ +#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */ +#define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */ +#define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */ + +#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */ +#define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */ +#define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */ + +/* Section 4: Extended PHY Registers */ + +#define PHY_SR ((uint16_t)0x1F) /*!< PHY special control/ status register Offset */ + +#define PHY_SPEED_STATUS ((uint16_t)0x0004) /*!< PHY Speed mask */ +#define PHY_DUPLEX_STATUS ((uint16_t)0x0010) /*!< PHY Duplex mask */ + + +#define PHY_ISFR ((uint16_t)0x1D) /*!< PHY Interrupt Source Flag register Offset */ +#define PHY_IMR ((uint16_t)0x1E) /*!< PHY Interrupt Mask register Offset */ +#define PHY_ISFR_INT4 ((uint16_t)0x0010) /*!< PHY Link down inturrupt */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver +* Activated: CRC code is present inside driver +* Deactivated: CRC code cleaned from driver +*/ +#if !defined (USE_SPI_CRC) +#define USE_SPI_CRC 0U +#endif + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED +#include "stm32f4xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED +#include "stm32f4xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED +#include "stm32f4xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED +#include "stm32f4xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED +#include "stm32f4xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED +#include "stm32f4xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CAN_MODULE_ENABLED +#include "stm32f4xx_hal_can.h" +#endif /* HAL_CAN_MODULE_ENABLED */ + +#ifdef HAL_CAN_LEGACY_MODULE_ENABLED +#include "stm32f4xx_hal_can_legacy.h" +#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED +#include "stm32f4xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_CRYP_MODULE_ENABLED +#include "stm32f4xx_hal_cryp.h" +#endif /* HAL_CRYP_MODULE_ENABLED */ + +#ifdef HAL_DMA2D_MODULE_ENABLED +#include "stm32f4xx_hal_dma2d.h" +#endif /* HAL_DMA2D_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED +#include "stm32f4xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_DCMI_MODULE_ENABLED +#include "stm32f4xx_hal_dcmi.h" +#endif /* HAL_DCMI_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED +#include "stm32f4xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED +#include "stm32f4xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED +#include "stm32f4xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED +#include "stm32f4xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED +#include "stm32f4xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_PCCARD_MODULE_ENABLED +#include "stm32f4xx_hal_pccard.h" +#endif /* HAL_PCCARD_MODULE_ENABLED */ + +#ifdef HAL_SDRAM_MODULE_ENABLED +#include "stm32f4xx_hal_sdram.h" +#endif /* HAL_SDRAM_MODULE_ENABLED */ + +#ifdef HAL_HASH_MODULE_ENABLED +#include "stm32f4xx_hal_hash.h" +#endif /* HAL_HASH_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED +#include "stm32f4xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_SMBUS_MODULE_ENABLED +#include "stm32f4xx_hal_smbus.h" +#endif /* HAL_SMBUS_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED +#include "stm32f4xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED +#include "stm32f4xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_LTDC_MODULE_ENABLED +#include "stm32f4xx_hal_ltdc.h" +#endif /* HAL_LTDC_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED +#include "stm32f4xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_RNG_MODULE_ENABLED +#include "stm32f4xx_hal_rng.h" +#endif /* HAL_RNG_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED +#include "stm32f4xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SAI_MODULE_ENABLED +#include "stm32f4xx_hal_sai.h" +#endif /* HAL_SAI_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED +#include "stm32f4xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED +#include "stm32f4xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED +#include "stm32f4xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED +#include "stm32f4xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED +#include "stm32f4xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED +#include "stm32f4xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED +#include "stm32f4xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED +#include "stm32f4xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED +#include "stm32f4xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED +#include "stm32f4xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_DSI_MODULE_ENABLED +#include "stm32f4xx_hal_dsi.h" +#endif /* HAL_DSI_MODULE_ENABLED */ + +#ifdef HAL_QSPI_MODULE_ENABLED +#include "stm32f4xx_hal_qspi.h" +#endif /* HAL_QSPI_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED +#include "stm32f4xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_FMPI2C_MODULE_ENABLED +#include "stm32f4xx_hal_fmpi2c.h" +#endif /* HAL_FMPI2C_MODULE_ENABLED */ + +#ifdef HAL_FMPSMBUS_MODULE_ENABLED +#include "stm32f4xx_hal_fmpsmbus.h" +#endif /* HAL_FMPSMBUS_MODULE_ENABLED */ + +#ifdef HAL_SPDIFRX_MODULE_ENABLED +#include "stm32f4xx_hal_spdifrx.h" +#endif /* HAL_SPDIFRX_MODULE_ENABLED */ + +#ifdef HAL_DFSDM_MODULE_ENABLED +#include "stm32f4xx_hal_dfsdm.h" +#endif /* HAL_DFSDM_MODULE_ENABLED */ + +#ifdef HAL_LPTIM_MODULE_ENABLED +#include "stm32f4xx_hal_lptim.h" +#endif /* HAL_LPTIM_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED +#include "stm32f4xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ +#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ +void assert_failed(uint8_t *file, uint32_t line); +#else +#define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F4xx_HAL_CONF_DEFAULT_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h new file mode 100644 index 0000000..6659ec3 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h @@ -0,0 +1,511 @@ +/** + ****************************************************************************** + * @file stm32f7xx_hal_conf_default.h + * @brief HAL default configuration file. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F7xx_HAL_CONF_DEFAULT_H +#define __STM32F7xx_HAL_CONF_DEFAULT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief Include the default list of modules to be used in the HAL driver + * and manage module deactivation + */ +#include "stm32yyxx_hal_conf.h" +#if 0 +/** + * @brief This is the list of modules to be used in the HAL driver + */ +#define HAL_MODULE_ENABLED +#define HAL_ADC_MODULE_ENABLED +#define HAL_CAN_MODULE_ENABLED +#define HAL_CAN_LEGACY_MODULE_ENABLED +#define HAL_CEC_MODULE_ENABLED +#define HAL_CRC_MODULE_ENABLED +#define HAL_CRYP_MODULE_ENABLED +#define HAL_DAC_MODULE_ENABLED +#define HAL_DCMI_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_DMA2D_MODULE_ENABLED +#define HAL_ETH_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_NAND_MODULE_ENABLED +#define HAL_NOR_MODULE_ENABLED +#define HAL_SRAM_MODULE_ENABLED +#define HAL_SDRAM_MODULE_ENABLED +#define HAL_HASH_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +#define HAL_I2C_MODULE_ENABLED +#define HAL_I2S_MODULE_ENABLED +#define HAL_IWDG_MODULE_ENABLED +#define HAL_LPTIM_MODULE_ENABLED +#define HAL_LTDC_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_QSPI_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +#define HAL_RNG_MODULE_ENABLED +#define HAL_RTC_MODULE_ENABLED +#define HAL_SAI_MODULE_ENABLED +#define HAL_SD_MODULE_ENABLED +#define HAL_SPDIFRX_MODULE_ENABLED +#define HAL_SPI_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +#define HAL_UART_MODULE_ENABLED +#define HAL_USART_MODULE_ENABLED +#define HAL_IRDA_MODULE_ENABLED +#define HAL_SMARTCARD_MODULE_ENABLED +#define HAL_WWDG_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +#define HAL_PCD_MODULE_ENABLED +#define HAL_HCD_MODULE_ENABLED +#define HAL_DFSDM_MODULE_ENABLED +#define HAL_DSI_MODULE_ENABLED +#define HAL_JPEG_MODULE_ENABLED +#define HAL_MDIOS_MODULE_ENABLED +#define HAL_SMBUS_MODULE_ENABLED +#define HAL_MMC_MODULE_ENABLED +#endif + +/* ########################## HSE/HSI Values adaptation ##################### */ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined (HSE_VALUE) +#define HSE_VALUE 25000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSE_STARTUP_TIMEOUT) +#define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined (HSI_VALUE) +#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/ +#endif /* HSI_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#if !defined (LSI_VALUE) +#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/ +#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz +The real value may vary depending on the variations +in voltage and temperature. */ +/** + * @brief External Low Speed oscillator (LSE) value. + */ +#if !defined (LSE_VALUE) +#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */ +#endif /* LSE_VALUE */ + +#if !defined (LSE_STARTUP_TIMEOUT) +#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +/** + * @brief External clock source for I2S peripheral + * This value is used by the I2S HAL module to compute the I2S clock source + * frequency, this source is inserted directly through I2S_CKIN pad. + */ +#if !defined (EXTERNAL_CLOCK_VALUE) +#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the Internal oscillator in Hz*/ +#endif /* EXTERNAL_CLOCK_VALUE */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#if !defined (VDD_VALUE) +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#endif +#if !defined (TICK_INT_PRIORITY) +#define TICK_INT_PRIORITY 0x00U /*!< tick interrupt priority */ +#endif +#if !defined (USE_RTOS) +#define USE_RTOS 0U +#endif +#if !defined (PREFETCH_ENABLE) +#define PREFETCH_ENABLE 1U /* To enable prefetch */ +#endif +#if !defined (ART_ACCLERATOR_ENABLE) +#define ART_ACCLERATOR_ENABLE 1U /* To enable ART Accelerator */ +#endif + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ +#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ +#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ +#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_JPEG_REGISTER_CALLBACKS 0U /* JPEG register callback disabled */ +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ +#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ +#define USE_HAL_MDIOS_REGISTER_CALLBACKS 0U /* MDIOS register callback disabled */ +#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ +#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ +#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ +/* #define USE_FULL_ASSERT 1 */ + +/* ################## Ethernet peripheral configuration ##################### */ + +/* Section 1 : Ethernet peripheral configuration */ + +/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ +#define MAC_ADDR0 2U +#define MAC_ADDR1 0U +#define MAC_ADDR2 0U +#define MAC_ADDR3 0U +#define MAC_ADDR4 0U +#define MAC_ADDR5 0U + +/* Definition of the Ethernet driver buffers size and count */ +#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ +#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ +#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ +#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ + +/* Section 2: PHY configuration section */ +/* LAN8742A PHY Address*/ +//////////////////////////////// +//#define LAN8742A_PHY_ADDRESS 0x00U +/* Section 2: PHY configuration section */ +#if !defined (LAN8742A_PHY_ADDRESS) + /* LAN8742A PHY Address*/ + #define LAN8742A_PHY_ADDRESS 0x00U +#endif +//////////////////////////////// +/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ +#define PHY_RESET_DELAY 0x00000FFFU +/* PHY Configuration delay */ +#define PHY_CONFIG_DELAY 0x00000FFFU + +#define PHY_READ_TO 0x0000FFFFU +#define PHY_WRITE_TO 0x0000FFFFU + +/* Section 3: Common PHY Registers */ + +#define PHY_BCR ((uint16_t)0x00U) /*!< Transceiver Basic Control Register */ +#define PHY_BSR ((uint16_t)0x01U) /*!< Transceiver Basic Status Register */ + +#define PHY_RESET ((uint16_t)0x8000U) /*!< PHY Reset */ +#define PHY_LOOPBACK ((uint16_t)0x4000U) /*!< Select loop-back mode */ +#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100U) /*!< Set the full-duplex mode at 100 Mb/s */ +#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000U) /*!< Set the half-duplex mode at 100 Mb/s */ +#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100U) /*!< Set the full-duplex mode at 10 Mb/s */ +#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000U) /*!< Set the half-duplex mode at 10 Mb/s */ +#define PHY_AUTONEGOTIATION ((uint16_t)0x1000U) /*!< Enable auto-negotiation function */ +#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200U) /*!< Restart auto-negotiation function */ +#define PHY_POWERDOWN ((uint16_t)0x0800U) /*!< Select the power down mode */ +#define PHY_ISOLATE ((uint16_t)0x0400U) /*!< Isolate PHY from MII */ + +#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020U) /*!< Auto-Negotiation process completed */ +#define PHY_LINKED_STATUS ((uint16_t)0x0004U) /*!< Valid link established */ +#define PHY_JABBER_DETECTION ((uint16_t)0x0002U) /*!< Jabber condition detected */ + +/* Section 4: Extended PHY Registers */ + +#define PHY_SR ((uint16_t)0x1FU) /*!< PHY special control/ status register Offset */ + +#define PHY_SPEED_STATUS ((uint16_t)0x0004U) /*!< PHY Speed mask */ +#define PHY_DUPLEX_STATUS ((uint16_t)0x0010U) /*!< PHY Duplex mask */ + + +#define PHY_ISFR ((uint16_t)0x01DU) /*!< PHY Interrupt Source Flag register Offset */ +#define PHY_IMR ((uint16_t)0x001E) /*!< PHY Interrupt Mask register Offset */ +#define PHY_ISFR_INT4 ((uint16_t)0x0010U) /*!< PHY Link down inturrupt */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver +* Activated: CRC code is present inside driver +* Deactivated: CRC code cleaned from driver +*/ +#if !defined (USE_SPI_CRC) +#define USE_SPI_CRC 0U +#endif + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED +#include "stm32f7xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED +#include "stm32f7xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED +#include "stm32f7xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED +#include "stm32f7xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED +#include "stm32f7xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CAN_MODULE_ENABLED +#include "stm32f7xx_hal_can.h" +#endif /* HAL_CAN_MODULE_ENABLED */ + +#ifdef HAL_CAN_LEGACY_MODULE_ENABLED +#include "stm32f7xx_hal_can_legacy.h" +#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED +#include "stm32f7xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED +#include "stm32f7xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_CRYP_MODULE_ENABLED +#include "stm32f7xx_hal_cryp.h" +#endif /* HAL_CRYP_MODULE_ENABLED */ + +#ifdef HAL_DMA2D_MODULE_ENABLED +#include "stm32f7xx_hal_dma2d.h" +#endif /* HAL_DMA2D_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED +#include "stm32f7xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_DCMI_MODULE_ENABLED +#include "stm32f7xx_hal_dcmi.h" +#endif /* HAL_DCMI_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED +#include "stm32f7xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED +#include "stm32f7xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED +#include "stm32f7xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED +#include "stm32f7xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED +#include "stm32f7xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED +#include "stm32f7xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_SDRAM_MODULE_ENABLED +#include "stm32f7xx_hal_sdram.h" +#endif /* HAL_SDRAM_MODULE_ENABLED */ + +#ifdef HAL_HASH_MODULE_ENABLED +#include "stm32f7xx_hal_hash.h" +#endif /* HAL_HASH_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED +#include "stm32f7xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED +#include "stm32f7xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED +#include "stm32f7xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_LPTIM_MODULE_ENABLED +#include "stm32f7xx_hal_lptim.h" +#endif /* HAL_LPTIM_MODULE_ENABLED */ + +#ifdef HAL_LTDC_MODULE_ENABLED +#include "stm32f7xx_hal_ltdc.h" +#endif /* HAL_LTDC_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED +#include "stm32f7xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_QSPI_MODULE_ENABLED +#include "stm32f7xx_hal_qspi.h" +#endif /* HAL_QSPI_MODULE_ENABLED */ + +#ifdef HAL_RNG_MODULE_ENABLED +#include "stm32f7xx_hal_rng.h" +#endif /* HAL_RNG_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED +#include "stm32f7xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SAI_MODULE_ENABLED +#include "stm32f7xx_hal_sai.h" +#endif /* HAL_SAI_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED +#include "stm32f7xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_SPDIFRX_MODULE_ENABLED +#include "stm32f7xx_hal_spdifrx.h" +#endif /* HAL_SPDIFRX_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED +#include "stm32f7xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED +#include "stm32f7xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED +#include "stm32f7xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED +#include "stm32f7xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED +#include "stm32f7xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED +#include "stm32f7xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED +#include "stm32f7xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED +#include "stm32f7xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED +#include "stm32f7xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_DFSDM_MODULE_ENABLED +#include "stm32f7xx_hal_dfsdm.h" +#endif /* HAL_DFSDM_MODULE_ENABLED */ + +#ifdef HAL_DSI_MODULE_ENABLED +#include "stm32f7xx_hal_dsi.h" +#endif /* HAL_DSI_MODULE_ENABLED */ + +#ifdef HAL_JPEG_MODULE_ENABLED +#include "stm32f7xx_hal_jpeg.h" +#endif /* HAL_JPEG_MODULE_ENABLED */ + +#ifdef HAL_MDIOS_MODULE_ENABLED +#include "stm32f7xx_hal_mdios.h" +#endif /* HAL_MDIOS_MODULE_ENABLED */ + +#ifdef HAL_SMBUS_MODULE_ENABLED +#include "stm32f7xx_hal_smbus.h" +#endif /* HAL_SMBUS_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED +#include "stm32f7xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ +#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ +void assert_failed(uint8_t *file, uint32_t line); +#else +#define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F7xx_HAL_CONF_DEFAULT_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/variants/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/variants/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.h new file mode 100644 index 0000000..e8eaf79 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/variants/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.h @@ -0,0 +1,274 @@ +/* + ******************************************************************************* + * Copyright (c) 2020-2021, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* +*/ +#pragma once + +/*---------------------------------------------------------------------------- + * Pins + *----------------------------------------------------------------------------*/ + +#define PG9 0 +#define PG14 1 +#define PF15 2 +#define PE13 3 +#define PF14 4 +#define PE11 5 +#define PE9 6 +#define PF13 7 +#define PF12 8 +#define PD15 9 +#define PD14 10 +#define PA7 PIN_A10 +#define PA6 PIN_A11 +#define PA5 PIN_A12 +#define PB9 14 +#define PB8 15 +#define PC6 16 +#define PB15 17 +#define PB13 18 +#define PB12 19 +#define PA15 20 +#define PC7 21 +#define PB5 22 +#define PB3 23 +#define PA4 PIN_A13 +#define PB4 25 +#define PB6 26 +#define PB2 27 +#define PD13 28 +#define PD12 29 +#define PD11 30 +#define PE2 31 +#define PA0 PIN_A14 +#define PB0 PIN_A23 // LED_GREEN +#define PE0 34 +#define PB11 35 +#define PB10 36 +#define PE15 37 +#define PE14 38 +#define PE12 39 +#define PE10 40 +#define PE7 41 +#define PE8 42 +#define PC8 43 +#define PC9 44 +#define PC10 45 +#define PC11 46 +#define PC12 47 +#define PD2 48 +#define PG2 49 +#define PG3 50 +#define PD7 51 +#define PD6 52 +#define PD5 53 +#define PD4 54 +#define PD3 55 +// 56 is PE2 (31) +#define PE4 57 +#define PE5 58 +#define PE6 59 +#define PE3 60 +#define PF8 PIN_A15 +#define PF7 PIN_A16 +#define PF9 PIN_A17 +#define PG1 64 +#define PG0 65 +#define PD1 66 +#define PD0 67 +#define PF0 68 +#define PF1 69 +#define PF2 70 +// 71 is PA7 (11) +// 72 is NC +#define PB7 73 // LED_BLUE +#define PB14 74 // LED_RED +#define PC13 75 // USER_BTN +#define PD9 76 // Serial Rx +#define PD8 77 // Serial Tx +#define PA3 PIN_A0 +#define PC0 PIN_A1 +#define PC3 PIN_A2 +#define PF3 PIN_A3 +#define PF5 PIN_A4 +#define PF10 PIN_A5 +#define PB1 PIN_A6 +#define PC2 PIN_A7 +#define PF4 PIN_A8 +#define PF6 PIN_A9 +// ST Morpho +#define PA1 PIN_A18 +#define PA2 PIN_A19 +#define PA8 90 +#define PA9 91 +#define PA10 92 +#define PA11 93 +#define PA12 94 +#define PA13 95 // SWD +#define PA14 96 // SWD +#define PC1 PIN_A20 +#define PC4 PIN_A21 +#define PC5 PIN_A22 +#define PC14 100 +#define PC15 101 +#define PD10 102 +#define PE1 103 +#define PF11 104 +#define PG4 105 +#define PG5 106 +#define PG6 107 +#define PG7 108 +#define PG8 109 +#define PG10 110 +#define PG11 111 +#define PG12 112 +#define PG13 113 +#define PG15 114 +#define PH0 115 // MCO +#define PH1 116 + +// Alternate pins number +#define PA0_ALT1 (PA0 | ALT1) +#define PA0_ALT2 (PA0 | ALT2) +#define PA1_ALT1 (PA1 | ALT1) +#define PA1_ALT2 (PA1 | ALT2) +#define PA2_ALT1 (PA2 | ALT1) +#define PA2_ALT2 (PA2 | ALT2) +#define PA3_ALT1 (PA3 | ALT1) +#define PA3_ALT2 (PA3 | ALT2) +#define PA4_ALT1 (PA4 | ALT1) +#define PA5_ALT1 (PA5 | ALT1) +#define PA6_ALT1 (PA6 | ALT1) +#define PA7_ALT1 (PA7 | ALT1) +#define PA7_ALT2 (PA7 | ALT2) +#define PA7_ALT3 (PA7 | ALT3) +#define PA15_ALT1 (PA15 | ALT1) +#define PB0_ALT1 (PB0 | ALT1) +#define PB0_ALT2 (PB0 | ALT2) +#define PB1_ALT1 (PB1 | ALT1) +#define PB1_ALT2 (PB1 | ALT2) +#define PB3_ALT1 (PB3 | ALT1) +#define PB4_ALT1 (PB4 | ALT1) +#define PB5_ALT1 (PB5 | ALT1) +#define PB8_ALT1 (PB8 | ALT1) +#define PB9_ALT1 (PB9 | ALT1) +#define PB14_ALT1 (PB14 | ALT1) +#define PB14_ALT2 (PB14 | ALT2) +#define PB15_ALT1 (PB15 | ALT1) +#define PB15_ALT2 (PB15 | ALT2) +#define PC0_ALT1 (PC0 | ALT1) +#define PC0_ALT2 (PC0 | ALT2) +#define PC1_ALT1 (PC1 | ALT1) +#define PC1_ALT2 (PC1 | ALT2) +#define PC2_ALT1 (PC2 | ALT1) +#define PC2_ALT2 (PC2 | ALT2) +#define PC3_ALT1 (PC3 | ALT1) +#define PC3_ALT2 (PC3 | ALT2) +#define PC4_ALT1 (PC4 | ALT1) +#define PC5_ALT1 (PC5 | ALT1) +#define PC6_ALT1 (PC6 | ALT1) +#define PC7_ALT1 (PC7 | ALT1) +#define PC8_ALT1 (PC8 | ALT1) +#define PC9_ALT1 (PC9 | ALT1) +#define PC10_ALT1 (PC10 | ALT1) +#define PC11_ALT1 (PC11 | ALT1) + +// This must be a literal +#define NUM_DIGITAL_PINS 117 +// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS +#define NUM_ANALOG_INPUTS 24 + +// On-board LED pin number +#ifndef LED_BUILTIN + #define LED_BUILTIN PB0 +#endif +#define LED_GREEN LED_BUILTIN +#define LED_BLUE PB7 +#define LED_RED PB14 + +// On-board user button +#ifndef USER_BTN + #define USER_BTN PC13 +#endif + +// Timer Definitions +// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin +#ifndef TIMER_TONE + #define TIMER_TONE TIM6 +#endif +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM7 +#endif + +// UART Definitions +#ifndef SERIAL_UART_INSTANCE + #define SERIAL_UART_INSTANCE 3 //Connected to ST-Link +#endif +// Serial pin used for console (ex: stlink) +// Rerquired by Firmata +#ifndef PIN_SERIAL_RX + #define PIN_SERIAL_RX PD9 +#endif +#ifndef PIN_SERIAL_TX + #define PIN_SERIAL_TX PD8 +#endif + +// Value of the External oscillator in Hz +#define HSE_VALUE 8000000U + +/* Extra HAL modules */ +#if !defined(HAL_DAC_MODULE_DISABLED) + #define HAL_DAC_MODULE_ENABLED +#endif +#if !defined(HAL_ETH_MODULE_DISABLED) + #define HAL_ETH_MODULE_ENABLED +#endif +#if !defined(HAL_QSPI_MODULE_DISABLED) + #define HAL_QSPI_MODULE_ENABLED +#endif +#if !defined(HAL_SD_MODULE_DISABLED) + #define HAL_SD_MODULE_ENABLED +#endif + +// Last Flash sector used for EEPROM emulation, address/sector depends on single/dual bank configuration. +// By default 2MB single bank +#define FLASH_BASE_ADDRESS 0x081C0000 +#define FLASH_DATA_SECTOR 11 + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #ifndef SERIAL_PORT_MONITOR + #define SERIAL_PORT_MONITOR Serial + #endif + #ifndef SERIAL_PORT_HARDWARE + // KH mod to add Serial1, for ESP-AT + //#define SERIAL_PORT_HARDWARE Serial + #define SERIAL_PORT_HARDWARE Serial1 + #endif +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/variants/L052R(6-8)H_L053R(6-8)H/variant_generic.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/variants/L052R(6-8)H_L053R(6-8)H/variant_generic.h new file mode 100644 index 0000000..43ba241 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/variants/L052R(6-8)H_L053R(6-8)H/variant_generic.h @@ -0,0 +1,173 @@ +/* + ******************************************************************************* + * Copyright (c) 2020-2021, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + */ +#pragma once + +/*---------------------------------------------------------------------------- + * STM32 pins number + *----------------------------------------------------------------------------*/ +#define PA0 PIN_A0 +#define PA1 PIN_A1 +#define PA2 PIN_A2 +#define PA3 PIN_A3 +#define PA4 PIN_A4 +#define PA5 PIN_A5 +#define PA6 PIN_A6 +#define PA7 PIN_A7 +#define PA8 8 +#define PA9 9 +#define PA10 10 +#define PA11 11 +#define PA12 12 +#define PA13 13 +#define PA14 14 +#define PA15 15 +#define PB0 PIN_A8 +#define PB1 PIN_A9 +#define PB2 18 +#define PB3 19 +#define PB4 20 +#define PB5 21 +#define PB6 22 +#define PB7 23 +#define PB8 24 +#define PB9 25 +#define PB10 26 +#define PB11 27 +#define PB12 28 +#define PB13 29 +#define PB14 30 +#define PB15 31 +#define PC0 PIN_A10 +#define PC1 PIN_A11 +#define PC2 PIN_A12 +#define PC4 PIN_A13 +#define PC5 PIN_A14 +#define PC6 37 +#define PC7 38 +#define PC8 39 +#define PC9 40 +#define PC10 41 +#define PC11 42 +#define PC12 43 +#define PC13 44 +#define PC14 45 +#define PC15 46 +#define PD2 47 +#define PH0 48 +#define PH1 49 + +// Alternate pins number +#define PA2_ALT1 (PA2 | ALT1) +#define PA3_ALT1 (PA3 | ALT1) + +#define NUM_DIGITAL_PINS 50 +#define NUM_ANALOG_INPUTS 15 + +// On-board LED pin number +#ifndef LED_BUILTIN + #define LED_BUILTIN PNUM_NOT_DEFINED +#endif + +// On-board user button +#ifndef USER_BTN + #define USER_BTN PNUM_NOT_DEFINED +#endif + +// SPI definitions +#ifndef PIN_SPI_SS + #define PIN_SPI_SS PA4 +#endif +#ifndef PIN_SPI_SS1 + #define PIN_SPI_SS1 PA15 +#endif +#ifndef PIN_SPI_SS2 + #define PIN_SPI_SS2 PNUM_NOT_DEFINED +#endif +#ifndef PIN_SPI_SS3 + #define PIN_SPI_SS3 PNUM_NOT_DEFINED +#endif +#ifndef PIN_SPI_MOSI + #define PIN_SPI_MOSI PA7 +#endif +#ifndef PIN_SPI_MISO + #define PIN_SPI_MISO PA6 +#endif +#ifndef PIN_SPI_SCK + #define PIN_SPI_SCK PA5 +#endif + +// I2C definitions +#ifndef PIN_WIRE_SDA + #define PIN_WIRE_SDA PB7 +#endif +#ifndef PIN_WIRE_SCL + #define PIN_WIRE_SCL PB6 +#endif + +// Timer Definitions +// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin +#ifndef TIMER_TONE + #define TIMER_TONE TIM6 +#endif +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM21 +#endif + +// UART Definitions +#ifndef SERIAL_UART_INSTANCE + #define SERIAL_UART_INSTANCE 2 +#endif + +// Default pin used for generic 'Serial' instance +// Mandatory for Firmata +#ifndef PIN_SERIAL_RX + #define PIN_SERIAL_RX PA3 +#endif +#ifndef PIN_SERIAL_TX + #define PIN_SERIAL_TX PA2 +#endif + +// Extra HAL modules +#if !defined(HAL_DAC_MODULE_DISABLED) + #define HAL_DAC_MODULE_ENABLED +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #ifndef SERIAL_PORT_MONITOR + #define SERIAL_PORT_MONITOR Serial + #endif + #ifndef SERIAL_PORT_HARDWARE + // KH mod to add Serial1, for ESP-AT + //#define SERIAL_PORT_HARDWARE Serial + #define SERIAL_PORT_HARDWARE Serial1 + #endif +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.h new file mode 100644 index 0000000..e8eaf79 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.h @@ -0,0 +1,274 @@ +/* + ******************************************************************************* + * Copyright (c) 2020-2021, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* +*/ +#pragma once + +/*---------------------------------------------------------------------------- + * Pins + *----------------------------------------------------------------------------*/ + +#define PG9 0 +#define PG14 1 +#define PF15 2 +#define PE13 3 +#define PF14 4 +#define PE11 5 +#define PE9 6 +#define PF13 7 +#define PF12 8 +#define PD15 9 +#define PD14 10 +#define PA7 PIN_A10 +#define PA6 PIN_A11 +#define PA5 PIN_A12 +#define PB9 14 +#define PB8 15 +#define PC6 16 +#define PB15 17 +#define PB13 18 +#define PB12 19 +#define PA15 20 +#define PC7 21 +#define PB5 22 +#define PB3 23 +#define PA4 PIN_A13 +#define PB4 25 +#define PB6 26 +#define PB2 27 +#define PD13 28 +#define PD12 29 +#define PD11 30 +#define PE2 31 +#define PA0 PIN_A14 +#define PB0 PIN_A23 // LED_GREEN +#define PE0 34 +#define PB11 35 +#define PB10 36 +#define PE15 37 +#define PE14 38 +#define PE12 39 +#define PE10 40 +#define PE7 41 +#define PE8 42 +#define PC8 43 +#define PC9 44 +#define PC10 45 +#define PC11 46 +#define PC12 47 +#define PD2 48 +#define PG2 49 +#define PG3 50 +#define PD7 51 +#define PD6 52 +#define PD5 53 +#define PD4 54 +#define PD3 55 +// 56 is PE2 (31) +#define PE4 57 +#define PE5 58 +#define PE6 59 +#define PE3 60 +#define PF8 PIN_A15 +#define PF7 PIN_A16 +#define PF9 PIN_A17 +#define PG1 64 +#define PG0 65 +#define PD1 66 +#define PD0 67 +#define PF0 68 +#define PF1 69 +#define PF2 70 +// 71 is PA7 (11) +// 72 is NC +#define PB7 73 // LED_BLUE +#define PB14 74 // LED_RED +#define PC13 75 // USER_BTN +#define PD9 76 // Serial Rx +#define PD8 77 // Serial Tx +#define PA3 PIN_A0 +#define PC0 PIN_A1 +#define PC3 PIN_A2 +#define PF3 PIN_A3 +#define PF5 PIN_A4 +#define PF10 PIN_A5 +#define PB1 PIN_A6 +#define PC2 PIN_A7 +#define PF4 PIN_A8 +#define PF6 PIN_A9 +// ST Morpho +#define PA1 PIN_A18 +#define PA2 PIN_A19 +#define PA8 90 +#define PA9 91 +#define PA10 92 +#define PA11 93 +#define PA12 94 +#define PA13 95 // SWD +#define PA14 96 // SWD +#define PC1 PIN_A20 +#define PC4 PIN_A21 +#define PC5 PIN_A22 +#define PC14 100 +#define PC15 101 +#define PD10 102 +#define PE1 103 +#define PF11 104 +#define PG4 105 +#define PG5 106 +#define PG6 107 +#define PG7 108 +#define PG8 109 +#define PG10 110 +#define PG11 111 +#define PG12 112 +#define PG13 113 +#define PG15 114 +#define PH0 115 // MCO +#define PH1 116 + +// Alternate pins number +#define PA0_ALT1 (PA0 | ALT1) +#define PA0_ALT2 (PA0 | ALT2) +#define PA1_ALT1 (PA1 | ALT1) +#define PA1_ALT2 (PA1 | ALT2) +#define PA2_ALT1 (PA2 | ALT1) +#define PA2_ALT2 (PA2 | ALT2) +#define PA3_ALT1 (PA3 | ALT1) +#define PA3_ALT2 (PA3 | ALT2) +#define PA4_ALT1 (PA4 | ALT1) +#define PA5_ALT1 (PA5 | ALT1) +#define PA6_ALT1 (PA6 | ALT1) +#define PA7_ALT1 (PA7 | ALT1) +#define PA7_ALT2 (PA7 | ALT2) +#define PA7_ALT3 (PA7 | ALT3) +#define PA15_ALT1 (PA15 | ALT1) +#define PB0_ALT1 (PB0 | ALT1) +#define PB0_ALT2 (PB0 | ALT2) +#define PB1_ALT1 (PB1 | ALT1) +#define PB1_ALT2 (PB1 | ALT2) +#define PB3_ALT1 (PB3 | ALT1) +#define PB4_ALT1 (PB4 | ALT1) +#define PB5_ALT1 (PB5 | ALT1) +#define PB8_ALT1 (PB8 | ALT1) +#define PB9_ALT1 (PB9 | ALT1) +#define PB14_ALT1 (PB14 | ALT1) +#define PB14_ALT2 (PB14 | ALT2) +#define PB15_ALT1 (PB15 | ALT1) +#define PB15_ALT2 (PB15 | ALT2) +#define PC0_ALT1 (PC0 | ALT1) +#define PC0_ALT2 (PC0 | ALT2) +#define PC1_ALT1 (PC1 | ALT1) +#define PC1_ALT2 (PC1 | ALT2) +#define PC2_ALT1 (PC2 | ALT1) +#define PC2_ALT2 (PC2 | ALT2) +#define PC3_ALT1 (PC3 | ALT1) +#define PC3_ALT2 (PC3 | ALT2) +#define PC4_ALT1 (PC4 | ALT1) +#define PC5_ALT1 (PC5 | ALT1) +#define PC6_ALT1 (PC6 | ALT1) +#define PC7_ALT1 (PC7 | ALT1) +#define PC8_ALT1 (PC8 | ALT1) +#define PC9_ALT1 (PC9 | ALT1) +#define PC10_ALT1 (PC10 | ALT1) +#define PC11_ALT1 (PC11 | ALT1) + +// This must be a literal +#define NUM_DIGITAL_PINS 117 +// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS +#define NUM_ANALOG_INPUTS 24 + +// On-board LED pin number +#ifndef LED_BUILTIN + #define LED_BUILTIN PB0 +#endif +#define LED_GREEN LED_BUILTIN +#define LED_BLUE PB7 +#define LED_RED PB14 + +// On-board user button +#ifndef USER_BTN + #define USER_BTN PC13 +#endif + +// Timer Definitions +// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin +#ifndef TIMER_TONE + #define TIMER_TONE TIM6 +#endif +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM7 +#endif + +// UART Definitions +#ifndef SERIAL_UART_INSTANCE + #define SERIAL_UART_INSTANCE 3 //Connected to ST-Link +#endif +// Serial pin used for console (ex: stlink) +// Rerquired by Firmata +#ifndef PIN_SERIAL_RX + #define PIN_SERIAL_RX PD9 +#endif +#ifndef PIN_SERIAL_TX + #define PIN_SERIAL_TX PD8 +#endif + +// Value of the External oscillator in Hz +#define HSE_VALUE 8000000U + +/* Extra HAL modules */ +#if !defined(HAL_DAC_MODULE_DISABLED) + #define HAL_DAC_MODULE_ENABLED +#endif +#if !defined(HAL_ETH_MODULE_DISABLED) + #define HAL_ETH_MODULE_ENABLED +#endif +#if !defined(HAL_QSPI_MODULE_DISABLED) + #define HAL_QSPI_MODULE_ENABLED +#endif +#if !defined(HAL_SD_MODULE_DISABLED) + #define HAL_SD_MODULE_ENABLED +#endif + +// Last Flash sector used for EEPROM emulation, address/sector depends on single/dual bank configuration. +// By default 2MB single bank +#define FLASH_BASE_ADDRESS 0x081C0000 +#define FLASH_DATA_SECTOR 11 + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #ifndef SERIAL_PORT_MONITOR + #define SERIAL_PORT_MONITOR Serial + #endif + #ifndef SERIAL_PORT_HARDWARE + // KH mod to add Serial1, for ESP-AT + //#define SERIAL_PORT_HARDWARE Serial + #define SERIAL_PORT_HARDWARE Serial1 + #endif +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/variant_generic.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/variant_generic.h new file mode 100644 index 0000000..43ba241 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.0.0/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/variant_generic.h @@ -0,0 +1,173 @@ +/* + ******************************************************************************* + * Copyright (c) 2020-2021, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + */ +#pragma once + +/*---------------------------------------------------------------------------- + * STM32 pins number + *----------------------------------------------------------------------------*/ +#define PA0 PIN_A0 +#define PA1 PIN_A1 +#define PA2 PIN_A2 +#define PA3 PIN_A3 +#define PA4 PIN_A4 +#define PA5 PIN_A5 +#define PA6 PIN_A6 +#define PA7 PIN_A7 +#define PA8 8 +#define PA9 9 +#define PA10 10 +#define PA11 11 +#define PA12 12 +#define PA13 13 +#define PA14 14 +#define PA15 15 +#define PB0 PIN_A8 +#define PB1 PIN_A9 +#define PB2 18 +#define PB3 19 +#define PB4 20 +#define PB5 21 +#define PB6 22 +#define PB7 23 +#define PB8 24 +#define PB9 25 +#define PB10 26 +#define PB11 27 +#define PB12 28 +#define PB13 29 +#define PB14 30 +#define PB15 31 +#define PC0 PIN_A10 +#define PC1 PIN_A11 +#define PC2 PIN_A12 +#define PC4 PIN_A13 +#define PC5 PIN_A14 +#define PC6 37 +#define PC7 38 +#define PC8 39 +#define PC9 40 +#define PC10 41 +#define PC11 42 +#define PC12 43 +#define PC13 44 +#define PC14 45 +#define PC15 46 +#define PD2 47 +#define PH0 48 +#define PH1 49 + +// Alternate pins number +#define PA2_ALT1 (PA2 | ALT1) +#define PA3_ALT1 (PA3 | ALT1) + +#define NUM_DIGITAL_PINS 50 +#define NUM_ANALOG_INPUTS 15 + +// On-board LED pin number +#ifndef LED_BUILTIN + #define LED_BUILTIN PNUM_NOT_DEFINED +#endif + +// On-board user button +#ifndef USER_BTN + #define USER_BTN PNUM_NOT_DEFINED +#endif + +// SPI definitions +#ifndef PIN_SPI_SS + #define PIN_SPI_SS PA4 +#endif +#ifndef PIN_SPI_SS1 + #define PIN_SPI_SS1 PA15 +#endif +#ifndef PIN_SPI_SS2 + #define PIN_SPI_SS2 PNUM_NOT_DEFINED +#endif +#ifndef PIN_SPI_SS3 + #define PIN_SPI_SS3 PNUM_NOT_DEFINED +#endif +#ifndef PIN_SPI_MOSI + #define PIN_SPI_MOSI PA7 +#endif +#ifndef PIN_SPI_MISO + #define PIN_SPI_MISO PA6 +#endif +#ifndef PIN_SPI_SCK + #define PIN_SPI_SCK PA5 +#endif + +// I2C definitions +#ifndef PIN_WIRE_SDA + #define PIN_WIRE_SDA PB7 +#endif +#ifndef PIN_WIRE_SCL + #define PIN_WIRE_SCL PB6 +#endif + +// Timer Definitions +// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin +#ifndef TIMER_TONE + #define TIMER_TONE TIM6 +#endif +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM21 +#endif + +// UART Definitions +#ifndef SERIAL_UART_INSTANCE + #define SERIAL_UART_INSTANCE 2 +#endif + +// Default pin used for generic 'Serial' instance +// Mandatory for Firmata +#ifndef PIN_SERIAL_RX + #define PIN_SERIAL_RX PA3 +#endif +#ifndef PIN_SERIAL_TX + #define PIN_SERIAL_TX PA2 +#endif + +// Extra HAL modules +#if !defined(HAL_DAC_MODULE_DISABLED) + #define HAL_DAC_MODULE_ENABLED +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #ifndef SERIAL_PORT_MONITOR + #define SERIAL_PORT_MONITOR Serial + #endif + #ifndef SERIAL_PORT_HARDWARE + // KH mod to add Serial1, for ESP-AT + //#define SERIAL_PORT_HARDWARE Serial + #define SERIAL_PORT_HARDWARE Serial1 + #endif +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.1.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.1.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h new file mode 100644 index 0000000..ec7da13 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.1.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h @@ -0,0 +1,519 @@ +/** + ****************************************************************************** + * @file stm32f4xx_hal_conf_default.h + * @brief HAL default configuration file. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F4xx_HAL_CONF_DEFAULT_H +#define __STM32F4xx_HAL_CONF_DEFAULT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief Include the default list of modules to be used in the HAL driver + * and manage module deactivation + */ +#include "stm32yyxx_hal_conf.h" +#if 0 +/** + * @brief This is the list of modules to be used in the HAL driver + */ +#define HAL_MODULE_ENABLED +#define HAL_ADC_MODULE_ENABLED +#define HAL_CAN_MODULE_ENABLED +/*#define HAL_CAN_LEGACY_MODULE_ENABLED*/ +#define HAL_CRC_MODULE_ENABLED +#define HAL_CEC_MODULE_ENABLED +#define HAL_CRYP_MODULE_ENABLED +#define HAL_DAC_MODULE_ENABLED +#define HAL_DCMI_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_DMA2D_MODULE_ENABLED +#define HAL_ETH_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_NAND_MODULE_ENABLED +#define HAL_NOR_MODULE_ENABLED +#define HAL_PCCARD_MODULE_ENABLED +#define HAL_SRAM_MODULE_ENABLED +#define HAL_SDRAM_MODULE_ENABLED +#define HAL_HASH_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED +#define HAL_I2C_MODULE_ENABLED +#define HAL_SMBUS_MODULE_ENABLED +#define HAL_I2S_MODULE_ENABLED +#define HAL_IWDG_MODULE_ENABLED +#define HAL_LTDC_MODULE_ENABLED +#define HAL_DSI_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_QSPI_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +#define HAL_RNG_MODULE_ENABLED +#define HAL_RTC_MODULE_ENABLED +#define HAL_SAI_MODULE_ENABLED +#define HAL_SD_MODULE_ENABLED +#define HAL_SPI_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +#define HAL_UART_MODULE_ENABLED +#define HAL_USART_MODULE_ENABLED +#define HAL_IRDA_MODULE_ENABLED +#define HAL_SMARTCARD_MODULE_ENABLED +#define HAL_WWDG_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +#define HAL_PCD_MODULE_ENABLED +#define HAL_HCD_MODULE_ENABLED +#define HAL_FMPI2C_MODULE_ENABLED +#define HAL_FMPSMBUS_MODULE_ENABLED +#define HAL_SPDIFRX_MODULE_ENABLED +#define HAL_DFSDM_MODULE_ENABLED +#define HAL_LPTIM_MODULE_ENABLED +#define HAL_MMC_MODULE_ENABLED +#endif + +/* ########################## HSE/HSI Values adaptation ##################### */ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined (HSE_VALUE) +#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSE_STARTUP_TIMEOUT) +#define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined (HSI_VALUE) +#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz */ +#endif /* HSI_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#if !defined (LSI_VALUE) +#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz */ +#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz +The real value may vary depending on the variations +in voltage and temperature. */ +/** + * @brief External Low Speed oscillator (LSE) value. + */ +#if !defined (LSE_VALUE) +#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */ +#endif /* LSE_VALUE */ + +#if !defined (LSE_STARTUP_TIMEOUT) +#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +/** + * @brief External clock source for I2S peripheral + * This value is used by the I2S HAL module to compute the I2S clock source + * frequency, this source is inserted directly through I2S_CKIN pad. + */ +#if !defined (EXTERNAL_CLOCK_VALUE) +#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External oscillator in Hz*/ +#endif /* EXTERNAL_CLOCK_VALUE */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#if !defined (VDD_VALUE) +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#endif +#if !defined (TICK_INT_PRIORITY) +#define TICK_INT_PRIORITY 0x00U /*!< tick interrupt priority */ +#endif +#if !defined (USE_RTOS) +#define USE_RTOS 0U +#endif +#if !defined (PREFETCH_ENABLE) +#define PREFETCH_ENABLE 1U +#endif +#if !defined (INSTRUCTION_CACHE_ENABLE) +#define INSTRUCTION_CACHE_ENABLE 1U +#endif +#if !defined (DATA_CACHE_ENABLE) +#define DATA_CACHE_ENABLE 1U +#endif + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ +#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ +#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ +#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_FMPI2C_REGISTER_CALLBACKS 0U /* FMPI2C register callback disabled */ +#define USE_HAL_FMPSMBUS_REGISTER_CALLBACKS 0U /* FMPSMBUS register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ +#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ +#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ +#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ +#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ +/* #define USE_FULL_ASSERT 1U */ + +/* ################## Ethernet peripheral configuration ##################### */ + +/* Section 1 : Ethernet peripheral configuration */ + +/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ +#define MAC_ADDR0 2U +#define MAC_ADDR1 0U +#define MAC_ADDR2 0U +#define MAC_ADDR3 0U +#define MAC_ADDR4 0U +#define MAC_ADDR5 0U + +/* Definition of the Ethernet driver buffers size and count */ +#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ +#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ +#define ETH_RXBUFNB (5U) /* 5 Rx buffers of size ETH_RX_BUF_SIZE */ +#define ETH_TXBUFNB (5U) /* 5 Tx buffers of size ETH_TX_BUF_SIZE */ + +/* Section 2: PHY configuration section */ +/* LAN8742A PHY Address*/ +//////////////////////////////// +//#define LAN8742A_PHY_ADDRESS 0x00U +/* Section 2: PHY configuration section */ +#if !defined (LAN8742A_PHY_ADDRESS) + /* KH, LAN8742A PHY Address*/ + #define LAN8742A_PHY_ADDRESS 0x00U +#endif +//////////////////////////////// +/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ +#define PHY_RESET_DELAY 0x000000FFU +/* PHY Configuration delay */ +#define PHY_CONFIG_DELAY 0x00000FFFU + +#define PHY_READ_TO 0x0000FFFFU +#define PHY_WRITE_TO 0x0000FFFFU + +/* Section 3: Common PHY Registers */ + +#define PHY_BCR ((uint16_t)0x0000) /*!< Transceiver Basic Control Register */ +#define PHY_BSR ((uint16_t)0x0001) /*!< Transceiver Basic Status Register */ + +#define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */ +#define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */ +#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */ +#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */ +#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */ +#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */ +#define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */ +#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */ +#define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */ +#define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */ + +#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */ +#define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */ +#define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */ + +/* Section 4: Extended PHY Registers */ + +#define PHY_SR ((uint16_t)0x1F) /*!< PHY special control/ status register Offset */ + +#define PHY_SPEED_STATUS ((uint16_t)0x0004) /*!< PHY Speed mask */ +#define PHY_DUPLEX_STATUS ((uint16_t)0x0010) /*!< PHY Duplex mask */ + + +#define PHY_ISFR ((uint16_t)0x1D) /*!< PHY Interrupt Source Flag register Offset */ +#define PHY_IMR ((uint16_t)0x1E) /*!< PHY Interrupt Mask register Offset */ +#define PHY_ISFR_INT4 ((uint16_t)0x0010) /*!< PHY Link down inturrupt */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver +* Activated: CRC code is present inside driver +* Deactivated: CRC code cleaned from driver +*/ +#if !defined (USE_SPI_CRC) +#define USE_SPI_CRC 0U +#endif + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED +#include "stm32f4xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED +#include "stm32f4xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED +#include "stm32f4xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED +#include "stm32f4xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED +#include "stm32f4xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED +#include "stm32f4xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CAN_MODULE_ENABLED +#include "stm32f4xx_hal_can.h" +#endif /* HAL_CAN_MODULE_ENABLED */ + +#ifdef HAL_CAN_LEGACY_MODULE_ENABLED +#include "stm32f4xx_hal_can_legacy.h" +#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED +#include "stm32f4xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_CRYP_MODULE_ENABLED +#include "stm32f4xx_hal_cryp.h" +#endif /* HAL_CRYP_MODULE_ENABLED */ + +#ifdef HAL_DMA2D_MODULE_ENABLED +#include "stm32f4xx_hal_dma2d.h" +#endif /* HAL_DMA2D_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED +#include "stm32f4xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_DCMI_MODULE_ENABLED +#include "stm32f4xx_hal_dcmi.h" +#endif /* HAL_DCMI_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED +#include "stm32f4xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED +#include "stm32f4xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED +#include "stm32f4xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED +#include "stm32f4xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED +#include "stm32f4xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_PCCARD_MODULE_ENABLED +#include "stm32f4xx_hal_pccard.h" +#endif /* HAL_PCCARD_MODULE_ENABLED */ + +#ifdef HAL_SDRAM_MODULE_ENABLED +#include "stm32f4xx_hal_sdram.h" +#endif /* HAL_SDRAM_MODULE_ENABLED */ + +#ifdef HAL_HASH_MODULE_ENABLED +#include "stm32f4xx_hal_hash.h" +#endif /* HAL_HASH_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED +#include "stm32f4xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_SMBUS_MODULE_ENABLED +#include "stm32f4xx_hal_smbus.h" +#endif /* HAL_SMBUS_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED +#include "stm32f4xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED +#include "stm32f4xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_LTDC_MODULE_ENABLED +#include "stm32f4xx_hal_ltdc.h" +#endif /* HAL_LTDC_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED +#include "stm32f4xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_RNG_MODULE_ENABLED +#include "stm32f4xx_hal_rng.h" +#endif /* HAL_RNG_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED +#include "stm32f4xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SAI_MODULE_ENABLED +#include "stm32f4xx_hal_sai.h" +#endif /* HAL_SAI_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED +#include "stm32f4xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED +#include "stm32f4xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED +#include "stm32f4xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED +#include "stm32f4xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED +#include "stm32f4xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED +#include "stm32f4xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED +#include "stm32f4xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED +#include "stm32f4xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED +#include "stm32f4xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED +#include "stm32f4xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_DSI_MODULE_ENABLED +#include "stm32f4xx_hal_dsi.h" +#endif /* HAL_DSI_MODULE_ENABLED */ + +#ifdef HAL_QSPI_MODULE_ENABLED +#include "stm32f4xx_hal_qspi.h" +#endif /* HAL_QSPI_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED +#include "stm32f4xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_FMPI2C_MODULE_ENABLED +#include "stm32f4xx_hal_fmpi2c.h" +#endif /* HAL_FMPI2C_MODULE_ENABLED */ + +#ifdef HAL_FMPSMBUS_MODULE_ENABLED +#include "stm32f4xx_hal_fmpsmbus.h" +#endif /* HAL_FMPSMBUS_MODULE_ENABLED */ + +#ifdef HAL_SPDIFRX_MODULE_ENABLED +#include "stm32f4xx_hal_spdifrx.h" +#endif /* HAL_SPDIFRX_MODULE_ENABLED */ + +#ifdef HAL_DFSDM_MODULE_ENABLED +#include "stm32f4xx_hal_dfsdm.h" +#endif /* HAL_DFSDM_MODULE_ENABLED */ + +#ifdef HAL_LPTIM_MODULE_ENABLED +#include "stm32f4xx_hal_lptim.h" +#endif /* HAL_LPTIM_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED +#include "stm32f4xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ +#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ +void assert_failed(uint8_t *file, uint32_t line); +#else +#define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F4xx_HAL_CONF_DEFAULT_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.1.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.1.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h new file mode 100644 index 0000000..3bcd06c --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.1.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h @@ -0,0 +1,511 @@ +/** + ****************************************************************************** + * @file stm32f7xx_hal_conf_default.h + * @brief HAL default configuration file. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F7xx_HAL_CONF_DEFAULT_H +#define __STM32F7xx_HAL_CONF_DEFAULT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief Include the default list of modules to be used in the HAL driver + * and manage module deactivation + */ +#include "stm32yyxx_hal_conf.h" +#if 0 +/** + * @brief This is the list of modules to be used in the HAL driver + */ +#define HAL_MODULE_ENABLED +#define HAL_ADC_MODULE_ENABLED +#define HAL_CAN_MODULE_ENABLED +#define HAL_CAN_LEGACY_MODULE_ENABLED +#define HAL_CEC_MODULE_ENABLED +#define HAL_CRC_MODULE_ENABLED +#define HAL_CRYP_MODULE_ENABLED +#define HAL_DAC_MODULE_ENABLED +#define HAL_DCMI_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_DMA2D_MODULE_ENABLED +#define HAL_ETH_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_NAND_MODULE_ENABLED +#define HAL_NOR_MODULE_ENABLED +#define HAL_SRAM_MODULE_ENABLED +#define HAL_SDRAM_MODULE_ENABLED +#define HAL_HASH_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +#define HAL_I2C_MODULE_ENABLED +#define HAL_I2S_MODULE_ENABLED +#define HAL_IWDG_MODULE_ENABLED +#define HAL_LPTIM_MODULE_ENABLED +#define HAL_LTDC_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_QSPI_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +#define HAL_RNG_MODULE_ENABLED +#define HAL_RTC_MODULE_ENABLED +#define HAL_SAI_MODULE_ENABLED +#define HAL_SD_MODULE_ENABLED +#define HAL_SPDIFRX_MODULE_ENABLED +#define HAL_SPI_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +#define HAL_UART_MODULE_ENABLED +#define HAL_USART_MODULE_ENABLED +#define HAL_IRDA_MODULE_ENABLED +#define HAL_SMARTCARD_MODULE_ENABLED +#define HAL_WWDG_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +#define HAL_PCD_MODULE_ENABLED +#define HAL_HCD_MODULE_ENABLED +#define HAL_DFSDM_MODULE_ENABLED +#define HAL_DSI_MODULE_ENABLED +#define HAL_JPEG_MODULE_ENABLED +#define HAL_MDIOS_MODULE_ENABLED +#define HAL_SMBUS_MODULE_ENABLED +#define HAL_MMC_MODULE_ENABLED +#endif + +/* ########################## HSE/HSI Values adaptation ##################### */ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined (HSE_VALUE) +#define HSE_VALUE 25000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSE_STARTUP_TIMEOUT) +#define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined (HSI_VALUE) +#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/ +#endif /* HSI_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#if !defined (LSI_VALUE) +#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/ +#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz +The real value may vary depending on the variations +in voltage and temperature. */ +/** + * @brief External Low Speed oscillator (LSE) value. + */ +#if !defined (LSE_VALUE) +#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */ +#endif /* LSE_VALUE */ + +#if !defined (LSE_STARTUP_TIMEOUT) +#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +/** + * @brief External clock source for I2S peripheral + * This value is used by the I2S HAL module to compute the I2S clock source + * frequency, this source is inserted directly through I2S_CKIN pad. + */ +#if !defined (EXTERNAL_CLOCK_VALUE) +#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the Internal oscillator in Hz*/ +#endif /* EXTERNAL_CLOCK_VALUE */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#if !defined (VDD_VALUE) +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#endif +#if !defined (TICK_INT_PRIORITY) +#define TICK_INT_PRIORITY 0x00U /*!< tick interrupt priority */ +#endif +#if !defined (USE_RTOS) +#define USE_RTOS 0U +#endif +#if !defined (PREFETCH_ENABLE) +#define PREFETCH_ENABLE 1U /* To enable prefetch */ +#endif +#if !defined (ART_ACCLERATOR_ENABLE) +#define ART_ACCLERATOR_ENABLE 1U /* To enable ART Accelerator */ +#endif + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ +#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ +#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ +#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_JPEG_REGISTER_CALLBACKS 0U /* JPEG register callback disabled */ +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ +#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ +#define USE_HAL_MDIOS_REGISTER_CALLBACKS 0U /* MDIOS register callback disabled */ +#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ +#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ +#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ +/* #define USE_FULL_ASSERT 1 */ + +/* ################## Ethernet peripheral configuration ##################### */ + +/* Section 1 : Ethernet peripheral configuration */ + +/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ +#define MAC_ADDR0 2U +#define MAC_ADDR1 0U +#define MAC_ADDR2 0U +#define MAC_ADDR3 0U +#define MAC_ADDR4 0U +#define MAC_ADDR5 0U + +/* Definition of the Ethernet driver buffers size and count */ +#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ +#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ +#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ +#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ + +/* Section 2: PHY configuration section */ +/* LAN8742A PHY Address*/ +//////////////////////////////// +//#define LAN8742A_PHY_ADDRESS 0x00U +/* Section 2: PHY configuration section */ +#if !defined (LAN8742A_PHY_ADDRESS) + /* KH, LAN8742A PHY Address*/ + #define LAN8742A_PHY_ADDRESS 0x00U +#endif +//////////////////////////////// +/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ +#define PHY_RESET_DELAY 0x00000FFFU +/* PHY Configuration delay */ +#define PHY_CONFIG_DELAY 0x00000FFFU + +#define PHY_READ_TO 0x0000FFFFU +#define PHY_WRITE_TO 0x0000FFFFU + +/* Section 3: Common PHY Registers */ + +#define PHY_BCR ((uint16_t)0x00U) /*!< Transceiver Basic Control Register */ +#define PHY_BSR ((uint16_t)0x01U) /*!< Transceiver Basic Status Register */ + +#define PHY_RESET ((uint16_t)0x8000U) /*!< PHY Reset */ +#define PHY_LOOPBACK ((uint16_t)0x4000U) /*!< Select loop-back mode */ +#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100U) /*!< Set the full-duplex mode at 100 Mb/s */ +#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000U) /*!< Set the half-duplex mode at 100 Mb/s */ +#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100U) /*!< Set the full-duplex mode at 10 Mb/s */ +#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000U) /*!< Set the half-duplex mode at 10 Mb/s */ +#define PHY_AUTONEGOTIATION ((uint16_t)0x1000U) /*!< Enable auto-negotiation function */ +#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200U) /*!< Restart auto-negotiation function */ +#define PHY_POWERDOWN ((uint16_t)0x0800U) /*!< Select the power down mode */ +#define PHY_ISOLATE ((uint16_t)0x0400U) /*!< Isolate PHY from MII */ + +#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020U) /*!< Auto-Negotiation process completed */ +#define PHY_LINKED_STATUS ((uint16_t)0x0004U) /*!< Valid link established */ +#define PHY_JABBER_DETECTION ((uint16_t)0x0002U) /*!< Jabber condition detected */ + +/* Section 4: Extended PHY Registers */ + +#define PHY_SR ((uint16_t)0x1FU) /*!< PHY special control/ status register Offset */ + +#define PHY_SPEED_STATUS ((uint16_t)0x0004U) /*!< PHY Speed mask */ +#define PHY_DUPLEX_STATUS ((uint16_t)0x0010U) /*!< PHY Duplex mask */ + + +#define PHY_ISFR ((uint16_t)0x01DU) /*!< PHY Interrupt Source Flag register Offset */ +#define PHY_IMR ((uint16_t)0x001E) /*!< PHY Interrupt Mask register Offset */ +#define PHY_ISFR_INT4 ((uint16_t)0x0010U) /*!< PHY Link down inturrupt */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver +* Activated: CRC code is present inside driver +* Deactivated: CRC code cleaned from driver +*/ +#if !defined (USE_SPI_CRC) +#define USE_SPI_CRC 0U +#endif + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED +#include "stm32f7xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED +#include "stm32f7xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED +#include "stm32f7xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED +#include "stm32f7xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED +#include "stm32f7xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CAN_MODULE_ENABLED +#include "stm32f7xx_hal_can.h" +#endif /* HAL_CAN_MODULE_ENABLED */ + +#ifdef HAL_CAN_LEGACY_MODULE_ENABLED +#include "stm32f7xx_hal_can_legacy.h" +#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED +#include "stm32f7xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED +#include "stm32f7xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_CRYP_MODULE_ENABLED +#include "stm32f7xx_hal_cryp.h" +#endif /* HAL_CRYP_MODULE_ENABLED */ + +#ifdef HAL_DMA2D_MODULE_ENABLED +#include "stm32f7xx_hal_dma2d.h" +#endif /* HAL_DMA2D_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED +#include "stm32f7xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_DCMI_MODULE_ENABLED +#include "stm32f7xx_hal_dcmi.h" +#endif /* HAL_DCMI_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED +#include "stm32f7xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED +#include "stm32f7xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED +#include "stm32f7xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED +#include "stm32f7xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED +#include "stm32f7xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED +#include "stm32f7xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_SDRAM_MODULE_ENABLED +#include "stm32f7xx_hal_sdram.h" +#endif /* HAL_SDRAM_MODULE_ENABLED */ + +#ifdef HAL_HASH_MODULE_ENABLED +#include "stm32f7xx_hal_hash.h" +#endif /* HAL_HASH_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED +#include "stm32f7xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED +#include "stm32f7xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED +#include "stm32f7xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_LPTIM_MODULE_ENABLED +#include "stm32f7xx_hal_lptim.h" +#endif /* HAL_LPTIM_MODULE_ENABLED */ + +#ifdef HAL_LTDC_MODULE_ENABLED +#include "stm32f7xx_hal_ltdc.h" +#endif /* HAL_LTDC_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED +#include "stm32f7xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_QSPI_MODULE_ENABLED +#include "stm32f7xx_hal_qspi.h" +#endif /* HAL_QSPI_MODULE_ENABLED */ + +#ifdef HAL_RNG_MODULE_ENABLED +#include "stm32f7xx_hal_rng.h" +#endif /* HAL_RNG_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED +#include "stm32f7xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SAI_MODULE_ENABLED +#include "stm32f7xx_hal_sai.h" +#endif /* HAL_SAI_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED +#include "stm32f7xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_SPDIFRX_MODULE_ENABLED +#include "stm32f7xx_hal_spdifrx.h" +#endif /* HAL_SPDIFRX_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED +#include "stm32f7xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED +#include "stm32f7xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED +#include "stm32f7xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED +#include "stm32f7xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED +#include "stm32f7xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED +#include "stm32f7xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED +#include "stm32f7xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED +#include "stm32f7xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED +#include "stm32f7xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_DFSDM_MODULE_ENABLED +#include "stm32f7xx_hal_dfsdm.h" +#endif /* HAL_DFSDM_MODULE_ENABLED */ + +#ifdef HAL_DSI_MODULE_ENABLED +#include "stm32f7xx_hal_dsi.h" +#endif /* HAL_DSI_MODULE_ENABLED */ + +#ifdef HAL_JPEG_MODULE_ENABLED +#include "stm32f7xx_hal_jpeg.h" +#endif /* HAL_JPEG_MODULE_ENABLED */ + +#ifdef HAL_MDIOS_MODULE_ENABLED +#include "stm32f7xx_hal_mdios.h" +#endif /* HAL_MDIOS_MODULE_ENABLED */ + +#ifdef HAL_SMBUS_MODULE_ENABLED +#include "stm32f7xx_hal_smbus.h" +#endif /* HAL_SMBUS_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED +#include "stm32f7xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ +#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ +void assert_failed(uint8_t *file, uint32_t line); +#else +#define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F7xx_HAL_CONF_DEFAULT_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.1.0/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.1.0/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.h new file mode 100644 index 0000000..e8eaf79 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.1.0/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.h @@ -0,0 +1,274 @@ +/* + ******************************************************************************* + * Copyright (c) 2020-2021, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* +*/ +#pragma once + +/*---------------------------------------------------------------------------- + * Pins + *----------------------------------------------------------------------------*/ + +#define PG9 0 +#define PG14 1 +#define PF15 2 +#define PE13 3 +#define PF14 4 +#define PE11 5 +#define PE9 6 +#define PF13 7 +#define PF12 8 +#define PD15 9 +#define PD14 10 +#define PA7 PIN_A10 +#define PA6 PIN_A11 +#define PA5 PIN_A12 +#define PB9 14 +#define PB8 15 +#define PC6 16 +#define PB15 17 +#define PB13 18 +#define PB12 19 +#define PA15 20 +#define PC7 21 +#define PB5 22 +#define PB3 23 +#define PA4 PIN_A13 +#define PB4 25 +#define PB6 26 +#define PB2 27 +#define PD13 28 +#define PD12 29 +#define PD11 30 +#define PE2 31 +#define PA0 PIN_A14 +#define PB0 PIN_A23 // LED_GREEN +#define PE0 34 +#define PB11 35 +#define PB10 36 +#define PE15 37 +#define PE14 38 +#define PE12 39 +#define PE10 40 +#define PE7 41 +#define PE8 42 +#define PC8 43 +#define PC9 44 +#define PC10 45 +#define PC11 46 +#define PC12 47 +#define PD2 48 +#define PG2 49 +#define PG3 50 +#define PD7 51 +#define PD6 52 +#define PD5 53 +#define PD4 54 +#define PD3 55 +// 56 is PE2 (31) +#define PE4 57 +#define PE5 58 +#define PE6 59 +#define PE3 60 +#define PF8 PIN_A15 +#define PF7 PIN_A16 +#define PF9 PIN_A17 +#define PG1 64 +#define PG0 65 +#define PD1 66 +#define PD0 67 +#define PF0 68 +#define PF1 69 +#define PF2 70 +// 71 is PA7 (11) +// 72 is NC +#define PB7 73 // LED_BLUE +#define PB14 74 // LED_RED +#define PC13 75 // USER_BTN +#define PD9 76 // Serial Rx +#define PD8 77 // Serial Tx +#define PA3 PIN_A0 +#define PC0 PIN_A1 +#define PC3 PIN_A2 +#define PF3 PIN_A3 +#define PF5 PIN_A4 +#define PF10 PIN_A5 +#define PB1 PIN_A6 +#define PC2 PIN_A7 +#define PF4 PIN_A8 +#define PF6 PIN_A9 +// ST Morpho +#define PA1 PIN_A18 +#define PA2 PIN_A19 +#define PA8 90 +#define PA9 91 +#define PA10 92 +#define PA11 93 +#define PA12 94 +#define PA13 95 // SWD +#define PA14 96 // SWD +#define PC1 PIN_A20 +#define PC4 PIN_A21 +#define PC5 PIN_A22 +#define PC14 100 +#define PC15 101 +#define PD10 102 +#define PE1 103 +#define PF11 104 +#define PG4 105 +#define PG5 106 +#define PG6 107 +#define PG7 108 +#define PG8 109 +#define PG10 110 +#define PG11 111 +#define PG12 112 +#define PG13 113 +#define PG15 114 +#define PH0 115 // MCO +#define PH1 116 + +// Alternate pins number +#define PA0_ALT1 (PA0 | ALT1) +#define PA0_ALT2 (PA0 | ALT2) +#define PA1_ALT1 (PA1 | ALT1) +#define PA1_ALT2 (PA1 | ALT2) +#define PA2_ALT1 (PA2 | ALT1) +#define PA2_ALT2 (PA2 | ALT2) +#define PA3_ALT1 (PA3 | ALT1) +#define PA3_ALT2 (PA3 | ALT2) +#define PA4_ALT1 (PA4 | ALT1) +#define PA5_ALT1 (PA5 | ALT1) +#define PA6_ALT1 (PA6 | ALT1) +#define PA7_ALT1 (PA7 | ALT1) +#define PA7_ALT2 (PA7 | ALT2) +#define PA7_ALT3 (PA7 | ALT3) +#define PA15_ALT1 (PA15 | ALT1) +#define PB0_ALT1 (PB0 | ALT1) +#define PB0_ALT2 (PB0 | ALT2) +#define PB1_ALT1 (PB1 | ALT1) +#define PB1_ALT2 (PB1 | ALT2) +#define PB3_ALT1 (PB3 | ALT1) +#define PB4_ALT1 (PB4 | ALT1) +#define PB5_ALT1 (PB5 | ALT1) +#define PB8_ALT1 (PB8 | ALT1) +#define PB9_ALT1 (PB9 | ALT1) +#define PB14_ALT1 (PB14 | ALT1) +#define PB14_ALT2 (PB14 | ALT2) +#define PB15_ALT1 (PB15 | ALT1) +#define PB15_ALT2 (PB15 | ALT2) +#define PC0_ALT1 (PC0 | ALT1) +#define PC0_ALT2 (PC0 | ALT2) +#define PC1_ALT1 (PC1 | ALT1) +#define PC1_ALT2 (PC1 | ALT2) +#define PC2_ALT1 (PC2 | ALT1) +#define PC2_ALT2 (PC2 | ALT2) +#define PC3_ALT1 (PC3 | ALT1) +#define PC3_ALT2 (PC3 | ALT2) +#define PC4_ALT1 (PC4 | ALT1) +#define PC5_ALT1 (PC5 | ALT1) +#define PC6_ALT1 (PC6 | ALT1) +#define PC7_ALT1 (PC7 | ALT1) +#define PC8_ALT1 (PC8 | ALT1) +#define PC9_ALT1 (PC9 | ALT1) +#define PC10_ALT1 (PC10 | ALT1) +#define PC11_ALT1 (PC11 | ALT1) + +// This must be a literal +#define NUM_DIGITAL_PINS 117 +// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS +#define NUM_ANALOG_INPUTS 24 + +// On-board LED pin number +#ifndef LED_BUILTIN + #define LED_BUILTIN PB0 +#endif +#define LED_GREEN LED_BUILTIN +#define LED_BLUE PB7 +#define LED_RED PB14 + +// On-board user button +#ifndef USER_BTN + #define USER_BTN PC13 +#endif + +// Timer Definitions +// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin +#ifndef TIMER_TONE + #define TIMER_TONE TIM6 +#endif +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM7 +#endif + +// UART Definitions +#ifndef SERIAL_UART_INSTANCE + #define SERIAL_UART_INSTANCE 3 //Connected to ST-Link +#endif +// Serial pin used for console (ex: stlink) +// Rerquired by Firmata +#ifndef PIN_SERIAL_RX + #define PIN_SERIAL_RX PD9 +#endif +#ifndef PIN_SERIAL_TX + #define PIN_SERIAL_TX PD8 +#endif + +// Value of the External oscillator in Hz +#define HSE_VALUE 8000000U + +/* Extra HAL modules */ +#if !defined(HAL_DAC_MODULE_DISABLED) + #define HAL_DAC_MODULE_ENABLED +#endif +#if !defined(HAL_ETH_MODULE_DISABLED) + #define HAL_ETH_MODULE_ENABLED +#endif +#if !defined(HAL_QSPI_MODULE_DISABLED) + #define HAL_QSPI_MODULE_ENABLED +#endif +#if !defined(HAL_SD_MODULE_DISABLED) + #define HAL_SD_MODULE_ENABLED +#endif + +// Last Flash sector used for EEPROM emulation, address/sector depends on single/dual bank configuration. +// By default 2MB single bank +#define FLASH_BASE_ADDRESS 0x081C0000 +#define FLASH_DATA_SECTOR 11 + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #ifndef SERIAL_PORT_MONITOR + #define SERIAL_PORT_MONITOR Serial + #endif + #ifndef SERIAL_PORT_HARDWARE + // KH mod to add Serial1, for ESP-AT + //#define SERIAL_PORT_HARDWARE Serial + #define SERIAL_PORT_HARDWARE Serial1 + #endif +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.1.0/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/variant_generic.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.1.0/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/variant_generic.h new file mode 100644 index 0000000..43ba241 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.1.0/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/variant_generic.h @@ -0,0 +1,173 @@ +/* + ******************************************************************************* + * Copyright (c) 2020-2021, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + */ +#pragma once + +/*---------------------------------------------------------------------------- + * STM32 pins number + *----------------------------------------------------------------------------*/ +#define PA0 PIN_A0 +#define PA1 PIN_A1 +#define PA2 PIN_A2 +#define PA3 PIN_A3 +#define PA4 PIN_A4 +#define PA5 PIN_A5 +#define PA6 PIN_A6 +#define PA7 PIN_A7 +#define PA8 8 +#define PA9 9 +#define PA10 10 +#define PA11 11 +#define PA12 12 +#define PA13 13 +#define PA14 14 +#define PA15 15 +#define PB0 PIN_A8 +#define PB1 PIN_A9 +#define PB2 18 +#define PB3 19 +#define PB4 20 +#define PB5 21 +#define PB6 22 +#define PB7 23 +#define PB8 24 +#define PB9 25 +#define PB10 26 +#define PB11 27 +#define PB12 28 +#define PB13 29 +#define PB14 30 +#define PB15 31 +#define PC0 PIN_A10 +#define PC1 PIN_A11 +#define PC2 PIN_A12 +#define PC4 PIN_A13 +#define PC5 PIN_A14 +#define PC6 37 +#define PC7 38 +#define PC8 39 +#define PC9 40 +#define PC10 41 +#define PC11 42 +#define PC12 43 +#define PC13 44 +#define PC14 45 +#define PC15 46 +#define PD2 47 +#define PH0 48 +#define PH1 49 + +// Alternate pins number +#define PA2_ALT1 (PA2 | ALT1) +#define PA3_ALT1 (PA3 | ALT1) + +#define NUM_DIGITAL_PINS 50 +#define NUM_ANALOG_INPUTS 15 + +// On-board LED pin number +#ifndef LED_BUILTIN + #define LED_BUILTIN PNUM_NOT_DEFINED +#endif + +// On-board user button +#ifndef USER_BTN + #define USER_BTN PNUM_NOT_DEFINED +#endif + +// SPI definitions +#ifndef PIN_SPI_SS + #define PIN_SPI_SS PA4 +#endif +#ifndef PIN_SPI_SS1 + #define PIN_SPI_SS1 PA15 +#endif +#ifndef PIN_SPI_SS2 + #define PIN_SPI_SS2 PNUM_NOT_DEFINED +#endif +#ifndef PIN_SPI_SS3 + #define PIN_SPI_SS3 PNUM_NOT_DEFINED +#endif +#ifndef PIN_SPI_MOSI + #define PIN_SPI_MOSI PA7 +#endif +#ifndef PIN_SPI_MISO + #define PIN_SPI_MISO PA6 +#endif +#ifndef PIN_SPI_SCK + #define PIN_SPI_SCK PA5 +#endif + +// I2C definitions +#ifndef PIN_WIRE_SDA + #define PIN_WIRE_SDA PB7 +#endif +#ifndef PIN_WIRE_SCL + #define PIN_WIRE_SCL PB6 +#endif + +// Timer Definitions +// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin +#ifndef TIMER_TONE + #define TIMER_TONE TIM6 +#endif +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM21 +#endif + +// UART Definitions +#ifndef SERIAL_UART_INSTANCE + #define SERIAL_UART_INSTANCE 2 +#endif + +// Default pin used for generic 'Serial' instance +// Mandatory for Firmata +#ifndef PIN_SERIAL_RX + #define PIN_SERIAL_RX PA3 +#endif +#ifndef PIN_SERIAL_TX + #define PIN_SERIAL_TX PA2 +#endif + +// Extra HAL modules +#if !defined(HAL_DAC_MODULE_DISABLED) + #define HAL_DAC_MODULE_ENABLED +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #ifndef SERIAL_PORT_MONITOR + #define SERIAL_PORT_MONITOR Serial + #endif + #ifndef SERIAL_PORT_HARDWARE + // KH mod to add Serial1, for ESP-AT + //#define SERIAL_PORT_HARDWARE Serial + #define SERIAL_PORT_HARDWARE Serial1 + #endif +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.2.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.2.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h new file mode 100644 index 0000000..ec7da13 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.2.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h @@ -0,0 +1,519 @@ +/** + ****************************************************************************** + * @file stm32f4xx_hal_conf_default.h + * @brief HAL default configuration file. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F4xx_HAL_CONF_DEFAULT_H +#define __STM32F4xx_HAL_CONF_DEFAULT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief Include the default list of modules to be used in the HAL driver + * and manage module deactivation + */ +#include "stm32yyxx_hal_conf.h" +#if 0 +/** + * @brief This is the list of modules to be used in the HAL driver + */ +#define HAL_MODULE_ENABLED +#define HAL_ADC_MODULE_ENABLED +#define HAL_CAN_MODULE_ENABLED +/*#define HAL_CAN_LEGACY_MODULE_ENABLED*/ +#define HAL_CRC_MODULE_ENABLED +#define HAL_CEC_MODULE_ENABLED +#define HAL_CRYP_MODULE_ENABLED +#define HAL_DAC_MODULE_ENABLED +#define HAL_DCMI_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_DMA2D_MODULE_ENABLED +#define HAL_ETH_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_NAND_MODULE_ENABLED +#define HAL_NOR_MODULE_ENABLED +#define HAL_PCCARD_MODULE_ENABLED +#define HAL_SRAM_MODULE_ENABLED +#define HAL_SDRAM_MODULE_ENABLED +#define HAL_HASH_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED +#define HAL_I2C_MODULE_ENABLED +#define HAL_SMBUS_MODULE_ENABLED +#define HAL_I2S_MODULE_ENABLED +#define HAL_IWDG_MODULE_ENABLED +#define HAL_LTDC_MODULE_ENABLED +#define HAL_DSI_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_QSPI_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +#define HAL_RNG_MODULE_ENABLED +#define HAL_RTC_MODULE_ENABLED +#define HAL_SAI_MODULE_ENABLED +#define HAL_SD_MODULE_ENABLED +#define HAL_SPI_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +#define HAL_UART_MODULE_ENABLED +#define HAL_USART_MODULE_ENABLED +#define HAL_IRDA_MODULE_ENABLED +#define HAL_SMARTCARD_MODULE_ENABLED +#define HAL_WWDG_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +#define HAL_PCD_MODULE_ENABLED +#define HAL_HCD_MODULE_ENABLED +#define HAL_FMPI2C_MODULE_ENABLED +#define HAL_FMPSMBUS_MODULE_ENABLED +#define HAL_SPDIFRX_MODULE_ENABLED +#define HAL_DFSDM_MODULE_ENABLED +#define HAL_LPTIM_MODULE_ENABLED +#define HAL_MMC_MODULE_ENABLED +#endif + +/* ########################## HSE/HSI Values adaptation ##################### */ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined (HSE_VALUE) +#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSE_STARTUP_TIMEOUT) +#define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined (HSI_VALUE) +#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz */ +#endif /* HSI_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#if !defined (LSI_VALUE) +#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz */ +#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz +The real value may vary depending on the variations +in voltage and temperature. */ +/** + * @brief External Low Speed oscillator (LSE) value. + */ +#if !defined (LSE_VALUE) +#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */ +#endif /* LSE_VALUE */ + +#if !defined (LSE_STARTUP_TIMEOUT) +#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +/** + * @brief External clock source for I2S peripheral + * This value is used by the I2S HAL module to compute the I2S clock source + * frequency, this source is inserted directly through I2S_CKIN pad. + */ +#if !defined (EXTERNAL_CLOCK_VALUE) +#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External oscillator in Hz*/ +#endif /* EXTERNAL_CLOCK_VALUE */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#if !defined (VDD_VALUE) +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#endif +#if !defined (TICK_INT_PRIORITY) +#define TICK_INT_PRIORITY 0x00U /*!< tick interrupt priority */ +#endif +#if !defined (USE_RTOS) +#define USE_RTOS 0U +#endif +#if !defined (PREFETCH_ENABLE) +#define PREFETCH_ENABLE 1U +#endif +#if !defined (INSTRUCTION_CACHE_ENABLE) +#define INSTRUCTION_CACHE_ENABLE 1U +#endif +#if !defined (DATA_CACHE_ENABLE) +#define DATA_CACHE_ENABLE 1U +#endif + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ +#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ +#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ +#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_FMPI2C_REGISTER_CALLBACKS 0U /* FMPI2C register callback disabled */ +#define USE_HAL_FMPSMBUS_REGISTER_CALLBACKS 0U /* FMPSMBUS register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ +#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ +#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ +#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ +#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ +/* #define USE_FULL_ASSERT 1U */ + +/* ################## Ethernet peripheral configuration ##################### */ + +/* Section 1 : Ethernet peripheral configuration */ + +/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ +#define MAC_ADDR0 2U +#define MAC_ADDR1 0U +#define MAC_ADDR2 0U +#define MAC_ADDR3 0U +#define MAC_ADDR4 0U +#define MAC_ADDR5 0U + +/* Definition of the Ethernet driver buffers size and count */ +#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ +#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ +#define ETH_RXBUFNB (5U) /* 5 Rx buffers of size ETH_RX_BUF_SIZE */ +#define ETH_TXBUFNB (5U) /* 5 Tx buffers of size ETH_TX_BUF_SIZE */ + +/* Section 2: PHY configuration section */ +/* LAN8742A PHY Address*/ +//////////////////////////////// +//#define LAN8742A_PHY_ADDRESS 0x00U +/* Section 2: PHY configuration section */ +#if !defined (LAN8742A_PHY_ADDRESS) + /* KH, LAN8742A PHY Address*/ + #define LAN8742A_PHY_ADDRESS 0x00U +#endif +//////////////////////////////// +/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ +#define PHY_RESET_DELAY 0x000000FFU +/* PHY Configuration delay */ +#define PHY_CONFIG_DELAY 0x00000FFFU + +#define PHY_READ_TO 0x0000FFFFU +#define PHY_WRITE_TO 0x0000FFFFU + +/* Section 3: Common PHY Registers */ + +#define PHY_BCR ((uint16_t)0x0000) /*!< Transceiver Basic Control Register */ +#define PHY_BSR ((uint16_t)0x0001) /*!< Transceiver Basic Status Register */ + +#define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */ +#define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */ +#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */ +#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */ +#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */ +#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */ +#define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */ +#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */ +#define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */ +#define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */ + +#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */ +#define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */ +#define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */ + +/* Section 4: Extended PHY Registers */ + +#define PHY_SR ((uint16_t)0x1F) /*!< PHY special control/ status register Offset */ + +#define PHY_SPEED_STATUS ((uint16_t)0x0004) /*!< PHY Speed mask */ +#define PHY_DUPLEX_STATUS ((uint16_t)0x0010) /*!< PHY Duplex mask */ + + +#define PHY_ISFR ((uint16_t)0x1D) /*!< PHY Interrupt Source Flag register Offset */ +#define PHY_IMR ((uint16_t)0x1E) /*!< PHY Interrupt Mask register Offset */ +#define PHY_ISFR_INT4 ((uint16_t)0x0010) /*!< PHY Link down inturrupt */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver +* Activated: CRC code is present inside driver +* Deactivated: CRC code cleaned from driver +*/ +#if !defined (USE_SPI_CRC) +#define USE_SPI_CRC 0U +#endif + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED +#include "stm32f4xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED +#include "stm32f4xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED +#include "stm32f4xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED +#include "stm32f4xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED +#include "stm32f4xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED +#include "stm32f4xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CAN_MODULE_ENABLED +#include "stm32f4xx_hal_can.h" +#endif /* HAL_CAN_MODULE_ENABLED */ + +#ifdef HAL_CAN_LEGACY_MODULE_ENABLED +#include "stm32f4xx_hal_can_legacy.h" +#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED +#include "stm32f4xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_CRYP_MODULE_ENABLED +#include "stm32f4xx_hal_cryp.h" +#endif /* HAL_CRYP_MODULE_ENABLED */ + +#ifdef HAL_DMA2D_MODULE_ENABLED +#include "stm32f4xx_hal_dma2d.h" +#endif /* HAL_DMA2D_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED +#include "stm32f4xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_DCMI_MODULE_ENABLED +#include "stm32f4xx_hal_dcmi.h" +#endif /* HAL_DCMI_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED +#include "stm32f4xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED +#include "stm32f4xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED +#include "stm32f4xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED +#include "stm32f4xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED +#include "stm32f4xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_PCCARD_MODULE_ENABLED +#include "stm32f4xx_hal_pccard.h" +#endif /* HAL_PCCARD_MODULE_ENABLED */ + +#ifdef HAL_SDRAM_MODULE_ENABLED +#include "stm32f4xx_hal_sdram.h" +#endif /* HAL_SDRAM_MODULE_ENABLED */ + +#ifdef HAL_HASH_MODULE_ENABLED +#include "stm32f4xx_hal_hash.h" +#endif /* HAL_HASH_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED +#include "stm32f4xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_SMBUS_MODULE_ENABLED +#include "stm32f4xx_hal_smbus.h" +#endif /* HAL_SMBUS_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED +#include "stm32f4xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED +#include "stm32f4xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_LTDC_MODULE_ENABLED +#include "stm32f4xx_hal_ltdc.h" +#endif /* HAL_LTDC_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED +#include "stm32f4xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_RNG_MODULE_ENABLED +#include "stm32f4xx_hal_rng.h" +#endif /* HAL_RNG_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED +#include "stm32f4xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SAI_MODULE_ENABLED +#include "stm32f4xx_hal_sai.h" +#endif /* HAL_SAI_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED +#include "stm32f4xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED +#include "stm32f4xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED +#include "stm32f4xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED +#include "stm32f4xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED +#include "stm32f4xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED +#include "stm32f4xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED +#include "stm32f4xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED +#include "stm32f4xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED +#include "stm32f4xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED +#include "stm32f4xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_DSI_MODULE_ENABLED +#include "stm32f4xx_hal_dsi.h" +#endif /* HAL_DSI_MODULE_ENABLED */ + +#ifdef HAL_QSPI_MODULE_ENABLED +#include "stm32f4xx_hal_qspi.h" +#endif /* HAL_QSPI_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED +#include "stm32f4xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_FMPI2C_MODULE_ENABLED +#include "stm32f4xx_hal_fmpi2c.h" +#endif /* HAL_FMPI2C_MODULE_ENABLED */ + +#ifdef HAL_FMPSMBUS_MODULE_ENABLED +#include "stm32f4xx_hal_fmpsmbus.h" +#endif /* HAL_FMPSMBUS_MODULE_ENABLED */ + +#ifdef HAL_SPDIFRX_MODULE_ENABLED +#include "stm32f4xx_hal_spdifrx.h" +#endif /* HAL_SPDIFRX_MODULE_ENABLED */ + +#ifdef HAL_DFSDM_MODULE_ENABLED +#include "stm32f4xx_hal_dfsdm.h" +#endif /* HAL_DFSDM_MODULE_ENABLED */ + +#ifdef HAL_LPTIM_MODULE_ENABLED +#include "stm32f4xx_hal_lptim.h" +#endif /* HAL_LPTIM_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED +#include "stm32f4xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ +#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ +void assert_failed(uint8_t *file, uint32_t line); +#else +#define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F4xx_HAL_CONF_DEFAULT_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.2.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.2.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h new file mode 100644 index 0000000..3bcd06c --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.2.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h @@ -0,0 +1,511 @@ +/** + ****************************************************************************** + * @file stm32f7xx_hal_conf_default.h + * @brief HAL default configuration file. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F7xx_HAL_CONF_DEFAULT_H +#define __STM32F7xx_HAL_CONF_DEFAULT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief Include the default list of modules to be used in the HAL driver + * and manage module deactivation + */ +#include "stm32yyxx_hal_conf.h" +#if 0 +/** + * @brief This is the list of modules to be used in the HAL driver + */ +#define HAL_MODULE_ENABLED +#define HAL_ADC_MODULE_ENABLED +#define HAL_CAN_MODULE_ENABLED +#define HAL_CAN_LEGACY_MODULE_ENABLED +#define HAL_CEC_MODULE_ENABLED +#define HAL_CRC_MODULE_ENABLED +#define HAL_CRYP_MODULE_ENABLED +#define HAL_DAC_MODULE_ENABLED +#define HAL_DCMI_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_DMA2D_MODULE_ENABLED +#define HAL_ETH_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_NAND_MODULE_ENABLED +#define HAL_NOR_MODULE_ENABLED +#define HAL_SRAM_MODULE_ENABLED +#define HAL_SDRAM_MODULE_ENABLED +#define HAL_HASH_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +#define HAL_I2C_MODULE_ENABLED +#define HAL_I2S_MODULE_ENABLED +#define HAL_IWDG_MODULE_ENABLED +#define HAL_LPTIM_MODULE_ENABLED +#define HAL_LTDC_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_QSPI_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +#define HAL_RNG_MODULE_ENABLED +#define HAL_RTC_MODULE_ENABLED +#define HAL_SAI_MODULE_ENABLED +#define HAL_SD_MODULE_ENABLED +#define HAL_SPDIFRX_MODULE_ENABLED +#define HAL_SPI_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +#define HAL_UART_MODULE_ENABLED +#define HAL_USART_MODULE_ENABLED +#define HAL_IRDA_MODULE_ENABLED +#define HAL_SMARTCARD_MODULE_ENABLED +#define HAL_WWDG_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +#define HAL_PCD_MODULE_ENABLED +#define HAL_HCD_MODULE_ENABLED +#define HAL_DFSDM_MODULE_ENABLED +#define HAL_DSI_MODULE_ENABLED +#define HAL_JPEG_MODULE_ENABLED +#define HAL_MDIOS_MODULE_ENABLED +#define HAL_SMBUS_MODULE_ENABLED +#define HAL_MMC_MODULE_ENABLED +#endif + +/* ########################## HSE/HSI Values adaptation ##################### */ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined (HSE_VALUE) +#define HSE_VALUE 25000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSE_STARTUP_TIMEOUT) +#define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined (HSI_VALUE) +#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/ +#endif /* HSI_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#if !defined (LSI_VALUE) +#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/ +#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz +The real value may vary depending on the variations +in voltage and temperature. */ +/** + * @brief External Low Speed oscillator (LSE) value. + */ +#if !defined (LSE_VALUE) +#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */ +#endif /* LSE_VALUE */ + +#if !defined (LSE_STARTUP_TIMEOUT) +#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +/** + * @brief External clock source for I2S peripheral + * This value is used by the I2S HAL module to compute the I2S clock source + * frequency, this source is inserted directly through I2S_CKIN pad. + */ +#if !defined (EXTERNAL_CLOCK_VALUE) +#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the Internal oscillator in Hz*/ +#endif /* EXTERNAL_CLOCK_VALUE */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#if !defined (VDD_VALUE) +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#endif +#if !defined (TICK_INT_PRIORITY) +#define TICK_INT_PRIORITY 0x00U /*!< tick interrupt priority */ +#endif +#if !defined (USE_RTOS) +#define USE_RTOS 0U +#endif +#if !defined (PREFETCH_ENABLE) +#define PREFETCH_ENABLE 1U /* To enable prefetch */ +#endif +#if !defined (ART_ACCLERATOR_ENABLE) +#define ART_ACCLERATOR_ENABLE 1U /* To enable ART Accelerator */ +#endif + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ +#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ +#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ +#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_JPEG_REGISTER_CALLBACKS 0U /* JPEG register callback disabled */ +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ +#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ +#define USE_HAL_MDIOS_REGISTER_CALLBACKS 0U /* MDIOS register callback disabled */ +#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ +#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ +#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ +/* #define USE_FULL_ASSERT 1 */ + +/* ################## Ethernet peripheral configuration ##################### */ + +/* Section 1 : Ethernet peripheral configuration */ + +/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ +#define MAC_ADDR0 2U +#define MAC_ADDR1 0U +#define MAC_ADDR2 0U +#define MAC_ADDR3 0U +#define MAC_ADDR4 0U +#define MAC_ADDR5 0U + +/* Definition of the Ethernet driver buffers size and count */ +#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ +#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ +#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ +#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ + +/* Section 2: PHY configuration section */ +/* LAN8742A PHY Address*/ +//////////////////////////////// +//#define LAN8742A_PHY_ADDRESS 0x00U +/* Section 2: PHY configuration section */ +#if !defined (LAN8742A_PHY_ADDRESS) + /* KH, LAN8742A PHY Address*/ + #define LAN8742A_PHY_ADDRESS 0x00U +#endif +//////////////////////////////// +/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ +#define PHY_RESET_DELAY 0x00000FFFU +/* PHY Configuration delay */ +#define PHY_CONFIG_DELAY 0x00000FFFU + +#define PHY_READ_TO 0x0000FFFFU +#define PHY_WRITE_TO 0x0000FFFFU + +/* Section 3: Common PHY Registers */ + +#define PHY_BCR ((uint16_t)0x00U) /*!< Transceiver Basic Control Register */ +#define PHY_BSR ((uint16_t)0x01U) /*!< Transceiver Basic Status Register */ + +#define PHY_RESET ((uint16_t)0x8000U) /*!< PHY Reset */ +#define PHY_LOOPBACK ((uint16_t)0x4000U) /*!< Select loop-back mode */ +#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100U) /*!< Set the full-duplex mode at 100 Mb/s */ +#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000U) /*!< Set the half-duplex mode at 100 Mb/s */ +#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100U) /*!< Set the full-duplex mode at 10 Mb/s */ +#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000U) /*!< Set the half-duplex mode at 10 Mb/s */ +#define PHY_AUTONEGOTIATION ((uint16_t)0x1000U) /*!< Enable auto-negotiation function */ +#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200U) /*!< Restart auto-negotiation function */ +#define PHY_POWERDOWN ((uint16_t)0x0800U) /*!< Select the power down mode */ +#define PHY_ISOLATE ((uint16_t)0x0400U) /*!< Isolate PHY from MII */ + +#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020U) /*!< Auto-Negotiation process completed */ +#define PHY_LINKED_STATUS ((uint16_t)0x0004U) /*!< Valid link established */ +#define PHY_JABBER_DETECTION ((uint16_t)0x0002U) /*!< Jabber condition detected */ + +/* Section 4: Extended PHY Registers */ + +#define PHY_SR ((uint16_t)0x1FU) /*!< PHY special control/ status register Offset */ + +#define PHY_SPEED_STATUS ((uint16_t)0x0004U) /*!< PHY Speed mask */ +#define PHY_DUPLEX_STATUS ((uint16_t)0x0010U) /*!< PHY Duplex mask */ + + +#define PHY_ISFR ((uint16_t)0x01DU) /*!< PHY Interrupt Source Flag register Offset */ +#define PHY_IMR ((uint16_t)0x001E) /*!< PHY Interrupt Mask register Offset */ +#define PHY_ISFR_INT4 ((uint16_t)0x0010U) /*!< PHY Link down inturrupt */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver +* Activated: CRC code is present inside driver +* Deactivated: CRC code cleaned from driver +*/ +#if !defined (USE_SPI_CRC) +#define USE_SPI_CRC 0U +#endif + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED +#include "stm32f7xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED +#include "stm32f7xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED +#include "stm32f7xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED +#include "stm32f7xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED +#include "stm32f7xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CAN_MODULE_ENABLED +#include "stm32f7xx_hal_can.h" +#endif /* HAL_CAN_MODULE_ENABLED */ + +#ifdef HAL_CAN_LEGACY_MODULE_ENABLED +#include "stm32f7xx_hal_can_legacy.h" +#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED +#include "stm32f7xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED +#include "stm32f7xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_CRYP_MODULE_ENABLED +#include "stm32f7xx_hal_cryp.h" +#endif /* HAL_CRYP_MODULE_ENABLED */ + +#ifdef HAL_DMA2D_MODULE_ENABLED +#include "stm32f7xx_hal_dma2d.h" +#endif /* HAL_DMA2D_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED +#include "stm32f7xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_DCMI_MODULE_ENABLED +#include "stm32f7xx_hal_dcmi.h" +#endif /* HAL_DCMI_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED +#include "stm32f7xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED +#include "stm32f7xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED +#include "stm32f7xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED +#include "stm32f7xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED +#include "stm32f7xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED +#include "stm32f7xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_SDRAM_MODULE_ENABLED +#include "stm32f7xx_hal_sdram.h" +#endif /* HAL_SDRAM_MODULE_ENABLED */ + +#ifdef HAL_HASH_MODULE_ENABLED +#include "stm32f7xx_hal_hash.h" +#endif /* HAL_HASH_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED +#include "stm32f7xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED +#include "stm32f7xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED +#include "stm32f7xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_LPTIM_MODULE_ENABLED +#include "stm32f7xx_hal_lptim.h" +#endif /* HAL_LPTIM_MODULE_ENABLED */ + +#ifdef HAL_LTDC_MODULE_ENABLED +#include "stm32f7xx_hal_ltdc.h" +#endif /* HAL_LTDC_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED +#include "stm32f7xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_QSPI_MODULE_ENABLED +#include "stm32f7xx_hal_qspi.h" +#endif /* HAL_QSPI_MODULE_ENABLED */ + +#ifdef HAL_RNG_MODULE_ENABLED +#include "stm32f7xx_hal_rng.h" +#endif /* HAL_RNG_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED +#include "stm32f7xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SAI_MODULE_ENABLED +#include "stm32f7xx_hal_sai.h" +#endif /* HAL_SAI_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED +#include "stm32f7xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_SPDIFRX_MODULE_ENABLED +#include "stm32f7xx_hal_spdifrx.h" +#endif /* HAL_SPDIFRX_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED +#include "stm32f7xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED +#include "stm32f7xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED +#include "stm32f7xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED +#include "stm32f7xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED +#include "stm32f7xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED +#include "stm32f7xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED +#include "stm32f7xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED +#include "stm32f7xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED +#include "stm32f7xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_DFSDM_MODULE_ENABLED +#include "stm32f7xx_hal_dfsdm.h" +#endif /* HAL_DFSDM_MODULE_ENABLED */ + +#ifdef HAL_DSI_MODULE_ENABLED +#include "stm32f7xx_hal_dsi.h" +#endif /* HAL_DSI_MODULE_ENABLED */ + +#ifdef HAL_JPEG_MODULE_ENABLED +#include "stm32f7xx_hal_jpeg.h" +#endif /* HAL_JPEG_MODULE_ENABLED */ + +#ifdef HAL_MDIOS_MODULE_ENABLED +#include "stm32f7xx_hal_mdios.h" +#endif /* HAL_MDIOS_MODULE_ENABLED */ + +#ifdef HAL_SMBUS_MODULE_ENABLED +#include "stm32f7xx_hal_smbus.h" +#endif /* HAL_SMBUS_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED +#include "stm32f7xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ +#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ +void assert_failed(uint8_t *file, uint32_t line); +#else +#define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F7xx_HAL_CONF_DEFAULT_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.2.0/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.2.0/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.h new file mode 100644 index 0000000..e8eaf79 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.2.0/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.h @@ -0,0 +1,274 @@ +/* + ******************************************************************************* + * Copyright (c) 2020-2021, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* +*/ +#pragma once + +/*---------------------------------------------------------------------------- + * Pins + *----------------------------------------------------------------------------*/ + +#define PG9 0 +#define PG14 1 +#define PF15 2 +#define PE13 3 +#define PF14 4 +#define PE11 5 +#define PE9 6 +#define PF13 7 +#define PF12 8 +#define PD15 9 +#define PD14 10 +#define PA7 PIN_A10 +#define PA6 PIN_A11 +#define PA5 PIN_A12 +#define PB9 14 +#define PB8 15 +#define PC6 16 +#define PB15 17 +#define PB13 18 +#define PB12 19 +#define PA15 20 +#define PC7 21 +#define PB5 22 +#define PB3 23 +#define PA4 PIN_A13 +#define PB4 25 +#define PB6 26 +#define PB2 27 +#define PD13 28 +#define PD12 29 +#define PD11 30 +#define PE2 31 +#define PA0 PIN_A14 +#define PB0 PIN_A23 // LED_GREEN +#define PE0 34 +#define PB11 35 +#define PB10 36 +#define PE15 37 +#define PE14 38 +#define PE12 39 +#define PE10 40 +#define PE7 41 +#define PE8 42 +#define PC8 43 +#define PC9 44 +#define PC10 45 +#define PC11 46 +#define PC12 47 +#define PD2 48 +#define PG2 49 +#define PG3 50 +#define PD7 51 +#define PD6 52 +#define PD5 53 +#define PD4 54 +#define PD3 55 +// 56 is PE2 (31) +#define PE4 57 +#define PE5 58 +#define PE6 59 +#define PE3 60 +#define PF8 PIN_A15 +#define PF7 PIN_A16 +#define PF9 PIN_A17 +#define PG1 64 +#define PG0 65 +#define PD1 66 +#define PD0 67 +#define PF0 68 +#define PF1 69 +#define PF2 70 +// 71 is PA7 (11) +// 72 is NC +#define PB7 73 // LED_BLUE +#define PB14 74 // LED_RED +#define PC13 75 // USER_BTN +#define PD9 76 // Serial Rx +#define PD8 77 // Serial Tx +#define PA3 PIN_A0 +#define PC0 PIN_A1 +#define PC3 PIN_A2 +#define PF3 PIN_A3 +#define PF5 PIN_A4 +#define PF10 PIN_A5 +#define PB1 PIN_A6 +#define PC2 PIN_A7 +#define PF4 PIN_A8 +#define PF6 PIN_A9 +// ST Morpho +#define PA1 PIN_A18 +#define PA2 PIN_A19 +#define PA8 90 +#define PA9 91 +#define PA10 92 +#define PA11 93 +#define PA12 94 +#define PA13 95 // SWD +#define PA14 96 // SWD +#define PC1 PIN_A20 +#define PC4 PIN_A21 +#define PC5 PIN_A22 +#define PC14 100 +#define PC15 101 +#define PD10 102 +#define PE1 103 +#define PF11 104 +#define PG4 105 +#define PG5 106 +#define PG6 107 +#define PG7 108 +#define PG8 109 +#define PG10 110 +#define PG11 111 +#define PG12 112 +#define PG13 113 +#define PG15 114 +#define PH0 115 // MCO +#define PH1 116 + +// Alternate pins number +#define PA0_ALT1 (PA0 | ALT1) +#define PA0_ALT2 (PA0 | ALT2) +#define PA1_ALT1 (PA1 | ALT1) +#define PA1_ALT2 (PA1 | ALT2) +#define PA2_ALT1 (PA2 | ALT1) +#define PA2_ALT2 (PA2 | ALT2) +#define PA3_ALT1 (PA3 | ALT1) +#define PA3_ALT2 (PA3 | ALT2) +#define PA4_ALT1 (PA4 | ALT1) +#define PA5_ALT1 (PA5 | ALT1) +#define PA6_ALT1 (PA6 | ALT1) +#define PA7_ALT1 (PA7 | ALT1) +#define PA7_ALT2 (PA7 | ALT2) +#define PA7_ALT3 (PA7 | ALT3) +#define PA15_ALT1 (PA15 | ALT1) +#define PB0_ALT1 (PB0 | ALT1) +#define PB0_ALT2 (PB0 | ALT2) +#define PB1_ALT1 (PB1 | ALT1) +#define PB1_ALT2 (PB1 | ALT2) +#define PB3_ALT1 (PB3 | ALT1) +#define PB4_ALT1 (PB4 | ALT1) +#define PB5_ALT1 (PB5 | ALT1) +#define PB8_ALT1 (PB8 | ALT1) +#define PB9_ALT1 (PB9 | ALT1) +#define PB14_ALT1 (PB14 | ALT1) +#define PB14_ALT2 (PB14 | ALT2) +#define PB15_ALT1 (PB15 | ALT1) +#define PB15_ALT2 (PB15 | ALT2) +#define PC0_ALT1 (PC0 | ALT1) +#define PC0_ALT2 (PC0 | ALT2) +#define PC1_ALT1 (PC1 | ALT1) +#define PC1_ALT2 (PC1 | ALT2) +#define PC2_ALT1 (PC2 | ALT1) +#define PC2_ALT2 (PC2 | ALT2) +#define PC3_ALT1 (PC3 | ALT1) +#define PC3_ALT2 (PC3 | ALT2) +#define PC4_ALT1 (PC4 | ALT1) +#define PC5_ALT1 (PC5 | ALT1) +#define PC6_ALT1 (PC6 | ALT1) +#define PC7_ALT1 (PC7 | ALT1) +#define PC8_ALT1 (PC8 | ALT1) +#define PC9_ALT1 (PC9 | ALT1) +#define PC10_ALT1 (PC10 | ALT1) +#define PC11_ALT1 (PC11 | ALT1) + +// This must be a literal +#define NUM_DIGITAL_PINS 117 +// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS +#define NUM_ANALOG_INPUTS 24 + +// On-board LED pin number +#ifndef LED_BUILTIN + #define LED_BUILTIN PB0 +#endif +#define LED_GREEN LED_BUILTIN +#define LED_BLUE PB7 +#define LED_RED PB14 + +// On-board user button +#ifndef USER_BTN + #define USER_BTN PC13 +#endif + +// Timer Definitions +// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin +#ifndef TIMER_TONE + #define TIMER_TONE TIM6 +#endif +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM7 +#endif + +// UART Definitions +#ifndef SERIAL_UART_INSTANCE + #define SERIAL_UART_INSTANCE 3 //Connected to ST-Link +#endif +// Serial pin used for console (ex: stlink) +// Rerquired by Firmata +#ifndef PIN_SERIAL_RX + #define PIN_SERIAL_RX PD9 +#endif +#ifndef PIN_SERIAL_TX + #define PIN_SERIAL_TX PD8 +#endif + +// Value of the External oscillator in Hz +#define HSE_VALUE 8000000U + +/* Extra HAL modules */ +#if !defined(HAL_DAC_MODULE_DISABLED) + #define HAL_DAC_MODULE_ENABLED +#endif +#if !defined(HAL_ETH_MODULE_DISABLED) + #define HAL_ETH_MODULE_ENABLED +#endif +#if !defined(HAL_QSPI_MODULE_DISABLED) + #define HAL_QSPI_MODULE_ENABLED +#endif +#if !defined(HAL_SD_MODULE_DISABLED) + #define HAL_SD_MODULE_ENABLED +#endif + +// Last Flash sector used for EEPROM emulation, address/sector depends on single/dual bank configuration. +// By default 2MB single bank +#define FLASH_BASE_ADDRESS 0x081C0000 +#define FLASH_DATA_SECTOR 11 + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #ifndef SERIAL_PORT_MONITOR + #define SERIAL_PORT_MONITOR Serial + #endif + #ifndef SERIAL_PORT_HARDWARE + // KH mod to add Serial1, for ESP-AT + //#define SERIAL_PORT_HARDWARE Serial + #define SERIAL_PORT_HARDWARE Serial1 + #endif +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.2.0/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/variant_generic.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.2.0/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/variant_generic.h new file mode 100644 index 0000000..43ba241 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/STM32/hardware/stm32/2.2.0/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/variant_generic.h @@ -0,0 +1,173 @@ +/* + ******************************************************************************* + * Copyright (c) 2020-2021, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + */ +#pragma once + +/*---------------------------------------------------------------------------- + * STM32 pins number + *----------------------------------------------------------------------------*/ +#define PA0 PIN_A0 +#define PA1 PIN_A1 +#define PA2 PIN_A2 +#define PA3 PIN_A3 +#define PA4 PIN_A4 +#define PA5 PIN_A5 +#define PA6 PIN_A6 +#define PA7 PIN_A7 +#define PA8 8 +#define PA9 9 +#define PA10 10 +#define PA11 11 +#define PA12 12 +#define PA13 13 +#define PA14 14 +#define PA15 15 +#define PB0 PIN_A8 +#define PB1 PIN_A9 +#define PB2 18 +#define PB3 19 +#define PB4 20 +#define PB5 21 +#define PB6 22 +#define PB7 23 +#define PB8 24 +#define PB9 25 +#define PB10 26 +#define PB11 27 +#define PB12 28 +#define PB13 29 +#define PB14 30 +#define PB15 31 +#define PC0 PIN_A10 +#define PC1 PIN_A11 +#define PC2 PIN_A12 +#define PC4 PIN_A13 +#define PC5 PIN_A14 +#define PC6 37 +#define PC7 38 +#define PC8 39 +#define PC9 40 +#define PC10 41 +#define PC11 42 +#define PC12 43 +#define PC13 44 +#define PC14 45 +#define PC15 46 +#define PD2 47 +#define PH0 48 +#define PH1 49 + +// Alternate pins number +#define PA2_ALT1 (PA2 | ALT1) +#define PA3_ALT1 (PA3 | ALT1) + +#define NUM_DIGITAL_PINS 50 +#define NUM_ANALOG_INPUTS 15 + +// On-board LED pin number +#ifndef LED_BUILTIN + #define LED_BUILTIN PNUM_NOT_DEFINED +#endif + +// On-board user button +#ifndef USER_BTN + #define USER_BTN PNUM_NOT_DEFINED +#endif + +// SPI definitions +#ifndef PIN_SPI_SS + #define PIN_SPI_SS PA4 +#endif +#ifndef PIN_SPI_SS1 + #define PIN_SPI_SS1 PA15 +#endif +#ifndef PIN_SPI_SS2 + #define PIN_SPI_SS2 PNUM_NOT_DEFINED +#endif +#ifndef PIN_SPI_SS3 + #define PIN_SPI_SS3 PNUM_NOT_DEFINED +#endif +#ifndef PIN_SPI_MOSI + #define PIN_SPI_MOSI PA7 +#endif +#ifndef PIN_SPI_MISO + #define PIN_SPI_MISO PA6 +#endif +#ifndef PIN_SPI_SCK + #define PIN_SPI_SCK PA5 +#endif + +// I2C definitions +#ifndef PIN_WIRE_SDA + #define PIN_WIRE_SDA PB7 +#endif +#ifndef PIN_WIRE_SCL + #define PIN_WIRE_SCL PB6 +#endif + +// Timer Definitions +// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin +#ifndef TIMER_TONE + #define TIMER_TONE TIM6 +#endif +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM21 +#endif + +// UART Definitions +#ifndef SERIAL_UART_INSTANCE + #define SERIAL_UART_INSTANCE 2 +#endif + +// Default pin used for generic 'Serial' instance +// Mandatory for Firmata +#ifndef PIN_SERIAL_RX + #define PIN_SERIAL_RX PA3 +#endif +#ifndef PIN_SERIAL_TX + #define PIN_SERIAL_TX PA2 +#endif + +// Extra HAL modules +#if !defined(HAL_DAC_MODULE_DISABLED) + #define HAL_DAC_MODULE_ENABLED +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #ifndef SERIAL_PORT_MONITOR + #define SERIAL_PORT_MONITOR Serial + #endif + #ifndef SERIAL_PORT_HARDWARE + // KH mod to add Serial1, for ESP-AT + //#define SERIAL_PORT_HARDWARE Serial + #define SERIAL_PORT_HARDWARE Serial1 + #endif +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/rp2040/1.9.3/variants/rpipico/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/rp2040/1.9.3/variants/rpipico/pins_arduino.h new file mode 100644 index 0000000..603700f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/rp2040/1.9.3/variants/rpipico/pins_arduino.h @@ -0,0 +1,81 @@ +#pragma once + +// Pin definitions taken from: +// https://datasheets.raspberrypi.org/pico/pico-datasheet.pdf + +//KH +// Pin count +// ---- +#define PINS_COUNT (30u) +#define NUM_DIGITAL_PINS (30u) +#define NUM_ANALOG_INPUTS (4u) +#define NUM_ANALOG_OUTPUTS (0u) +////// + +// LEDs +#define PIN_LED (25u) +#define PIN_LED_0 (16u) +#define PIN_LED_1 (17u) +#define PIN_LED_2 (18u) +// Serial +#define PIN_SERIAL1_TX (0u) +#define PIN_SERIAL1_RX (1u) + +#define PIN_SERIAL2_TX (31u) +#define PIN_SERIAL2_RX (31u) + + +// SPI +#define PIN_SPI0_MISO (4u) +#define PIN_SPI0_MOSI (3u) +#define PIN_SPI0_SCK (2u) +#define PIN_SPI0_SS (5u) + +// static const int SS = PIN_SPI0_SS; // SPI Slave SS not used. Set here only for reference. +// static const int MOSI = PIN_SPI0_MOSI; +// static const int MISO = PIN_SPI0_MISO; +// static const int SCK = PIN_SPI0_SCK; + +#define PIN_SPI1_MISO (12u) +#define PIN_SPI1_MOSI (31u) +#define PIN_SPI1_SCK (31u) +#define PIN_SPI1_SS (31u) +// static const int MISO_1 = PIN_SPI1_MISO; + +#define PIN_A0 (26u) +#define PIN_A1 (27u) +#define PIN_A2 (28u) +#define PIN_A3 (29u) + +static const int A0 = PIN_A0; +static const int A1 = PIN_A1; +static const int A2 = PIN_A2; +static const int A3 = PIN_A3; + +// D0 - D10 +#define D26 (26u) +#define D1 (27u) +#define D2 (28u) +#define D3 (29u) +#define D4 (6u) +#define D5 (7u) +#define D0 (0u) +#define D7 (1u) +#define D8 (2u) +#define D9 (4u) +#define D10 (3u) + +// static const int 0 = D0; + +// Wire +#define PIN_WIRE0_SDA (6u) +#define PIN_WIRE0_SCL (7u) + +#define PIN_WIRE1_SDA (26u) +#define PIN_WIRE1_SCL (27u) + +// #define SERIAL_HOWMANY (3u) +// #define SPI_HOWMANY (2u) +// #define WIRE_HOWMANY (2u) + +// #include "../generic/common.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/rp2040/2.7.2/boards.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/rp2040/2.7.2/boards.txt new file mode 100644 index 0000000..6ac0f09 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/rp2040/2.7.2/boards.txt @@ -0,0 +1,84 @@ +menu.split=Flash split +Seeed_XIAO_RP2040.name=SEEED XIAO RP2040 +Seeed_XIAO_RP2040.build.core=arduino +Seeed_XIAO_RP2040.build.crossprefix=arm-none-eabi- +Seeed_XIAO_RP2040.build.compiler_path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ + +# KH fix for Linux case-sensitive path +#Seeed_XIAO_RP2040.build.variant=SEEED_XIAO_RP2040 +Seeed_XIAO_RP2040.build.variant=Seeed_XIAO_RP2040 +###### + +Seeed_XIAO_RP2040.build.mcu=cortex-m0plus +Seeed_XIAO_RP2040.build.extra_flags= +Seeed_XIAO_RP2040.build.fpu= +Seeed_XIAO_RP2040.build.float-abi= +Seeed_XIAO_RP2040.build.architecture=cortex-m0plus +Seeed_XIAO_RP2040.build.board=SEEED_XIAO_RP2040 +Seeed_XIAO_RP2040.build.ldscript=linker_script.ld +Seeed_XIAO_RP2040.compiler.mbed.arch.define=-DARDUINO_ARCH_RP2040 +Seeed_XIAO_RP2040.compiler.mbed.defines={build.variant.path}/defines.txt +Seeed_XIAO_RP2040.compiler.mbed.ldflags={build.variant.path}/ldflags.txt +Seeed_XIAO_RP2040.compiler.mbed.cflags={build.variant.path}/cflags.txt +Seeed_XIAO_RP2040.compiler.mbed.cxxflags={build.variant.path}/cxxflags.txt +Seeed_XIAO_RP2040.compiler.mbed.includes={build.variant.path}/includes.txt +Seeed_XIAO_RP2040.compiler.mbed.extra_ldflags=-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys +Seeed_XIAO_RP2040.compiler.mbed="{build.variant.path}/libs/libmbed.a" +Seeed_XIAO_RP2040.vid.0=0x2886 +Seeed_XIAO_RP2040.pid.0=0x8042 +Seeed_XIAO_RP2040.upload_port.0.vid=0x2886 +Seeed_XIAO_RP2040.upload_port.0.pid=0x8042 +Seeed_XIAO_RP2040.upload.tool=picotool +Seeed_XIAO_RP2040.upload.tool.default=picotool +Seeed_XIAO_RP2040.upload.protocol= +Seeed_XIAO_RP2040.upload.transport= +Seeed_XIAO_RP2040.upload.use_1200bps_touch=true +Seeed_XIAO_RP2040.upload.wait_for_upload_port=false +Seeed_XIAO_RP2040.upload.native_usb=true +Seeed_XIAO_RP2040.upload.maximum_size=16777216 +Seeed_XIAO_RP2040.upload.maximum_data_size=270336 +Seeed_XIAO_RP2040.bootloader.tool=openocd +Seeed_XIAO_RP2040.bootloader.tool.default=openocd +Seeed_XIAO_RP2040.bootloader.config=-f target/rp2040.cfg +Seeed_XIAO_RP2040.bootloader.programmer=-f interface/cmsis-dap.cfg + +############################################################## + +menu.split=Flash split +WIO_RP2040_MINI_DEV_BOARD.name=Wio RP2040 Mini Dev Board +WIO_RP2040_MINI_DEV_BOARD.build.core=arduino +WIO_RP2040_MINI_DEV_BOARD.build.crossprefix=arm-none-eabi- +WIO_RP2040_MINI_DEV_BOARD.build.compiler_path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +WIO_RP2040_MINI_DEV_BOARD.build.variant=WIO_RP2040_MINI_DEV_BOARD +WIO_RP2040_MINI_DEV_BOARD.build.mcu=cortex-m0plus +WIO_RP2040_MINI_DEV_BOARD.build.extra_flags= +WIO_RP2040_MINI_DEV_BOARD.build.fpu= +WIO_RP2040_MINI_DEV_BOARD.build.float-abi= +WIO_RP2040_MINI_DEV_BOARD.build.architecture=cortex-m0plus +WIO_RP2040_MINI_DEV_BOARD.build.board=WIO_RP2040_MINI_DEV_BOARD +WIO_RP2040_MINI_DEV_BOARD.build.ldscript=linker_script.ld +WIO_RP2040_MINI_DEV_BOARD.compiler.mbed.arch.define=-DARDUINO_ARCH_RP2040 +WIO_RP2040_MINI_DEV_BOARD.compiler.mbed.defines={build.variant.path}/defines.txt +WIO_RP2040_MINI_DEV_BOARD.compiler.mbed.ldflags={build.variant.path}/ldflags.txt +WIO_RP2040_MINI_DEV_BOARD.compiler.mbed.cflags={build.variant.path}/cflags.txt +WIO_RP2040_MINI_DEV_BOARD.compiler.mbed.cxxflags={build.variant.path}/cxxflags.txt +WIO_RP2040_MINI_DEV_BOARD.compiler.mbed.includes={build.variant.path}/includes.txt +WIO_RP2040_MINI_DEV_BOARD.compiler.mbed.extra_ldflags=-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys +WIO_RP2040_MINI_DEV_BOARD.compiler.mbed="{build.variant.path}/libs/libmbed.a" +WIO_RP2040_MINI_DEV_BOARD.vid.0=0x2886 +WIO_RP2040_MINI_DEV_BOARD.pid.0=0x8043 +WIO_RP2040_MINI_DEV_BOARD.upload_port.0.vid=0x2886 +WIO_RP2040_MINI_DEV_BOARD.upload_port.0.pid=0x8043 +WIO_RP2040_MINI_DEV_BOARD.upload.tool=picotool +WIO_RP2040_MINI_DEV_BOARD.upload.tool.default=picotool +WIO_RP2040_MINI_DEV_BOARD.upload.protocol= +WIO_RP2040_MINI_DEV_BOARD.upload.transport= +WIO_RP2040_MINI_DEV_BOARD.upload.use_1200bps_touch=true +WIO_RP2040_MINI_DEV_BOARD.upload.wait_for_upload_port=false +WIO_RP2040_MINI_DEV_BOARD.upload.native_usb=true +WIO_RP2040_MINI_DEV_BOARD.upload.maximum_size=16777216 +WIO_RP2040_MINI_DEV_BOARD.upload.maximum_data_size=270336 +WIO_RP2040_MINI_DEV_BOARD.bootloader.tool=openocd +WIO_RP2040_MINI_DEV_BOARD.bootloader.tool.default=openocd +WIO_RP2040_MINI_DEV_BOARD.bootloader.config=-f target/rp2040.cfg +WIO_RP2040_MINI_DEV_BOARD.bootloader.programmer=-f interface/cmsis-dap.cfg diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/rp2040/2.7.2/variants/Seeed_XIAO_RP2040/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/rp2040/2.7.2/variants/Seeed_XIAO_RP2040/pins_arduino.h new file mode 100644 index 0000000..d51c54c --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/rp2040/2.7.2/variants/Seeed_XIAO_RP2040/pins_arduino.h @@ -0,0 +1,123 @@ +#pragma once +#include +#include + +#ifndef __PINS_ARDUINO__ +#define __PINS_ARDUINO__ + +#ifdef __cplusplus +extern "C" unsigned int PINCOUNT_fn(); +#endif + +// Pin count +// ---- +#define PINS_COUNT (PINCOUNT_fn()) +#define NUM_DIGITAL_PINS (30u) +#define NUM_ANALOG_INPUTS (4u) +#define NUM_ANALOG_OUTPUTS (0u) + +extern PinName digitalPinToPinName(pin_size_t P); + +// LEDs +// ---- +#define PIN_LED (25u) +#define LED_BUILTIN PIN_LED + +// Digital pins +// ---- +#define PIN_D0 (26u) +#define PIN_D1 (27u) +#define PIN_D2 (28u) +#define PIN_D3 (29u) +#define PIN_D4 (6u) +#define PIN_D5 (7u) +#define PIN_D6 (0u) +#define PIN_D7 (1u) +#define PIN_D8 (2u) +#define PIN_D9 (4u) +#define PIN_D10 (3u) + +static const uint8_t D0 = PIN_D0; +static const uint8_t D1 = PIN_D1; +static const uint8_t D2 = PIN_D2; +static const uint8_t D3 = PIN_D3; +static const uint8_t D4 = PIN_D4; +static const uint8_t D5 = PIN_D5; +static const uint8_t D6 = PIN_D6; +static const uint8_t D7 = PIN_D7; +static const uint8_t D8 = PIN_D8; +static const uint8_t D9 = PIN_D9; +static const uint8_t D10 = PIN_D10; + + +// Analog pins +// ----------- +#define PIN_A0 (26u) +#define PIN_A1 (27u) +#define PIN_A2 (28u) +#define PIN_A3 (29u) + +static const uint8_t A0 = PIN_A0; +static const uint8_t A1 = PIN_A1; +static const uint8_t A2 = PIN_A2; +static const uint8_t A3 = PIN_A3; + +#define ADC_RESOLUTION 12 + +// Serial +#define PIN_SERIAL_TX (0ul) +#define PIN_SERIAL_RX (1ul) + +// SPI +//#define PIN_SPI_MISO (16u) +//#define PIN_SPI_MOSI (19u) +//#define PIN_SPI_SCK (18u) +//#define PIN_SPI_SS (17u) +// KH fix wrong pin +#define PIN_SPI_MISO (D9) +#define PIN_SPI_MOSI (D10) +#define PIN_SPI_SCK (D8) +#define PIN_SPI_SS (D7) +////// + +static const uint8_t SS = PIN_SPI_SS; // SPI Slave SS not used. Set here only for reference. +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +// Wire +#define SDA (6u) +#define SCL (7u) + +#define SERIAL_HOWMANY 1 +#define SERIAL1_TX (digitalPinToPinName(PIN_SERIAL_TX)) +#define SERIAL1_RX (digitalPinToPinName(PIN_SERIAL_RX)) + +#define SERIAL_CDC 1 +#define HAS_UNIQUE_ISERIAL_DESCRIPTOR +#define BOARD_VENDORID 0x2886 +#define BOARD_PRODUCTID 0x8042 +#define BOARD_NAME "RaspberryPi Pico" + +uint8_t getUniqueSerialNumber(uint8_t* name); +void _ontouch1200bps_(); + +#define SPI_HOWMANY (1) +#define SPI_MISO (digitalPinToPinName(PIN_SPI_MISO)) +#define SPI_MOSI (digitalPinToPinName(PIN_SPI_MOSI)) +#define SPI_SCK (digitalPinToPinName(PIN_SPI_SCK)) + +#define WIRE_HOWMANY (1) +#define I2C_SDA (digitalPinToPinName(SDA)) +#define I2C_SCL (digitalPinToPinName(SCL)) + +#define digitalPinToPort(P) (digitalPinToPinName(P)/32) + +#define SERIAL_PORT_USBVIRTUAL SerialUSB +#define SERIAL_PORT_MONITOR SerialUSB +#define SERIAL_PORT_HARDWARE Serial1 +#define SERIAL_PORT_HARDWARE_OPEN Serial1 + +#define USB_MAX_POWER (500) + +#endif //__PINS_ARDUINO__ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.7/cores/arduino/Arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.7/cores/arduino/Arduino.h new file mode 100644 index 0000000..ca6ec0d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.7/cores/arduino/Arduino.h @@ -0,0 +1,181 @@ +/* + Arduino.h - Main include file for the Arduino SDK + Copyright (c) 2014 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef Arduino_h +#define Arduino_h + +#include +#include +#include +#include +#include + +#define CORE_HAS_LIBB64 + +typedef bool boolean; +typedef uint8_t byte; +typedef uint16_t word; + +// some libraries and sketches depend on this AVR stuff, +// assuming Arduino.h or WProgram.h automatically includes it... +// +#include "avr/pgmspace.h" +#include "avr/interrupt.h" +#include "avr/dtostrf.h" +#include "avr/io.h" + +#include "binary.h" +#include "itoa.h" + +#ifdef __cplusplus +extern "C"{ +#endif // __cplusplus + +// Include Atmel headers +#include "sam.h" + +#include "wiring_constants.h" + +#define clockCyclesPerMicrosecond() ( SystemCoreClock / 1000000L ) +#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (SystemCoreClock / 1000L) ) +#define microsecondsToClockCycles(a) ( (a) * (SystemCoreClock / 1000000L) ) + +void yield( void ) ; + +/* system functions */ +int main( void ); +void init( void ); + +/* sketch */ +void setup( void ) ; +void loop( void ) ; + +int __debug_buf(const char* head, char* buf, int len); + +#include "WVariant.h" + +#ifdef __cplusplus +} // extern "C" +#endif + +// The following headers are for C++ only compilation +#ifdef __cplusplus + #include "WCharacter.h" + #include "WString.h" + #include "Tone.h" + #include "WMath.h" + #include "HardwareSerial.h" + #include "pulse.h" +#endif +#include "delay.h" +#ifdef __cplusplus + #include "Uart.h" +#endif + +// Include board variant +#include "variant.h" + +#include "wiring.h" +#include "wiring_digital.h" +#include "wiring_analog.h" +#include "wiring_shift.h" +#include "wiring_pwm.h" +#include "WInterrupts.h" + +// undefine stdlib's abs if encountered +#ifdef abs +#undef abs +#endif // abs +// undefine stdlib's abs if encountered +#ifdef abs +#undef abs +#endif // abs + +#ifdef __cplusplus + template + auto min(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (b < a) ? b : a; + } + + template + auto max(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (a < b) ? b : a; + } +#else +#ifndef min +#define min(a,b) \ + ({ __typeof__ (a) _a = (a); \ + __typeof__ (b) _b = (b); \ + _a < _b ? _a : _b; }) +#endif +#ifndef max +#define max(a,b) \ + ({ __typeof__ (a) _a = (a); \ + __typeof__ (b) _b = (b); \ + _a > _b ? _a : _b; }) +#endif +#endif + +#define abs(x) ((x)>0?(x):-(x)) +#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) +#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) +#define radians(deg) ((deg)*DEG_TO_RAD) +#define degrees(rad) ((rad)*RAD_TO_DEG) +#define sq(x) ((x)*(x)) + +#define interrupts() __enable_irq() +#define noInterrupts() __disable_irq() +#ifndef interruptsStatus +static inline unsigned char __interruptsStatus(void) __attribute__((always_inline, unused)); +static inline unsigned char __interruptsStatus(void) +{ + // See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0497a/CHDBIBGJ.html + return (__get_PRIMASK() ? 0 : 1); +} +#define interruptsStatus() __interruptsStatus() +#endif + +#define lowByte(w) ((uint8_t) ((w) & 0xff)) +#define highByte(w) ((uint8_t) ((w) >> 8)) + +#define bitRead(value, bit) (((value) >> (bit)) & 0x01) +#define bitSet(value, bit) ((value) |= (1UL << (bit))) +#define bitClear(value, bit) ((value) &= ~(1UL << (bit))) +#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit)) + +#define bit(b) (1UL << (b)) + +#if (ARDUINO_SAMD_VARIANT_COMPLIANCE >= 10606) +// Interrupts +#define digitalPinToInterrupt(P) ( P ) +#endif + +// USB +#ifdef USE_TINYUSB +#include "Adafruit_TinyUSB_Core.h" +#else +#include "USB/USBDesc.h" +#include "USB/USBCore.h" +#include "USB/USBAPI.h" +#include "USB/USB_host.h" +#endif + +#endif // Arduino_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.7/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.7/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.7/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.7/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.7/cores/arduino/Print.h new file mode 100644 index 0000000..48353c4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.7/cores/arduino/Print.h @@ -0,0 +1,108 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t +#include // for printf + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.7/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.7/platform.txt new file mode 100644 index 0000000..7b6c33c --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.7/platform.txt @@ -0,0 +1,234 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Seeed SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.7.7 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -u _printf_float -u _scanf_float -Wl,--wrap,_write -u __wrap__write +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.project_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.1.path}/CMSIS-Atmel/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {build.project_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {build.project_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.8/cores/arduino/Arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.8/cores/arduino/Arduino.h new file mode 100644 index 0000000..ca6ec0d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.8/cores/arduino/Arduino.h @@ -0,0 +1,181 @@ +/* + Arduino.h - Main include file for the Arduino SDK + Copyright (c) 2014 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef Arduino_h +#define Arduino_h + +#include +#include +#include +#include +#include + +#define CORE_HAS_LIBB64 + +typedef bool boolean; +typedef uint8_t byte; +typedef uint16_t word; + +// some libraries and sketches depend on this AVR stuff, +// assuming Arduino.h or WProgram.h automatically includes it... +// +#include "avr/pgmspace.h" +#include "avr/interrupt.h" +#include "avr/dtostrf.h" +#include "avr/io.h" + +#include "binary.h" +#include "itoa.h" + +#ifdef __cplusplus +extern "C"{ +#endif // __cplusplus + +// Include Atmel headers +#include "sam.h" + +#include "wiring_constants.h" + +#define clockCyclesPerMicrosecond() ( SystemCoreClock / 1000000L ) +#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (SystemCoreClock / 1000L) ) +#define microsecondsToClockCycles(a) ( (a) * (SystemCoreClock / 1000000L) ) + +void yield( void ) ; + +/* system functions */ +int main( void ); +void init( void ); + +/* sketch */ +void setup( void ) ; +void loop( void ) ; + +int __debug_buf(const char* head, char* buf, int len); + +#include "WVariant.h" + +#ifdef __cplusplus +} // extern "C" +#endif + +// The following headers are for C++ only compilation +#ifdef __cplusplus + #include "WCharacter.h" + #include "WString.h" + #include "Tone.h" + #include "WMath.h" + #include "HardwareSerial.h" + #include "pulse.h" +#endif +#include "delay.h" +#ifdef __cplusplus + #include "Uart.h" +#endif + +// Include board variant +#include "variant.h" + +#include "wiring.h" +#include "wiring_digital.h" +#include "wiring_analog.h" +#include "wiring_shift.h" +#include "wiring_pwm.h" +#include "WInterrupts.h" + +// undefine stdlib's abs if encountered +#ifdef abs +#undef abs +#endif // abs +// undefine stdlib's abs if encountered +#ifdef abs +#undef abs +#endif // abs + +#ifdef __cplusplus + template + auto min(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (b < a) ? b : a; + } + + template + auto max(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (a < b) ? b : a; + } +#else +#ifndef min +#define min(a,b) \ + ({ __typeof__ (a) _a = (a); \ + __typeof__ (b) _b = (b); \ + _a < _b ? _a : _b; }) +#endif +#ifndef max +#define max(a,b) \ + ({ __typeof__ (a) _a = (a); \ + __typeof__ (b) _b = (b); \ + _a > _b ? _a : _b; }) +#endif +#endif + +#define abs(x) ((x)>0?(x):-(x)) +#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) +#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) +#define radians(deg) ((deg)*DEG_TO_RAD) +#define degrees(rad) ((rad)*RAD_TO_DEG) +#define sq(x) ((x)*(x)) + +#define interrupts() __enable_irq() +#define noInterrupts() __disable_irq() +#ifndef interruptsStatus +static inline unsigned char __interruptsStatus(void) __attribute__((always_inline, unused)); +static inline unsigned char __interruptsStatus(void) +{ + // See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0497a/CHDBIBGJ.html + return (__get_PRIMASK() ? 0 : 1); +} +#define interruptsStatus() __interruptsStatus() +#endif + +#define lowByte(w) ((uint8_t) ((w) & 0xff)) +#define highByte(w) ((uint8_t) ((w) >> 8)) + +#define bitRead(value, bit) (((value) >> (bit)) & 0x01) +#define bitSet(value, bit) ((value) |= (1UL << (bit))) +#define bitClear(value, bit) ((value) &= ~(1UL << (bit))) +#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit)) + +#define bit(b) (1UL << (b)) + +#if (ARDUINO_SAMD_VARIANT_COMPLIANCE >= 10606) +// Interrupts +#define digitalPinToInterrupt(P) ( P ) +#endif + +// USB +#ifdef USE_TINYUSB +#include "Adafruit_TinyUSB_Core.h" +#else +#include "USB/USBDesc.h" +#include "USB/USBCore.h" +#include "USB/USBAPI.h" +#include "USB/USB_host.h" +#endif + +#endif // Arduino_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.8/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.8/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.8/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.8/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.8/cores/arduino/Print.h new file mode 100644 index 0000000..48353c4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.8/cores/arduino/Print.h @@ -0,0 +1,108 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t +#include // for printf + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.8/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.8/platform.txt new file mode 100644 index 0000000..0ca1ffd --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.8/platform.txt @@ -0,0 +1,230 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Seeed SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.7.8 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -u _printf_float -u _scanf_float -Wl,--wrap,_write -u __wrap__write +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.project_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.1.path}/CMSIS-Atmel/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" +##recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {build.project_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" +##recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {build.project_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" +##recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.9/cores/arduino/Arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.9/cores/arduino/Arduino.h new file mode 100644 index 0000000..ca6ec0d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.9/cores/arduino/Arduino.h @@ -0,0 +1,181 @@ +/* + Arduino.h - Main include file for the Arduino SDK + Copyright (c) 2014 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef Arduino_h +#define Arduino_h + +#include +#include +#include +#include +#include + +#define CORE_HAS_LIBB64 + +typedef bool boolean; +typedef uint8_t byte; +typedef uint16_t word; + +// some libraries and sketches depend on this AVR stuff, +// assuming Arduino.h or WProgram.h automatically includes it... +// +#include "avr/pgmspace.h" +#include "avr/interrupt.h" +#include "avr/dtostrf.h" +#include "avr/io.h" + +#include "binary.h" +#include "itoa.h" + +#ifdef __cplusplus +extern "C"{ +#endif // __cplusplus + +// Include Atmel headers +#include "sam.h" + +#include "wiring_constants.h" + +#define clockCyclesPerMicrosecond() ( SystemCoreClock / 1000000L ) +#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (SystemCoreClock / 1000L) ) +#define microsecondsToClockCycles(a) ( (a) * (SystemCoreClock / 1000000L) ) + +void yield( void ) ; + +/* system functions */ +int main( void ); +void init( void ); + +/* sketch */ +void setup( void ) ; +void loop( void ) ; + +int __debug_buf(const char* head, char* buf, int len); + +#include "WVariant.h" + +#ifdef __cplusplus +} // extern "C" +#endif + +// The following headers are for C++ only compilation +#ifdef __cplusplus + #include "WCharacter.h" + #include "WString.h" + #include "Tone.h" + #include "WMath.h" + #include "HardwareSerial.h" + #include "pulse.h" +#endif +#include "delay.h" +#ifdef __cplusplus + #include "Uart.h" +#endif + +// Include board variant +#include "variant.h" + +#include "wiring.h" +#include "wiring_digital.h" +#include "wiring_analog.h" +#include "wiring_shift.h" +#include "wiring_pwm.h" +#include "WInterrupts.h" + +// undefine stdlib's abs if encountered +#ifdef abs +#undef abs +#endif // abs +// undefine stdlib's abs if encountered +#ifdef abs +#undef abs +#endif // abs + +#ifdef __cplusplus + template + auto min(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (b < a) ? b : a; + } + + template + auto max(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (a < b) ? b : a; + } +#else +#ifndef min +#define min(a,b) \ + ({ __typeof__ (a) _a = (a); \ + __typeof__ (b) _b = (b); \ + _a < _b ? _a : _b; }) +#endif +#ifndef max +#define max(a,b) \ + ({ __typeof__ (a) _a = (a); \ + __typeof__ (b) _b = (b); \ + _a > _b ? _a : _b; }) +#endif +#endif + +#define abs(x) ((x)>0?(x):-(x)) +#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) +#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) +#define radians(deg) ((deg)*DEG_TO_RAD) +#define degrees(rad) ((rad)*RAD_TO_DEG) +#define sq(x) ((x)*(x)) + +#define interrupts() __enable_irq() +#define noInterrupts() __disable_irq() +#ifndef interruptsStatus +static inline unsigned char __interruptsStatus(void) __attribute__((always_inline, unused)); +static inline unsigned char __interruptsStatus(void) +{ + // See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0497a/CHDBIBGJ.html + return (__get_PRIMASK() ? 0 : 1); +} +#define interruptsStatus() __interruptsStatus() +#endif + +#define lowByte(w) ((uint8_t) ((w) & 0xff)) +#define highByte(w) ((uint8_t) ((w) >> 8)) + +#define bitRead(value, bit) (((value) >> (bit)) & 0x01) +#define bitSet(value, bit) ((value) |= (1UL << (bit))) +#define bitClear(value, bit) ((value) &= ~(1UL << (bit))) +#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit)) + +#define bit(b) (1UL << (b)) + +#if (ARDUINO_SAMD_VARIANT_COMPLIANCE >= 10606) +// Interrupts +#define digitalPinToInterrupt(P) ( P ) +#endif + +// USB +#ifdef USE_TINYUSB +#include "Adafruit_TinyUSB_Core.h" +#else +#include "USB/USBDesc.h" +#include "USB/USBCore.h" +#include "USB/USBAPI.h" +#include "USB/USB_host.h" +#endif + +#endif // Arduino_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.9/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.9/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.9/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.9/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.9/cores/arduino/Print.h new file mode 100644 index 0000000..48353c4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.9/cores/arduino/Print.h @@ -0,0 +1,108 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t +#include // for printf + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.9/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.9/platform.txt new file mode 100644 index 0000000..986663b --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.7.9/platform.txt @@ -0,0 +1,227 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Seeed SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.7.9 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -u _printf_float -u _scanf_float -Wl,--wrap,_write -u __wrap__write +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.project_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.1.path}/CMSIS-Atmel/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {build.project_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.1/cores/arduino/Arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.1/cores/arduino/Arduino.h new file mode 100644 index 0000000..ca6ec0d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.1/cores/arduino/Arduino.h @@ -0,0 +1,181 @@ +/* + Arduino.h - Main include file for the Arduino SDK + Copyright (c) 2014 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef Arduino_h +#define Arduino_h + +#include +#include +#include +#include +#include + +#define CORE_HAS_LIBB64 + +typedef bool boolean; +typedef uint8_t byte; +typedef uint16_t word; + +// some libraries and sketches depend on this AVR stuff, +// assuming Arduino.h or WProgram.h automatically includes it... +// +#include "avr/pgmspace.h" +#include "avr/interrupt.h" +#include "avr/dtostrf.h" +#include "avr/io.h" + +#include "binary.h" +#include "itoa.h" + +#ifdef __cplusplus +extern "C"{ +#endif // __cplusplus + +// Include Atmel headers +#include "sam.h" + +#include "wiring_constants.h" + +#define clockCyclesPerMicrosecond() ( SystemCoreClock / 1000000L ) +#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (SystemCoreClock / 1000L) ) +#define microsecondsToClockCycles(a) ( (a) * (SystemCoreClock / 1000000L) ) + +void yield( void ) ; + +/* system functions */ +int main( void ); +void init( void ); + +/* sketch */ +void setup( void ) ; +void loop( void ) ; + +int __debug_buf(const char* head, char* buf, int len); + +#include "WVariant.h" + +#ifdef __cplusplus +} // extern "C" +#endif + +// The following headers are for C++ only compilation +#ifdef __cplusplus + #include "WCharacter.h" + #include "WString.h" + #include "Tone.h" + #include "WMath.h" + #include "HardwareSerial.h" + #include "pulse.h" +#endif +#include "delay.h" +#ifdef __cplusplus + #include "Uart.h" +#endif + +// Include board variant +#include "variant.h" + +#include "wiring.h" +#include "wiring_digital.h" +#include "wiring_analog.h" +#include "wiring_shift.h" +#include "wiring_pwm.h" +#include "WInterrupts.h" + +// undefine stdlib's abs if encountered +#ifdef abs +#undef abs +#endif // abs +// undefine stdlib's abs if encountered +#ifdef abs +#undef abs +#endif // abs + +#ifdef __cplusplus + template + auto min(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (b < a) ? b : a; + } + + template + auto max(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (a < b) ? b : a; + } +#else +#ifndef min +#define min(a,b) \ + ({ __typeof__ (a) _a = (a); \ + __typeof__ (b) _b = (b); \ + _a < _b ? _a : _b; }) +#endif +#ifndef max +#define max(a,b) \ + ({ __typeof__ (a) _a = (a); \ + __typeof__ (b) _b = (b); \ + _a > _b ? _a : _b; }) +#endif +#endif + +#define abs(x) ((x)>0?(x):-(x)) +#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) +#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) +#define radians(deg) ((deg)*DEG_TO_RAD) +#define degrees(rad) ((rad)*RAD_TO_DEG) +#define sq(x) ((x)*(x)) + +#define interrupts() __enable_irq() +#define noInterrupts() __disable_irq() +#ifndef interruptsStatus +static inline unsigned char __interruptsStatus(void) __attribute__((always_inline, unused)); +static inline unsigned char __interruptsStatus(void) +{ + // See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0497a/CHDBIBGJ.html + return (__get_PRIMASK() ? 0 : 1); +} +#define interruptsStatus() __interruptsStatus() +#endif + +#define lowByte(w) ((uint8_t) ((w) & 0xff)) +#define highByte(w) ((uint8_t) ((w) >> 8)) + +#define bitRead(value, bit) (((value) >> (bit)) & 0x01) +#define bitSet(value, bit) ((value) |= (1UL << (bit))) +#define bitClear(value, bit) ((value) &= ~(1UL << (bit))) +#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit)) + +#define bit(b) (1UL << (b)) + +#if (ARDUINO_SAMD_VARIANT_COMPLIANCE >= 10606) +// Interrupts +#define digitalPinToInterrupt(P) ( P ) +#endif + +// USB +#ifdef USE_TINYUSB +#include "Adafruit_TinyUSB_Core.h" +#else +#include "USB/USBDesc.h" +#include "USB/USBCore.h" +#include "USB/USBAPI.h" +#include "USB/USB_host.h" +#endif + +#endif // Arduino_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.1/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.1/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.1/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.1/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.1/cores/arduino/Print.h new file mode 100644 index 0000000..48353c4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.1/cores/arduino/Print.h @@ -0,0 +1,108 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t +#include // for printf + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.1/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.1/platform.txt new file mode 100644 index 0000000..b215d74 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.1/platform.txt @@ -0,0 +1,204 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Seeed SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.8.1 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -u _printf_float -u _scanf_float -Wl,--wrap,_write -u __wrap__write +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.project_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= +build.flags.txrxled= +build.flags.role= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.1.path}/CMSIS-Atmel/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} {build.flags.role} "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {build.flags.debug} {build.flags.txrxled} {build.flags.role} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {build.flags.debug} {build.flags.txrxled} {build.flags.role} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {build.project_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b +# v1.8.0 +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b +# +# OpenOCD sketch upload +# +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.2/cores/arduino/Arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.2/cores/arduino/Arduino.h new file mode 100644 index 0000000..ca6ec0d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.2/cores/arduino/Arduino.h @@ -0,0 +1,181 @@ +/* + Arduino.h - Main include file for the Arduino SDK + Copyright (c) 2014 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef Arduino_h +#define Arduino_h + +#include +#include +#include +#include +#include + +#define CORE_HAS_LIBB64 + +typedef bool boolean; +typedef uint8_t byte; +typedef uint16_t word; + +// some libraries and sketches depend on this AVR stuff, +// assuming Arduino.h or WProgram.h automatically includes it... +// +#include "avr/pgmspace.h" +#include "avr/interrupt.h" +#include "avr/dtostrf.h" +#include "avr/io.h" + +#include "binary.h" +#include "itoa.h" + +#ifdef __cplusplus +extern "C"{ +#endif // __cplusplus + +// Include Atmel headers +#include "sam.h" + +#include "wiring_constants.h" + +#define clockCyclesPerMicrosecond() ( SystemCoreClock / 1000000L ) +#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (SystemCoreClock / 1000L) ) +#define microsecondsToClockCycles(a) ( (a) * (SystemCoreClock / 1000000L) ) + +void yield( void ) ; + +/* system functions */ +int main( void ); +void init( void ); + +/* sketch */ +void setup( void ) ; +void loop( void ) ; + +int __debug_buf(const char* head, char* buf, int len); + +#include "WVariant.h" + +#ifdef __cplusplus +} // extern "C" +#endif + +// The following headers are for C++ only compilation +#ifdef __cplusplus + #include "WCharacter.h" + #include "WString.h" + #include "Tone.h" + #include "WMath.h" + #include "HardwareSerial.h" + #include "pulse.h" +#endif +#include "delay.h" +#ifdef __cplusplus + #include "Uart.h" +#endif + +// Include board variant +#include "variant.h" + +#include "wiring.h" +#include "wiring_digital.h" +#include "wiring_analog.h" +#include "wiring_shift.h" +#include "wiring_pwm.h" +#include "WInterrupts.h" + +// undefine stdlib's abs if encountered +#ifdef abs +#undef abs +#endif // abs +// undefine stdlib's abs if encountered +#ifdef abs +#undef abs +#endif // abs + +#ifdef __cplusplus + template + auto min(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (b < a) ? b : a; + } + + template + auto max(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (a < b) ? b : a; + } +#else +#ifndef min +#define min(a,b) \ + ({ __typeof__ (a) _a = (a); \ + __typeof__ (b) _b = (b); \ + _a < _b ? _a : _b; }) +#endif +#ifndef max +#define max(a,b) \ + ({ __typeof__ (a) _a = (a); \ + __typeof__ (b) _b = (b); \ + _a > _b ? _a : _b; }) +#endif +#endif + +#define abs(x) ((x)>0?(x):-(x)) +#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) +#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) +#define radians(deg) ((deg)*DEG_TO_RAD) +#define degrees(rad) ((rad)*RAD_TO_DEG) +#define sq(x) ((x)*(x)) + +#define interrupts() __enable_irq() +#define noInterrupts() __disable_irq() +#ifndef interruptsStatus +static inline unsigned char __interruptsStatus(void) __attribute__((always_inline, unused)); +static inline unsigned char __interruptsStatus(void) +{ + // See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0497a/CHDBIBGJ.html + return (__get_PRIMASK() ? 0 : 1); +} +#define interruptsStatus() __interruptsStatus() +#endif + +#define lowByte(w) ((uint8_t) ((w) & 0xff)) +#define highByte(w) ((uint8_t) ((w) >> 8)) + +#define bitRead(value, bit) (((value) >> (bit)) & 0x01) +#define bitSet(value, bit) ((value) |= (1UL << (bit))) +#define bitClear(value, bit) ((value) &= ~(1UL << (bit))) +#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit)) + +#define bit(b) (1UL << (b)) + +#if (ARDUINO_SAMD_VARIANT_COMPLIANCE >= 10606) +// Interrupts +#define digitalPinToInterrupt(P) ( P ) +#endif + +// USB +#ifdef USE_TINYUSB +#include "Adafruit_TinyUSB_Core.h" +#else +#include "USB/USBDesc.h" +#include "USB/USBCore.h" +#include "USB/USBAPI.h" +#include "USB/USB_host.h" +#endif + +#endif // Arduino_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.2/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.2/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.2/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.2/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.2/cores/arduino/Print.h new file mode 100644 index 0000000..48353c4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.2/cores/arduino/Print.h @@ -0,0 +1,108 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t +#include // for printf + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.2/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.2/platform.txt new file mode 100644 index 0000000..2cbc192 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/Seeeduino/hardware/samd/1.8.2/platform.txt @@ -0,0 +1,204 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Seeed SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.8.2 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -u _printf_float -u _scanf_float -Wl,--wrap,_write -u __wrap__write +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.project_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= +build.flags.role= +build.flags.txrxled= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.1.path}/CMSIS-Atmel/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Lib/GCC/" -larm_cortexM0l_math -lm + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} {build.flags.role} "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {build.flags.debug} {build.flags.txrxled} {build.flags.role} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {build.flags.debug} {build.flags.txrxled} {build.flags.role} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {build.project_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.project_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b +# v1.8.0 +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b +# +# OpenOCD sketch upload +# +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/SparkFun/hardware/samd/1.8.3/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/SparkFun/hardware/samd/1.8.3/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/SparkFun/hardware/samd/1.8.3/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/SparkFun/hardware/samd/1.8.3/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/SparkFun/hardware/samd/1.8.3/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/SparkFun/hardware/samd/1.8.3/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/SparkFun/hardware/samd/1.8.3/cores/arduino51/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/SparkFun/hardware/samd/1.8.3/cores/arduino51/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/SparkFun/hardware/samd/1.8.3/cores/arduino51/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/SparkFun/hardware/samd/1.8.3/cores/arduino51/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/SparkFun/hardware/samd/1.8.3/cores/arduino51/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/SparkFun/hardware/samd/1.8.3/cores/arduino51/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/boards.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/boards.txt new file mode 100644 index 0000000..bbe9f9e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/boards.txt @@ -0,0 +1,649 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +menu.softdevice=Bootloader +menu.debug=Debug + +# ---------------------------------- +# Bluefruit Feather nRF52832 +# ---------------------------------- +feather52832.name=Adafruit Feather nRF52832 +feather52832.bootloader.tool=bootburn + +# Upload +feather52832.upload.tool=nrfutil +feather52832.upload.protocol=nrfutil +feather52832.upload.use_1200bps_touch=false +feather52832.upload.wait_for_upload_port=false +feather52832.upload.native_usb=false +feather52832.upload.maximum_size=290816 +feather52832.upload.maximum_data_size=52224 + +# Build +feather52832.build.mcu=cortex-m4 +feather52832.build.f_cpu=64000000 +feather52832.build.board=NRF52832_FEATHER +feather52832.build.core=nRF5 +feather52832.build.variant=feather_nrf52832 +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52832" +feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52832_FEATHER -DNRF52 +feather52832.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +feather52832.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_name=s132 +feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +feather52832.menu.debug.l0=Level 0 (Release) +feather52832.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52832.menu.debug.l1=Level 1 (Error Message) +feather52832.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52832.menu.debug.l2=Level 2 (Full Debug) +feather52832.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52832.menu.debug.l3=Level 3 (Segger SystemView) +feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Bluefruit Feather nRF52840 Express +# ---------------------------------- +feather52840.name=Adafruit Feather nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840.vid.0=0x239A +feather52840.pid.0=0x8029 +feather52840.vid.1=0x239A +feather52840.pid.1=0x0029 +feather52840.vid.2=0x239A +feather52840.pid.2=0x002A +feather52840.vid.3=0x239A +feather52840.pid.3=0x802A + +# Upload +feather52840.bootloader.tool=bootburn +feather52840.upload.tool=nrfutil +feather52840.upload.protocol=nrfutil +feather52840.upload.use_1200bps_touch=true +feather52840.upload.wait_for_upload_port=true +feather52840.upload.maximum_size=815104 +feather52840.upload.maximum_data_size=237568 + +# Build +feather52840.build.mcu=cortex-m4 +feather52840.build.f_cpu=64000000 +feather52840.build.board=NRF52840_FEATHER +feather52840.build.core=nRF5 +feather52840.build.variant=feather_nrf52840_express +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52840 Express" +feather52840.build.extra_flags=-DNRF52840_XXAA -DNRF52840_FEATHER {build.flags.usb} +feather52840.build.ldscript=nrf52840_s140_v6.ld +feather52840.build.vid=0x239A +feather52840.build.pid=0x8029 + +# SofDevice Menu +feather52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_name=s140 +feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840.menu.debug.l0=Level 0 (Release) +feather52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840.menu.debug.l1=Level 1 (Error Message) +feather52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840.menu.debug.l2=Level 2 (Full Debug) +feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840.menu.debug.l3=Level 3 (Segger SystemView) +feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# ---------------------------------- +# Feather Bluefruit sense +# ---------------------------------- +feather52840sense.name=Adafruit Feather Bluefruit Sense + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840sense.vid.0=0x239A +feather52840sense.pid.0=0x8087 +feather52840sense.vid.1=0x239A +feather52840sense.pid.1=0x0087 +feather52840sense.vid.2=0x239A +feather52840sense.pid.2=0x0088 +feather52840sense.vid.3=0x239A +feather52840sense.pid.3=0x8088 + +# Upload +feather52840sense.bootloader.tool=bootburn +feather52840sense.upload.tool=nrfutil +feather52840sense.upload.protocol=nrfutil +feather52840sense.upload.use_1200bps_touch=true +feather52840sense.upload.wait_for_upload_port=true +feather52840sense.upload.maximum_size=815104 +feather52840sense.upload.maximum_data_size=237568 + +# Build +feather52840sense.build.mcu=cortex-m4 +feather52840sense.build.f_cpu=64000000 +feather52840sense.build.board=NRF52840_FEATHER_SENSE +feather52840sense.build.core=nRF5 +feather52840sense.build.variant=feather_nrf52840_sense +feather52840sense.build.usb_manufacturer="Adafruit LLC" +feather52840sense.build.usb_product="Feather nRF52840 Sense" +feather52840sense.build.extra_flags=-DNRF52840_XXAA -DNRF52840_FEATHER_SENSE {build.flags.usb} +feather52840sense.build.ldscript=nrf52840_s140_v6.ld +feather52840sense.build.vid=0x239A +feather52840sense.build.pid=0x8087 + +# SofDevice Menu +feather52840sense.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_name=s140 +feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840sense.menu.debug.l0=Level 0 (Release) +feather52840sense.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840sense.menu.debug.l1=Level 1 (Error Message) +feather52840sense.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840sense.menu.debug.l2=Level 2 (Full Debug) +feather52840sense.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840sense.menu.debug.l3=Level 3 (Segger SystemView) +feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Bluefruit ItsyBitsy nRF52840 Express +# --------------------------------------------- +itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +itsybitsy52840.vid.0=0x239A +itsybitsy52840.pid.0=0x8051 +itsybitsy52840.vid.1=0x239A +itsybitsy52840.pid.1=0x0051 +itsybitsy52840.vid.2=0x239A +itsybitsy52840.pid.2=0x0052 +itsybitsy52840.vid.3=0x239A +itsybitsy52840.pid.3=0x8052 + +# Upload +itsybitsy52840.bootloader.tool=bootburn +itsybitsy52840.upload.tool=nrfutil +itsybitsy52840.upload.protocol=nrfutil +itsybitsy52840.upload.use_1200bps_touch=true +itsybitsy52840.upload.wait_for_upload_port=true +itsybitsy52840.upload.maximum_size=815104 +itsybitsy52840.upload.maximum_data_size=237568 + +# Build +itsybitsy52840.build.mcu=cortex-m4 +itsybitsy52840.build.f_cpu=64000000 +itsybitsy52840.build.board=NRF52840_ITSYBITSY +itsybitsy52840.build.core=nRF5 +itsybitsy52840.build.variant=itsybitsy_nrf52840_express +itsybitsy52840.build.usb_manufacturer="Adafruit LLC" +itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express" +itsybitsy52840.build.extra_flags=-DNRF52840_XXAA -DNRF52840_ITSYBITSY -DARDUINO_NRF52_ITSYBITSY {build.flags.usb} +itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld +itsybitsy52840.build.vid=0x239A +itsybitsy52840.build.pid=0x8051 + +# SofDevice Menu +itsybitsy52840.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140 +itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +itsybitsy52840.menu.debug.l0=Level 0 (Release) +itsybitsy52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +itsybitsy52840.menu.debug.l1=Level 1 (Error Message) +itsybitsy52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +itsybitsy52840.menu.debug.l2=Level 2 (Full Debug) +itsybitsy52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView) +itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# --------------------------------------------- +# Bluefruit Circuit Playground nRF52840 Express +# --------------------------------------------- +cplaynrf52840.name=Adafruit Circuit Playground Bluefruit + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cplaynrf52840.vid.0=0x239A +cplaynrf52840.pid.0=0x8045 +cplaynrf52840.vid.1=0x239A +cplaynrf52840.pid.1=0x0045 +cplaynrf52840.vid.2=0x239A +cplaynrf52840.pid.2=0x0046 +cplaynrf52840.vid.3=0x239A +cplaynrf52840.pid.3=0x8046 + +# Upload +cplaynrf52840.bootloader.tool=bootburn +cplaynrf52840.upload.tool=nrfutil +cplaynrf52840.upload.protocol=nrfutil +cplaynrf52840.upload.use_1200bps_touch=true +cplaynrf52840.upload.wait_for_upload_port=true +cplaynrf52840.upload.maximum_size=815104 +cplaynrf52840.upload.maximum_data_size=237568 + +# Build +cplaynrf52840.build.mcu=cortex-m4 +cplaynrf52840.build.f_cpu=64000000 +cplaynrf52840.build.board=NRF52840_CIRCUITPLAY +cplaynrf52840.build.core=nRF5 +cplaynrf52840.build.variant=circuitplayground_nrf52840 +cplaynrf52840.build.usb_manufacturer="Adafruit LLC" +cplaynrf52840.build.usb_product="Circuit Playground Bluefruit" +cplaynrf52840.build.extra_flags=-DNRF52840_XXAA -DNRF52840_CIRCUITPLAY {build.flags.usb} +cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld +cplaynrf52840.build.vid=0x239A +cplaynrf52840.build.pid=0x8045 + +# SofDevice Menu +cplaynrf52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cplaynrf52840.menu.debug.l0=Level 0 (Release) +cplaynrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cplaynrf52840.menu.debug.l1=Level 1 (Error Message) +cplaynrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cplaynrf52840.menu.debug.l2=Level 2 (Full Debug) +cplaynrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Clue nRF52840 +# --------------------------------------------- +cluenrf52840.name=Adafruit CLUE + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cluenrf52840.vid.0=0x239A +cluenrf52840.pid.0=0x8072 +cluenrf52840.vid.1=0x239A +cluenrf52840.pid.1=0x0072 +cluenrf52840.vid.2=0x239A +cluenrf52840.pid.2=0x0071 +cluenrf52840.vid.3=0x239A +cluenrf52840.pid.3=0x8071 + +# Upload +cluenrf52840.bootloader.tool=bootburn +cluenrf52840.upload.tool=nrfutil +cluenrf52840.upload.protocol=nrfutil +cluenrf52840.upload.use_1200bps_touch=true +cluenrf52840.upload.wait_for_upload_port=true +cluenrf52840.upload.maximum_size=815104 +cluenrf52840.upload.maximum_data_size=237568 + +# Build +cluenrf52840.build.mcu=cortex-m4 +cluenrf52840.build.f_cpu=64000000 +cluenrf52840.build.board=NRF52840_CLUE +cluenrf52840.build.core=nRF5 +cluenrf52840.build.variant=clue_nrf52840 +cluenrf52840.build.usb_manufacturer="Adafruit LLC" +cluenrf52840.build.usb_product="CLUE" +cluenrf52840.build.extra_flags=-DNRF52840_XXAA -DNRF52840_CLUE {build.flags.usb} +cluenrf52840.build.ldscript=nrf52840_s140_v6.ld +cluenrf52840.build.vid=0x239A +cluenrf52840.build.pid=0x8071 + +# SofDevice Menu +cluenrf52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cluenrf52840.menu.debug.l0=Level 0 (Release) +cluenrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cluenrf52840.menu.debug.l1=Level 1 (Error Message) +cluenrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cluenrf52840.menu.debug.l2=Level 2 (Full Debug) +cluenrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Bluefruit Metro nRF52840 Express +# ---------------------------------- +metro52840.name=Adafruit Bluefruit Metro nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +metro52840.vid.0=0x239A +metro52840.pid.0=0x803F +metro52840.vid.1=0x239A +metro52840.pid.1=0x003F +metro52840.vid.2=0x239A +metro52840.pid.2=0x0040 +metro52840.vid.3=0x239A +metro52840.pid.3=0x8040 + +# Upload +metro52840.bootloader.tool=bootburn +metro52840.upload.tool=nrfutil +metro52840.upload.protocol=nrfutil +metro52840.upload.use_1200bps_touch=true +metro52840.upload.wait_for_upload_port=true +metro52840.upload.maximum_size=815104 +metro52840.upload.maximum_data_size=237568 + +# Build +metro52840.build.mcu=cortex-m4 +metro52840.build.f_cpu=64000000 +metro52840.build.board=NRF52840_METRO +metro52840.build.core=nRF5 +metro52840.build.variant=metro_nrf52840_express +metro52840.build.usb_manufacturer="Adafruit LLC" +metro52840.build.usb_product="Metro nRF52840 Express" +metro52840.build.extra_flags=-DNRF52840_XXAA -DNRF52840_METRO {build.flags.usb} +metro52840.build.ldscript=nrf52840_s140_v6.ld +metro52840.build.vid=0x239A +metro52840.build.pid=0x803F + +# SofDevice Menu +metro52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_name=s140 +metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +metro52840.menu.debug.l0=Level 0 (Release) +metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +metro52840.menu.debug.l1=Level 1 (Error Message) +metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +metro52840.menu.debug.l2=Level 2 (Full Debug) +metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +metro52840.menu.debug.l3=Level 3 (Segger SystemView) +metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + + + +# ------------------------------------------------------- +# +# Boards that aren't made by Adafruit +# +# ------------------------------------------------------- + + +# ---------------------------------- +# Nordic nRF52840DK (PCA10056) +# ---------------------------------- +pca10056.name=Nordic nRF52840DK (PCA10056) +pca10056.bootloader.tool=bootburn + +# Upload +pca10056.upload.tool=nrfutil +pca10056.upload.protocol=nrfutil +pca10056.upload.use_1200bps_touch=true +pca10056.upload.wait_for_upload_port=true +pca10056.upload.maximum_size=815104 +pca10056.upload.maximum_data_size=237568 + +# Build +pca10056.build.mcu=cortex-m4 +pca10056.build.f_cpu=64000000 +pca10056.build.board=NRF52840_PCA10056 +pca10056.build.core=nRF5 +pca10056.build.variant=pca10056 +pca10056.build.usb_manufacturer="Nordic" +pca10056.build.usb_product="nRF52840 DK" +pca10056.build.extra_flags=-DNRF52840_XXAA -DNRF52840_PCA10056 {build.flags.usb} +pca10056.build.ldscript=nrf52840_s140_v6.ld +pca10056.build.vid=0x239A +pca10056.build.pid=0x8029 + +# SofDevice Menu +pca10056.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_name=s140 +pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +pca10056.menu.debug.l0=Level 0 (Release) +pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +pca10056.menu.debug.l1=Level 1 (Error Message) +pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +pca10056.menu.debug.l2=Level 2 (Full Debug) +pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +pca10056.menu.debug.l3=Level 3 (Segger SystemView) +pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Particle Xenon +# ---------------------------------- +particle_xenon.name=Particle Xenon + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +particle_xenon.vid.0=0x239A +particle_xenon.pid.0=0x8029 +particle_xenon.vid.1=0x239A +particle_xenon.pid.1=0x0029 +particle_xenon.vid.2=0x239A +particle_xenon.pid.2=0x002A +particle_xenon.vid.3=0x239A +particle_xenon.pid.3=0x802A + +# Upload +particle_xenon.bootloader.tool=bootburn +particle_xenon.upload.tool=nrfutil +particle_xenon.upload.protocol=nrfutil +particle_xenon.upload.use_1200bps_touch=true +particle_xenon.upload.wait_for_upload_port=true +particle_xenon.upload.maximum_size=815104 +particle_xenon.upload.maximum_data_size=237568 + +# Build +particle_xenon.build.mcu=cortex-m4 +particle_xenon.build.f_cpu=64000000 +particle_xenon.build.board=PARTICLE_XENON +particle_xenon.build.core=nRF5 +particle_xenon.build.variant=particle_xenon +particle_xenon.build.usb_manufacturer="Particle Industries" +particle_xenon.build.usb_product="Particle Xenon" +particle_xenon.build.extra_flags=-DNRF52840_XXAA -DPARTICLE_XENON {build.flags.usb} +particle_xenon.build.ldscript=nrf52840_s140_v6.ld +particle_xenon.build.vid=0x239A +particle_xenon.build.pid=0x8029 + +# SofDevice Menu +particle_xenon.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_name=s140 +particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +particle_xenon.menu.debug.l0=Level 0 (Release) +particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +particle_xenon.menu.debug.l1=Level 1 (Error Message) +particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +particle_xenon.menu.debug.l2=Level 2 (Full Debug) +particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +particle_xenon.menu.debug.l3=Level 3 (Segger SystemView) +particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Raytac MDBT50Q - RX +# ---------------------------------- +mdbt50qrx.name=Raytac MDBT50Q-RX Dongle + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +mdbt50qrx.vid.0=0x239A +mdbt50qrx.pid.0=0x8029 +mdbt50qrx.vid.1=0x239A +mdbt50qrx.pid.1=0x0029 +mdbt50qrx.vid.2=0x239A +mdbt50qrx.pid.2=0x002A +mdbt50qrx.vid.3=0x239A +mdbt50qrx.pid.3=0x802A + +# Upload +mdbt50qrx.bootloader.tool=bootburn +mdbt50qrx.upload.tool=nrfutil +mdbt50qrx.upload.protocol=nrfutil +mdbt50qrx.upload.use_1200bps_touch=true +mdbt50qrx.upload.wait_for_upload_port=true +mdbt50qrx.upload.maximum_size=815104 +mdbt50qrx.upload.maximum_data_size=237568 + +# Build +mdbt50qrx.build.mcu=cortex-m4 +mdbt50qrx.build.f_cpu=64000000 +mdbt50qrx.build.board=MDBT50Q_RX +mdbt50qrx.build.core=nRF5 +mdbt50qrx.build.variant=raytac_mdbt50q_rx +mdbt50qrx.build.usb_manufacturer="Raytac Corporation" +mdbt50qrx.build.usb_product="Raytac MDBT50Q - RX" +mdbt50qrx.build.extra_flags=-DNRF52840_XXAA -DMDBT50Q_RX {build.flags.usb} +mdbt50qrx.build.ldscript=nrf52840_s140_v6.ld +mdbt50qrx.build.vid=0x239A +mdbt50qrx.build.pid=0x8029 + +# SofDevice Menu +mdbt50qrx.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_name=s140 +mdbt50qrx.menu.softdevice.s140v6.build.sd_version=6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +mdbt50qrx.menu.debug.l0=Level 0 (Release) +mdbt50qrx.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +mdbt50qrx.menu.debug.l1=Level 1 (Error Message) +mdbt50qrx.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +mdbt50qrx.menu.debug.l2=Level 2 (Full Debug) +mdbt50qrx.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +mdbt50qrx.menu.debug.l3=Level 3 (Segger SystemView) +mdbt50qrx.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +mdbt50qrx.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B302 +# ---------------------------------- +ninab302.name=NINA B302 ublox + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +ninab302.vid.0=0x239A +ninab302.pid.0=0x8029 +ninab302.vid.1=0x239A +ninab302.pid.1=0x0029 +ninab302.vid.2=0x7239A +ninab302.pid.2=0x002A +ninab302.vid.3=0x239A +ninab302.pid.3=0x802A + +# Upload +ninab302.bootloader.tool=bootburn +ninab302.upload.tool=nrfutil +ninab302.upload.protocol=nrfutil +ninab302.upload.use_1200bps_touch=true +ninab302.upload.wait_for_upload_port=true +ninab302.upload.maximum_size=815104 +ninab302.upload.maximum_data_size=237568 + +# Build +ninab302.build.mcu=cortex-m4 +ninab302.build.f_cpu=64000000 +ninab302.build.board=NINA_B302_ublox +ninab302.build.core=nRF5 +ninab302.build.variant=NINA_B302_ublox +ninab302.build.usb_manufacturer="Nordic" +ninab302.build.usb_product="NINA B302 ublox" +ninab302.build.extra_flags=-DNRF52840_XXAA -DNINA_B302_ublox {build.flags.usb} +ninab302.build.ldscript=nrf52840_s140_v6.ld +ninab302.build.vid=0x239A +ninab302.build.pid=0x8029 + +# SofDevice Menu +ninab302.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_name=s140 +ninab302.menu.softdevice.s140v6.build.sd_version=6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +ninab302.menu.debug.l0=Level 0 (Release) +ninab302.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab302.menu.debug.l1=Level 1 (Error Message) +ninab302.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab302.menu.debug.l2=Level 2 (Full Debug) +ninab302.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab302.menu.debug.l3=Level 3 (Segger SystemView) +ninab302.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab302.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B112 +# ---------------------------------- +ninab112.name=NINA B112 ublox +ninab112.bootloader.tool=bootburn + +# Upload +ninab112.upload.tool=nrfutil +ninab112.upload.protocol=nrfutil +ninab112.upload.use_1200bps_touch=false +ninab112.upload.wait_for_upload_port=false +ninab112.upload.native_usb=false +ninab112.upload.maximum_size=290816 +ninab112.upload.maximum_data_size=52224 + +# Build +ninab112.build.mcu=cortex-m4 +ninab112.build.f_cpu=64000000 +ninab112.build.board=NINA_B112_ublox +ninab112.build.core=nRF5 +ninab112.build.variant=NINA_B112_ublox +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52832" +ninab112.build.extra_flags=-DNRF52832_XXAA -DNINA_B112_ublox -DNRF52 +ninab112.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +ninab112.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_name=s132 +ninab112.menu.softdevice.s132v6.build.sd_version=6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +ninab112.menu.debug.l0=Level 0 (Release) +ninab112.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab112.menu.debug.l1=Level 1 (Error Message) +ninab112.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab112.menu.debug.l2=Level 2 (Full Debug) +ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab112.menu.debug.l3=Level 3 (Segger SystemView) +ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/cores/nRF5/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/cores/nRF5/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/cores/nRF5/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/cores/nRF5/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/cores/nRF5/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/cores/nRF5/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/cores/nRF5/Udp.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/cores/nRF5/Udp.h new file mode 100644 index 0000000..016042a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/cores/nRF5/Udp.h @@ -0,0 +1,92 @@ +/* + * Udp.cpp: Library to send/receive UDP packets. + * + * NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these) + * 1) UDP does not guarantee the order in which assembled UDP packets are received. This + * might not happen often in practice, but in larger network topologies, a UDP + * packet can be received out of sequence. + * 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being + * aware of it. Again, this may not be a concern in practice on small local networks. + * For more information, see http://www.cafeaulait.org/course/week12/35.html + * + * MIT License: + * Copyright (c) 2008 Bjoern Hartmann + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * bjoern@cs.stanford.edu 12/30/2008 + */ + +#ifndef udp_h +#define udp_h + +#include +#include + +class UDP : public Stream { + +public: + virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + + // KH, add virtual function to support Multicast, necessary for many services (MDNS, etc.) + virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure + + virtual void stop() =0; // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port) =0; + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char *host, uint16_t port) =0; + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket() =0; + // Write a single byte into the packet + virtual size_t write(uint8_t) =0; + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t *buffer, size_t size) =0; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket() =0; + // Number of bytes remaining in the current packet + virtual int available() =0; + // Read a single byte from the current packet + virtual int read() =0; + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len) =0; + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) =0; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek() =0; + virtual void flush() =0; // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP() =0; + // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort() =0; +protected: + uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; +}; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/platform.txt new file mode 100644 index 0000000..6c7ed43 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/platform.txt @@ -0,0 +1,164 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All rights reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +name=Adafruit nRF52 Boards +version=0.20.5 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD +# KH, Error here to use gcc, mjust use g++ +#compiler.c.elf.cmd=arm-none-eabi-gcc +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Ofast -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2bin.flags=-O binary +compiler.elf2bin.cmd=arm-none-eabi-objcopy +compiler.elf2hex.flags=-O ihex +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align --specs=nano.specs --specs=nosys.specs +compiler.size.cmd=arm-none-eabi-size + +# this can be overriden in boards.txt +build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float +build.debug_flags=-DCFG_DEBUG=0 +build.logger_flags=-DCFG_LOGGER=1 +build.sysview_flags=-DCFG_SYSVIEW=0 + +# common compiler for nrf +rtos.path={build.core.path}/freertos +nordic.path={build.core.path}/nordic + +# build.logger_flags and build.sysview_flags and intentionally empty, +# to allow modification via a user's own boards.local.txt or platform.local.txt files. +build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DLFS_NAME_MAX=64 -Ofast {build.debug_flags} {build.logger_flags} {build.sysview_flags} "-I{build.core.path}/cmsis/Core/Include" "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" + +# usb flags +build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2bin.extra_flags= +compiler.elf2hex.extra_flags= + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +##recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +##recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +##recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Create archives +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.core.path}/linker" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +#recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +## Create dfu package zip file +recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip" + +## Create uf2 file +#recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2conv.py" -f 0xADA52840 -c -o "{build.path}/{build.project_name}.uf2" "{build.path}/{build.project_name}.hex" + +## Save bin +recipe.output.tmp_file_bin={build.project_name}.bin +recipe.output.save_file_bin={build.project_name}.save.bin + +## Save hex +recipe.output.tmp_file_hex={build.project_name}.hex +recipe.output.save_file_hexu={build.project_name}.save.hex + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +## Export Compiled Binary +recipe.output.tmp_file={build.project_name}.hex +recipe.output.save_file={build.project_name}.{build.variant}.hex + +#*************************************************** +# adafruit-nrfutil for uploading +# https://github.com/adafruit/Adafruit_nRF52_nrfutil +# pre-built binaries are provided for macos and windows +#*************************************************** +tools.nrfutil.cmd=adafruit-nrfutil +tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe +tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/macos/adafruit-nrfutil + +tools.nrfutil.upload.params.verbose=--verbose +tools.nrfutil.upload.params.quiet= +tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200 --singlebank + +#*************************************************** +# Burning bootloader with either jlink or nrfutil +#*************************************************** + +# Bootloader version +tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.3.2_{build.sd_name}_{build.sd_version} + +tools.bootburn.bootloader.params.verbose= +tools.bootburn.bootloader.params.quiet= +tools.bootburn.bootloader.pattern={program.burn_pattern} + +# erase flash page while programming +tools.bootburn.erase.params.verbose= +tools.bootburn.erase.params.quiet= +tools.bootburn.erase.pattern= + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B112_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B112_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B112_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B112_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B112_ublox/variant.cpp new file mode 100644 index 0000000..f43f3a4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B112_ublox/variant.cpp @@ -0,0 +1,59 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" + +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +const uint32_t g_ADigitalPinMap[] = { + // D0 .. D13 + 5, // D0 is P0.05 (UART RX) + 6, // D1 is P0.06 (UART TX) + 7, // D2 is P0.07 + 31, // D3 is P0.31 + 18, // D4 is P0.18 (LED Blue) + 99, // D5 (NC) + 9, // D6 is P0.09 NFC1 + 10, // D7 is P0.10 (Button) NFC2 + 99, // D8 (NC) + 8, // D9 is P0.08 + 11, // D10 is P0.11 CS + 13, // D11 is P0.13 MOSI + 12, // D12 is P0.12 MISO + 14, // D13 is P0.14 SCK + //I2C + 2, // D14 is P0.2 (SDA) + 3, // D15 is P0.3 (SCL) + // D16 .. D21 (aka A0 .. A5) + 3, // D16 is P0.03 (A0) + 2, // D17 is P0.02 (A1) + 4, // D18 is P0.04 (A2) + 30, // D19 is P0.30 (A3) SW2 + 29, // D20 is P0.29 (A4) + 28, // D21 is P0.28 (A5) + 9, // P0.09 NFC + 10, // P0.10 NFC + 16, // SW1 (LED Green) +}; \ No newline at end of file diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B112_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B112_ublox/variant.h new file mode 100644 index 0000000..833cbf6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B112_ublox/variant.h @@ -0,0 +1,172 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +#ifndef _VARIANT_NINA_B112_UBLOX_ +#define _VARIANT_NINA_B112_UBLOX_ + +#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \ + .rc_ctiv = 0, \ +.rc_temp_ctiv = 0, \ +.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM} + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (32u) +#define NUM_DIGITAL_PINS (32u) +#define NUM_ANALOG_INPUTS (6u) +#define NUM_ANALOG_OUTPUTS (0u) + +// LEDs +#define PIN_LED LED1 +#define LED_BUILTIN PIN_LED + +//LEDs onboard +#define LED1 (0) // Red +#define LED2 (24) // Green/SW1 +#define LED3 (4) // Blue + +#define LED_STATE_ON 1 // State when LED is litted + +//Switch +#define SW1 (24) +#define SW2 (19) + +// NFC +#define PIN_NFC_1 (6) // P0.9 +#define PIN_NFC_2 (7) // P0.10 + +/* + * Analog pins + */ +#define PIN_A0 (16) // P0.03 +#define PIN_A1 (17) // P0.02 +#define PIN_A2 (18) // P0.04 +#define PIN_A3 (19) // P0.30 +#define PIN_A4 (20) // P0.29 +#define PIN_A5 (21) // P0.28 + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_D0 (0) // P0.05 +#define PIN_D1 (1) // P0.06 +#define PIN_D2 (2) // P0.07 +#define PIN_D3 (4) // P0.31 +#define PIN_D4 (5) // P0.18 +#define PIN_D6 (6) // P0.09 +#define PIN_D7 (7) // P0.10 +#define PIN_D9 (9) // P0.08 +#define PIN_D10 (11) // P0.11 +#define PIN_D11 (13) // P0.13 +#define PIN_D12 (12) // P0.12 +#define PIN_D13 (14) // P0.14 +#define PIN_D14 (2) // P0.02 +#define PIN_D15 (3) // P0.03 + +static const uint8_t D0 = PIN_D0 ; +static const uint8_t D1 = PIN_D1 ; +static const uint8_t D2 = PIN_D2 ; +static const uint8_t D3 = PIN_D3 ; +static const uint8_t D4 = PIN_D4 ; +static const uint8_t D6 = PIN_D6 ; +static const uint8_t D7 = PIN_D7 ; +static const uint8_t D9 = PIN_D9 ; +static const uint8_t D10 = PIN_D10 ; +static const uint8_t D11 = PIN_D11 ; +static const uint8_t D12 = PIN_D12 ; +static const uint8_t D13 = PIN_D13 ; +static const uint8_t D14 = PIN_D14 ; +static const uint8_t D15 = PIN_D15 ; + +// Other pins +//static const uint8_t AREF = PIN_AREF; + +//#define PIN_AREF (24) +//#define PIN_VBAT PIN_A7 + +/* + * Serial interfaces + */ +#define PIN_SERIAL_RX (0) // P0.05 +#define PIN_SERIAL_TX (1) // P0.06 +#define PIN_SERIAL_CTS (2) // P0.07 +#define PIN_SERIAL_RTS (3) // P0.31 +#define PIN_SERIAL_DTR (28) // P0.28 +#define PIN_SERIAL_DSR (29) // P0.29 + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (12) // P0.12 +#define PIN_SPI_MOSI (11) // P0.13 +#define PIN_SPI_SCK (13) // P0.14 + +static const uint8_t SS = 10 ; // P0.11 +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (14) // P0.02 +#define PIN_WIRE_SCL (15) // P0.03 + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + + +#endif //_VARIANT_NINA_B112_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B302_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B302_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B302_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B302_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B302_ublox/variant.cpp new file mode 100644 index 0000000..8b4df2e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B302_ublox/variant.cpp @@ -0,0 +1,87 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#include "variant.h" +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +const uint32_t g_ADigitalPinMap[] = +{ + // D0 .. D13 + 29, // D0 is P0.29 (UART RX) + 45, // D1 is P1.13 (UART TX) + 44, // D2 is P1.12 (NFC2) + 31, // D3 is P0.31 (LED1) + 13, // D4 is P0.13 (LED2) + 11, // D5 is P0.11 + 9, // D6 is P0.09 + 10, // D7 is P0.10 (Button) + 41, // D8 is P1.09 + 12, // D9 is P0.12 + 14, // D10 is P0.14 + 15, // D11 is P0.15 + 32, // D12 is P1.00 + 7, // D13 is P0.07 + + // D14 .. D21 (aka A0 .. A5) + 4, // D14 is P0.04 (A0) + 30, // D15 is P0.30 (A1) + 5, // D16 is P0.05 (A2) + 2, // D17 is P0.02 (A3) + 28, // D18 is P0.28 (A4) + 3, // D19 is P0.03 (A5) + + // D20 .. D21 (aka I2C pins) + 16, // D20 is P0.16 (SDA) + 24, // D21 is P0.24 (SCL) + + // QSPI pins (not exposed via any header / test point) + 19, // D22 is P0.19 (QSPI CLK) + 17, // D23 is P0.17 (QSPI CS) + 20, // D24 is P0.20 (QSPI Data 0) + 21, // D25 is P0.21 (QSPI Data 1) + 22, // D26 is P0.22 (QSPI Data 2) + 26, // D27 is P0.23 (QSPI Data 3) + + 40, // D28 is P1.08 - IO34 + 41, // D29 is P1.01 - IO35 + 44, // D30 is P1.02 - IO36 + 45, // D31 is P1.03 - IO37 + 42, // D32 is P1.10 - IO38 + 43, // D33 is P1.11 - IO39 + 47, // D34 is P1.15 - IO40 + 46, // D35 is P1.14 - IO41 + 26, // D36 is P0.26 - IO42 + 6, // D37 is P0.6 - IO43 + 27, // D38 is P0.27 - IO44 +}; + +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B302_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B302_ublox/variant.h new file mode 100644 index 0000000..a69575f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B302_ublox/variant.h @@ -0,0 +1,149 @@ + /* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#ifndef _VARIANT_NINA_B302_UBLOX_ +#define _VARIANT_NINA_B302_UBLOX_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus +// Number of pins defined in PinDescription array +#define PINS_COUNT (40) +#define NUM_DIGITAL_PINS (34) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (3) +#define PIN_LED2 (4) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_RED PIN_LED1 +#define LED_BLUE PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +/* + * Buttons + */ +#define PIN_BUTTON1 (7) + +/* + * Analog pins + */ +#define PIN_A0 (14) +#define PIN_A1 (15) +#define PIN_A2 (16) +#define PIN_A3 (17) +#define PIN_A4 (18) +#define PIN_A5 (19) + +#define D0 (0) +#define D1 (1) +#define D2 (2) +#define D3 (3) +#define D4 (4) +#define D5 (5) +#define D6 (6) +#define D7 (7) +#define D8 (8) +#define D9 (9) +#define D10 (10) +#define D11 (11) +#define D12 (12) +#define D13 (13) + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_NFC1 (31) +#define PIN_NFC2 (2) + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0) +#define PIN_SERIAL1_TX (1) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (22) //24 original +#define PIN_SPI_MOSI (23) //25 original +#define PIN_SPI_SCK (24) //26 original + +static const uint8_t SS = (13); +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (20) +#define PIN_WIRE_SCL (21) + +// QSPI Pins +#define PIN_QSPI_SCK 22 +#define PIN_QSPI_CS 23 +#define PIN_QSPI_IO0 24 +#define PIN_QSPI_IO1 25 +#define PIN_QSPI_IO2 26 +#define PIN_QSPI_IO3 27 + +// On-board QSPI Flash +#define EXTERNAL_FLASH_DEVICES GD25Q16C +#define EXTERNAL_FLASH_USE_QSPI + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif //_VARIANT_NINA_B302_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/boards.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/boards.txt new file mode 100644 index 0000000..bbe9f9e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/boards.txt @@ -0,0 +1,649 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +menu.softdevice=Bootloader +menu.debug=Debug + +# ---------------------------------- +# Bluefruit Feather nRF52832 +# ---------------------------------- +feather52832.name=Adafruit Feather nRF52832 +feather52832.bootloader.tool=bootburn + +# Upload +feather52832.upload.tool=nrfutil +feather52832.upload.protocol=nrfutil +feather52832.upload.use_1200bps_touch=false +feather52832.upload.wait_for_upload_port=false +feather52832.upload.native_usb=false +feather52832.upload.maximum_size=290816 +feather52832.upload.maximum_data_size=52224 + +# Build +feather52832.build.mcu=cortex-m4 +feather52832.build.f_cpu=64000000 +feather52832.build.board=NRF52832_FEATHER +feather52832.build.core=nRF5 +feather52832.build.variant=feather_nrf52832 +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52832" +feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52832_FEATHER -DNRF52 +feather52832.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +feather52832.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_name=s132 +feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +feather52832.menu.debug.l0=Level 0 (Release) +feather52832.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52832.menu.debug.l1=Level 1 (Error Message) +feather52832.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52832.menu.debug.l2=Level 2 (Full Debug) +feather52832.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52832.menu.debug.l3=Level 3 (Segger SystemView) +feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Bluefruit Feather nRF52840 Express +# ---------------------------------- +feather52840.name=Adafruit Feather nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840.vid.0=0x239A +feather52840.pid.0=0x8029 +feather52840.vid.1=0x239A +feather52840.pid.1=0x0029 +feather52840.vid.2=0x239A +feather52840.pid.2=0x002A +feather52840.vid.3=0x239A +feather52840.pid.3=0x802A + +# Upload +feather52840.bootloader.tool=bootburn +feather52840.upload.tool=nrfutil +feather52840.upload.protocol=nrfutil +feather52840.upload.use_1200bps_touch=true +feather52840.upload.wait_for_upload_port=true +feather52840.upload.maximum_size=815104 +feather52840.upload.maximum_data_size=237568 + +# Build +feather52840.build.mcu=cortex-m4 +feather52840.build.f_cpu=64000000 +feather52840.build.board=NRF52840_FEATHER +feather52840.build.core=nRF5 +feather52840.build.variant=feather_nrf52840_express +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52840 Express" +feather52840.build.extra_flags=-DNRF52840_XXAA -DNRF52840_FEATHER {build.flags.usb} +feather52840.build.ldscript=nrf52840_s140_v6.ld +feather52840.build.vid=0x239A +feather52840.build.pid=0x8029 + +# SofDevice Menu +feather52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_name=s140 +feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840.menu.debug.l0=Level 0 (Release) +feather52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840.menu.debug.l1=Level 1 (Error Message) +feather52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840.menu.debug.l2=Level 2 (Full Debug) +feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840.menu.debug.l3=Level 3 (Segger SystemView) +feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# ---------------------------------- +# Feather Bluefruit sense +# ---------------------------------- +feather52840sense.name=Adafruit Feather Bluefruit Sense + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840sense.vid.0=0x239A +feather52840sense.pid.0=0x8087 +feather52840sense.vid.1=0x239A +feather52840sense.pid.1=0x0087 +feather52840sense.vid.2=0x239A +feather52840sense.pid.2=0x0088 +feather52840sense.vid.3=0x239A +feather52840sense.pid.3=0x8088 + +# Upload +feather52840sense.bootloader.tool=bootburn +feather52840sense.upload.tool=nrfutil +feather52840sense.upload.protocol=nrfutil +feather52840sense.upload.use_1200bps_touch=true +feather52840sense.upload.wait_for_upload_port=true +feather52840sense.upload.maximum_size=815104 +feather52840sense.upload.maximum_data_size=237568 + +# Build +feather52840sense.build.mcu=cortex-m4 +feather52840sense.build.f_cpu=64000000 +feather52840sense.build.board=NRF52840_FEATHER_SENSE +feather52840sense.build.core=nRF5 +feather52840sense.build.variant=feather_nrf52840_sense +feather52840sense.build.usb_manufacturer="Adafruit LLC" +feather52840sense.build.usb_product="Feather nRF52840 Sense" +feather52840sense.build.extra_flags=-DNRF52840_XXAA -DNRF52840_FEATHER_SENSE {build.flags.usb} +feather52840sense.build.ldscript=nrf52840_s140_v6.ld +feather52840sense.build.vid=0x239A +feather52840sense.build.pid=0x8087 + +# SofDevice Menu +feather52840sense.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_name=s140 +feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840sense.menu.debug.l0=Level 0 (Release) +feather52840sense.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840sense.menu.debug.l1=Level 1 (Error Message) +feather52840sense.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840sense.menu.debug.l2=Level 2 (Full Debug) +feather52840sense.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840sense.menu.debug.l3=Level 3 (Segger SystemView) +feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Bluefruit ItsyBitsy nRF52840 Express +# --------------------------------------------- +itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +itsybitsy52840.vid.0=0x239A +itsybitsy52840.pid.0=0x8051 +itsybitsy52840.vid.1=0x239A +itsybitsy52840.pid.1=0x0051 +itsybitsy52840.vid.2=0x239A +itsybitsy52840.pid.2=0x0052 +itsybitsy52840.vid.3=0x239A +itsybitsy52840.pid.3=0x8052 + +# Upload +itsybitsy52840.bootloader.tool=bootburn +itsybitsy52840.upload.tool=nrfutil +itsybitsy52840.upload.protocol=nrfutil +itsybitsy52840.upload.use_1200bps_touch=true +itsybitsy52840.upload.wait_for_upload_port=true +itsybitsy52840.upload.maximum_size=815104 +itsybitsy52840.upload.maximum_data_size=237568 + +# Build +itsybitsy52840.build.mcu=cortex-m4 +itsybitsy52840.build.f_cpu=64000000 +itsybitsy52840.build.board=NRF52840_ITSYBITSY +itsybitsy52840.build.core=nRF5 +itsybitsy52840.build.variant=itsybitsy_nrf52840_express +itsybitsy52840.build.usb_manufacturer="Adafruit LLC" +itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express" +itsybitsy52840.build.extra_flags=-DNRF52840_XXAA -DNRF52840_ITSYBITSY -DARDUINO_NRF52_ITSYBITSY {build.flags.usb} +itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld +itsybitsy52840.build.vid=0x239A +itsybitsy52840.build.pid=0x8051 + +# SofDevice Menu +itsybitsy52840.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140 +itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +itsybitsy52840.menu.debug.l0=Level 0 (Release) +itsybitsy52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +itsybitsy52840.menu.debug.l1=Level 1 (Error Message) +itsybitsy52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +itsybitsy52840.menu.debug.l2=Level 2 (Full Debug) +itsybitsy52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView) +itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# --------------------------------------------- +# Bluefruit Circuit Playground nRF52840 Express +# --------------------------------------------- +cplaynrf52840.name=Adafruit Circuit Playground Bluefruit + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cplaynrf52840.vid.0=0x239A +cplaynrf52840.pid.0=0x8045 +cplaynrf52840.vid.1=0x239A +cplaynrf52840.pid.1=0x0045 +cplaynrf52840.vid.2=0x239A +cplaynrf52840.pid.2=0x0046 +cplaynrf52840.vid.3=0x239A +cplaynrf52840.pid.3=0x8046 + +# Upload +cplaynrf52840.bootloader.tool=bootburn +cplaynrf52840.upload.tool=nrfutil +cplaynrf52840.upload.protocol=nrfutil +cplaynrf52840.upload.use_1200bps_touch=true +cplaynrf52840.upload.wait_for_upload_port=true +cplaynrf52840.upload.maximum_size=815104 +cplaynrf52840.upload.maximum_data_size=237568 + +# Build +cplaynrf52840.build.mcu=cortex-m4 +cplaynrf52840.build.f_cpu=64000000 +cplaynrf52840.build.board=NRF52840_CIRCUITPLAY +cplaynrf52840.build.core=nRF5 +cplaynrf52840.build.variant=circuitplayground_nrf52840 +cplaynrf52840.build.usb_manufacturer="Adafruit LLC" +cplaynrf52840.build.usb_product="Circuit Playground Bluefruit" +cplaynrf52840.build.extra_flags=-DNRF52840_XXAA -DNRF52840_CIRCUITPLAY {build.flags.usb} +cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld +cplaynrf52840.build.vid=0x239A +cplaynrf52840.build.pid=0x8045 + +# SofDevice Menu +cplaynrf52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cplaynrf52840.menu.debug.l0=Level 0 (Release) +cplaynrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cplaynrf52840.menu.debug.l1=Level 1 (Error Message) +cplaynrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cplaynrf52840.menu.debug.l2=Level 2 (Full Debug) +cplaynrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Clue nRF52840 +# --------------------------------------------- +cluenrf52840.name=Adafruit CLUE + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cluenrf52840.vid.0=0x239A +cluenrf52840.pid.0=0x8072 +cluenrf52840.vid.1=0x239A +cluenrf52840.pid.1=0x0072 +cluenrf52840.vid.2=0x239A +cluenrf52840.pid.2=0x0071 +cluenrf52840.vid.3=0x239A +cluenrf52840.pid.3=0x8071 + +# Upload +cluenrf52840.bootloader.tool=bootburn +cluenrf52840.upload.tool=nrfutil +cluenrf52840.upload.protocol=nrfutil +cluenrf52840.upload.use_1200bps_touch=true +cluenrf52840.upload.wait_for_upload_port=true +cluenrf52840.upload.maximum_size=815104 +cluenrf52840.upload.maximum_data_size=237568 + +# Build +cluenrf52840.build.mcu=cortex-m4 +cluenrf52840.build.f_cpu=64000000 +cluenrf52840.build.board=NRF52840_CLUE +cluenrf52840.build.core=nRF5 +cluenrf52840.build.variant=clue_nrf52840 +cluenrf52840.build.usb_manufacturer="Adafruit LLC" +cluenrf52840.build.usb_product="CLUE" +cluenrf52840.build.extra_flags=-DNRF52840_XXAA -DNRF52840_CLUE {build.flags.usb} +cluenrf52840.build.ldscript=nrf52840_s140_v6.ld +cluenrf52840.build.vid=0x239A +cluenrf52840.build.pid=0x8071 + +# SofDevice Menu +cluenrf52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cluenrf52840.menu.debug.l0=Level 0 (Release) +cluenrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cluenrf52840.menu.debug.l1=Level 1 (Error Message) +cluenrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cluenrf52840.menu.debug.l2=Level 2 (Full Debug) +cluenrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Bluefruit Metro nRF52840 Express +# ---------------------------------- +metro52840.name=Adafruit Bluefruit Metro nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +metro52840.vid.0=0x239A +metro52840.pid.0=0x803F +metro52840.vid.1=0x239A +metro52840.pid.1=0x003F +metro52840.vid.2=0x239A +metro52840.pid.2=0x0040 +metro52840.vid.3=0x239A +metro52840.pid.3=0x8040 + +# Upload +metro52840.bootloader.tool=bootburn +metro52840.upload.tool=nrfutil +metro52840.upload.protocol=nrfutil +metro52840.upload.use_1200bps_touch=true +metro52840.upload.wait_for_upload_port=true +metro52840.upload.maximum_size=815104 +metro52840.upload.maximum_data_size=237568 + +# Build +metro52840.build.mcu=cortex-m4 +metro52840.build.f_cpu=64000000 +metro52840.build.board=NRF52840_METRO +metro52840.build.core=nRF5 +metro52840.build.variant=metro_nrf52840_express +metro52840.build.usb_manufacturer="Adafruit LLC" +metro52840.build.usb_product="Metro nRF52840 Express" +metro52840.build.extra_flags=-DNRF52840_XXAA -DNRF52840_METRO {build.flags.usb} +metro52840.build.ldscript=nrf52840_s140_v6.ld +metro52840.build.vid=0x239A +metro52840.build.pid=0x803F + +# SofDevice Menu +metro52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_name=s140 +metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +metro52840.menu.debug.l0=Level 0 (Release) +metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +metro52840.menu.debug.l1=Level 1 (Error Message) +metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +metro52840.menu.debug.l2=Level 2 (Full Debug) +metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +metro52840.menu.debug.l3=Level 3 (Segger SystemView) +metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + + + +# ------------------------------------------------------- +# +# Boards that aren't made by Adafruit +# +# ------------------------------------------------------- + + +# ---------------------------------- +# Nordic nRF52840DK (PCA10056) +# ---------------------------------- +pca10056.name=Nordic nRF52840DK (PCA10056) +pca10056.bootloader.tool=bootburn + +# Upload +pca10056.upload.tool=nrfutil +pca10056.upload.protocol=nrfutil +pca10056.upload.use_1200bps_touch=true +pca10056.upload.wait_for_upload_port=true +pca10056.upload.maximum_size=815104 +pca10056.upload.maximum_data_size=237568 + +# Build +pca10056.build.mcu=cortex-m4 +pca10056.build.f_cpu=64000000 +pca10056.build.board=NRF52840_PCA10056 +pca10056.build.core=nRF5 +pca10056.build.variant=pca10056 +pca10056.build.usb_manufacturer="Nordic" +pca10056.build.usb_product="nRF52840 DK" +pca10056.build.extra_flags=-DNRF52840_XXAA -DNRF52840_PCA10056 {build.flags.usb} +pca10056.build.ldscript=nrf52840_s140_v6.ld +pca10056.build.vid=0x239A +pca10056.build.pid=0x8029 + +# SofDevice Menu +pca10056.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_name=s140 +pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +pca10056.menu.debug.l0=Level 0 (Release) +pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +pca10056.menu.debug.l1=Level 1 (Error Message) +pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +pca10056.menu.debug.l2=Level 2 (Full Debug) +pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +pca10056.menu.debug.l3=Level 3 (Segger SystemView) +pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Particle Xenon +# ---------------------------------- +particle_xenon.name=Particle Xenon + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +particle_xenon.vid.0=0x239A +particle_xenon.pid.0=0x8029 +particle_xenon.vid.1=0x239A +particle_xenon.pid.1=0x0029 +particle_xenon.vid.2=0x239A +particle_xenon.pid.2=0x002A +particle_xenon.vid.3=0x239A +particle_xenon.pid.3=0x802A + +# Upload +particle_xenon.bootloader.tool=bootburn +particle_xenon.upload.tool=nrfutil +particle_xenon.upload.protocol=nrfutil +particle_xenon.upload.use_1200bps_touch=true +particle_xenon.upload.wait_for_upload_port=true +particle_xenon.upload.maximum_size=815104 +particle_xenon.upload.maximum_data_size=237568 + +# Build +particle_xenon.build.mcu=cortex-m4 +particle_xenon.build.f_cpu=64000000 +particle_xenon.build.board=PARTICLE_XENON +particle_xenon.build.core=nRF5 +particle_xenon.build.variant=particle_xenon +particle_xenon.build.usb_manufacturer="Particle Industries" +particle_xenon.build.usb_product="Particle Xenon" +particle_xenon.build.extra_flags=-DNRF52840_XXAA -DPARTICLE_XENON {build.flags.usb} +particle_xenon.build.ldscript=nrf52840_s140_v6.ld +particle_xenon.build.vid=0x239A +particle_xenon.build.pid=0x8029 + +# SofDevice Menu +particle_xenon.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_name=s140 +particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +particle_xenon.menu.debug.l0=Level 0 (Release) +particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +particle_xenon.menu.debug.l1=Level 1 (Error Message) +particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +particle_xenon.menu.debug.l2=Level 2 (Full Debug) +particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +particle_xenon.menu.debug.l3=Level 3 (Segger SystemView) +particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Raytac MDBT50Q - RX +# ---------------------------------- +mdbt50qrx.name=Raytac MDBT50Q-RX Dongle + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +mdbt50qrx.vid.0=0x239A +mdbt50qrx.pid.0=0x8029 +mdbt50qrx.vid.1=0x239A +mdbt50qrx.pid.1=0x0029 +mdbt50qrx.vid.2=0x239A +mdbt50qrx.pid.2=0x002A +mdbt50qrx.vid.3=0x239A +mdbt50qrx.pid.3=0x802A + +# Upload +mdbt50qrx.bootloader.tool=bootburn +mdbt50qrx.upload.tool=nrfutil +mdbt50qrx.upload.protocol=nrfutil +mdbt50qrx.upload.use_1200bps_touch=true +mdbt50qrx.upload.wait_for_upload_port=true +mdbt50qrx.upload.maximum_size=815104 +mdbt50qrx.upload.maximum_data_size=237568 + +# Build +mdbt50qrx.build.mcu=cortex-m4 +mdbt50qrx.build.f_cpu=64000000 +mdbt50qrx.build.board=MDBT50Q_RX +mdbt50qrx.build.core=nRF5 +mdbt50qrx.build.variant=raytac_mdbt50q_rx +mdbt50qrx.build.usb_manufacturer="Raytac Corporation" +mdbt50qrx.build.usb_product="Raytac MDBT50Q - RX" +mdbt50qrx.build.extra_flags=-DNRF52840_XXAA -DMDBT50Q_RX {build.flags.usb} +mdbt50qrx.build.ldscript=nrf52840_s140_v6.ld +mdbt50qrx.build.vid=0x239A +mdbt50qrx.build.pid=0x8029 + +# SofDevice Menu +mdbt50qrx.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_name=s140 +mdbt50qrx.menu.softdevice.s140v6.build.sd_version=6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +mdbt50qrx.menu.debug.l0=Level 0 (Release) +mdbt50qrx.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +mdbt50qrx.menu.debug.l1=Level 1 (Error Message) +mdbt50qrx.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +mdbt50qrx.menu.debug.l2=Level 2 (Full Debug) +mdbt50qrx.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +mdbt50qrx.menu.debug.l3=Level 3 (Segger SystemView) +mdbt50qrx.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +mdbt50qrx.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B302 +# ---------------------------------- +ninab302.name=NINA B302 ublox + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +ninab302.vid.0=0x239A +ninab302.pid.0=0x8029 +ninab302.vid.1=0x239A +ninab302.pid.1=0x0029 +ninab302.vid.2=0x7239A +ninab302.pid.2=0x002A +ninab302.vid.3=0x239A +ninab302.pid.3=0x802A + +# Upload +ninab302.bootloader.tool=bootburn +ninab302.upload.tool=nrfutil +ninab302.upload.protocol=nrfutil +ninab302.upload.use_1200bps_touch=true +ninab302.upload.wait_for_upload_port=true +ninab302.upload.maximum_size=815104 +ninab302.upload.maximum_data_size=237568 + +# Build +ninab302.build.mcu=cortex-m4 +ninab302.build.f_cpu=64000000 +ninab302.build.board=NINA_B302_ublox +ninab302.build.core=nRF5 +ninab302.build.variant=NINA_B302_ublox +ninab302.build.usb_manufacturer="Nordic" +ninab302.build.usb_product="NINA B302 ublox" +ninab302.build.extra_flags=-DNRF52840_XXAA -DNINA_B302_ublox {build.flags.usb} +ninab302.build.ldscript=nrf52840_s140_v6.ld +ninab302.build.vid=0x239A +ninab302.build.pid=0x8029 + +# SofDevice Menu +ninab302.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_name=s140 +ninab302.menu.softdevice.s140v6.build.sd_version=6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +ninab302.menu.debug.l0=Level 0 (Release) +ninab302.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab302.menu.debug.l1=Level 1 (Error Message) +ninab302.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab302.menu.debug.l2=Level 2 (Full Debug) +ninab302.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab302.menu.debug.l3=Level 3 (Segger SystemView) +ninab302.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab302.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B112 +# ---------------------------------- +ninab112.name=NINA B112 ublox +ninab112.bootloader.tool=bootburn + +# Upload +ninab112.upload.tool=nrfutil +ninab112.upload.protocol=nrfutil +ninab112.upload.use_1200bps_touch=false +ninab112.upload.wait_for_upload_port=false +ninab112.upload.native_usb=false +ninab112.upload.maximum_size=290816 +ninab112.upload.maximum_data_size=52224 + +# Build +ninab112.build.mcu=cortex-m4 +ninab112.build.f_cpu=64000000 +ninab112.build.board=NINA_B112_ublox +ninab112.build.core=nRF5 +ninab112.build.variant=NINA_B112_ublox +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52832" +ninab112.build.extra_flags=-DNRF52832_XXAA -DNINA_B112_ublox -DNRF52 +ninab112.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +ninab112.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_name=s132 +ninab112.menu.softdevice.s132v6.build.sd_version=6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +ninab112.menu.debug.l0=Level 0 (Release) +ninab112.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab112.menu.debug.l1=Level 1 (Error Message) +ninab112.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab112.menu.debug.l2=Level 2 (Full Debug) +ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab112.menu.debug.l3=Level 3 (Segger SystemView) +ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/cores/nRF5/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/cores/nRF5/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/cores/nRF5/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/cores/nRF5/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/cores/nRF5/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/cores/nRF5/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/cores/nRF5/Udp.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/cores/nRF5/Udp.h new file mode 100644 index 0000000..016042a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/cores/nRF5/Udp.h @@ -0,0 +1,92 @@ +/* + * Udp.cpp: Library to send/receive UDP packets. + * + * NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these) + * 1) UDP does not guarantee the order in which assembled UDP packets are received. This + * might not happen often in practice, but in larger network topologies, a UDP + * packet can be received out of sequence. + * 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being + * aware of it. Again, this may not be a concern in practice on small local networks. + * For more information, see http://www.cafeaulait.org/course/week12/35.html + * + * MIT License: + * Copyright (c) 2008 Bjoern Hartmann + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * bjoern@cs.stanford.edu 12/30/2008 + */ + +#ifndef udp_h +#define udp_h + +#include +#include + +class UDP : public Stream { + +public: + virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + + // KH, add virtual function to support Multicast, necessary for many services (MDNS, etc.) + virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure + + virtual void stop() =0; // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port) =0; + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char *host, uint16_t port) =0; + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket() =0; + // Write a single byte into the packet + virtual size_t write(uint8_t) =0; + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t *buffer, size_t size) =0; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket() =0; + // Number of bytes remaining in the current packet + virtual int available() =0; + // Read a single byte from the current packet + virtual int read() =0; + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len) =0; + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) =0; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek() =0; + virtual void flush() =0; // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP() =0; + // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort() =0; +protected: + uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; +}; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/platform.txt new file mode 100644 index 0000000..6c7ed43 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/platform.txt @@ -0,0 +1,164 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All rights reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +name=Adafruit nRF52 Boards +version=0.20.5 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD +# KH, Error here to use gcc, mjust use g++ +#compiler.c.elf.cmd=arm-none-eabi-gcc +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Ofast -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2bin.flags=-O binary +compiler.elf2bin.cmd=arm-none-eabi-objcopy +compiler.elf2hex.flags=-O ihex +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align --specs=nano.specs --specs=nosys.specs +compiler.size.cmd=arm-none-eabi-size + +# this can be overriden in boards.txt +build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float +build.debug_flags=-DCFG_DEBUG=0 +build.logger_flags=-DCFG_LOGGER=1 +build.sysview_flags=-DCFG_SYSVIEW=0 + +# common compiler for nrf +rtos.path={build.core.path}/freertos +nordic.path={build.core.path}/nordic + +# build.logger_flags and build.sysview_flags and intentionally empty, +# to allow modification via a user's own boards.local.txt or platform.local.txt files. +build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DLFS_NAME_MAX=64 -Ofast {build.debug_flags} {build.logger_flags} {build.sysview_flags} "-I{build.core.path}/cmsis/Core/Include" "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" + +# usb flags +build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2bin.extra_flags= +compiler.elf2hex.extra_flags= + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +##recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +##recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +##recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Create archives +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.core.path}/linker" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +#recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +## Create dfu package zip file +recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip" + +## Create uf2 file +#recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2conv.py" -f 0xADA52840 -c -o "{build.path}/{build.project_name}.uf2" "{build.path}/{build.project_name}.hex" + +## Save bin +recipe.output.tmp_file_bin={build.project_name}.bin +recipe.output.save_file_bin={build.project_name}.save.bin + +## Save hex +recipe.output.tmp_file_hex={build.project_name}.hex +recipe.output.save_file_hexu={build.project_name}.save.hex + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +## Export Compiled Binary +recipe.output.tmp_file={build.project_name}.hex +recipe.output.save_file={build.project_name}.{build.variant}.hex + +#*************************************************** +# adafruit-nrfutil for uploading +# https://github.com/adafruit/Adafruit_nRF52_nrfutil +# pre-built binaries are provided for macos and windows +#*************************************************** +tools.nrfutil.cmd=adafruit-nrfutil +tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe +tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/macos/adafruit-nrfutil + +tools.nrfutil.upload.params.verbose=--verbose +tools.nrfutil.upload.params.quiet= +tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200 --singlebank + +#*************************************************** +# Burning bootloader with either jlink or nrfutil +#*************************************************** + +# Bootloader version +tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.3.2_{build.sd_name}_{build.sd_version} + +tools.bootburn.bootloader.params.verbose= +tools.bootburn.bootloader.params.quiet= +tools.bootburn.bootloader.pattern={program.burn_pattern} + +# erase flash page while programming +tools.bootburn.erase.params.verbose= +tools.bootburn.erase.params.quiet= +tools.bootburn.erase.pattern= + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B112_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B112_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B112_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B112_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B112_ublox/variant.cpp new file mode 100644 index 0000000..f43f3a4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B112_ublox/variant.cpp @@ -0,0 +1,59 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" + +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +const uint32_t g_ADigitalPinMap[] = { + // D0 .. D13 + 5, // D0 is P0.05 (UART RX) + 6, // D1 is P0.06 (UART TX) + 7, // D2 is P0.07 + 31, // D3 is P0.31 + 18, // D4 is P0.18 (LED Blue) + 99, // D5 (NC) + 9, // D6 is P0.09 NFC1 + 10, // D7 is P0.10 (Button) NFC2 + 99, // D8 (NC) + 8, // D9 is P0.08 + 11, // D10 is P0.11 CS + 13, // D11 is P0.13 MOSI + 12, // D12 is P0.12 MISO + 14, // D13 is P0.14 SCK + //I2C + 2, // D14 is P0.2 (SDA) + 3, // D15 is P0.3 (SCL) + // D16 .. D21 (aka A0 .. A5) + 3, // D16 is P0.03 (A0) + 2, // D17 is P0.02 (A1) + 4, // D18 is P0.04 (A2) + 30, // D19 is P0.30 (A3) SW2 + 29, // D20 is P0.29 (A4) + 28, // D21 is P0.28 (A5) + 9, // P0.09 NFC + 10, // P0.10 NFC + 16, // SW1 (LED Green) +}; \ No newline at end of file diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B112_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B112_ublox/variant.h new file mode 100644 index 0000000..833cbf6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B112_ublox/variant.h @@ -0,0 +1,172 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +#ifndef _VARIANT_NINA_B112_UBLOX_ +#define _VARIANT_NINA_B112_UBLOX_ + +#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \ + .rc_ctiv = 0, \ +.rc_temp_ctiv = 0, \ +.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM} + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (32u) +#define NUM_DIGITAL_PINS (32u) +#define NUM_ANALOG_INPUTS (6u) +#define NUM_ANALOG_OUTPUTS (0u) + +// LEDs +#define PIN_LED LED1 +#define LED_BUILTIN PIN_LED + +//LEDs onboard +#define LED1 (0) // Red +#define LED2 (24) // Green/SW1 +#define LED3 (4) // Blue + +#define LED_STATE_ON 1 // State when LED is litted + +//Switch +#define SW1 (24) +#define SW2 (19) + +// NFC +#define PIN_NFC_1 (6) // P0.9 +#define PIN_NFC_2 (7) // P0.10 + +/* + * Analog pins + */ +#define PIN_A0 (16) // P0.03 +#define PIN_A1 (17) // P0.02 +#define PIN_A2 (18) // P0.04 +#define PIN_A3 (19) // P0.30 +#define PIN_A4 (20) // P0.29 +#define PIN_A5 (21) // P0.28 + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_D0 (0) // P0.05 +#define PIN_D1 (1) // P0.06 +#define PIN_D2 (2) // P0.07 +#define PIN_D3 (4) // P0.31 +#define PIN_D4 (5) // P0.18 +#define PIN_D6 (6) // P0.09 +#define PIN_D7 (7) // P0.10 +#define PIN_D9 (9) // P0.08 +#define PIN_D10 (11) // P0.11 +#define PIN_D11 (13) // P0.13 +#define PIN_D12 (12) // P0.12 +#define PIN_D13 (14) // P0.14 +#define PIN_D14 (2) // P0.02 +#define PIN_D15 (3) // P0.03 + +static const uint8_t D0 = PIN_D0 ; +static const uint8_t D1 = PIN_D1 ; +static const uint8_t D2 = PIN_D2 ; +static const uint8_t D3 = PIN_D3 ; +static const uint8_t D4 = PIN_D4 ; +static const uint8_t D6 = PIN_D6 ; +static const uint8_t D7 = PIN_D7 ; +static const uint8_t D9 = PIN_D9 ; +static const uint8_t D10 = PIN_D10 ; +static const uint8_t D11 = PIN_D11 ; +static const uint8_t D12 = PIN_D12 ; +static const uint8_t D13 = PIN_D13 ; +static const uint8_t D14 = PIN_D14 ; +static const uint8_t D15 = PIN_D15 ; + +// Other pins +//static const uint8_t AREF = PIN_AREF; + +//#define PIN_AREF (24) +//#define PIN_VBAT PIN_A7 + +/* + * Serial interfaces + */ +#define PIN_SERIAL_RX (0) // P0.05 +#define PIN_SERIAL_TX (1) // P0.06 +#define PIN_SERIAL_CTS (2) // P0.07 +#define PIN_SERIAL_RTS (3) // P0.31 +#define PIN_SERIAL_DTR (28) // P0.28 +#define PIN_SERIAL_DSR (29) // P0.29 + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (12) // P0.12 +#define PIN_SPI_MOSI (11) // P0.13 +#define PIN_SPI_SCK (13) // P0.14 + +static const uint8_t SS = 10 ; // P0.11 +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (14) // P0.02 +#define PIN_WIRE_SCL (15) // P0.03 + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + + +#endif //_VARIANT_NINA_B112_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B302_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B302_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B302_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B302_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B302_ublox/variant.cpp new file mode 100644 index 0000000..8b4df2e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B302_ublox/variant.cpp @@ -0,0 +1,87 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#include "variant.h" +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +const uint32_t g_ADigitalPinMap[] = +{ + // D0 .. D13 + 29, // D0 is P0.29 (UART RX) + 45, // D1 is P1.13 (UART TX) + 44, // D2 is P1.12 (NFC2) + 31, // D3 is P0.31 (LED1) + 13, // D4 is P0.13 (LED2) + 11, // D5 is P0.11 + 9, // D6 is P0.09 + 10, // D7 is P0.10 (Button) + 41, // D8 is P1.09 + 12, // D9 is P0.12 + 14, // D10 is P0.14 + 15, // D11 is P0.15 + 32, // D12 is P1.00 + 7, // D13 is P0.07 + + // D14 .. D21 (aka A0 .. A5) + 4, // D14 is P0.04 (A0) + 30, // D15 is P0.30 (A1) + 5, // D16 is P0.05 (A2) + 2, // D17 is P0.02 (A3) + 28, // D18 is P0.28 (A4) + 3, // D19 is P0.03 (A5) + + // D20 .. D21 (aka I2C pins) + 16, // D20 is P0.16 (SDA) + 24, // D21 is P0.24 (SCL) + + // QSPI pins (not exposed via any header / test point) + 19, // D22 is P0.19 (QSPI CLK) + 17, // D23 is P0.17 (QSPI CS) + 20, // D24 is P0.20 (QSPI Data 0) + 21, // D25 is P0.21 (QSPI Data 1) + 22, // D26 is P0.22 (QSPI Data 2) + 26, // D27 is P0.23 (QSPI Data 3) + + 40, // D28 is P1.08 - IO34 + 41, // D29 is P1.01 - IO35 + 44, // D30 is P1.02 - IO36 + 45, // D31 is P1.03 - IO37 + 42, // D32 is P1.10 - IO38 + 43, // D33 is P1.11 - IO39 + 47, // D34 is P1.15 - IO40 + 46, // D35 is P1.14 - IO41 + 26, // D36 is P0.26 - IO42 + 6, // D37 is P0.6 - IO43 + 27, // D38 is P0.27 - IO44 +}; + +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B302_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B302_ublox/variant.h new file mode 100644 index 0000000..a69575f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B302_ublox/variant.h @@ -0,0 +1,149 @@ + /* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#ifndef _VARIANT_NINA_B302_UBLOX_ +#define _VARIANT_NINA_B302_UBLOX_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus +// Number of pins defined in PinDescription array +#define PINS_COUNT (40) +#define NUM_DIGITAL_PINS (34) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (3) +#define PIN_LED2 (4) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_RED PIN_LED1 +#define LED_BLUE PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +/* + * Buttons + */ +#define PIN_BUTTON1 (7) + +/* + * Analog pins + */ +#define PIN_A0 (14) +#define PIN_A1 (15) +#define PIN_A2 (16) +#define PIN_A3 (17) +#define PIN_A4 (18) +#define PIN_A5 (19) + +#define D0 (0) +#define D1 (1) +#define D2 (2) +#define D3 (3) +#define D4 (4) +#define D5 (5) +#define D6 (6) +#define D7 (7) +#define D8 (8) +#define D9 (9) +#define D10 (10) +#define D11 (11) +#define D12 (12) +#define D13 (13) + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_NFC1 (31) +#define PIN_NFC2 (2) + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0) +#define PIN_SERIAL1_TX (1) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (22) //24 original +#define PIN_SPI_MOSI (23) //25 original +#define PIN_SPI_SCK (24) //26 original + +static const uint8_t SS = (13); +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (20) +#define PIN_WIRE_SCL (21) + +// QSPI Pins +#define PIN_QSPI_SCK 22 +#define PIN_QSPI_CS 23 +#define PIN_QSPI_IO0 24 +#define PIN_QSPI_IO1 25 +#define PIN_QSPI_IO2 26 +#define PIN_QSPI_IO3 27 + +// On-board QSPI Flash +#define EXTERNAL_FLASH_DEVICES GD25Q16C +#define EXTERNAL_FLASH_USE_QSPI + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif //_VARIANT_NINA_B302_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/boards.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/boards.txt new file mode 100644 index 0000000..5aee8ca --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/boards.txt @@ -0,0 +1,649 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +menu.softdevice=Bootloader +menu.debug=Debug + +# ---------------------------------- +# Bluefruit Feather nRF52832 +# ---------------------------------- +feather52832.name=Adafruit Feather nRF52832 +feather52832.bootloader.tool=bootburn + +# Upload +feather52832.upload.tool=nrfutil +feather52832.upload.protocol=nrfutil +feather52832.upload.use_1200bps_touch=false +feather52832.upload.wait_for_upload_port=false +feather52832.upload.native_usb=false +feather52832.upload.maximum_size=290816 +feather52832.upload.maximum_data_size=52224 + +# Build +feather52832.build.mcu=cortex-m4 +feather52832.build.f_cpu=64000000 +feather52832.build.board=NRF52832_FEATHER +feather52832.build.core=nRF5 +feather52832.build.variant=feather_nrf52832 +feather52832.build.usb_manufacturer="Adafruit LLC" +feather52832.build.usb_product="Feather nRF52832" +feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52832_FEATHER -DNRF52 +feather52832.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +feather52832.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_name=s132 +feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +feather52832.menu.debug.l0=Level 0 (Release) +feather52832.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52832.menu.debug.l1=Level 1 (Error Message) +feather52832.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52832.menu.debug.l2=Level 2 (Full Debug) +feather52832.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52832.menu.debug.l3=Level 3 (Segger SystemView) +feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Bluefruit Feather nRF52840 Express +# ---------------------------------- +feather52840.name=Adafruit Feather nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840.vid.0=0x239A +feather52840.pid.0=0x8029 +feather52840.vid.1=0x239A +feather52840.pid.1=0x0029 +feather52840.vid.2=0x239A +feather52840.pid.2=0x002A +feather52840.vid.3=0x239A +feather52840.pid.3=0x802A + +# Upload +feather52840.bootloader.tool=bootburn +feather52840.upload.tool=nrfutil +feather52840.upload.protocol=nrfutil +feather52840.upload.use_1200bps_touch=true +feather52840.upload.wait_for_upload_port=true +feather52840.upload.maximum_size=815104 +feather52840.upload.maximum_data_size=237568 + +# Build +feather52840.build.mcu=cortex-m4 +feather52840.build.f_cpu=64000000 +feather52840.build.board=NRF52840_FEATHER +feather52840.build.core=nRF5 +feather52840.build.variant=feather_nrf52840_express +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52840 Express" +feather52840.build.extra_flags=-DNRF52840_XXAA -DNRF52840_FEATHER {build.flags.usb} +feather52840.build.ldscript=nrf52840_s140_v6.ld +feather52840.build.vid=0x239A +feather52840.build.pid=0x8029 + +# SofDevice Menu +feather52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_name=s140 +feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840.menu.debug.l0=Level 0 (Release) +feather52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840.menu.debug.l1=Level 1 (Error Message) +feather52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840.menu.debug.l2=Level 2 (Full Debug) +feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840.menu.debug.l3=Level 3 (Segger SystemView) +feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# ---------------------------------- +# Feather Bluefruit sense +# ---------------------------------- +feather52840sense.name=Adafruit Feather Bluefruit Sense + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840sense.vid.0=0x239A +feather52840sense.pid.0=0x8087 +feather52840sense.vid.1=0x239A +feather52840sense.pid.1=0x0087 +feather52840sense.vid.2=0x239A +feather52840sense.pid.2=0x0088 +feather52840sense.vid.3=0x239A +feather52840sense.pid.3=0x8088 + +# Upload +feather52840sense.bootloader.tool=bootburn +feather52840sense.upload.tool=nrfutil +feather52840sense.upload.protocol=nrfutil +feather52840sense.upload.use_1200bps_touch=true +feather52840sense.upload.wait_for_upload_port=true +feather52840sense.upload.maximum_size=815104 +feather52840sense.upload.maximum_data_size=237568 + +# Build +feather52840sense.build.mcu=cortex-m4 +feather52840sense.build.f_cpu=64000000 +feather52840sense.build.board=NRF52840_FEATHER_SENSE +feather52840sense.build.core=nRF5 +feather52840sense.build.variant=feather_nrf52840_sense +feather52840sense.build.usb_manufacturer="Adafruit LLC" +feather52840sense.build.usb_product="Feather nRF52840 Sense" +feather52840sense.build.extra_flags=-DNRF52840_XXAA -DNRF52840_FEATHER_SENSE {build.flags.usb} +feather52840sense.build.ldscript=nrf52840_s140_v6.ld +feather52840sense.build.vid=0x239A +feather52840sense.build.pid=0x8087 + +# SofDevice Menu +feather52840sense.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_name=s140 +feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840sense.menu.debug.l0=Level 0 (Release) +feather52840sense.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840sense.menu.debug.l1=Level 1 (Error Message) +feather52840sense.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840sense.menu.debug.l2=Level 2 (Full Debug) +feather52840sense.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840sense.menu.debug.l3=Level 3 (Segger SystemView) +feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Bluefruit ItsyBitsy nRF52840 Express +# --------------------------------------------- +itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +itsybitsy52840.vid.0=0x239A +itsybitsy52840.pid.0=0x8051 +itsybitsy52840.vid.1=0x239A +itsybitsy52840.pid.1=0x0051 +itsybitsy52840.vid.2=0x239A +itsybitsy52840.pid.2=0x0052 +itsybitsy52840.vid.3=0x239A +itsybitsy52840.pid.3=0x8052 + +# Upload +itsybitsy52840.bootloader.tool=bootburn +itsybitsy52840.upload.tool=nrfutil +itsybitsy52840.upload.protocol=nrfutil +itsybitsy52840.upload.use_1200bps_touch=true +itsybitsy52840.upload.wait_for_upload_port=true +itsybitsy52840.upload.maximum_size=815104 +itsybitsy52840.upload.maximum_data_size=237568 + +# Build +itsybitsy52840.build.mcu=cortex-m4 +itsybitsy52840.build.f_cpu=64000000 +itsybitsy52840.build.board=NRF52840_ITSYBITSY +itsybitsy52840.build.core=nRF5 +itsybitsy52840.build.variant=itsybitsy_nrf52840_express +itsybitsy52840.build.usb_manufacturer="Adafruit LLC" +itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express" +itsybitsy52840.build.extra_flags=-DNRF52840_XXAA -DNRF52840_ITSYBITSY -DARDUINO_NRF52_ITSYBITSY {build.flags.usb} +itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld +itsybitsy52840.build.vid=0x239A +itsybitsy52840.build.pid=0x8051 + +# SofDevice Menu +itsybitsy52840.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140 +itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +itsybitsy52840.menu.debug.l0=Level 0 (Release) +itsybitsy52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +itsybitsy52840.menu.debug.l1=Level 1 (Error Message) +itsybitsy52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +itsybitsy52840.menu.debug.l2=Level 2 (Full Debug) +itsybitsy52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView) +itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# --------------------------------------------- +# Bluefruit Circuit Playground nRF52840 Express +# --------------------------------------------- +cplaynrf52840.name=Adafruit Circuit Playground Bluefruit + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cplaynrf52840.vid.0=0x239A +cplaynrf52840.pid.0=0x8045 +cplaynrf52840.vid.1=0x239A +cplaynrf52840.pid.1=0x0045 +cplaynrf52840.vid.2=0x239A +cplaynrf52840.pid.2=0x0046 +cplaynrf52840.vid.3=0x239A +cplaynrf52840.pid.3=0x8046 + +# Upload +cplaynrf52840.bootloader.tool=bootburn +cplaynrf52840.upload.tool=nrfutil +cplaynrf52840.upload.protocol=nrfutil +cplaynrf52840.upload.use_1200bps_touch=true +cplaynrf52840.upload.wait_for_upload_port=true +cplaynrf52840.upload.maximum_size=815104 +cplaynrf52840.upload.maximum_data_size=237568 + +# Build +cplaynrf52840.build.mcu=cortex-m4 +cplaynrf52840.build.f_cpu=64000000 +cplaynrf52840.build.board=NRF52840_CIRCUITPLAY +cplaynrf52840.build.core=nRF5 +cplaynrf52840.build.variant=circuitplayground_nrf52840 +cplaynrf52840.build.usb_manufacturer="Adafruit LLC" +cplaynrf52840.build.usb_product="Circuit Playground Bluefruit" +cplaynrf52840.build.extra_flags=-DNRF52840_XXAA -DNRF52840_CIRCUITPLAY {build.flags.usb} +cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld +cplaynrf52840.build.vid=0x239A +cplaynrf52840.build.pid=0x8045 + +# SofDevice Menu +cplaynrf52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cplaynrf52840.menu.debug.l0=Level 0 (Release) +cplaynrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cplaynrf52840.menu.debug.l1=Level 1 (Error Message) +cplaynrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cplaynrf52840.menu.debug.l2=Level 2 (Full Debug) +cplaynrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Clue nRF52840 +# --------------------------------------------- +cluenrf52840.name=Adafruit CLUE + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cluenrf52840.vid.0=0x239A +cluenrf52840.pid.0=0x8072 +cluenrf52840.vid.1=0x239A +cluenrf52840.pid.1=0x0072 +cluenrf52840.vid.2=0x239A +cluenrf52840.pid.2=0x0071 +cluenrf52840.vid.3=0x239A +cluenrf52840.pid.3=0x8071 + +# Upload +cluenrf52840.bootloader.tool=bootburn +cluenrf52840.upload.tool=nrfutil +cluenrf52840.upload.protocol=nrfutil +cluenrf52840.upload.use_1200bps_touch=true +cluenrf52840.upload.wait_for_upload_port=true +cluenrf52840.upload.maximum_size=815104 +cluenrf52840.upload.maximum_data_size=237568 + +# Build +cluenrf52840.build.mcu=cortex-m4 +cluenrf52840.build.f_cpu=64000000 +cluenrf52840.build.board=NRF52840_CLUE +cluenrf52840.build.core=nRF5 +cluenrf52840.build.variant=clue_nrf52840 +cluenrf52840.build.usb_manufacturer="Adafruit LLC" +cluenrf52840.build.usb_product="CLUE" +cluenrf52840.build.extra_flags=-DNRF52840_XXAA -DNRF52840_CLUE {build.flags.usb} +cluenrf52840.build.ldscript=nrf52840_s140_v6.ld +cluenrf52840.build.vid=0x239A +cluenrf52840.build.pid=0x8071 + +# SofDevice Menu +cluenrf52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cluenrf52840.menu.debug.l0=Level 0 (Release) +cluenrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cluenrf52840.menu.debug.l1=Level 1 (Error Message) +cluenrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cluenrf52840.menu.debug.l2=Level 2 (Full Debug) +cluenrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Bluefruit Metro nRF52840 Express +# ---------------------------------- +metro52840.name=Adafruit Bluefruit Metro nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +metro52840.vid.0=0x239A +metro52840.pid.0=0x803F +metro52840.vid.1=0x239A +metro52840.pid.1=0x003F +metro52840.vid.2=0x239A +metro52840.pid.2=0x0040 +metro52840.vid.3=0x239A +metro52840.pid.3=0x8040 + +# Upload +metro52840.bootloader.tool=bootburn +metro52840.upload.tool=nrfutil +metro52840.upload.protocol=nrfutil +metro52840.upload.use_1200bps_touch=true +metro52840.upload.wait_for_upload_port=true +metro52840.upload.maximum_size=815104 +metro52840.upload.maximum_data_size=237568 + +# Build +metro52840.build.mcu=cortex-m4 +metro52840.build.f_cpu=64000000 +metro52840.build.board=NRF52840_METRO +metro52840.build.core=nRF5 +metro52840.build.variant=metro_nrf52840_express +metro52840.build.usb_manufacturer="Adafruit LLC" +metro52840.build.usb_product="Metro nRF52840 Express" +metro52840.build.extra_flags=-DNRF52840_XXAA -DNRF52840_METRO {build.flags.usb} +metro52840.build.ldscript=nrf52840_s140_v6.ld +metro52840.build.vid=0x239A +metro52840.build.pid=0x803F + +# SofDevice Menu +metro52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_name=s140 +metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +metro52840.menu.debug.l0=Level 0 (Release) +metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +metro52840.menu.debug.l1=Level 1 (Error Message) +metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +metro52840.menu.debug.l2=Level 2 (Full Debug) +metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +metro52840.menu.debug.l3=Level 3 (Segger SystemView) +metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + + + +# ------------------------------------------------------- +# +# Boards that aren't made by Adafruit +# +# ------------------------------------------------------- + + +# ---------------------------------- +# Nordic nRF52840DK (PCA10056) +# ---------------------------------- +pca10056.name=Nordic nRF52840DK (PCA10056) +pca10056.bootloader.tool=bootburn + +# Upload +pca10056.upload.tool=nrfutil +pca10056.upload.protocol=nrfutil +pca10056.upload.use_1200bps_touch=true +pca10056.upload.wait_for_upload_port=true +pca10056.upload.maximum_size=815104 +pca10056.upload.maximum_data_size=237568 + +# Build +pca10056.build.mcu=cortex-m4 +pca10056.build.f_cpu=64000000 +pca10056.build.board=NRF52840_PCA10056 +pca10056.build.core=nRF5 +pca10056.build.variant=pca10056 +pca10056.build.usb_manufacturer="Nordic" +pca10056.build.usb_product="nRF52840 DK" +pca10056.build.extra_flags=-DNRF52840_XXAA -DNRF52840_PCA10056 {build.flags.usb} +pca10056.build.ldscript=nrf52840_s140_v6.ld +pca10056.build.vid=0x239A +pca10056.build.pid=0x8029 + +# SofDevice Menu +pca10056.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_name=s140 +pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +pca10056.menu.debug.l0=Level 0 (Release) +pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +pca10056.menu.debug.l1=Level 1 (Error Message) +pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +pca10056.menu.debug.l2=Level 2 (Full Debug) +pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +pca10056.menu.debug.l3=Level 3 (Segger SystemView) +pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Particle Xenon +# ---------------------------------- +particle_xenon.name=Particle Xenon + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +particle_xenon.vid.0=0x239A +particle_xenon.pid.0=0x8029 +particle_xenon.vid.1=0x239A +particle_xenon.pid.1=0x0029 +particle_xenon.vid.2=0x239A +particle_xenon.pid.2=0x002A +particle_xenon.vid.3=0x239A +particle_xenon.pid.3=0x802A + +# Upload +particle_xenon.bootloader.tool=bootburn +particle_xenon.upload.tool=nrfutil +particle_xenon.upload.protocol=nrfutil +particle_xenon.upload.use_1200bps_touch=true +particle_xenon.upload.wait_for_upload_port=true +particle_xenon.upload.maximum_size=815104 +particle_xenon.upload.maximum_data_size=237568 + +# Build +particle_xenon.build.mcu=cortex-m4 +particle_xenon.build.f_cpu=64000000 +particle_xenon.build.board=PARTICLE_XENON +particle_xenon.build.core=nRF5 +particle_xenon.build.variant=particle_xenon +particle_xenon.build.usb_manufacturer="Particle Industries" +particle_xenon.build.usb_product="Particle Xenon" +particle_xenon.build.extra_flags=-DNRF52840_XXAA -DPARTICLE_XENON {build.flags.usb} +particle_xenon.build.ldscript=nrf52840_s140_v6.ld +particle_xenon.build.vid=0x239A +particle_xenon.build.pid=0x8029 + +# SofDevice Menu +particle_xenon.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_name=s140 +particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +particle_xenon.menu.debug.l0=Level 0 (Release) +particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +particle_xenon.menu.debug.l1=Level 1 (Error Message) +particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +particle_xenon.menu.debug.l2=Level 2 (Full Debug) +particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +particle_xenon.menu.debug.l3=Level 3 (Segger SystemView) +particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Raytac MDBT50Q - RX +# ---------------------------------- +mdbt50qrx.name=Raytac MDBT50Q-RX Dongle + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +mdbt50qrx.vid.0=0x239A +mdbt50qrx.pid.0=0x8029 +mdbt50qrx.vid.1=0x239A +mdbt50qrx.pid.1=0x0029 +mdbt50qrx.vid.2=0x239A +mdbt50qrx.pid.2=0x002A +mdbt50qrx.vid.3=0x239A +mdbt50qrx.pid.3=0x802A + +# Upload +mdbt50qrx.bootloader.tool=bootburn +mdbt50qrx.upload.tool=nrfutil +mdbt50qrx.upload.protocol=nrfutil +mdbt50qrx.upload.use_1200bps_touch=true +mdbt50qrx.upload.wait_for_upload_port=true +mdbt50qrx.upload.maximum_size=815104 +mdbt50qrx.upload.maximum_data_size=237568 + +# Build +mdbt50qrx.build.mcu=cortex-m4 +mdbt50qrx.build.f_cpu=64000000 +mdbt50qrx.build.board=MDBT50Q_RX +mdbt50qrx.build.core=nRF5 +mdbt50qrx.build.variant=raytac_mdbt50q_rx +mdbt50qrx.build.usb_manufacturer="Raytac Corporation" +mdbt50qrx.build.usb_product="Raytac MDBT50Q - RX" +mdbt50qrx.build.extra_flags=-DNRF52840_XXAA -DMDBT50Q_RX {build.flags.usb} +mdbt50qrx.build.ldscript=nrf52840_s140_v6.ld +mdbt50qrx.build.vid=0x239A +mdbt50qrx.build.pid=0x8029 + +# SofDevice Menu +mdbt50qrx.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_name=s140 +mdbt50qrx.menu.softdevice.s140v6.build.sd_version=6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +mdbt50qrx.menu.debug.l0=Level 0 (Release) +mdbt50qrx.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +mdbt50qrx.menu.debug.l1=Level 1 (Error Message) +mdbt50qrx.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +mdbt50qrx.menu.debug.l2=Level 2 (Full Debug) +mdbt50qrx.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +mdbt50qrx.menu.debug.l3=Level 3 (Segger SystemView) +mdbt50qrx.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +mdbt50qrx.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B302 +# ---------------------------------- +ninab302.name=NINA B302 ublox + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +ninab302.vid.0=0x239A +ninab302.pid.0=0x8029 +ninab302.vid.1=0x239A +ninab302.pid.1=0x0029 +ninab302.vid.2=0x7239A +ninab302.pid.2=0x002A +ninab302.vid.3=0x239A +ninab302.pid.3=0x802A + +# Upload +ninab302.bootloader.tool=bootburn +ninab302.upload.tool=nrfutil +ninab302.upload.protocol=nrfutil +ninab302.upload.use_1200bps_touch=true +ninab302.upload.wait_for_upload_port=true +ninab302.upload.maximum_size=815104 +ninab302.upload.maximum_data_size=237568 + +# Build +ninab302.build.mcu=cortex-m4 +ninab302.build.f_cpu=64000000 +ninab302.build.board=NINA_B302_ublox +ninab302.build.core=nRF5 +ninab302.build.variant=NINA_B302_ublox +ninab302.build.usb_manufacturer="Nordic" +ninab302.build.usb_product="NINA B302 ublox" +ninab302.build.extra_flags=-DNRF52840_XXAA -DNINA_B302_ublox {build.flags.usb} +ninab302.build.ldscript=nrf52840_s140_v6.ld +ninab302.build.vid=0x239A +ninab302.build.pid=0x8029 + +# SofDevice Menu +ninab302.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_name=s140 +ninab302.menu.softdevice.s140v6.build.sd_version=6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +ninab302.menu.debug.l0=Level 0 (Release) +ninab302.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab302.menu.debug.l1=Level 1 (Error Message) +ninab302.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab302.menu.debug.l2=Level 2 (Full Debug) +ninab302.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab302.menu.debug.l3=Level 3 (Segger SystemView) +ninab302.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab302.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B112 +# ---------------------------------- +ninab112.name=NINA B112 ublox +ninab112.bootloader.tool=bootburn + +# Upload +ninab112.upload.tool=nrfutil +ninab112.upload.protocol=nrfutil +ninab112.upload.use_1200bps_touch=false +ninab112.upload.wait_for_upload_port=false +ninab112.upload.native_usb=false +ninab112.upload.maximum_size=290816 +ninab112.upload.maximum_data_size=52224 + +# Build +ninab112.build.mcu=cortex-m4 +ninab112.build.f_cpu=64000000 +ninab112.build.board=NINA_B112_ublox +ninab112.build.core=nRF5 +ninab112.build.variant=NINA_B112_ublox +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52832" +ninab112.build.extra_flags=-DNRF52832_XXAA -DNINA_B112_ublox -DNRF52 +ninab112.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +ninab112.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_name=s132 +ninab112.menu.softdevice.s132v6.build.sd_version=6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +ninab112.menu.debug.l0=Level 0 (Release) +ninab112.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab112.menu.debug.l1=Level 1 (Error Message) +ninab112.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab112.menu.debug.l2=Level 2 (Full Debug) +ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab112.menu.debug.l3=Level 3 (Segger SystemView) +ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/cores/nRF5/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/cores/nRF5/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/cores/nRF5/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/cores/nRF5/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/cores/nRF5/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/cores/nRF5/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/cores/nRF5/Udp.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/cores/nRF5/Udp.h new file mode 100644 index 0000000..016042a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/cores/nRF5/Udp.h @@ -0,0 +1,92 @@ +/* + * Udp.cpp: Library to send/receive UDP packets. + * + * NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these) + * 1) UDP does not guarantee the order in which assembled UDP packets are received. This + * might not happen often in practice, but in larger network topologies, a UDP + * packet can be received out of sequence. + * 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being + * aware of it. Again, this may not be a concern in practice on small local networks. + * For more information, see http://www.cafeaulait.org/course/week12/35.html + * + * MIT License: + * Copyright (c) 2008 Bjoern Hartmann + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * bjoern@cs.stanford.edu 12/30/2008 + */ + +#ifndef udp_h +#define udp_h + +#include +#include + +class UDP : public Stream { + +public: + virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + + // KH, add virtual function to support Multicast, necessary for many services (MDNS, etc.) + virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure + + virtual void stop() =0; // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port) =0; + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char *host, uint16_t port) =0; + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket() =0; + // Write a single byte into the packet + virtual size_t write(uint8_t) =0; + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t *buffer, size_t size) =0; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket() =0; + // Number of bytes remaining in the current packet + virtual int available() =0; + // Read a single byte from the current packet + virtual int read() =0; + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len) =0; + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) =0; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek() =0; + virtual void flush() =0; // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP() =0; + // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort() =0; +protected: + uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; +}; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/platform.txt new file mode 100644 index 0000000..6c7ed43 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/platform.txt @@ -0,0 +1,164 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All rights reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +name=Adafruit nRF52 Boards +version=0.20.5 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD +# KH, Error here to use gcc, mjust use g++ +#compiler.c.elf.cmd=arm-none-eabi-gcc +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Ofast -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2bin.flags=-O binary +compiler.elf2bin.cmd=arm-none-eabi-objcopy +compiler.elf2hex.flags=-O ihex +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align --specs=nano.specs --specs=nosys.specs +compiler.size.cmd=arm-none-eabi-size + +# this can be overriden in boards.txt +build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float +build.debug_flags=-DCFG_DEBUG=0 +build.logger_flags=-DCFG_LOGGER=1 +build.sysview_flags=-DCFG_SYSVIEW=0 + +# common compiler for nrf +rtos.path={build.core.path}/freertos +nordic.path={build.core.path}/nordic + +# build.logger_flags and build.sysview_flags and intentionally empty, +# to allow modification via a user's own boards.local.txt or platform.local.txt files. +build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DLFS_NAME_MAX=64 -Ofast {build.debug_flags} {build.logger_flags} {build.sysview_flags} "-I{build.core.path}/cmsis/Core/Include" "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" + +# usb flags +build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2bin.extra_flags= +compiler.elf2hex.extra_flags= + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +##recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +##recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +##recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Create archives +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.core.path}/linker" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +#recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +## Create dfu package zip file +recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip" + +## Create uf2 file +#recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2conv.py" -f 0xADA52840 -c -o "{build.path}/{build.project_name}.uf2" "{build.path}/{build.project_name}.hex" + +## Save bin +recipe.output.tmp_file_bin={build.project_name}.bin +recipe.output.save_file_bin={build.project_name}.save.bin + +## Save hex +recipe.output.tmp_file_hex={build.project_name}.hex +recipe.output.save_file_hexu={build.project_name}.save.hex + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +## Export Compiled Binary +recipe.output.tmp_file={build.project_name}.hex +recipe.output.save_file={build.project_name}.{build.variant}.hex + +#*************************************************** +# adafruit-nrfutil for uploading +# https://github.com/adafruit/Adafruit_nRF52_nrfutil +# pre-built binaries are provided for macos and windows +#*************************************************** +tools.nrfutil.cmd=adafruit-nrfutil +tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe +tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/macos/adafruit-nrfutil + +tools.nrfutil.upload.params.verbose=--verbose +tools.nrfutil.upload.params.quiet= +tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200 --singlebank + +#*************************************************** +# Burning bootloader with either jlink or nrfutil +#*************************************************** + +# Bootloader version +tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.3.2_{build.sd_name}_{build.sd_version} + +tools.bootburn.bootloader.params.verbose= +tools.bootburn.bootloader.params.quiet= +tools.bootburn.bootloader.pattern={program.burn_pattern} + +# erase flash page while programming +tools.bootburn.erase.params.verbose= +tools.bootburn.erase.params.quiet= +tools.bootburn.erase.pattern= + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B112_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B112_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B112_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B112_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B112_ublox/variant.cpp new file mode 100644 index 0000000..f43f3a4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B112_ublox/variant.cpp @@ -0,0 +1,59 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" + +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +const uint32_t g_ADigitalPinMap[] = { + // D0 .. D13 + 5, // D0 is P0.05 (UART RX) + 6, // D1 is P0.06 (UART TX) + 7, // D2 is P0.07 + 31, // D3 is P0.31 + 18, // D4 is P0.18 (LED Blue) + 99, // D5 (NC) + 9, // D6 is P0.09 NFC1 + 10, // D7 is P0.10 (Button) NFC2 + 99, // D8 (NC) + 8, // D9 is P0.08 + 11, // D10 is P0.11 CS + 13, // D11 is P0.13 MOSI + 12, // D12 is P0.12 MISO + 14, // D13 is P0.14 SCK + //I2C + 2, // D14 is P0.2 (SDA) + 3, // D15 is P0.3 (SCL) + // D16 .. D21 (aka A0 .. A5) + 3, // D16 is P0.03 (A0) + 2, // D17 is P0.02 (A1) + 4, // D18 is P0.04 (A2) + 30, // D19 is P0.30 (A3) SW2 + 29, // D20 is P0.29 (A4) + 28, // D21 is P0.28 (A5) + 9, // P0.09 NFC + 10, // P0.10 NFC + 16, // SW1 (LED Green) +}; \ No newline at end of file diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B112_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B112_ublox/variant.h new file mode 100644 index 0000000..833cbf6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B112_ublox/variant.h @@ -0,0 +1,172 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +#ifndef _VARIANT_NINA_B112_UBLOX_ +#define _VARIANT_NINA_B112_UBLOX_ + +#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \ + .rc_ctiv = 0, \ +.rc_temp_ctiv = 0, \ +.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM} + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (32u) +#define NUM_DIGITAL_PINS (32u) +#define NUM_ANALOG_INPUTS (6u) +#define NUM_ANALOG_OUTPUTS (0u) + +// LEDs +#define PIN_LED LED1 +#define LED_BUILTIN PIN_LED + +//LEDs onboard +#define LED1 (0) // Red +#define LED2 (24) // Green/SW1 +#define LED3 (4) // Blue + +#define LED_STATE_ON 1 // State when LED is litted + +//Switch +#define SW1 (24) +#define SW2 (19) + +// NFC +#define PIN_NFC_1 (6) // P0.9 +#define PIN_NFC_2 (7) // P0.10 + +/* + * Analog pins + */ +#define PIN_A0 (16) // P0.03 +#define PIN_A1 (17) // P0.02 +#define PIN_A2 (18) // P0.04 +#define PIN_A3 (19) // P0.30 +#define PIN_A4 (20) // P0.29 +#define PIN_A5 (21) // P0.28 + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_D0 (0) // P0.05 +#define PIN_D1 (1) // P0.06 +#define PIN_D2 (2) // P0.07 +#define PIN_D3 (4) // P0.31 +#define PIN_D4 (5) // P0.18 +#define PIN_D6 (6) // P0.09 +#define PIN_D7 (7) // P0.10 +#define PIN_D9 (9) // P0.08 +#define PIN_D10 (11) // P0.11 +#define PIN_D11 (13) // P0.13 +#define PIN_D12 (12) // P0.12 +#define PIN_D13 (14) // P0.14 +#define PIN_D14 (2) // P0.02 +#define PIN_D15 (3) // P0.03 + +static const uint8_t D0 = PIN_D0 ; +static const uint8_t D1 = PIN_D1 ; +static const uint8_t D2 = PIN_D2 ; +static const uint8_t D3 = PIN_D3 ; +static const uint8_t D4 = PIN_D4 ; +static const uint8_t D6 = PIN_D6 ; +static const uint8_t D7 = PIN_D7 ; +static const uint8_t D9 = PIN_D9 ; +static const uint8_t D10 = PIN_D10 ; +static const uint8_t D11 = PIN_D11 ; +static const uint8_t D12 = PIN_D12 ; +static const uint8_t D13 = PIN_D13 ; +static const uint8_t D14 = PIN_D14 ; +static const uint8_t D15 = PIN_D15 ; + +// Other pins +//static const uint8_t AREF = PIN_AREF; + +//#define PIN_AREF (24) +//#define PIN_VBAT PIN_A7 + +/* + * Serial interfaces + */ +#define PIN_SERIAL_RX (0) // P0.05 +#define PIN_SERIAL_TX (1) // P0.06 +#define PIN_SERIAL_CTS (2) // P0.07 +#define PIN_SERIAL_RTS (3) // P0.31 +#define PIN_SERIAL_DTR (28) // P0.28 +#define PIN_SERIAL_DSR (29) // P0.29 + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (12) // P0.12 +#define PIN_SPI_MOSI (11) // P0.13 +#define PIN_SPI_SCK (13) // P0.14 + +static const uint8_t SS = 10 ; // P0.11 +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (14) // P0.02 +#define PIN_WIRE_SCL (15) // P0.03 + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + + +#endif //_VARIANT_NINA_B112_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B302_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B302_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B302_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B302_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B302_ublox/variant.cpp new file mode 100644 index 0000000..8b4df2e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B302_ublox/variant.cpp @@ -0,0 +1,87 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#include "variant.h" +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +const uint32_t g_ADigitalPinMap[] = +{ + // D0 .. D13 + 29, // D0 is P0.29 (UART RX) + 45, // D1 is P1.13 (UART TX) + 44, // D2 is P1.12 (NFC2) + 31, // D3 is P0.31 (LED1) + 13, // D4 is P0.13 (LED2) + 11, // D5 is P0.11 + 9, // D6 is P0.09 + 10, // D7 is P0.10 (Button) + 41, // D8 is P1.09 + 12, // D9 is P0.12 + 14, // D10 is P0.14 + 15, // D11 is P0.15 + 32, // D12 is P1.00 + 7, // D13 is P0.07 + + // D14 .. D21 (aka A0 .. A5) + 4, // D14 is P0.04 (A0) + 30, // D15 is P0.30 (A1) + 5, // D16 is P0.05 (A2) + 2, // D17 is P0.02 (A3) + 28, // D18 is P0.28 (A4) + 3, // D19 is P0.03 (A5) + + // D20 .. D21 (aka I2C pins) + 16, // D20 is P0.16 (SDA) + 24, // D21 is P0.24 (SCL) + + // QSPI pins (not exposed via any header / test point) + 19, // D22 is P0.19 (QSPI CLK) + 17, // D23 is P0.17 (QSPI CS) + 20, // D24 is P0.20 (QSPI Data 0) + 21, // D25 is P0.21 (QSPI Data 1) + 22, // D26 is P0.22 (QSPI Data 2) + 26, // D27 is P0.23 (QSPI Data 3) + + 40, // D28 is P1.08 - IO34 + 41, // D29 is P1.01 - IO35 + 44, // D30 is P1.02 - IO36 + 45, // D31 is P1.03 - IO37 + 42, // D32 is P1.10 - IO38 + 43, // D33 is P1.11 - IO39 + 47, // D34 is P1.15 - IO40 + 46, // D35 is P1.14 - IO41 + 26, // D36 is P0.26 - IO42 + 6, // D37 is P0.6 - IO43 + 27, // D38 is P0.27 - IO44 +}; + +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B302_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B302_ublox/variant.h new file mode 100644 index 0000000..a69575f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B302_ublox/variant.h @@ -0,0 +1,149 @@ + /* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#ifndef _VARIANT_NINA_B302_UBLOX_ +#define _VARIANT_NINA_B302_UBLOX_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus +// Number of pins defined in PinDescription array +#define PINS_COUNT (40) +#define NUM_DIGITAL_PINS (34) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (3) +#define PIN_LED2 (4) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_RED PIN_LED1 +#define LED_BLUE PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +/* + * Buttons + */ +#define PIN_BUTTON1 (7) + +/* + * Analog pins + */ +#define PIN_A0 (14) +#define PIN_A1 (15) +#define PIN_A2 (16) +#define PIN_A3 (17) +#define PIN_A4 (18) +#define PIN_A5 (19) + +#define D0 (0) +#define D1 (1) +#define D2 (2) +#define D3 (3) +#define D4 (4) +#define D5 (5) +#define D6 (6) +#define D7 (7) +#define D8 (8) +#define D9 (9) +#define D10 (10) +#define D11 (11) +#define D12 (12) +#define D13 (13) + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_NFC1 (31) +#define PIN_NFC2 (2) + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0) +#define PIN_SERIAL1_TX (1) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (22) //24 original +#define PIN_SPI_MOSI (23) //25 original +#define PIN_SPI_SCK (24) //26 original + +static const uint8_t SS = (13); +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (20) +#define PIN_WIRE_SCL (21) + +// QSPI Pins +#define PIN_QSPI_SCK 22 +#define PIN_QSPI_CS 23 +#define PIN_QSPI_IO0 24 +#define PIN_QSPI_IO1 25 +#define PIN_QSPI_IO2 26 +#define PIN_QSPI_IO3 27 + +// On-board QSPI Flash +#define EXTERNAL_FLASH_DEVICES GD25Q16C +#define EXTERNAL_FLASH_USE_QSPI + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif //_VARIANT_NINA_B302_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/boards.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/boards.txt new file mode 100644 index 0000000..762f02f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/boards.txt @@ -0,0 +1,649 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +menu.softdevice=Bootloader +menu.debug=Debug + +# ---------------------------------- +# Bluefruit Feather nRF52832 +# ---------------------------------- +feather52832.name=Adafruit Feather nRF52832 +feather52832.bootloader.tool=bootburn + +# Upload +feather52832.upload.tool=nrfutil +feather52832.upload.protocol=nrfutil +feather52832.upload.use_1200bps_touch=false +feather52832.upload.wait_for_upload_port=false +feather52832.upload.native_usb=false +feather52832.upload.maximum_size=290816 +feather52832.upload.maximum_data_size=52224 + +# Build +feather52832.build.mcu=cortex-m4 +feather52832.build.f_cpu=64000000 +feather52832.build.board=NRF52832_FEATHER +feather52832.build.core=nRF5 +feather52832.build.variant=feather_nrf52832 +feather52832.build.usb_manufacturer="Adafruit LLC" +feather52832.build.usb_product="Feather nRF52832" +feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52 +feather52832.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +feather52832.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_name=s132 +feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +feather52832.menu.debug.l0=Level 0 (Release) +feather52832.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52832.menu.debug.l1=Level 1 (Error Message) +feather52832.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52832.menu.debug.l2=Level 2 (Full Debug) +feather52832.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52832.menu.debug.l3=Level 3 (Segger SystemView) +feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Bluefruit Feather nRF52840 Express +# ---------------------------------- +feather52840.name=Adafruit Feather nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840.vid.0=0x239A +feather52840.pid.0=0x8029 +feather52840.vid.1=0x239A +feather52840.pid.1=0x0029 +feather52840.vid.2=0x239A +feather52840.pid.2=0x002A +feather52840.vid.3=0x239A +feather52840.pid.3=0x802A + +# Upload +feather52840.bootloader.tool=bootburn +feather52840.upload.tool=nrfutil +feather52840.upload.protocol=nrfutil +feather52840.upload.use_1200bps_touch=true +feather52840.upload.wait_for_upload_port=true +feather52840.upload.maximum_size=815104 +feather52840.upload.maximum_data_size=237568 + +# Build +feather52840.build.mcu=cortex-m4 +feather52840.build.f_cpu=64000000 +feather52840.build.board=NRF52840_FEATHER +feather52840.build.core=nRF5 +feather52840.build.variant=feather_nrf52840_express +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52840 Express" +feather52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840.build.ldscript=nrf52840_s140_v6.ld +feather52840.build.vid=0x239A +feather52840.build.pid=0x8029 + +# SofDevice Menu +feather52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_name=s140 +feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840.menu.debug.l0=Level 0 (Release) +feather52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840.menu.debug.l1=Level 1 (Error Message) +feather52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840.menu.debug.l2=Level 2 (Full Debug) +feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840.menu.debug.l3=Level 3 (Segger SystemView) +feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# ---------------------------------- +# Feather Bluefruit sense +# ---------------------------------- +feather52840sense.name=Adafruit Feather Bluefruit Sense + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840sense.vid.0=0x239A +feather52840sense.pid.0=0x8087 +feather52840sense.vid.1=0x239A +feather52840sense.pid.1=0x0087 +feather52840sense.vid.2=0x239A +feather52840sense.pid.2=0x0088 +feather52840sense.vid.3=0x239A +feather52840sense.pid.3=0x8088 + +# Upload +feather52840sense.bootloader.tool=bootburn +feather52840sense.upload.tool=nrfutil +feather52840sense.upload.protocol=nrfutil +feather52840sense.upload.use_1200bps_touch=true +feather52840sense.upload.wait_for_upload_port=true +feather52840sense.upload.maximum_size=815104 +feather52840sense.upload.maximum_data_size=237568 + +# Build +feather52840sense.build.mcu=cortex-m4 +feather52840sense.build.f_cpu=64000000 +feather52840sense.build.board=NRF52840_FEATHER_SENSE +feather52840sense.build.core=nRF5 +feather52840sense.build.variant=feather_nrf52840_sense +feather52840sense.build.usb_manufacturer="Adafruit LLC" +feather52840sense.build.usb_product="Feather nRF52840 Sense" +feather52840sense.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840sense.build.ldscript=nrf52840_s140_v6.ld +feather52840sense.build.vid=0x239A +feather52840sense.build.pid=0x8087 + +# SofDevice Menu +feather52840sense.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_name=s140 +feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840sense.menu.debug.l0=Level 0 (Release) +feather52840sense.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840sense.menu.debug.l1=Level 1 (Error Message) +feather52840sense.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840sense.menu.debug.l2=Level 2 (Full Debug) +feather52840sense.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840sense.menu.debug.l3=Level 3 (Segger SystemView) +feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Bluefruit ItsyBitsy nRF52840 Express +# --------------------------------------------- +itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +itsybitsy52840.vid.0=0x239A +itsybitsy52840.pid.0=0x8051 +itsybitsy52840.vid.1=0x239A +itsybitsy52840.pid.1=0x0051 +itsybitsy52840.vid.2=0x239A +itsybitsy52840.pid.2=0x0052 +itsybitsy52840.vid.3=0x239A +itsybitsy52840.pid.3=0x8052 + +# Upload +itsybitsy52840.bootloader.tool=bootburn +itsybitsy52840.upload.tool=nrfutil +itsybitsy52840.upload.protocol=nrfutil +itsybitsy52840.upload.use_1200bps_touch=true +itsybitsy52840.upload.wait_for_upload_port=true +itsybitsy52840.upload.maximum_size=815104 +itsybitsy52840.upload.maximum_data_size=237568 + +# Build +itsybitsy52840.build.mcu=cortex-m4 +itsybitsy52840.build.f_cpu=64000000 +itsybitsy52840.build.board=NRF52840_ITSYBITSY +itsybitsy52840.build.core=nRF5 +itsybitsy52840.build.variant=itsybitsy_nrf52840_express +itsybitsy52840.build.usb_manufacturer="Adafruit LLC" +itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express" +itsybitsy52840.build.extra_flags=-DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY {build.flags.usb} +itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld +itsybitsy52840.build.vid=0x239A +itsybitsy52840.build.pid=0x8051 + +# SofDevice Menu +itsybitsy52840.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140 +itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +itsybitsy52840.menu.debug.l0=Level 0 (Release) +itsybitsy52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +itsybitsy52840.menu.debug.l1=Level 1 (Error Message) +itsybitsy52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +itsybitsy52840.menu.debug.l2=Level 2 (Full Debug) +itsybitsy52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView) +itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# --------------------------------------------- +# Bluefruit Circuit Playground nRF52840 Express +# --------------------------------------------- +cplaynrf52840.name=Adafruit Circuit Playground Bluefruit + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cplaynrf52840.vid.0=0x239A +cplaynrf52840.pid.0=0x8045 +cplaynrf52840.vid.1=0x239A +cplaynrf52840.pid.1=0x0045 +cplaynrf52840.vid.2=0x239A +cplaynrf52840.pid.2=0x0046 +cplaynrf52840.vid.3=0x239A +cplaynrf52840.pid.3=0x8046 + +# Upload +cplaynrf52840.bootloader.tool=bootburn +cplaynrf52840.upload.tool=nrfutil +cplaynrf52840.upload.protocol=nrfutil +cplaynrf52840.upload.use_1200bps_touch=true +cplaynrf52840.upload.wait_for_upload_port=true +cplaynrf52840.upload.maximum_size=815104 +cplaynrf52840.upload.maximum_data_size=237568 + +# Build +cplaynrf52840.build.mcu=cortex-m4 +cplaynrf52840.build.f_cpu=64000000 +cplaynrf52840.build.board=NRF52840_CIRCUITPLAY +cplaynrf52840.build.core=nRF5 +cplaynrf52840.build.variant=circuitplayground_nrf52840 +cplaynrf52840.build.usb_manufacturer="Adafruit LLC" +cplaynrf52840.build.usb_product="Circuit Playground Bluefruit" +cplaynrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld +cplaynrf52840.build.vid=0x239A +cplaynrf52840.build.pid=0x8045 + +# SofDevice Menu +cplaynrf52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cplaynrf52840.menu.debug.l0=Level 0 (Release) +cplaynrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cplaynrf52840.menu.debug.l1=Level 1 (Error Message) +cplaynrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cplaynrf52840.menu.debug.l2=Level 2 (Full Debug) +cplaynrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Clue nRF52840 +# --------------------------------------------- +cluenrf52840.name=Adafruit CLUE + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cluenrf52840.vid.0=0x239A +cluenrf52840.pid.0=0x8072 +cluenrf52840.vid.1=0x239A +cluenrf52840.pid.1=0x0072 +cluenrf52840.vid.2=0x239A +cluenrf52840.pid.2=0x0071 +cluenrf52840.vid.3=0x239A +cluenrf52840.pid.3=0x8071 + +# Upload +cluenrf52840.bootloader.tool=bootburn +cluenrf52840.upload.tool=nrfutil +cluenrf52840.upload.protocol=nrfutil +cluenrf52840.upload.use_1200bps_touch=true +cluenrf52840.upload.wait_for_upload_port=true +cluenrf52840.upload.maximum_size=815104 +cluenrf52840.upload.maximum_data_size=237568 + +# Build +cluenrf52840.build.mcu=cortex-m4 +cluenrf52840.build.f_cpu=64000000 +cluenrf52840.build.board=NRF52840_CLUE +cluenrf52840.build.core=nRF5 +cluenrf52840.build.variant=clue_nrf52840 +cluenrf52840.build.usb_manufacturer="Adafruit LLC" +cluenrf52840.build.usb_product="CLUE" +cluenrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cluenrf52840.build.ldscript=nrf52840_s140_v6.ld +cluenrf52840.build.vid=0x239A +cluenrf52840.build.pid=0x8071 + +# SofDevice Menu +cluenrf52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cluenrf52840.menu.debug.l0=Level 0 (Release) +cluenrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cluenrf52840.menu.debug.l1=Level 1 (Error Message) +cluenrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cluenrf52840.menu.debug.l2=Level 2 (Full Debug) +cluenrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Bluefruit Metro nRF52840 Express +# ---------------------------------- +metro52840.name=Adafruit Bluefruit Metro nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +metro52840.vid.0=0x239A +metro52840.pid.0=0x803F +metro52840.vid.1=0x239A +metro52840.pid.1=0x003F +metro52840.vid.2=0x239A +metro52840.pid.2=0x0040 +metro52840.vid.3=0x239A +metro52840.pid.3=0x8040 + +# Upload +metro52840.bootloader.tool=bootburn +metro52840.upload.tool=nrfutil +metro52840.upload.protocol=nrfutil +metro52840.upload.use_1200bps_touch=true +metro52840.upload.wait_for_upload_port=true +metro52840.upload.maximum_size=815104 +metro52840.upload.maximum_data_size=237568 + +# Build +metro52840.build.mcu=cortex-m4 +metro52840.build.f_cpu=64000000 +metro52840.build.board=NRF52840_METRO +metro52840.build.core=nRF5 +metro52840.build.variant=metro_nrf52840_express +metro52840.build.usb_manufacturer="Adafruit LLC" +metro52840.build.usb_product="Metro nRF52840 Express" +metro52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +metro52840.build.ldscript=nrf52840_s140_v6.ld +metro52840.build.vid=0x239A +metro52840.build.pid=0x803F + +# SofDevice Menu +metro52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_name=s140 +metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +metro52840.menu.debug.l0=Level 0 (Release) +metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +metro52840.menu.debug.l1=Level 1 (Error Message) +metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +metro52840.menu.debug.l2=Level 2 (Full Debug) +metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +metro52840.menu.debug.l3=Level 3 (Segger SystemView) +metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + + + +# ------------------------------------------------------- +# +# Boards that aren't made by Adafruit +# +# ------------------------------------------------------- + + +# ---------------------------------- +# Nordic nRF52840DK (PCA10056) +# ---------------------------------- +pca10056.name=Nordic nRF52840DK (PCA10056) +pca10056.bootloader.tool=bootburn + +# Upload +pca10056.upload.tool=nrfutil +pca10056.upload.protocol=nrfutil +pca10056.upload.use_1200bps_touch=true +pca10056.upload.wait_for_upload_port=true +pca10056.upload.maximum_size=815104 +pca10056.upload.maximum_data_size=237568 + +# Build +pca10056.build.mcu=cortex-m4 +pca10056.build.f_cpu=64000000 +pca10056.build.board=NRF52840_PCA10056 +pca10056.build.core=nRF5 +pca10056.build.variant=pca10056 +pca10056.build.usb_manufacturer="Nordic" +pca10056.build.usb_product="nRF52840 DK" +pca10056.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +pca10056.build.ldscript=nrf52840_s140_v6.ld +pca10056.build.vid=0x239A +pca10056.build.pid=0x8029 + +# SofDevice Menu +pca10056.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_name=s140 +pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +pca10056.menu.debug.l0=Level 0 (Release) +pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +pca10056.menu.debug.l1=Level 1 (Error Message) +pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +pca10056.menu.debug.l2=Level 2 (Full Debug) +pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +pca10056.menu.debug.l3=Level 3 (Segger SystemView) +pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Particle Xenon +# ---------------------------------- +particle_xenon.name=Particle Xenon + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +particle_xenon.vid.0=0x239A +particle_xenon.pid.0=0x8029 +particle_xenon.vid.1=0x239A +particle_xenon.pid.1=0x0029 +particle_xenon.vid.2=0x239A +particle_xenon.pid.2=0x002A +particle_xenon.vid.3=0x239A +particle_xenon.pid.3=0x802A + +# Upload +particle_xenon.bootloader.tool=bootburn +particle_xenon.upload.tool=nrfutil +particle_xenon.upload.protocol=nrfutil +particle_xenon.upload.use_1200bps_touch=true +particle_xenon.upload.wait_for_upload_port=true +particle_xenon.upload.maximum_size=815104 +particle_xenon.upload.maximum_data_size=237568 + +# Build +particle_xenon.build.mcu=cortex-m4 +particle_xenon.build.f_cpu=64000000 +particle_xenon.build.board=PARTICLE_XENON +particle_xenon.build.core=nRF5 +particle_xenon.build.variant=particle_xenon +particle_xenon.build.usb_manufacturer="Particle Industries" +particle_xenon.build.usb_product="Particle Xenon" +particle_xenon.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +particle_xenon.build.ldscript=nrf52840_s140_v6.ld +particle_xenon.build.vid=0x239A +particle_xenon.build.pid=0x8029 + +# SofDevice Menu +particle_xenon.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_name=s140 +particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +particle_xenon.menu.debug.l0=Level 0 (Release) +particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +particle_xenon.menu.debug.l1=Level 1 (Error Message) +particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +particle_xenon.menu.debug.l2=Level 2 (Full Debug) +particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +particle_xenon.menu.debug.l3=Level 3 (Segger SystemView) +particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Raytac MDBT50Q - RX +# ---------------------------------- +mdbt50qrx.name=Raytac MDBT50Q-RX Dongle + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +mdbt50qrx.vid.0=0x239A +mdbt50qrx.pid.0=0x8029 +mdbt50qrx.vid.1=0x239A +mdbt50qrx.pid.1=0x0029 +mdbt50qrx.vid.2=0x239A +mdbt50qrx.pid.2=0x002A +mdbt50qrx.vid.3=0x239A +mdbt50qrx.pid.3=0x802A + +# Upload +mdbt50qrx.bootloader.tool=bootburn +mdbt50qrx.upload.tool=nrfutil +mdbt50qrx.upload.protocol=nrfutil +mdbt50qrx.upload.use_1200bps_touch=true +mdbt50qrx.upload.wait_for_upload_port=true +mdbt50qrx.upload.maximum_size=815104 +mdbt50qrx.upload.maximum_data_size=237568 + +# Build +mdbt50qrx.build.mcu=cortex-m4 +mdbt50qrx.build.f_cpu=64000000 +mdbt50qrx.build.board=MDBT50Q_RX +mdbt50qrx.build.core=nRF5 +mdbt50qrx.build.variant=raytac_mdbt50q_rx +mdbt50qrx.build.usb_manufacturer="Raytac Corporation" +mdbt50qrx.build.usb_product="Raytac MDBT50Q - RX" +mdbt50qrx.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +mdbt50qrx.build.ldscript=nrf52840_s140_v6.ld +mdbt50qrx.build.vid=0x239A +mdbt50qrx.build.pid=0x8029 + +# SofDevice Menu +mdbt50qrx.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_name=s140 +mdbt50qrx.menu.softdevice.s140v6.build.sd_version=6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +mdbt50qrx.menu.debug.l0=Level 0 (Release) +mdbt50qrx.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +mdbt50qrx.menu.debug.l1=Level 1 (Error Message) +mdbt50qrx.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +mdbt50qrx.menu.debug.l2=Level 2 (Full Debug) +mdbt50qrx.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +mdbt50qrx.menu.debug.l3=Level 3 (Segger SystemView) +mdbt50qrx.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +mdbt50qrx.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B302 +# ---------------------------------- +ninab302.name=NINA B302 ublox + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +ninab302.vid.0=0x239A +ninab302.pid.0=0x8029 +ninab302.vid.1=0x239A +ninab302.pid.1=0x0029 +ninab302.vid.2=0x7239A +ninab302.pid.2=0x002A +ninab302.vid.3=0x239A +ninab302.pid.3=0x802A + +# Upload +ninab302.bootloader.tool=bootburn +ninab302.upload.tool=nrfutil +ninab302.upload.protocol=nrfutil +ninab302.upload.use_1200bps_touch=true +ninab302.upload.wait_for_upload_port=true +ninab302.upload.maximum_size=815104 +ninab302.upload.maximum_data_size=237568 + +# Build +ninab302.build.mcu=cortex-m4 +ninab302.build.f_cpu=64000000 +ninab302.build.board=NINA_B302_ublox +ninab302.build.core=nRF5 +ninab302.build.variant=NINA_B302_ublox +ninab302.build.usb_manufacturer="Nordic" +ninab302.build.usb_product="NINA B302 ublox" +ninab302.build.extra_flags=-DNRF52840_XXAA -DNINA_B302_ublox {build.flags.usb} +ninab302.build.ldscript=nrf52840_s140_v6.ld +ninab302.build.vid=0x239A +ninab302.build.pid=0x8029 + +# SofDevice Menu +ninab302.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_name=s140 +ninab302.menu.softdevice.s140v6.build.sd_version=6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +ninab302.menu.debug.l0=Level 0 (Release) +ninab302.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab302.menu.debug.l1=Level 1 (Error Message) +ninab302.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab302.menu.debug.l2=Level 2 (Full Debug) +ninab302.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab302.menu.debug.l3=Level 3 (Segger SystemView) +ninab302.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab302.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B112 +# ---------------------------------- +ninab112.name=NINA B112 ublox +ninab112.bootloader.tool=bootburn + +# Upload +ninab112.upload.tool=nrfutil +ninab112.upload.protocol=nrfutil +ninab112.upload.use_1200bps_touch=false +ninab112.upload.wait_for_upload_port=false +ninab112.upload.native_usb=false +ninab112.upload.maximum_size=290816 +ninab112.upload.maximum_data_size=52224 + +# Build +ninab112.build.mcu=cortex-m4 +ninab112.build.f_cpu=64000000 +ninab112.build.board=NINA_B112_ublox +ninab112.build.core=nRF5 +ninab112.build.variant=NINA_B112_ublox +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52832" +ninab112.build.extra_flags=-DNRF52832_XXAA -DNINA_B112_ublox -DNRF52 +ninab112.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +ninab112.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_name=s132 +ninab112.menu.softdevice.s132v6.build.sd_version=6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +ninab112.menu.debug.l0=Level 0 (Release) +ninab112.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab112.menu.debug.l1=Level 1 (Error Message) +ninab112.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab112.menu.debug.l2=Level 2 (Full Debug) +ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab112.menu.debug.l3=Level 3 (Segger SystemView) +ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/cores/nRF5/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/cores/nRF5/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/cores/nRF5/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/cores/nRF5/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/cores/nRF5/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/cores/nRF5/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/cores/nRF5/Udp.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/cores/nRF5/Udp.h new file mode 100644 index 0000000..cc814d3 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/cores/nRF5/Udp.h @@ -0,0 +1,92 @@ +/* + * Udp.cpp: Library to send/receive UDP packets. + * + * NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these) + * 1) UDP does not guarantee the order in which assembled UDP packets are received. This + * might not happen often in practice, but in larger network topologies, a UDP + * packet can be received out of sequence. + * 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being + * aware of it. Again, this may not be a concern in practice on small local networks. + * For more information, see http://www.cafeaulait.org/course/week12/35.html + * + * MIT License: + * Copyright (c) 2008 Bjoern Hartmann + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * bjoern@cs.stanford.edu 12/30/2008 + */ + +#ifndef udp_h +#define udp_h + +#include +#include + +class UDP : public Stream { + +public: + virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + + // KH, add virtual function to support Multicast, necessary for many services (MDNS, UPnP, etc.) + virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure + + virtual void stop() =0; // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port) =0; + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char *host, uint16_t port) =0; + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket() =0; + // Write a single byte into the packet + virtual size_t write(uint8_t) =0; + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t *buffer, size_t size) =0; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket() =0; + // Number of bytes remaining in the current packet + virtual int available() =0; + // Read a single byte from the current packet + virtual int read() =0; + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len) =0; + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) =0; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek() =0; + virtual void flush() =0; // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP() =0; + // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort() =0; +protected: + uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; +}; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/platform.txt new file mode 100644 index 0000000..3de4b45 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/platform.txt @@ -0,0 +1,164 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All rights reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +name=Adafruit nRF52 Boards +version=0.21.0 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith + +# Allow changing optimization settings via platform.local.txt / boards.local.txt +compiler.optimization_flag=-Ofast + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD + +# KH, Error here to use gcc, must use g++ +#compiler.c.elf.cmd=arm-none-eabi-gcc +compiler.c.elf.cmd=arm-none-eabi-g++ + +compiler.c.elf.flags={compiler.optimization_flag} -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2bin.flags=-O binary +compiler.elf2bin.cmd=arm-none-eabi-objcopy +compiler.elf2hex.flags=-O ihex +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align --specs=nano.specs --specs=nosys.specs +compiler.size.cmd=arm-none-eabi-size + +# this can be overriden in boards.txt +build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float +build.debug_flags=-DCFG_DEBUG=0 +build.logger_flags=-DCFG_LOGGER=1 +build.sysview_flags=-DCFG_SYSVIEW=0 + +# common compiler for nrf +rtos.path={build.core.path}/freertos +nordic.path={build.core.path}/nordic + +# build.logger_flags and build.sysview_flags and intentionally empty, +# to allow modification via a user's own boards.local.txt or platform.local.txt files. +build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DLFS_NAME_MAX=64 {compiler.optimization_flag} {build.debug_flags} {build.logger_flags} {build.sysview_flags} "-I{build.core.path}/cmsis/Core/Include" "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include/nrf52" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" + +# usb flags +build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.libraries.ldflags= +compiler.elf2bin.extra_flags= +compiler.elf2hex.extra_flags= + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Create archives +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.core.path}/linker" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +#recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +## Create dfu package zip file +recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip" + +## Create uf2 file +#recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2conv.py" -f 0xADA52840 -c -o "{build.path}/{build.project_name}.uf2" "{build.path}/{build.project_name}.hex" + +## Save bin +recipe.output.tmp_file_bin={build.project_name}.bin +recipe.output.save_file_bin={build.project_name}.save.bin + +## Save hex +recipe.output.tmp_file_hex={build.project_name}.hex +recipe.output.save_file_hexu={build.project_name}.save.hex + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +## Export Compiled Binary +recipe.output.tmp_file={build.project_name}.hex +recipe.output.save_file={build.project_name}.{build.variant}.hex + +#*************************************************** +# adafruit-nrfutil for uploading +# https://github.com/adafruit/Adafruit_nRF52_nrfutil +# pre-built binaries are provided for macos and windows +#*************************************************** +tools.nrfutil.cmd=adafruit-nrfutil +tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe +tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/macos/adafruit-nrfutil + +tools.nrfutil.upload.params.verbose=--verbose +tools.nrfutil.upload.params.quiet= +tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200 --singlebank + +#*************************************************** +# Burning bootloader with either jlink or nrfutil +#*************************************************** + +# Bootloader version +tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.3.2_{build.sd_name}_{build.sd_version} + +tools.bootburn.bootloader.params.verbose= +tools.bootburn.bootloader.params.quiet= +tools.bootburn.bootloader.pattern={program.burn_pattern} + +# erase flash page while programming +tools.bootburn.erase.params.verbose= +tools.bootburn.erase.params.quiet= +tools.bootburn.erase.pattern= + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/variant.cpp new file mode 100644 index 0000000..f43f3a4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/variant.cpp @@ -0,0 +1,59 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" + +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +const uint32_t g_ADigitalPinMap[] = { + // D0 .. D13 + 5, // D0 is P0.05 (UART RX) + 6, // D1 is P0.06 (UART TX) + 7, // D2 is P0.07 + 31, // D3 is P0.31 + 18, // D4 is P0.18 (LED Blue) + 99, // D5 (NC) + 9, // D6 is P0.09 NFC1 + 10, // D7 is P0.10 (Button) NFC2 + 99, // D8 (NC) + 8, // D9 is P0.08 + 11, // D10 is P0.11 CS + 13, // D11 is P0.13 MOSI + 12, // D12 is P0.12 MISO + 14, // D13 is P0.14 SCK + //I2C + 2, // D14 is P0.2 (SDA) + 3, // D15 is P0.3 (SCL) + // D16 .. D21 (aka A0 .. A5) + 3, // D16 is P0.03 (A0) + 2, // D17 is P0.02 (A1) + 4, // D18 is P0.04 (A2) + 30, // D19 is P0.30 (A3) SW2 + 29, // D20 is P0.29 (A4) + 28, // D21 is P0.28 (A5) + 9, // P0.09 NFC + 10, // P0.10 NFC + 16, // SW1 (LED Green) +}; \ No newline at end of file diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/variant.h new file mode 100644 index 0000000..833cbf6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/variant.h @@ -0,0 +1,172 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +#ifndef _VARIANT_NINA_B112_UBLOX_ +#define _VARIANT_NINA_B112_UBLOX_ + +#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \ + .rc_ctiv = 0, \ +.rc_temp_ctiv = 0, \ +.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM} + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (32u) +#define NUM_DIGITAL_PINS (32u) +#define NUM_ANALOG_INPUTS (6u) +#define NUM_ANALOG_OUTPUTS (0u) + +// LEDs +#define PIN_LED LED1 +#define LED_BUILTIN PIN_LED + +//LEDs onboard +#define LED1 (0) // Red +#define LED2 (24) // Green/SW1 +#define LED3 (4) // Blue + +#define LED_STATE_ON 1 // State when LED is litted + +//Switch +#define SW1 (24) +#define SW2 (19) + +// NFC +#define PIN_NFC_1 (6) // P0.9 +#define PIN_NFC_2 (7) // P0.10 + +/* + * Analog pins + */ +#define PIN_A0 (16) // P0.03 +#define PIN_A1 (17) // P0.02 +#define PIN_A2 (18) // P0.04 +#define PIN_A3 (19) // P0.30 +#define PIN_A4 (20) // P0.29 +#define PIN_A5 (21) // P0.28 + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_D0 (0) // P0.05 +#define PIN_D1 (1) // P0.06 +#define PIN_D2 (2) // P0.07 +#define PIN_D3 (4) // P0.31 +#define PIN_D4 (5) // P0.18 +#define PIN_D6 (6) // P0.09 +#define PIN_D7 (7) // P0.10 +#define PIN_D9 (9) // P0.08 +#define PIN_D10 (11) // P0.11 +#define PIN_D11 (13) // P0.13 +#define PIN_D12 (12) // P0.12 +#define PIN_D13 (14) // P0.14 +#define PIN_D14 (2) // P0.02 +#define PIN_D15 (3) // P0.03 + +static const uint8_t D0 = PIN_D0 ; +static const uint8_t D1 = PIN_D1 ; +static const uint8_t D2 = PIN_D2 ; +static const uint8_t D3 = PIN_D3 ; +static const uint8_t D4 = PIN_D4 ; +static const uint8_t D6 = PIN_D6 ; +static const uint8_t D7 = PIN_D7 ; +static const uint8_t D9 = PIN_D9 ; +static const uint8_t D10 = PIN_D10 ; +static const uint8_t D11 = PIN_D11 ; +static const uint8_t D12 = PIN_D12 ; +static const uint8_t D13 = PIN_D13 ; +static const uint8_t D14 = PIN_D14 ; +static const uint8_t D15 = PIN_D15 ; + +// Other pins +//static const uint8_t AREF = PIN_AREF; + +//#define PIN_AREF (24) +//#define PIN_VBAT PIN_A7 + +/* + * Serial interfaces + */ +#define PIN_SERIAL_RX (0) // P0.05 +#define PIN_SERIAL_TX (1) // P0.06 +#define PIN_SERIAL_CTS (2) // P0.07 +#define PIN_SERIAL_RTS (3) // P0.31 +#define PIN_SERIAL_DTR (28) // P0.28 +#define PIN_SERIAL_DSR (29) // P0.29 + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (12) // P0.12 +#define PIN_SPI_MOSI (11) // P0.13 +#define PIN_SPI_SCK (13) // P0.14 + +static const uint8_t SS = 10 ; // P0.11 +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (14) // P0.02 +#define PIN_WIRE_SCL (15) // P0.03 + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + + +#endif //_VARIANT_NINA_B112_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/variant.cpp new file mode 100644 index 0000000..8b4df2e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/variant.cpp @@ -0,0 +1,87 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#include "variant.h" +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +const uint32_t g_ADigitalPinMap[] = +{ + // D0 .. D13 + 29, // D0 is P0.29 (UART RX) + 45, // D1 is P1.13 (UART TX) + 44, // D2 is P1.12 (NFC2) + 31, // D3 is P0.31 (LED1) + 13, // D4 is P0.13 (LED2) + 11, // D5 is P0.11 + 9, // D6 is P0.09 + 10, // D7 is P0.10 (Button) + 41, // D8 is P1.09 + 12, // D9 is P0.12 + 14, // D10 is P0.14 + 15, // D11 is P0.15 + 32, // D12 is P1.00 + 7, // D13 is P0.07 + + // D14 .. D21 (aka A0 .. A5) + 4, // D14 is P0.04 (A0) + 30, // D15 is P0.30 (A1) + 5, // D16 is P0.05 (A2) + 2, // D17 is P0.02 (A3) + 28, // D18 is P0.28 (A4) + 3, // D19 is P0.03 (A5) + + // D20 .. D21 (aka I2C pins) + 16, // D20 is P0.16 (SDA) + 24, // D21 is P0.24 (SCL) + + // QSPI pins (not exposed via any header / test point) + 19, // D22 is P0.19 (QSPI CLK) + 17, // D23 is P0.17 (QSPI CS) + 20, // D24 is P0.20 (QSPI Data 0) + 21, // D25 is P0.21 (QSPI Data 1) + 22, // D26 is P0.22 (QSPI Data 2) + 26, // D27 is P0.23 (QSPI Data 3) + + 40, // D28 is P1.08 - IO34 + 41, // D29 is P1.01 - IO35 + 44, // D30 is P1.02 - IO36 + 45, // D31 is P1.03 - IO37 + 42, // D32 is P1.10 - IO38 + 43, // D33 is P1.11 - IO39 + 47, // D34 is P1.15 - IO40 + 46, // D35 is P1.14 - IO41 + 26, // D36 is P0.26 - IO42 + 6, // D37 is P0.6 - IO43 + 27, // D38 is P0.27 - IO44 +}; + +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/variant.h new file mode 100644 index 0000000..a69575f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/variant.h @@ -0,0 +1,149 @@ + /* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#ifndef _VARIANT_NINA_B302_UBLOX_ +#define _VARIANT_NINA_B302_UBLOX_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus +// Number of pins defined in PinDescription array +#define PINS_COUNT (40) +#define NUM_DIGITAL_PINS (34) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (3) +#define PIN_LED2 (4) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_RED PIN_LED1 +#define LED_BLUE PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +/* + * Buttons + */ +#define PIN_BUTTON1 (7) + +/* + * Analog pins + */ +#define PIN_A0 (14) +#define PIN_A1 (15) +#define PIN_A2 (16) +#define PIN_A3 (17) +#define PIN_A4 (18) +#define PIN_A5 (19) + +#define D0 (0) +#define D1 (1) +#define D2 (2) +#define D3 (3) +#define D4 (4) +#define D5 (5) +#define D6 (6) +#define D7 (7) +#define D8 (8) +#define D9 (9) +#define D10 (10) +#define D11 (11) +#define D12 (12) +#define D13 (13) + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_NFC1 (31) +#define PIN_NFC2 (2) + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0) +#define PIN_SERIAL1_TX (1) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (22) //24 original +#define PIN_SPI_MOSI (23) //25 original +#define PIN_SPI_SCK (24) //26 original + +static const uint8_t SS = (13); +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (20) +#define PIN_WIRE_SCL (21) + +// QSPI Pins +#define PIN_QSPI_SCK 22 +#define PIN_QSPI_CS 23 +#define PIN_QSPI_IO0 24 +#define PIN_QSPI_IO1 25 +#define PIN_QSPI_IO2 26 +#define PIN_QSPI_IO3 27 + +// On-board QSPI Flash +#define EXTERNAL_FLASH_DEVICES GD25Q16C +#define EXTERNAL_FLASH_USE_QSPI + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif //_VARIANT_NINA_B302_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/boards.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/boards.txt new file mode 100644 index 0000000..c03de13 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/boards.txt @@ -0,0 +1,650 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +menu.softdevice=Bootloader +menu.debug=Debug + +# ---------------------------------- +# Bluefruit Feather nRF52832 +# ---------------------------------- +feather52832.name=Adafruit Feather nRF52832 +feather52832.bootloader.tool=bootburn + +# Upload +feather52832.upload.tool=nrfutil +feather52832.upload.protocol=nrfutil +feather52832.upload.use_1200bps_touch=false +feather52832.upload.wait_for_upload_port=false +feather52832.upload.native_usb=false +feather52832.upload.maximum_size=290816 +feather52832.upload.maximum_data_size=52224 + +# Build +feather52832.build.mcu=cortex-m4 +feather52832.build.f_cpu=64000000 +feather52832.build.board=NRF52832_FEATHER +feather52832.build.core=nRF5 +feather52832.build.variant=feather_nrf52832 +feather52832.build.usb_manufacturer="Adafruit LLC" +feather52832.build.usb_product="Feather nRF52832" +feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52 +feather52832.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +feather52832.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_name=s132 +feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +feather52832.menu.debug.l0=Level 0 (Release) +feather52832.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52832.menu.debug.l1=Level 1 (Error Message) +feather52832.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52832.menu.debug.l2=Level 2 (Full Debug) +feather52832.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52832.menu.debug.l3=Level 3 (Segger SystemView) +feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Bluefruit Feather nRF52840 Express +# ---------------------------------- +feather52840.name=Adafruit Feather nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840.vid.0=0x239A +feather52840.pid.0=0x8029 +feather52840.vid.1=0x239A +feather52840.pid.1=0x0029 +feather52840.vid.2=0x239A +feather52840.pid.2=0x002A +feather52840.vid.3=0x239A +feather52840.pid.3=0x802A + +# Upload +feather52840.bootloader.tool=bootburn +feather52840.upload.tool=nrfutil +feather52840.upload.protocol=nrfutil +feather52840.upload.use_1200bps_touch=true +feather52840.upload.wait_for_upload_port=true +feather52840.upload.maximum_size=815104 +feather52840.upload.maximum_data_size=237568 + +# Build +feather52840.build.mcu=cortex-m4 +feather52840.build.f_cpu=64000000 +feather52840.build.board=NRF52840_FEATHER +feather52840.build.core=nRF5 +feather52840.build.variant=feather_nrf52840_express +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52840 Express" +feather52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840.build.ldscript=nrf52840_s140_v6.ld +feather52840.build.vid=0x239A +feather52840.build.pid=0x8029 + +# SofDevice Menu +feather52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_name=s140 +feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840.menu.debug.l0=Level 0 (Release) +feather52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840.menu.debug.l1=Level 1 (Error Message) +feather52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840.menu.debug.l2=Level 2 (Full Debug) +feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840.menu.debug.l3=Level 3 (Segger SystemView) +feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# ---------------------------------- +# Feather nRF52840 sense +# ---------------------------------- +feather52840sense.name=Adafruit Feather nRF52840 Sense + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840sense.vid.0=0x239A +feather52840sense.pid.0=0x8087 +feather52840sense.vid.1=0x239A +feather52840sense.pid.1=0x0087 +feather52840sense.vid.2=0x239A +feather52840sense.pid.2=0x0088 +feather52840sense.vid.3=0x239A +feather52840sense.pid.3=0x8088 + +# Upload +feather52840sense.bootloader.tool=bootburn +feather52840sense.upload.tool=nrfutil +feather52840sense.upload.protocol=nrfutil +feather52840sense.upload.use_1200bps_touch=true +feather52840sense.upload.wait_for_upload_port=true +feather52840sense.upload.maximum_size=815104 +feather52840sense.upload.maximum_data_size=237568 + +# Build +feather52840sense.build.mcu=cortex-m4 +feather52840sense.build.f_cpu=64000000 +feather52840sense.build.board=NRF52840_FEATHER_SENSE +feather52840sense.build.core=nRF5 +feather52840sense.build.variant=feather_nrf52840_sense +feather52840sense.build.usb_manufacturer="Adafruit LLC" +feather52840sense.build.usb_product="Feather nRF52840 Sense" +feather52840sense.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840sense.build.ldscript=nrf52840_s140_v6.ld +feather52840sense.build.vid=0x239A +feather52840sense.build.pid=0x8087 + +# SofDevice Menu +feather52840sense.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_name=s140 +feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840sense.menu.debug.l0=Level 0 (Release) +feather52840sense.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840sense.menu.debug.l1=Level 1 (Error Message) +feather52840sense.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840sense.menu.debug.l2=Level 2 (Full Debug) +feather52840sense.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840sense.menu.debug.l3=Level 3 (Segger SystemView) +feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Bluefruit ItsyBitsy nRF52840 Express +# --------------------------------------------- +itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +itsybitsy52840.vid.0=0x239A +itsybitsy52840.pid.0=0x8051 +itsybitsy52840.vid.1=0x239A +itsybitsy52840.pid.1=0x0051 +itsybitsy52840.vid.2=0x239A +itsybitsy52840.pid.2=0x0052 +itsybitsy52840.vid.3=0x239A +itsybitsy52840.pid.3=0x8052 + +# Upload +itsybitsy52840.bootloader.tool=bootburn +itsybitsy52840.upload.tool=nrfutil +itsybitsy52840.upload.protocol=nrfutil +itsybitsy52840.upload.use_1200bps_touch=true +itsybitsy52840.upload.wait_for_upload_port=true +itsybitsy52840.upload.maximum_size=815104 +itsybitsy52840.upload.maximum_data_size=237568 + +# Build +itsybitsy52840.build.mcu=cortex-m4 +itsybitsy52840.build.f_cpu=64000000 +itsybitsy52840.build.board=NRF52840_ITSYBITSY +itsybitsy52840.build.core=nRF5 +itsybitsy52840.build.variant=itsybitsy_nrf52840_express +itsybitsy52840.build.usb_manufacturer="Adafruit LLC" +itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express" +itsybitsy52840.build.extra_flags=-DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY {build.flags.usb} +itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld +itsybitsy52840.build.vid=0x239A +itsybitsy52840.build.pid=0x8051 + +# SofDevice Menu +itsybitsy52840.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140 +itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +itsybitsy52840.menu.debug.l0=Level 0 (Release) +itsybitsy52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +itsybitsy52840.menu.debug.l1=Level 1 (Error Message) +itsybitsy52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +itsybitsy52840.menu.debug.l2=Level 2 (Full Debug) +itsybitsy52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView) +itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# --------------------------------------------- +# Bluefruit Circuit Playground nRF52840 Express +# --------------------------------------------- +cplaynrf52840.name=Adafruit Circuit Playground Bluefruit + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cplaynrf52840.vid.0=0x239A +cplaynrf52840.pid.0=0x8045 +cplaynrf52840.vid.1=0x239A +cplaynrf52840.pid.1=0x0045 +cplaynrf52840.vid.2=0x239A +cplaynrf52840.pid.2=0x0046 +cplaynrf52840.vid.3=0x239A +cplaynrf52840.pid.3=0x8046 + +# Upload +cplaynrf52840.bootloader.tool=bootburn +cplaynrf52840.upload.tool=nrfutil +cplaynrf52840.upload.protocol=nrfutil +cplaynrf52840.upload.use_1200bps_touch=true +cplaynrf52840.upload.wait_for_upload_port=true +cplaynrf52840.upload.maximum_size=815104 +cplaynrf52840.upload.maximum_data_size=237568 + +# Build +cplaynrf52840.build.mcu=cortex-m4 +cplaynrf52840.build.f_cpu=64000000 +cplaynrf52840.build.board=NRF52840_CIRCUITPLAY +cplaynrf52840.build.core=nRF5 +cplaynrf52840.build.variant=circuitplayground_nrf52840 +cplaynrf52840.build.usb_manufacturer="Adafruit LLC" +cplaynrf52840.build.usb_product="Circuit Playground Bluefruit" +cplaynrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld +cplaynrf52840.build.vid=0x239A +cplaynrf52840.build.pid=0x8045 + +# SofDevice Menu +cplaynrf52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cplaynrf52840.menu.debug.l0=Level 0 (Release) +cplaynrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cplaynrf52840.menu.debug.l1=Level 1 (Error Message) +cplaynrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cplaynrf52840.menu.debug.l2=Level 2 (Full Debug) +cplaynrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Clue nRF52840 +# --------------------------------------------- +cluenrf52840.name=Adafruit CLUE + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cluenrf52840.vid.0=0x239A +cluenrf52840.pid.0=0x8072 +cluenrf52840.vid.1=0x239A +cluenrf52840.pid.1=0x0072 +cluenrf52840.vid.2=0x239A +cluenrf52840.pid.2=0x0071 +cluenrf52840.vid.3=0x239A +cluenrf52840.pid.3=0x8071 + +# Upload +cluenrf52840.bootloader.tool=bootburn +cluenrf52840.upload.tool=nrfutil +cluenrf52840.upload.protocol=nrfutil +cluenrf52840.upload.use_1200bps_touch=true +cluenrf52840.upload.wait_for_upload_port=true +cluenrf52840.upload.maximum_size=815104 +cluenrf52840.upload.maximum_data_size=237568 + +# Build +cluenrf52840.build.mcu=cortex-m4 +cluenrf52840.build.f_cpu=64000000 +cluenrf52840.build.board=NRF52840_CLUE +cluenrf52840.build.core=nRF5 +cluenrf52840.build.variant=clue_nrf52840 +cluenrf52840.build.usb_manufacturer="Adafruit LLC" +cluenrf52840.build.usb_product="CLUE" +cluenrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cluenrf52840.build.ldscript=nrf52840_s140_v6.ld +cluenrf52840.build.vid=0x239A +cluenrf52840.build.pid=0x8071 + +# SofDevice Menu +cluenrf52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cluenrf52840.menu.debug.l0=Level 0 (Release) +cluenrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cluenrf52840.menu.debug.l1=Level 1 (Error Message) +cluenrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cluenrf52840.menu.debug.l2=Level 2 (Full Debug) +cluenrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Metro nRF52840 Express +# ---------------------------------- +metro52840.name=Adafruit Metro nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +metro52840.vid.0=0x239A +metro52840.pid.0=0x803F +metro52840.vid.1=0x239A +metro52840.pid.1=0x003F +metro52840.vid.2=0x239A +metro52840.pid.2=0x0040 +metro52840.vid.3=0x239A +metro52840.pid.3=0x8040 + +# Upload +metro52840.bootloader.tool=bootburn +metro52840.upload.tool=nrfutil +metro52840.upload.protocol=nrfutil +metro52840.upload.use_1200bps_touch=true +metro52840.upload.wait_for_upload_port=true +metro52840.upload.maximum_size=815104 +metro52840.upload.maximum_data_size=237568 + +# Build +metro52840.build.mcu=cortex-m4 +metro52840.build.f_cpu=64000000 +metro52840.build.board=NRF52840_METRO +metro52840.build.core=nRF5 +metro52840.build.variant=metro_nrf52840_express +metro52840.build.usb_manufacturer="Adafruit LLC" +metro52840.build.usb_product="Metro nRF52840 Express" +metro52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +metro52840.build.ldscript=nrf52840_s140_v6.ld +metro52840.build.vid=0x239A +metro52840.build.pid=0x803F + +# SofDevice Menu +metro52840.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_name=s140 +metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +metro52840.menu.debug.l0=Level 0 (Release) +metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +metro52840.menu.debug.l1=Level 1 (Error Message) +metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +metro52840.menu.debug.l2=Level 2 (Full Debug) +metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +metro52840.menu.debug.l3=Level 3 (Segger SystemView) +metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + + + +# ------------------------------------------------------- +# +# Boards that aren't made by Adafruit +# +# ------------------------------------------------------- + + +# ---------------------------------- +# Nordic nRF52840DK (PCA10056) +# ---------------------------------- +pca10056.name=Nordic nRF52840DK (PCA10056) +pca10056.bootloader.tool=bootburn + +# Upload +pca10056.upload.tool=nrfutil +pca10056.upload.protocol=nrfutil +pca10056.upload.use_1200bps_touch=true +pca10056.upload.wait_for_upload_port=true +pca10056.upload.maximum_size=815104 +pca10056.upload.maximum_data_size=237568 + +# Build +pca10056.build.mcu=cortex-m4 +pca10056.build.f_cpu=64000000 +pca10056.build.board=NRF52840_PCA10056 +pca10056.build.core=nRF5 +pca10056.build.variant=pca10056 +pca10056.build.usb_manufacturer="Nordic" +pca10056.build.usb_product="nRF52840 DK" +pca10056.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +pca10056.build.ldscript=nrf52840_s140_v6.ld +pca10056.build.vid=0x239A +pca10056.build.pid=0x8029 + +# SofDevice Menu +pca10056.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_name=s140 +pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +pca10056.menu.debug.l0=Level 0 (Release) +pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +pca10056.menu.debug.l1=Level 1 (Error Message) +pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +pca10056.menu.debug.l2=Level 2 (Full Debug) +pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +pca10056.menu.debug.l3=Level 3 (Segger SystemView) +pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Particle Xenon +# ---------------------------------- +particle_xenon.name=Particle Xenon + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +particle_xenon.vid.0=0x239A +particle_xenon.pid.0=0x8029 +particle_xenon.vid.1=0x239A +particle_xenon.pid.1=0x0029 +particle_xenon.vid.2=0x239A +particle_xenon.pid.2=0x002A +particle_xenon.vid.3=0x239A +particle_xenon.pid.3=0x802A + +# Upload +particle_xenon.bootloader.tool=bootburn +particle_xenon.upload.tool=nrfutil +particle_xenon.upload.protocol=nrfutil +particle_xenon.upload.use_1200bps_touch=true +particle_xenon.upload.wait_for_upload_port=true +particle_xenon.upload.maximum_size=815104 +particle_xenon.upload.maximum_data_size=237568 + +# Build +particle_xenon.build.mcu=cortex-m4 +particle_xenon.build.f_cpu=64000000 +particle_xenon.build.board=PARTICLE_XENON +particle_xenon.build.core=nRF5 +particle_xenon.build.variant=particle_xenon +particle_xenon.build.usb_manufacturer="Particle Industries" +particle_xenon.build.usb_product="Particle Xenon" +particle_xenon.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +particle_xenon.build.ldscript=nrf52840_s140_v6.ld +particle_xenon.build.vid=0x239A +particle_xenon.build.pid=0x8029 + +# SofDevice Menu +particle_xenon.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_name=s140 +particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +particle_xenon.menu.debug.l0=Level 0 (Release) +particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +particle_xenon.menu.debug.l1=Level 1 (Error Message) +particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +particle_xenon.menu.debug.l2=Level 2 (Full Debug) +particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +particle_xenon.menu.debug.l3=Level 3 (Segger SystemView) +particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Raytac MDBT50Q - RX +# ---------------------------------- +mdbt50qrx.name=Raytac MDBT50Q-RX Dongle + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +mdbt50qrx.vid.0=0x239A +mdbt50qrx.pid.0=0x8029 +mdbt50qrx.vid.1=0x239A +mdbt50qrx.pid.1=0x0029 +mdbt50qrx.vid.2=0x239A +mdbt50qrx.pid.2=0x002A +mdbt50qrx.vid.3=0x239A +mdbt50qrx.pid.3=0x802A + +# Upload +mdbt50qrx.bootloader.tool=bootburn +mdbt50qrx.upload.tool=nrfutil +mdbt50qrx.upload.protocol=nrfutil +mdbt50qrx.upload.use_1200bps_touch=true +mdbt50qrx.upload.wait_for_upload_port=true +mdbt50qrx.upload.maximum_size=815104 +mdbt50qrx.upload.maximum_data_size=237568 + +# Build +mdbt50qrx.build.mcu=cortex-m4 +mdbt50qrx.build.f_cpu=64000000 +mdbt50qrx.build.board=MDBT50Q_RX +mdbt50qrx.build.core=nRF5 +mdbt50qrx.build.variant=raytac_mdbt50q_rx +mdbt50qrx.build.usb_manufacturer="Raytac Corporation" +mdbt50qrx.build.usb_product="Raytac MDBT50Q - RX" +mdbt50qrx.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +mdbt50qrx.build.ldscript=nrf52840_s140_v6.ld +mdbt50qrx.build.vid=0x239A +mdbt50qrx.build.pid=0x8029 + +# SofDevice Menu +mdbt50qrx.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_name=s140 +mdbt50qrx.menu.softdevice.s140v6.build.sd_version=6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +mdbt50qrx.menu.debug.l0=Level 0 (Release) +mdbt50qrx.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +mdbt50qrx.menu.debug.l1=Level 1 (Error Message) +mdbt50qrx.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +mdbt50qrx.menu.debug.l2=Level 2 (Full Debug) +mdbt50qrx.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +mdbt50qrx.menu.debug.l3=Level 3 (Segger SystemView) +mdbt50qrx.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +mdbt50qrx.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# ---------------------------------- +# NINA B302 +# ---------------------------------- +ninab302.name=NINA B302 ublox + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +ninab302.vid.0=0x239A +ninab302.pid.0=0x8029 +ninab302.vid.1=0x239A +ninab302.pid.1=0x0029 +ninab302.vid.2=0x7239A +ninab302.pid.2=0x002A +ninab302.vid.3=0x239A +ninab302.pid.3=0x802A + +# Upload +ninab302.bootloader.tool=bootburn +ninab302.upload.tool=nrfutil +ninab302.upload.protocol=nrfutil +ninab302.upload.use_1200bps_touch=true +ninab302.upload.wait_for_upload_port=true +ninab302.upload.maximum_size=815104 +ninab302.upload.maximum_data_size=237568 + +# Build +ninab302.build.mcu=cortex-m4 +ninab302.build.f_cpu=64000000 +ninab302.build.board=NINA_B302_ublox +ninab302.build.core=nRF5 +ninab302.build.variant=NINA_B302_ublox +ninab302.build.usb_manufacturer="Nordic" +ninab302.build.usb_product="NINA B302 ublox" +ninab302.build.extra_flags=-DNRF52840_XXAA -DNINA_B302_ublox {build.flags.usb} +ninab302.build.ldscript=nrf52840_s140_v6.ld +ninab302.build.vid=0x239A +ninab302.build.pid=0x8029 + +# SofDevice Menu +ninab302.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_name=s140 +ninab302.menu.softdevice.s140v6.build.sd_version=6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +ninab302.menu.debug.l0=Level 0 (Release) +ninab302.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab302.menu.debug.l1=Level 1 (Error Message) +ninab302.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab302.menu.debug.l2=Level 2 (Full Debug) +ninab302.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab302.menu.debug.l3=Level 3 (Segger SystemView) +ninab302.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab302.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B112 +# ---------------------------------- +ninab112.name=NINA B112 ublox +ninab112.bootloader.tool=bootburn + +# Upload +ninab112.upload.tool=nrfutil +ninab112.upload.protocol=nrfutil +ninab112.upload.use_1200bps_touch=false +ninab112.upload.wait_for_upload_port=false +ninab112.upload.native_usb=false +ninab112.upload.maximum_size=290816 +ninab112.upload.maximum_data_size=52224 + +# Build +ninab112.build.mcu=cortex-m4 +ninab112.build.f_cpu=64000000 +ninab112.build.board=NINA_B112_ublox +ninab112.build.core=nRF5 +ninab112.build.variant=NINA_B112_ublox +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52832" +ninab112.build.extra_flags=-DNRF52832_XXAA -DNINA_B112_ublox -DNRF52 +ninab112.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +ninab112.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_name=s132 +ninab112.menu.softdevice.s132v6.build.sd_version=6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +ninab112.menu.debug.l0=Level 0 (Release) +ninab112.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab112.menu.debug.l1=Level 1 (Error Message) +ninab112.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab112.menu.debug.l2=Level 2 (Full Debug) +ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab112.menu.debug.l3=Level 3 (Segger SystemView) +ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/cores/nRF5/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/cores/nRF5/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/cores/nRF5/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/cores/nRF5/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/cores/nRF5/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/cores/nRF5/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/cores/nRF5/Udp.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/cores/nRF5/Udp.h new file mode 100644 index 0000000..cc814d3 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/cores/nRF5/Udp.h @@ -0,0 +1,92 @@ +/* + * Udp.cpp: Library to send/receive UDP packets. + * + * NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these) + * 1) UDP does not guarantee the order in which assembled UDP packets are received. This + * might not happen often in practice, but in larger network topologies, a UDP + * packet can be received out of sequence. + * 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being + * aware of it. Again, this may not be a concern in practice on small local networks. + * For more information, see http://www.cafeaulait.org/course/week12/35.html + * + * MIT License: + * Copyright (c) 2008 Bjoern Hartmann + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * bjoern@cs.stanford.edu 12/30/2008 + */ + +#ifndef udp_h +#define udp_h + +#include +#include + +class UDP : public Stream { + +public: + virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + + // KH, add virtual function to support Multicast, necessary for many services (MDNS, UPnP, etc.) + virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure + + virtual void stop() =0; // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port) =0; + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char *host, uint16_t port) =0; + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket() =0; + // Write a single byte into the packet + virtual size_t write(uint8_t) =0; + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t *buffer, size_t size) =0; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket() =0; + // Number of bytes remaining in the current packet + virtual int available() =0; + // Read a single byte from the current packet + virtual int read() =0; + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len) =0; + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) =0; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek() =0; + virtual void flush() =0; // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP() =0; + // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort() =0; +protected: + uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; +}; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/platform.txt new file mode 100644 index 0000000..f2877b8 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/platform.txt @@ -0,0 +1,165 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All rights reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +name=Adafruit nRF52 Boards +version=0.22.0 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith + +# Allow changing optimization settings via platform.local.txt / boards.local.txt +compiler.optimization_flag=-Ofast + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD + +# KH, Error here to use gcc, must use g++ +#compiler.c.elf.cmd=arm-none-eabi-gcc +compiler.c.elf.cmd=arm-none-eabi-g++ + +compiler.c.elf.flags={compiler.optimization_flag} -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-mcpu={build.mcu} -mthumb -mabi=aapcs {compiler.optimization_flag} -g -c {build.float_flags} -x assembler-with-cpp + +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2bin.flags=-O binary +compiler.elf2bin.cmd=arm-none-eabi-objcopy +compiler.elf2hex.flags=-O ihex +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align --specs=nano.specs --specs=nosys.specs +compiler.size.cmd=arm-none-eabi-size + +# this can be overriden in boards.txt +build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float +build.debug_flags=-DCFG_DEBUG=0 +build.logger_flags=-DCFG_LOGGER=1 +build.sysview_flags=-DCFG_SYSVIEW=0 + +# common compiler for nrf +rtos.path={build.core.path}/freertos +nordic.path={build.core.path}/nordic + +# build.logger_flags and build.sysview_flags are intentionally empty, +# to allow modification via a user's own boards.local.txt or platform.local.txt files. +build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 {compiler.optimization_flag} {build.debug_flags} {build.logger_flags} {build.sysview_flags} "-I{build.core.path}/cmsis/Core/Include" "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include/nrf52" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# usb flags +build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.libraries.ldflags= +compiler.elf2bin.extra_flags= +compiler.elf2hex.extra_flags= + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Create archives +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.core.path}/linker" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group -lm "{build.path}/{archive_file}" {compiler.libraries.ldflags} -Wl,--end-group + +## Create output (bin file) +#recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +## Create dfu package zip file +recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip" + +## Create uf2 file +#recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2conv.py" -f 0xADA52840 -c -o "{build.path}/{build.project_name}.uf2" "{build.path}/{build.project_name}.hex" + +## Save bin +recipe.output.tmp_file_bin={build.project_name}.bin +recipe.output.save_file_bin={build.project_name}.save.bin + +## Save hex +recipe.output.tmp_file_hex={build.project_name}.hex +recipe.output.save_file_hexu={build.project_name}.save.hex + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +## Export Compiled Binary +recipe.output.tmp_file={build.project_name}.hex +recipe.output.save_file={build.project_name}.{build.variant}.hex + +#*************************************************** +# adafruit-nrfutil for uploading +# https://github.com/adafruit/Adafruit_nRF52_nrfutil +# pre-built binaries are provided for macos and windows +#*************************************************** +tools.nrfutil.cmd=adafruit-nrfutil +tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe +tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/macos/adafruit-nrfutil + +tools.nrfutil.upload.params.verbose=--verbose +tools.nrfutil.upload.params.quiet= +tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200 --singlebank + +#*************************************************** +# Burning bootloader with either jlink or nrfutil +#*************************************************** + +# Bootloader version +tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.3.2_{build.sd_name}_{build.sd_version} + +tools.bootburn.bootloader.params.verbose= +tools.bootburn.bootloader.params.quiet= +tools.bootburn.bootloader.pattern={program.burn_pattern} + +# erase flash page while programming +tools.bootburn.erase.params.verbose= +tools.bootburn.erase.params.quiet= +tools.bootburn.erase.pattern= + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B112_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B112_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B112_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B112_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B112_ublox/variant.cpp new file mode 100644 index 0000000..f43f3a4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B112_ublox/variant.cpp @@ -0,0 +1,59 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" + +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +const uint32_t g_ADigitalPinMap[] = { + // D0 .. D13 + 5, // D0 is P0.05 (UART RX) + 6, // D1 is P0.06 (UART TX) + 7, // D2 is P0.07 + 31, // D3 is P0.31 + 18, // D4 is P0.18 (LED Blue) + 99, // D5 (NC) + 9, // D6 is P0.09 NFC1 + 10, // D7 is P0.10 (Button) NFC2 + 99, // D8 (NC) + 8, // D9 is P0.08 + 11, // D10 is P0.11 CS + 13, // D11 is P0.13 MOSI + 12, // D12 is P0.12 MISO + 14, // D13 is P0.14 SCK + //I2C + 2, // D14 is P0.2 (SDA) + 3, // D15 is P0.3 (SCL) + // D16 .. D21 (aka A0 .. A5) + 3, // D16 is P0.03 (A0) + 2, // D17 is P0.02 (A1) + 4, // D18 is P0.04 (A2) + 30, // D19 is P0.30 (A3) SW2 + 29, // D20 is P0.29 (A4) + 28, // D21 is P0.28 (A5) + 9, // P0.09 NFC + 10, // P0.10 NFC + 16, // SW1 (LED Green) +}; \ No newline at end of file diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B112_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B112_ublox/variant.h new file mode 100644 index 0000000..833cbf6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B112_ublox/variant.h @@ -0,0 +1,172 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +#ifndef _VARIANT_NINA_B112_UBLOX_ +#define _VARIANT_NINA_B112_UBLOX_ + +#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \ + .rc_ctiv = 0, \ +.rc_temp_ctiv = 0, \ +.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM} + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (32u) +#define NUM_DIGITAL_PINS (32u) +#define NUM_ANALOG_INPUTS (6u) +#define NUM_ANALOG_OUTPUTS (0u) + +// LEDs +#define PIN_LED LED1 +#define LED_BUILTIN PIN_LED + +//LEDs onboard +#define LED1 (0) // Red +#define LED2 (24) // Green/SW1 +#define LED3 (4) // Blue + +#define LED_STATE_ON 1 // State when LED is litted + +//Switch +#define SW1 (24) +#define SW2 (19) + +// NFC +#define PIN_NFC_1 (6) // P0.9 +#define PIN_NFC_2 (7) // P0.10 + +/* + * Analog pins + */ +#define PIN_A0 (16) // P0.03 +#define PIN_A1 (17) // P0.02 +#define PIN_A2 (18) // P0.04 +#define PIN_A3 (19) // P0.30 +#define PIN_A4 (20) // P0.29 +#define PIN_A5 (21) // P0.28 + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_D0 (0) // P0.05 +#define PIN_D1 (1) // P0.06 +#define PIN_D2 (2) // P0.07 +#define PIN_D3 (4) // P0.31 +#define PIN_D4 (5) // P0.18 +#define PIN_D6 (6) // P0.09 +#define PIN_D7 (7) // P0.10 +#define PIN_D9 (9) // P0.08 +#define PIN_D10 (11) // P0.11 +#define PIN_D11 (13) // P0.13 +#define PIN_D12 (12) // P0.12 +#define PIN_D13 (14) // P0.14 +#define PIN_D14 (2) // P0.02 +#define PIN_D15 (3) // P0.03 + +static const uint8_t D0 = PIN_D0 ; +static const uint8_t D1 = PIN_D1 ; +static const uint8_t D2 = PIN_D2 ; +static const uint8_t D3 = PIN_D3 ; +static const uint8_t D4 = PIN_D4 ; +static const uint8_t D6 = PIN_D6 ; +static const uint8_t D7 = PIN_D7 ; +static const uint8_t D9 = PIN_D9 ; +static const uint8_t D10 = PIN_D10 ; +static const uint8_t D11 = PIN_D11 ; +static const uint8_t D12 = PIN_D12 ; +static const uint8_t D13 = PIN_D13 ; +static const uint8_t D14 = PIN_D14 ; +static const uint8_t D15 = PIN_D15 ; + +// Other pins +//static const uint8_t AREF = PIN_AREF; + +//#define PIN_AREF (24) +//#define PIN_VBAT PIN_A7 + +/* + * Serial interfaces + */ +#define PIN_SERIAL_RX (0) // P0.05 +#define PIN_SERIAL_TX (1) // P0.06 +#define PIN_SERIAL_CTS (2) // P0.07 +#define PIN_SERIAL_RTS (3) // P0.31 +#define PIN_SERIAL_DTR (28) // P0.28 +#define PIN_SERIAL_DSR (29) // P0.29 + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (12) // P0.12 +#define PIN_SPI_MOSI (11) // P0.13 +#define PIN_SPI_SCK (13) // P0.14 + +static const uint8_t SS = 10 ; // P0.11 +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (14) // P0.02 +#define PIN_WIRE_SCL (15) // P0.03 + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + + +#endif //_VARIANT_NINA_B112_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B302_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B302_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B302_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B302_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B302_ublox/variant.cpp new file mode 100644 index 0000000..8b4df2e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B302_ublox/variant.cpp @@ -0,0 +1,87 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#include "variant.h" +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +const uint32_t g_ADigitalPinMap[] = +{ + // D0 .. D13 + 29, // D0 is P0.29 (UART RX) + 45, // D1 is P1.13 (UART TX) + 44, // D2 is P1.12 (NFC2) + 31, // D3 is P0.31 (LED1) + 13, // D4 is P0.13 (LED2) + 11, // D5 is P0.11 + 9, // D6 is P0.09 + 10, // D7 is P0.10 (Button) + 41, // D8 is P1.09 + 12, // D9 is P0.12 + 14, // D10 is P0.14 + 15, // D11 is P0.15 + 32, // D12 is P1.00 + 7, // D13 is P0.07 + + // D14 .. D21 (aka A0 .. A5) + 4, // D14 is P0.04 (A0) + 30, // D15 is P0.30 (A1) + 5, // D16 is P0.05 (A2) + 2, // D17 is P0.02 (A3) + 28, // D18 is P0.28 (A4) + 3, // D19 is P0.03 (A5) + + // D20 .. D21 (aka I2C pins) + 16, // D20 is P0.16 (SDA) + 24, // D21 is P0.24 (SCL) + + // QSPI pins (not exposed via any header / test point) + 19, // D22 is P0.19 (QSPI CLK) + 17, // D23 is P0.17 (QSPI CS) + 20, // D24 is P0.20 (QSPI Data 0) + 21, // D25 is P0.21 (QSPI Data 1) + 22, // D26 is P0.22 (QSPI Data 2) + 26, // D27 is P0.23 (QSPI Data 3) + + 40, // D28 is P1.08 - IO34 + 41, // D29 is P1.01 - IO35 + 44, // D30 is P1.02 - IO36 + 45, // D31 is P1.03 - IO37 + 42, // D32 is P1.10 - IO38 + 43, // D33 is P1.11 - IO39 + 47, // D34 is P1.15 - IO40 + 46, // D35 is P1.14 - IO41 + 26, // D36 is P0.26 - IO42 + 6, // D37 is P0.6 - IO43 + 27, // D38 is P0.27 - IO44 +}; + +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B302_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B302_ublox/variant.h new file mode 100644 index 0000000..a69575f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B302_ublox/variant.h @@ -0,0 +1,149 @@ + /* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#ifndef _VARIANT_NINA_B302_UBLOX_ +#define _VARIANT_NINA_B302_UBLOX_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus +// Number of pins defined in PinDescription array +#define PINS_COUNT (40) +#define NUM_DIGITAL_PINS (34) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (3) +#define PIN_LED2 (4) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_RED PIN_LED1 +#define LED_BLUE PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +/* + * Buttons + */ +#define PIN_BUTTON1 (7) + +/* + * Analog pins + */ +#define PIN_A0 (14) +#define PIN_A1 (15) +#define PIN_A2 (16) +#define PIN_A3 (17) +#define PIN_A4 (18) +#define PIN_A5 (19) + +#define D0 (0) +#define D1 (1) +#define D2 (2) +#define D3 (3) +#define D4 (4) +#define D5 (5) +#define D6 (6) +#define D7 (7) +#define D8 (8) +#define D9 (9) +#define D10 (10) +#define D11 (11) +#define D12 (12) +#define D13 (13) + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_NFC1 (31) +#define PIN_NFC2 (2) + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0) +#define PIN_SERIAL1_TX (1) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (22) //24 original +#define PIN_SPI_MOSI (23) //25 original +#define PIN_SPI_SCK (24) //26 original + +static const uint8_t SS = (13); +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (20) +#define PIN_WIRE_SCL (21) + +// QSPI Pins +#define PIN_QSPI_SCK 22 +#define PIN_QSPI_CS 23 +#define PIN_QSPI_IO0 24 +#define PIN_QSPI_IO1 25 +#define PIN_QSPI_IO2 26 +#define PIN_QSPI_IO3 27 + +// On-board QSPI Flash +#define EXTERNAL_FLASH_DEVICES GD25Q16C +#define EXTERNAL_FLASH_USE_QSPI + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif //_VARIANT_NINA_B302_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/boards.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/boards.txt new file mode 100644 index 0000000..1368e40 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/boards.txt @@ -0,0 +1,596 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +menu.softdevice=Bootloader +menu.debug=Debug + +# ---------------------------------- +# Bluefruit Feather nRF52832 +# ---------------------------------- +feather52832.name=Adafruit Feather nRF52832 +feather52832.bootloader.tool=bootburn + +# Upload +feather52832.upload.tool=nrfutil +feather52832.upload.protocol=nrfutil +feather52832.upload.use_1200bps_touch=false +feather52832.upload.wait_for_upload_port=false +feather52832.upload.native_usb=false +feather52832.upload.maximum_size=290816 +feather52832.upload.maximum_data_size=52224 + +# Build +feather52832.build.mcu=cortex-m4 +feather52832.build.f_cpu=64000000 +feather52832.build.board=NRF52832_FEATHER +feather52832.build.core=nRF5 +feather52832.build.variant=feather_nrf52832 +feather52832.build.usb_manufacturer="Adafruit LLC" +feather52832.build.usb_product="Feather nRF52832" +feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52 +feather52832.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +feather52832.menu.softdevice.s132v6=0.5.0 SoftDevice s132 6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_name=s132 +feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +feather52832.menu.debug.l0=Level 0 (Release) +feather52832.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52832.menu.debug.l1=Level 1 (Error Message) +feather52832.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52832.menu.debug.l2=Level 2 (Full Debug) +feather52832.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52832.menu.debug.l3=Level 3 (Segger SystemView) +feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Bluefruit Feather nRF52840 Express +# ---------------------------------- +feather52840.name=Adafruit Feather nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840.vid.0=0x239A +feather52840.pid.0=0x8029 +feather52840.vid.1=0x239A +feather52840.pid.1=0x0029 +feather52840.vid.2=0x239A +feather52840.pid.2=0x002A +feather52840.vid.3=0x239A +feather52840.pid.3=0x802A + +# Upload +feather52840.bootloader.tool=bootburn +feather52840.upload.tool=nrfutil +feather52840.upload.protocol=nrfutil +feather52840.upload.use_1200bps_touch=true +feather52840.upload.wait_for_upload_port=true +feather52840.upload.maximum_size=815104 +feather52840.upload.maximum_data_size=237568 + +# Build +feather52840.build.mcu=cortex-m4 +feather52840.build.f_cpu=64000000 +feather52840.build.board=NRF52840_FEATHER +feather52840.build.core=nRF5 +feather52840.build.variant=feather_nrf52840_express +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52840 Express" +feather52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840.build.ldscript=nrf52840_s140_v6.ld +feather52840.build.vid=0x239A +feather52840.build.pid=0x8029 + +# SofDevice Menu +feather52840.menu.softdevice.s140v6=0.5.0 SoftDevice s140 6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_name=s140 +feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840.menu.debug.l0=Level 0 (Release) +feather52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840.menu.debug.l1=Level 1 (Error Message) +feather52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840.menu.debug.l2=Level 2 (Full Debug) +feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840.menu.debug.l3=Level 3 (Segger SystemView) +feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# ---------------------------------- +# Feather nRF52840 sense +# ---------------------------------- +feather52840sense.name=Adafruit Feather nRF52840 Sense + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840sense.vid.0=0x239A +feather52840sense.pid.0=0x8087 +feather52840sense.vid.1=0x239A +feather52840sense.pid.1=0x0087 +feather52840sense.vid.2=0x239A +feather52840sense.pid.2=0x0088 +feather52840sense.vid.3=0x239A +feather52840sense.pid.3=0x8088 + +# Upload +feather52840sense.bootloader.tool=bootburn +feather52840sense.upload.tool=nrfutil +feather52840sense.upload.protocol=nrfutil +feather52840sense.upload.use_1200bps_touch=true +feather52840sense.upload.wait_for_upload_port=true +feather52840sense.upload.maximum_size=815104 +feather52840sense.upload.maximum_data_size=237568 + +# Build +feather52840sense.build.mcu=cortex-m4 +feather52840sense.build.f_cpu=64000000 +feather52840sense.build.board=NRF52840_FEATHER_SENSE +feather52840sense.build.core=nRF5 +feather52840sense.build.variant=feather_nrf52840_sense +feather52840sense.build.usb_manufacturer="Adafruit LLC" +feather52840sense.build.usb_product="Feather nRF52840 Sense" +feather52840sense.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840sense.build.ldscript=nrf52840_s140_v6.ld +feather52840sense.build.vid=0x239A +feather52840sense.build.pid=0x8087 + +# SofDevice Menu +feather52840sense.menu.softdevice.s140v6=0.5.0 SoftDevice s140 6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_name=s140 +feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840sense.menu.debug.l0=Level 0 (Release) +feather52840sense.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840sense.menu.debug.l1=Level 1 (Error Message) +feather52840sense.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840sense.menu.debug.l2=Level 2 (Full Debug) +feather52840sense.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840sense.menu.debug.l3=Level 3 (Segger SystemView) +feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Bluefruit ItsyBitsy nRF52840 Express +# --------------------------------------------- +itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +itsybitsy52840.vid.0=0x239A +itsybitsy52840.pid.0=0x8051 +itsybitsy52840.vid.1=0x239A +itsybitsy52840.pid.1=0x0051 +itsybitsy52840.vid.2=0x239A +itsybitsy52840.pid.2=0x0052 +itsybitsy52840.vid.3=0x239A +itsybitsy52840.pid.3=0x8052 + +# Upload +itsybitsy52840.bootloader.tool=bootburn +itsybitsy52840.upload.tool=nrfutil +itsybitsy52840.upload.protocol=nrfutil +itsybitsy52840.upload.use_1200bps_touch=true +itsybitsy52840.upload.wait_for_upload_port=true +itsybitsy52840.upload.maximum_size=815104 +itsybitsy52840.upload.maximum_data_size=237568 + +# Build +itsybitsy52840.build.mcu=cortex-m4 +itsybitsy52840.build.f_cpu=64000000 +itsybitsy52840.build.board=NRF52840_ITSYBITSY +itsybitsy52840.build.core=nRF5 +itsybitsy52840.build.variant=itsybitsy_nrf52840_express +itsybitsy52840.build.usb_manufacturer="Adafruit LLC" +itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express" +itsybitsy52840.build.extra_flags=-DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY {build.flags.usb} +itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld +itsybitsy52840.build.vid=0x239A +itsybitsy52840.build.pid=0x8051 + +# SofDevice Menu +itsybitsy52840.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140 +itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +itsybitsy52840.menu.debug.l0=Level 0 (Release) +itsybitsy52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +itsybitsy52840.menu.debug.l1=Level 1 (Error Message) +itsybitsy52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +itsybitsy52840.menu.debug.l2=Level 2 (Full Debug) +itsybitsy52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView) +itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# --------------------------------------------- +# Bluefruit Circuit Playground nRF52840 Express +# --------------------------------------------- +cplaynrf52840.name=Adafruit Circuit Playground Bluefruit + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cplaynrf52840.vid.0=0x239A +cplaynrf52840.pid.0=0x8045 +cplaynrf52840.vid.1=0x239A +cplaynrf52840.pid.1=0x0045 +cplaynrf52840.vid.2=0x239A +cplaynrf52840.pid.2=0x0046 +cplaynrf52840.vid.3=0x239A +cplaynrf52840.pid.3=0x8046 + +# Upload +cplaynrf52840.bootloader.tool=bootburn +cplaynrf52840.upload.tool=nrfutil +cplaynrf52840.upload.protocol=nrfutil +cplaynrf52840.upload.use_1200bps_touch=true +cplaynrf52840.upload.wait_for_upload_port=true +cplaynrf52840.upload.maximum_size=815104 +cplaynrf52840.upload.maximum_data_size=237568 + +# Build +cplaynrf52840.build.mcu=cortex-m4 +cplaynrf52840.build.f_cpu=64000000 +cplaynrf52840.build.board=NRF52840_CIRCUITPLAY +cplaynrf52840.build.core=nRF5 +cplaynrf52840.build.variant=circuitplayground_nrf52840 +cplaynrf52840.build.usb_manufacturer="Adafruit LLC" +cplaynrf52840.build.usb_product="Circuit Playground Bluefruit" +cplaynrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld +cplaynrf52840.build.vid=0x239A +cplaynrf52840.build.pid=0x8045 + +# SofDevice Menu +cplaynrf52840.menu.softdevice.s140v6=0.5.0 SoftDevice s140 6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cplaynrf52840.menu.debug.l0=Level 0 (Release) +cplaynrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cplaynrf52840.menu.debug.l1=Level 1 (Error Message) +cplaynrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cplaynrf52840.menu.debug.l2=Level 2 (Full Debug) +cplaynrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Clue nRF52840 +# --------------------------------------------- +cluenrf52840.name=Adafruit CLUE + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cluenrf52840.vid.0=0x239A +cluenrf52840.pid.0=0x8072 +cluenrf52840.vid.1=0x239A +cluenrf52840.pid.1=0x0072 +cluenrf52840.vid.2=0x239A +cluenrf52840.pid.2=0x0071 +cluenrf52840.vid.3=0x239A +cluenrf52840.pid.3=0x8071 + +# Upload +cluenrf52840.bootloader.tool=bootburn +cluenrf52840.upload.tool=nrfutil +cluenrf52840.upload.protocol=nrfutil +cluenrf52840.upload.use_1200bps_touch=true +cluenrf52840.upload.wait_for_upload_port=true +cluenrf52840.upload.maximum_size=815104 +cluenrf52840.upload.maximum_data_size=237568 + +# Build +cluenrf52840.build.mcu=cortex-m4 +cluenrf52840.build.f_cpu=64000000 +cluenrf52840.build.board=NRF52840_CLUE +cluenrf52840.build.core=nRF5 +cluenrf52840.build.variant=clue_nrf52840 +cluenrf52840.build.usb_manufacturer="Adafruit LLC" +cluenrf52840.build.usb_product="CLUE" +cluenrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cluenrf52840.build.ldscript=nrf52840_s140_v6.ld +cluenrf52840.build.vid=0x239A +cluenrf52840.build.pid=0x8071 + +# SofDevice Menu +cluenrf52840.menu.softdevice.s140v6=0.5.0 SoftDevice s140 6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cluenrf52840.menu.debug.l0=Level 0 (Release) +cluenrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cluenrf52840.menu.debug.l1=Level 1 (Error Message) +cluenrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cluenrf52840.menu.debug.l2=Level 2 (Full Debug) +cluenrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Metro nRF52840 Express +# ---------------------------------- +metro52840.name=Adafruit Metro nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +metro52840.vid.0=0x239A +metro52840.pid.0=0x803F +metro52840.vid.1=0x239A +metro52840.pid.1=0x003F +metro52840.vid.2=0x239A +metro52840.pid.2=0x0040 +metro52840.vid.3=0x239A +metro52840.pid.3=0x8040 + +# Upload +metro52840.bootloader.tool=bootburn +metro52840.upload.tool=nrfutil +metro52840.upload.protocol=nrfutil +metro52840.upload.use_1200bps_touch=true +metro52840.upload.wait_for_upload_port=true +metro52840.upload.maximum_size=815104 +metro52840.upload.maximum_data_size=237568 + +# Build +metro52840.build.mcu=cortex-m4 +metro52840.build.f_cpu=64000000 +metro52840.build.board=NRF52840_METRO +metro52840.build.core=nRF5 +metro52840.build.variant=metro_nrf52840_express +metro52840.build.usb_manufacturer="Adafruit LLC" +metro52840.build.usb_product="Metro nRF52840 Express" +metro52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +metro52840.build.ldscript=nrf52840_s140_v6.ld +metro52840.build.vid=0x239A +metro52840.build.pid=0x803F + +# SofDevice Menu +metro52840.menu.softdevice.s140v6=0.5.0 SoftDevice s140 6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_name=s140 +metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +metro52840.menu.debug.l0=Level 0 (Release) +metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +metro52840.menu.debug.l1=Level 1 (Error Message) +metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +metro52840.menu.debug.l2=Level 2 (Full Debug) +metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +metro52840.menu.debug.l3=Level 3 (Segger SystemView) +metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + + + +# ------------------------------------------------------- +# +# Boards that aren't made by Adafruit +# +# ------------------------------------------------------- + + +# ---------------------------------- +# Nordic nRF52840DK (PCA10056) +# ---------------------------------- +pca10056.name=Nordic nRF52840DK (PCA10056) +pca10056.bootloader.tool=bootburn + +# Upload +pca10056.upload.tool=nrfutil +pca10056.upload.protocol=nrfutil +pca10056.upload.use_1200bps_touch=true +pca10056.upload.wait_for_upload_port=true +pca10056.upload.maximum_size=815104 +pca10056.upload.maximum_data_size=237568 + +# Build +pca10056.build.mcu=cortex-m4 +pca10056.build.f_cpu=64000000 +pca10056.build.board=NRF52840_PCA10056 +pca10056.build.core=nRF5 +pca10056.build.variant=pca10056 +pca10056.build.usb_manufacturer="Nordic" +pca10056.build.usb_product="nRF52840 DK" +pca10056.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +pca10056.build.ldscript=nrf52840_s140_v6.ld +pca10056.build.vid=0x239A +pca10056.build.pid=0x8029 + +# SofDevice Menu +pca10056.menu.softdevice.s140v6=0.5.0 SoftDevice s140 6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_name=s140 +pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +pca10056.menu.debug.l0=Level 0 (Release) +pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +pca10056.menu.debug.l1=Level 1 (Error Message) +pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +pca10056.menu.debug.l2=Level 2 (Full Debug) +pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +pca10056.menu.debug.l3=Level 3 (Segger SystemView) +pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Particle Xenon +# ---------------------------------- +particle_xenon.name=Particle Xenon + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +particle_xenon.vid.0=0x239A +particle_xenon.pid.0=0x8029 +particle_xenon.vid.1=0x239A +particle_xenon.pid.1=0x0029 +particle_xenon.vid.2=0x239A +particle_xenon.pid.2=0x002A +particle_xenon.vid.3=0x239A +particle_xenon.pid.3=0x802A + +# Upload +particle_xenon.bootloader.tool=bootburn +particle_xenon.upload.tool=nrfutil +particle_xenon.upload.protocol=nrfutil +particle_xenon.upload.use_1200bps_touch=true +particle_xenon.upload.wait_for_upload_port=true +particle_xenon.upload.maximum_size=815104 +particle_xenon.upload.maximum_data_size=237568 + +# Build +particle_xenon.build.mcu=cortex-m4 +particle_xenon.build.f_cpu=64000000 +particle_xenon.build.board=PARTICLE_XENON +particle_xenon.build.core=nRF5 +particle_xenon.build.variant=particle_xenon +particle_xenon.build.usb_manufacturer="Particle Industries" +particle_xenon.build.usb_product="Particle Xenon" +particle_xenon.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +particle_xenon.build.ldscript=nrf52840_s140_v6.ld +particle_xenon.build.vid=0x239A +particle_xenon.build.pid=0x8029 + +# SofDevice Menu +particle_xenon.menu.softdevice.s140v6=0.5.0 SoftDevice s140 6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_name=s140 +particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +particle_xenon.menu.debug.l0=Level 0 (Release) +particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +particle_xenon.menu.debug.l1=Level 1 (Error Message) +particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +particle_xenon.menu.debug.l2=Level 2 (Full Debug) +particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +particle_xenon.menu.debug.l3=Level 3 (Segger SystemView) +particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# ---------------------------------- +# NINA B302 +# ---------------------------------- +ninab302.name=NINA B302 ublox + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +ninab302.vid.0=0x239A +ninab302.pid.0=0x8029 +ninab302.vid.1=0x239A +ninab302.pid.1=0x0029 +ninab302.vid.2=0x7239A +ninab302.pid.2=0x002A +ninab302.vid.3=0x239A +ninab302.pid.3=0x802A + +# Upload +ninab302.bootloader.tool=bootburn +ninab302.upload.tool=nrfutil +ninab302.upload.protocol=nrfutil +ninab302.upload.use_1200bps_touch=true +ninab302.upload.wait_for_upload_port=true +ninab302.upload.maximum_size=815104 +ninab302.upload.maximum_data_size=237568 + +# Build +ninab302.build.mcu=cortex-m4 +ninab302.build.f_cpu=64000000 +ninab302.build.board=NINA_B302_ublox +ninab302.build.core=nRF5 +ninab302.build.variant=NINA_B302_ublox +ninab302.build.usb_manufacturer="Nordic" +ninab302.build.usb_product="NINA B302 ublox" +ninab302.build.extra_flags=-DNRF52840_XXAA -DNINA_B302_ublox {build.flags.usb} +ninab302.build.ldscript=nrf52840_s140_v6.ld +ninab302.build.vid=0x239A +ninab302.build.pid=0x8029 + +# SofDevice Menu +ninab302.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_name=s140 +ninab302.menu.softdevice.s140v6.build.sd_version=6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +ninab302.menu.debug.l0=Level 0 (Release) +ninab302.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab302.menu.debug.l1=Level 1 (Error Message) +ninab302.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab302.menu.debug.l2=Level 2 (Full Debug) +ninab302.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab302.menu.debug.l3=Level 3 (Segger SystemView) +ninab302.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab302.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B112 +# ---------------------------------- +ninab112.name=NINA B112 ublox +ninab112.bootloader.tool=bootburn + +# Upload +ninab112.upload.tool=nrfutil +ninab112.upload.protocol=nrfutil +ninab112.upload.use_1200bps_touch=false +ninab112.upload.wait_for_upload_port=false +ninab112.upload.native_usb=false +ninab112.upload.maximum_size=290816 +ninab112.upload.maximum_data_size=52224 + +# Build +ninab112.build.mcu=cortex-m4 +ninab112.build.f_cpu=64000000 +ninab112.build.board=NINA_B112_ublox +ninab112.build.core=nRF5 +ninab112.build.variant=NINA_B112_ublox +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52832" +ninab112.build.extra_flags=-DNRF52832_XXAA -DNINA_B112_ublox -DNRF52 +ninab112.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +ninab112.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_name=s132 +ninab112.menu.softdevice.s132v6.build.sd_version=6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +ninab112.menu.debug.l0=Level 0 (Release) +ninab112.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab112.menu.debug.l1=Level 1 (Error Message) +ninab112.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab112.menu.debug.l2=Level 2 (Full Debug) +ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab112.menu.debug.l3=Level 3 (Segger SystemView) +ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/cores/nRF5/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/cores/nRF5/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/cores/nRF5/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/cores/nRF5/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/cores/nRF5/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/cores/nRF5/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/cores/nRF5/Udp.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/cores/nRF5/Udp.h new file mode 100644 index 0000000..cc814d3 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/cores/nRF5/Udp.h @@ -0,0 +1,92 @@ +/* + * Udp.cpp: Library to send/receive UDP packets. + * + * NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these) + * 1) UDP does not guarantee the order in which assembled UDP packets are received. This + * might not happen often in practice, but in larger network topologies, a UDP + * packet can be received out of sequence. + * 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being + * aware of it. Again, this may not be a concern in practice on small local networks. + * For more information, see http://www.cafeaulait.org/course/week12/35.html + * + * MIT License: + * Copyright (c) 2008 Bjoern Hartmann + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * bjoern@cs.stanford.edu 12/30/2008 + */ + +#ifndef udp_h +#define udp_h + +#include +#include + +class UDP : public Stream { + +public: + virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + + // KH, add virtual function to support Multicast, necessary for many services (MDNS, UPnP, etc.) + virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure + + virtual void stop() =0; // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port) =0; + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char *host, uint16_t port) =0; + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket() =0; + // Write a single byte into the packet + virtual size_t write(uint8_t) =0; + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t *buffer, size_t size) =0; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket() =0; + // Number of bytes remaining in the current packet + virtual int available() =0; + // Read a single byte from the current packet + virtual int read() =0; + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len) =0; + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) =0; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek() =0; + virtual void flush() =0; // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP() =0; + // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort() =0; +protected: + uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; +}; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/platform.txt new file mode 100644 index 0000000..7d0f6b6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/platform.txt @@ -0,0 +1,169 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All rights reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +name=Adafruit nRF52 Boards +version=0.22.1 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith + +# Allow changing optimization settings via platform.local.txt / boards.local.txt +compiler.optimization_flag=-Ofast + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD + +# KH, Error here to use gcc, must use g++ +#compiler.c.elf.cmd=arm-none-eabi-gcc +compiler.c.elf.cmd=arm-none-eabi-g++ + +compiler.c.elf.flags={compiler.optimization_flag} -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-mcpu={build.mcu} -mthumb -mabi=aapcs {compiler.optimization_flag} -g -c {build.float_flags} -x assembler-with-cpp + +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2bin.flags=-O binary +compiler.elf2bin.cmd=arm-none-eabi-objcopy +compiler.elf2hex.flags=-O ihex +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align --specs=nano.specs --specs=nosys.specs +compiler.size.cmd=arm-none-eabi-size + +# this can be overriden in boards.txt +build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float +build.debug_flags=-DCFG_DEBUG=0 +build.logger_flags=-DCFG_LOGGER=1 +build.sysview_flags=-DCFG_SYSVIEW=0 + +# USB flags +build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.libraries.ldflags= +compiler.elf2bin.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" + +# TODO enable linking with libmath later on +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM4lf_math + +# common compiler for nrf +rtos.path={build.core.path}/freertos +nordic.path={build.core.path}/nordic + +# build.logger_flags and build.sysview_flags are intentionally empty, +# to allow modification via a user's own boards.local.txt or platform.local.txt files. +build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 {compiler.optimization_flag} {build.debug_flags} {build.logger_flags} {build.sysview_flags} {compiler.arm.cmsis.c.flags} "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include/nrf52" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Create archives +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.core.path}/linker" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group -lm "{build.path}/{archive_file}" {compiler.libraries.ldflags} -Wl,--end-group + +## Create output (bin file) +#recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +## Create dfu package zip file +recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip" + +## Create uf2 file +#recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2conv.py" -f 0xADA52840 -c -o "{build.path}/{build.project_name}.uf2" "{build.path}/{build.project_name}.hex" + +## Save bin +recipe.output.tmp_file_bin={build.project_name}.bin +recipe.output.save_file_bin={build.project_name}.save.bin + +## Save hex +recipe.output.tmp_file_hex={build.project_name}.hex +recipe.output.save_file_hexu={build.project_name}.save.hex + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +## Export Compiled Binary +recipe.output.tmp_file={build.project_name}.hex +recipe.output.save_file={build.project_name}.{build.variant}.hex + +#*************************************************** +# adafruit-nrfutil for uploading +# https://github.com/adafruit/Adafruit_nRF52_nrfutil +# pre-built binaries are provided for macos and windows +#*************************************************** +tools.nrfutil.cmd=adafruit-nrfutil +tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe +tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/macos/adafruit-nrfutil + +tools.nrfutil.upload.params.verbose=--verbose +tools.nrfutil.upload.params.quiet= +tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200 --singlebank + +#*************************************************** +# Burning bootloader with either jlink or nrfutil +#*************************************************** + +# Bootloader version +tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.5.0_{build.sd_name}_{build.sd_version} + +tools.bootburn.bootloader.params.verbose= +tools.bootburn.bootloader.params.quiet= +tools.bootburn.bootloader.pattern={program.burn_pattern} + +# erase flash page while programming +tools.bootburn.erase.params.verbose= +tools.bootburn.erase.params.quiet= +tools.bootburn.erase.pattern= + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B112_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B112_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B112_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B112_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B112_ublox/variant.cpp new file mode 100644 index 0000000..f43f3a4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B112_ublox/variant.cpp @@ -0,0 +1,59 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" + +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +const uint32_t g_ADigitalPinMap[] = { + // D0 .. D13 + 5, // D0 is P0.05 (UART RX) + 6, // D1 is P0.06 (UART TX) + 7, // D2 is P0.07 + 31, // D3 is P0.31 + 18, // D4 is P0.18 (LED Blue) + 99, // D5 (NC) + 9, // D6 is P0.09 NFC1 + 10, // D7 is P0.10 (Button) NFC2 + 99, // D8 (NC) + 8, // D9 is P0.08 + 11, // D10 is P0.11 CS + 13, // D11 is P0.13 MOSI + 12, // D12 is P0.12 MISO + 14, // D13 is P0.14 SCK + //I2C + 2, // D14 is P0.2 (SDA) + 3, // D15 is P0.3 (SCL) + // D16 .. D21 (aka A0 .. A5) + 3, // D16 is P0.03 (A0) + 2, // D17 is P0.02 (A1) + 4, // D18 is P0.04 (A2) + 30, // D19 is P0.30 (A3) SW2 + 29, // D20 is P0.29 (A4) + 28, // D21 is P0.28 (A5) + 9, // P0.09 NFC + 10, // P0.10 NFC + 16, // SW1 (LED Green) +}; \ No newline at end of file diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B112_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B112_ublox/variant.h new file mode 100644 index 0000000..833cbf6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B112_ublox/variant.h @@ -0,0 +1,172 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +#ifndef _VARIANT_NINA_B112_UBLOX_ +#define _VARIANT_NINA_B112_UBLOX_ + +#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \ + .rc_ctiv = 0, \ +.rc_temp_ctiv = 0, \ +.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM} + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (32u) +#define NUM_DIGITAL_PINS (32u) +#define NUM_ANALOG_INPUTS (6u) +#define NUM_ANALOG_OUTPUTS (0u) + +// LEDs +#define PIN_LED LED1 +#define LED_BUILTIN PIN_LED + +//LEDs onboard +#define LED1 (0) // Red +#define LED2 (24) // Green/SW1 +#define LED3 (4) // Blue + +#define LED_STATE_ON 1 // State when LED is litted + +//Switch +#define SW1 (24) +#define SW2 (19) + +// NFC +#define PIN_NFC_1 (6) // P0.9 +#define PIN_NFC_2 (7) // P0.10 + +/* + * Analog pins + */ +#define PIN_A0 (16) // P0.03 +#define PIN_A1 (17) // P0.02 +#define PIN_A2 (18) // P0.04 +#define PIN_A3 (19) // P0.30 +#define PIN_A4 (20) // P0.29 +#define PIN_A5 (21) // P0.28 + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_D0 (0) // P0.05 +#define PIN_D1 (1) // P0.06 +#define PIN_D2 (2) // P0.07 +#define PIN_D3 (4) // P0.31 +#define PIN_D4 (5) // P0.18 +#define PIN_D6 (6) // P0.09 +#define PIN_D7 (7) // P0.10 +#define PIN_D9 (9) // P0.08 +#define PIN_D10 (11) // P0.11 +#define PIN_D11 (13) // P0.13 +#define PIN_D12 (12) // P0.12 +#define PIN_D13 (14) // P0.14 +#define PIN_D14 (2) // P0.02 +#define PIN_D15 (3) // P0.03 + +static const uint8_t D0 = PIN_D0 ; +static const uint8_t D1 = PIN_D1 ; +static const uint8_t D2 = PIN_D2 ; +static const uint8_t D3 = PIN_D3 ; +static const uint8_t D4 = PIN_D4 ; +static const uint8_t D6 = PIN_D6 ; +static const uint8_t D7 = PIN_D7 ; +static const uint8_t D9 = PIN_D9 ; +static const uint8_t D10 = PIN_D10 ; +static const uint8_t D11 = PIN_D11 ; +static const uint8_t D12 = PIN_D12 ; +static const uint8_t D13 = PIN_D13 ; +static const uint8_t D14 = PIN_D14 ; +static const uint8_t D15 = PIN_D15 ; + +// Other pins +//static const uint8_t AREF = PIN_AREF; + +//#define PIN_AREF (24) +//#define PIN_VBAT PIN_A7 + +/* + * Serial interfaces + */ +#define PIN_SERIAL_RX (0) // P0.05 +#define PIN_SERIAL_TX (1) // P0.06 +#define PIN_SERIAL_CTS (2) // P0.07 +#define PIN_SERIAL_RTS (3) // P0.31 +#define PIN_SERIAL_DTR (28) // P0.28 +#define PIN_SERIAL_DSR (29) // P0.29 + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (12) // P0.12 +#define PIN_SPI_MOSI (11) // P0.13 +#define PIN_SPI_SCK (13) // P0.14 + +static const uint8_t SS = 10 ; // P0.11 +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (14) // P0.02 +#define PIN_WIRE_SCL (15) // P0.03 + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + + +#endif //_VARIANT_NINA_B112_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B302_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B302_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B302_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B302_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B302_ublox/variant.cpp new file mode 100644 index 0000000..8b4df2e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B302_ublox/variant.cpp @@ -0,0 +1,87 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#include "variant.h" +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +const uint32_t g_ADigitalPinMap[] = +{ + // D0 .. D13 + 29, // D0 is P0.29 (UART RX) + 45, // D1 is P1.13 (UART TX) + 44, // D2 is P1.12 (NFC2) + 31, // D3 is P0.31 (LED1) + 13, // D4 is P0.13 (LED2) + 11, // D5 is P0.11 + 9, // D6 is P0.09 + 10, // D7 is P0.10 (Button) + 41, // D8 is P1.09 + 12, // D9 is P0.12 + 14, // D10 is P0.14 + 15, // D11 is P0.15 + 32, // D12 is P1.00 + 7, // D13 is P0.07 + + // D14 .. D21 (aka A0 .. A5) + 4, // D14 is P0.04 (A0) + 30, // D15 is P0.30 (A1) + 5, // D16 is P0.05 (A2) + 2, // D17 is P0.02 (A3) + 28, // D18 is P0.28 (A4) + 3, // D19 is P0.03 (A5) + + // D20 .. D21 (aka I2C pins) + 16, // D20 is P0.16 (SDA) + 24, // D21 is P0.24 (SCL) + + // QSPI pins (not exposed via any header / test point) + 19, // D22 is P0.19 (QSPI CLK) + 17, // D23 is P0.17 (QSPI CS) + 20, // D24 is P0.20 (QSPI Data 0) + 21, // D25 is P0.21 (QSPI Data 1) + 22, // D26 is P0.22 (QSPI Data 2) + 26, // D27 is P0.23 (QSPI Data 3) + + 40, // D28 is P1.08 - IO34 + 41, // D29 is P1.01 - IO35 + 44, // D30 is P1.02 - IO36 + 45, // D31 is P1.03 - IO37 + 42, // D32 is P1.10 - IO38 + 43, // D33 is P1.11 - IO39 + 47, // D34 is P1.15 - IO40 + 46, // D35 is P1.14 - IO41 + 26, // D36 is P0.26 - IO42 + 6, // D37 is P0.6 - IO43 + 27, // D38 is P0.27 - IO44 +}; + +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B302_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B302_ublox/variant.h new file mode 100644 index 0000000..a69575f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B302_ublox/variant.h @@ -0,0 +1,149 @@ + /* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#ifndef _VARIANT_NINA_B302_UBLOX_ +#define _VARIANT_NINA_B302_UBLOX_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus +// Number of pins defined in PinDescription array +#define PINS_COUNT (40) +#define NUM_DIGITAL_PINS (34) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (3) +#define PIN_LED2 (4) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_RED PIN_LED1 +#define LED_BLUE PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +/* + * Buttons + */ +#define PIN_BUTTON1 (7) + +/* + * Analog pins + */ +#define PIN_A0 (14) +#define PIN_A1 (15) +#define PIN_A2 (16) +#define PIN_A3 (17) +#define PIN_A4 (18) +#define PIN_A5 (19) + +#define D0 (0) +#define D1 (1) +#define D2 (2) +#define D3 (3) +#define D4 (4) +#define D5 (5) +#define D6 (6) +#define D7 (7) +#define D8 (8) +#define D9 (9) +#define D10 (10) +#define D11 (11) +#define D12 (12) +#define D13 (13) + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_NFC1 (31) +#define PIN_NFC2 (2) + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0) +#define PIN_SERIAL1_TX (1) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (22) //24 original +#define PIN_SPI_MOSI (23) //25 original +#define PIN_SPI_SCK (24) //26 original + +static const uint8_t SS = (13); +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (20) +#define PIN_WIRE_SCL (21) + +// QSPI Pins +#define PIN_QSPI_SCK 22 +#define PIN_QSPI_CS 23 +#define PIN_QSPI_IO0 24 +#define PIN_QSPI_IO1 25 +#define PIN_QSPI_IO2 26 +#define PIN_QSPI_IO3 27 + +// On-board QSPI Flash +#define EXTERNAL_FLASH_DEVICES GD25Q16C +#define EXTERNAL_FLASH_USE_QSPI + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif //_VARIANT_NINA_B302_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/boards.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/boards.txt new file mode 100644 index 0000000..14f6252 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/boards.txt @@ -0,0 +1,648 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +menu.softdevice=SoftDevice +menu.debug=Debug + +# ---------------------------------- +# Bluefruit Feather nRF52832 +# ---------------------------------- +feather52832.name=Adafruit Feather nRF52832 +feather52832.bootloader.tool=bootburn + +# Upload +feather52832.upload.tool=nrfutil +feather52832.upload.protocol=nrfutil +feather52832.upload.use_1200bps_touch=false +feather52832.upload.wait_for_upload_port=false +feather52832.upload.native_usb=false +feather52832.upload.maximum_size=290816 +feather52832.upload.maximum_data_size=52224 + +# Build +feather52832.build.mcu=cortex-m4 +feather52832.build.f_cpu=64000000 +feather52832.build.board=NRF52832_FEATHER +feather52832.build.core=nRF5 +feather52832.build.variant=feather_nrf52832 +feather52832.build.usb_manufacturer="Adafruit LLC" +feather52832.build.usb_product="Feather nRF52832" +feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52 +feather52832.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +feather52832.menu.softdevice.s132v6=S132 6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_name=s132 +feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +feather52832.menu.debug.l0=Level 0 (Release) +feather52832.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52832.menu.debug.l1=Level 1 (Error Message) +feather52832.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52832.menu.debug.l2=Level 2 (Full Debug) +feather52832.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52832.menu.debug.l3=Level 3 (Segger SystemView) +feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Bluefruit Feather nRF52840 Express +# ---------------------------------- +feather52840.name=Adafruit Feather nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840.vid.0=0x239A +feather52840.pid.0=0x8029 +feather52840.vid.1=0x239A +feather52840.pid.1=0x0029 +feather52840.vid.2=0x239A +feather52840.pid.2=0x002A +feather52840.vid.3=0x239A +feather52840.pid.3=0x802A + +# Upload +feather52840.bootloader.tool=bootburn +feather52840.upload.tool=nrfutil +feather52840.upload.protocol=nrfutil +feather52840.upload.use_1200bps_touch=true +feather52840.upload.wait_for_upload_port=true +feather52840.upload.maximum_size=815104 +feather52840.upload.maximum_data_size=237568 + +# Build +feather52840.build.mcu=cortex-m4 +feather52840.build.f_cpu=64000000 +feather52840.build.board=NRF52840_FEATHER +feather52840.build.core=nRF5 +feather52840.build.variant=feather_nrf52840_express +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52840 Express" +feather52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840.build.ldscript=nrf52840_s140_v6.ld +feather52840.build.vid=0x239A +feather52840.build.pid=0x8029 + +# SofDevice Menu +feather52840.menu.softdevice.s140v6=S140 6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_name=s140 +feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840.menu.debug.l0=Level 0 (Release) +feather52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840.menu.debug.l1=Level 1 (Error Message) +feather52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840.menu.debug.l2=Level 2 (Full Debug) +feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840.menu.debug.l3=Level 3 (Segger SystemView) +feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# ---------------------------------- +# Feather nRF52840 sense +# ---------------------------------- +feather52840sense.name=Adafruit Feather nRF52840 Sense + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840sense.vid.0=0x239A +feather52840sense.pid.0=0x8087 +feather52840sense.vid.1=0x239A +feather52840sense.pid.1=0x0087 +feather52840sense.vid.2=0x239A +feather52840sense.pid.2=0x0088 +feather52840sense.vid.3=0x239A +feather52840sense.pid.3=0x8088 + +# Upload +feather52840sense.bootloader.tool=bootburn +feather52840sense.upload.tool=nrfutil +feather52840sense.upload.protocol=nrfutil +feather52840sense.upload.use_1200bps_touch=true +feather52840sense.upload.wait_for_upload_port=true +feather52840sense.upload.maximum_size=815104 +feather52840sense.upload.maximum_data_size=237568 + +# Build +feather52840sense.build.mcu=cortex-m4 +feather52840sense.build.f_cpu=64000000 +feather52840sense.build.board=NRF52840_FEATHER_SENSE +feather52840sense.build.core=nRF5 +feather52840sense.build.variant=feather_nrf52840_sense +feather52840sense.build.usb_manufacturer="Adafruit LLC" +feather52840sense.build.usb_product="Feather nRF52840 Sense" +feather52840sense.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840sense.build.ldscript=nrf52840_s140_v6.ld +feather52840sense.build.vid=0x239A +feather52840sense.build.pid=0x8087 + +# SofDevice Menu +feather52840sense.menu.softdevice.s140v6=S140 6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_name=s140 +feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840sense.menu.debug.l0=Level 0 (Release) +feather52840sense.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840sense.menu.debug.l1=Level 1 (Error Message) +feather52840sense.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840sense.menu.debug.l2=Level 2 (Full Debug) +feather52840sense.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840sense.menu.debug.l3=Level 3 (Segger SystemView) +feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Bluefruit ItsyBitsy nRF52840 Express +# --------------------------------------------- +itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +itsybitsy52840.vid.0=0x239A +itsybitsy52840.pid.0=0x8051 +itsybitsy52840.vid.1=0x239A +itsybitsy52840.pid.1=0x0051 +itsybitsy52840.vid.2=0x239A +itsybitsy52840.pid.2=0x0052 +itsybitsy52840.vid.3=0x239A +itsybitsy52840.pid.3=0x8052 + +# Upload +itsybitsy52840.bootloader.tool=bootburn +itsybitsy52840.upload.tool=nrfutil +itsybitsy52840.upload.protocol=nrfutil +itsybitsy52840.upload.use_1200bps_touch=true +itsybitsy52840.upload.wait_for_upload_port=true +itsybitsy52840.upload.maximum_size=815104 +itsybitsy52840.upload.maximum_data_size=237568 + +# Build +itsybitsy52840.build.mcu=cortex-m4 +itsybitsy52840.build.f_cpu=64000000 +itsybitsy52840.build.board=NRF52840_ITSYBITSY +itsybitsy52840.build.core=nRF5 +itsybitsy52840.build.variant=itsybitsy_nrf52840_express +itsybitsy52840.build.usb_manufacturer="Adafruit LLC" +itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express" +itsybitsy52840.build.extra_flags=-DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY {build.flags.usb} +itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld +itsybitsy52840.build.vid=0x239A +itsybitsy52840.build.pid=0x8051 + +# SofDevice Menu +itsybitsy52840.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140 +itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +itsybitsy52840.menu.debug.l0=Level 0 (Release) +itsybitsy52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +itsybitsy52840.menu.debug.l1=Level 1 (Error Message) +itsybitsy52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +itsybitsy52840.menu.debug.l2=Level 2 (Full Debug) +itsybitsy52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView) +itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# --------------------------------------------- +# Bluefruit Circuit Playground nRF52840 Express +# --------------------------------------------- +cplaynrf52840.name=Adafruit Circuit Playground Bluefruit + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cplaynrf52840.vid.0=0x239A +cplaynrf52840.pid.0=0x8045 +cplaynrf52840.vid.1=0x239A +cplaynrf52840.pid.1=0x0045 +cplaynrf52840.vid.2=0x239A +cplaynrf52840.pid.2=0x0046 +cplaynrf52840.vid.3=0x239A +cplaynrf52840.pid.3=0x8046 + +# Upload +cplaynrf52840.bootloader.tool=bootburn +cplaynrf52840.upload.tool=nrfutil +cplaynrf52840.upload.protocol=nrfutil +cplaynrf52840.upload.use_1200bps_touch=true +cplaynrf52840.upload.wait_for_upload_port=true +cplaynrf52840.upload.maximum_size=815104 +cplaynrf52840.upload.maximum_data_size=237568 + +# Build +cplaynrf52840.build.mcu=cortex-m4 +cplaynrf52840.build.f_cpu=64000000 +cplaynrf52840.build.board=NRF52840_CIRCUITPLAY +cplaynrf52840.build.core=nRF5 +cplaynrf52840.build.variant=circuitplayground_nrf52840 +cplaynrf52840.build.usb_manufacturer="Adafruit LLC" +cplaynrf52840.build.usb_product="Circuit Playground Bluefruit" +cplaynrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld +cplaynrf52840.build.vid=0x239A +cplaynrf52840.build.pid=0x8045 + +# SofDevice Menu +cplaynrf52840.menu.softdevice.s140v6=S140 6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cplaynrf52840.menu.debug.l0=Level 0 (Release) +cplaynrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cplaynrf52840.menu.debug.l1=Level 1 (Error Message) +cplaynrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cplaynrf52840.menu.debug.l2=Level 2 (Full Debug) +cplaynrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Clue nRF52840 +# --------------------------------------------- +cluenrf52840.name=Adafruit CLUE + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cluenrf52840.vid.0=0x239A +cluenrf52840.pid.0=0x8072 +cluenrf52840.vid.1=0x239A +cluenrf52840.pid.1=0x0072 +cluenrf52840.vid.2=0x239A +cluenrf52840.pid.2=0x0071 +cluenrf52840.vid.3=0x239A +cluenrf52840.pid.3=0x8071 + +# Upload +cluenrf52840.bootloader.tool=bootburn +cluenrf52840.upload.tool=nrfutil +cluenrf52840.upload.protocol=nrfutil +cluenrf52840.upload.use_1200bps_touch=true +cluenrf52840.upload.wait_for_upload_port=true +cluenrf52840.upload.maximum_size=815104 +cluenrf52840.upload.maximum_data_size=237568 + +# Build +cluenrf52840.build.mcu=cortex-m4 +cluenrf52840.build.f_cpu=64000000 +cluenrf52840.build.board=NRF52840_CLUE +cluenrf52840.build.core=nRF5 +cluenrf52840.build.variant=clue_nrf52840 +cluenrf52840.build.usb_manufacturer="Adafruit LLC" +cluenrf52840.build.usb_product="CLUE" +cluenrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cluenrf52840.build.ldscript=nrf52840_s140_v6.ld +cluenrf52840.build.vid=0x239A +cluenrf52840.build.pid=0x8071 + +# SofDevice Menu +cluenrf52840.menu.softdevice.s140v6=S140 6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cluenrf52840.menu.debug.l0=Level 0 (Release) +cluenrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cluenrf52840.menu.debug.l1=Level 1 (Error Message) +cluenrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cluenrf52840.menu.debug.l2=Level 2 (Full Debug) +cluenrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Metro nRF52840 Express +# ---------------------------------- +metro52840.name=Adafruit Metro nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +metro52840.vid.0=0x239A +metro52840.pid.0=0x803F +metro52840.vid.1=0x239A +metro52840.pid.1=0x003F +metro52840.vid.2=0x239A +metro52840.pid.2=0x0040 +metro52840.vid.3=0x239A +metro52840.pid.3=0x8040 + +# Upload +metro52840.bootloader.tool=bootburn +metro52840.upload.tool=nrfutil +metro52840.upload.protocol=nrfutil +metro52840.upload.use_1200bps_touch=true +metro52840.upload.wait_for_upload_port=true +metro52840.upload.maximum_size=815104 +metro52840.upload.maximum_data_size=237568 + +# Build +metro52840.build.mcu=cortex-m4 +metro52840.build.f_cpu=64000000 +metro52840.build.board=NRF52840_METRO +metro52840.build.core=nRF5 +metro52840.build.variant=metro_nrf52840_express +metro52840.build.usb_manufacturer="Adafruit LLC" +metro52840.build.usb_product="Metro nRF52840 Express" +metro52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +metro52840.build.ldscript=nrf52840_s140_v6.ld +metro52840.build.vid=0x239A +metro52840.build.pid=0x803F + +# SofDevice Menu +metro52840.menu.softdevice.s140v6=S140 6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_name=s140 +metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +metro52840.menu.debug.l0=Level 0 (Release) +metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +metro52840.menu.debug.l1=Level 1 (Error Message) +metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +metro52840.menu.debug.l2=Level 2 (Full Debug) +metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +metro52840.menu.debug.l3=Level 3 (Segger SystemView) +metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + + + +# ------------------------------------------------------- +# +# Boards that aren't made by Adafruit +# +# ------------------------------------------------------- + + +# ---------------------------------- +# Nordic nRF52840DK (PCA10056) +# ---------------------------------- +pca10056.name=Nordic nRF52840DK (PCA10056) +pca10056.bootloader.tool=bootburn + +# Upload +pca10056.upload.tool=nrfutil +pca10056.upload.protocol=nrfutil +pca10056.upload.use_1200bps_touch=true +pca10056.upload.wait_for_upload_port=true +pca10056.upload.maximum_size=815104 +pca10056.upload.maximum_data_size=237568 + +# Build +pca10056.build.mcu=cortex-m4 +pca10056.build.f_cpu=64000000 +pca10056.build.board=NRF52840_PCA10056 +pca10056.build.core=nRF5 +pca10056.build.variant=pca10056 +pca10056.build.usb_manufacturer="Nordic" +pca10056.build.usb_product="nRF52840 DK" +pca10056.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +pca10056.build.ldscript=nrf52840_s140_v6.ld +pca10056.build.vid=0x239A +pca10056.build.pid=0x8029 + +# SofDevice Menu +pca10056.menu.softdevice.s140v6=S140 6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_name=s140 +pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +pca10056.menu.debug.l0=Level 0 (Release) +pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +pca10056.menu.debug.l1=Level 1 (Error Message) +pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +pca10056.menu.debug.l2=Level 2 (Full Debug) +pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +pca10056.menu.debug.l3=Level 3 (Segger SystemView) +pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Particle Xenon +# ---------------------------------- +particle_xenon.name=Particle Xenon + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +particle_xenon.vid.0=0x239A +particle_xenon.pid.0=0x8029 +particle_xenon.vid.1=0x239A +particle_xenon.pid.1=0x0029 +particle_xenon.vid.2=0x239A +particle_xenon.pid.2=0x002A +particle_xenon.vid.3=0x239A +particle_xenon.pid.3=0x802A + +# Upload +particle_xenon.bootloader.tool=bootburn +particle_xenon.upload.tool=nrfutil +particle_xenon.upload.protocol=nrfutil +particle_xenon.upload.use_1200bps_touch=true +particle_xenon.upload.wait_for_upload_port=true +particle_xenon.upload.maximum_size=815104 +particle_xenon.upload.maximum_data_size=237568 + +# Build +particle_xenon.build.mcu=cortex-m4 +particle_xenon.build.f_cpu=64000000 +particle_xenon.build.board=PARTICLE_XENON +particle_xenon.build.core=nRF5 +particle_xenon.build.variant=particle_xenon +particle_xenon.build.usb_manufacturer="Particle Industries" +particle_xenon.build.usb_product="Particle Xenon" +particle_xenon.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +particle_xenon.build.ldscript=nrf52840_s140_v6.ld +particle_xenon.build.vid=0x239A +particle_xenon.build.pid=0x8029 + +# SofDevice Menu +particle_xenon.menu.softdevice.s140v6=S140 6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_name=s140 +particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +particle_xenon.menu.debug.l0=Level 0 (Release) +particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +particle_xenon.menu.debug.l1=Level 1 (Error Message) +particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +particle_xenon.menu.debug.l2=Level 2 (Full Debug) +particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +particle_xenon.menu.debug.l3=Level 3 (Segger SystemView) +particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Raytac MDBT50Q - RX +# ---------------------------------- +mdbt50qrx.name=Raytac MDBT50Q-RX Dongle + +# VID/PID for bootloader, Arduino + Circuitpython App +mdbt50qrx.vid.0=0x239A +mdbt50qrx.pid.0=0x810B +mdbt50qrx.vid.1=0x239A +mdbt50qrx.pid.1=0x010B +mdbt50qrx.vid.2=0x239A +mdbt50qrx.pid.2=0x810C + +# Upload +mdbt50qrx.bootloader.tool=bootburn +mdbt50qrx.upload.tool=nrfutil +mdbt50qrx.upload.protocol=nrfutil +mdbt50qrx.upload.use_1200bps_touch=true +mdbt50qrx.upload.wait_for_upload_port=true +mdbt50qrx.upload.maximum_size=815104 +mdbt50qrx.upload.maximum_data_size=237568 + +# Build +mdbt50qrx.build.mcu=cortex-m4 +mdbt50qrx.build.f_cpu=64000000 +mdbt50qrx.build.board=MDBT50Q_RX +mdbt50qrx.build.core=nRF5 +mdbt50qrx.build.variant=raytac_mdbt50q_rx +mdbt50qrx.build.usb_manufacturer="Raytac" +mdbt50qrx.build.usb_product="nRF52840 Dongle" +mdbt50qrx.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +mdbt50qrx.build.ldscript=nrf52840_s140_v6.ld +mdbt50qrx.build.vid=0x239A +mdbt50qrx.build.pid=0x810B + +# SofDevice Menu +mdbt50qrx.menu.softdevice.s140v6=S140 6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_name=s140 +mdbt50qrx.menu.softdevice.s140v6.build.sd_version=6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +mdbt50qrx.menu.debug.l0=Level 0 (Release) +mdbt50qrx.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +mdbt50qrx.menu.debug.l1=Level 1 (Error Message) +mdbt50qrx.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +mdbt50qrx.menu.debug.l2=Level 2 (Full Debug) +mdbt50qrx.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +mdbt50qrx.menu.debug.l3=Level 3 (Segger SystemView) +mdbt50qrx.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +mdbt50qrx.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# ---------------------------------- +# NINA B302 +# ---------------------------------- +ninab302.name=NINA B302 ublox + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +ninab302.vid.0=0x239A +ninab302.pid.0=0x8029 +ninab302.vid.1=0x239A +ninab302.pid.1=0x0029 +ninab302.vid.2=0x7239A +ninab302.pid.2=0x002A +ninab302.vid.3=0x239A +ninab302.pid.3=0x802A + +# Upload +ninab302.bootloader.tool=bootburn +ninab302.upload.tool=nrfutil +ninab302.upload.protocol=nrfutil +ninab302.upload.use_1200bps_touch=true +ninab302.upload.wait_for_upload_port=true +ninab302.upload.maximum_size=815104 +ninab302.upload.maximum_data_size=237568 + +# Build +ninab302.build.mcu=cortex-m4 +ninab302.build.f_cpu=64000000 +ninab302.build.board=NINA_B302_ublox +ninab302.build.core=nRF5 +ninab302.build.variant=NINA_B302_ublox +ninab302.build.usb_manufacturer="Nordic" +ninab302.build.usb_product="NINA B302 ublox" +ninab302.build.extra_flags=-DNRF52840_XXAA -DNINA_B302_ublox {build.flags.usb} +ninab302.build.ldscript=nrf52840_s140_v6.ld +ninab302.build.vid=0x239A +ninab302.build.pid=0x8029 + +# SofDevice Menu +ninab302.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_name=s140 +ninab302.menu.softdevice.s140v6.build.sd_version=6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +ninab302.menu.debug.l0=Level 0 (Release) +ninab302.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab302.menu.debug.l1=Level 1 (Error Message) +ninab302.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab302.menu.debug.l2=Level 2 (Full Debug) +ninab302.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab302.menu.debug.l3=Level 3 (Segger SystemView) +ninab302.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab302.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B112 +# ---------------------------------- +ninab112.name=NINA B112 ublox +ninab112.bootloader.tool=bootburn + +# Upload +ninab112.upload.tool=nrfutil +ninab112.upload.protocol=nrfutil +ninab112.upload.use_1200bps_touch=false +ninab112.upload.wait_for_upload_port=false +ninab112.upload.native_usb=false +ninab112.upload.maximum_size=290816 +ninab112.upload.maximum_data_size=52224 + +# Build +ninab112.build.mcu=cortex-m4 +ninab112.build.f_cpu=64000000 +ninab112.build.board=NINA_B112_ublox +ninab112.build.core=nRF5 +ninab112.build.variant=NINA_B112_ublox +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52832" +ninab112.build.extra_flags=-DNRF52832_XXAA -DNINA_B112_ublox -DNRF52 +ninab112.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +ninab112.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_name=s132 +ninab112.menu.softdevice.s132v6.build.sd_version=6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +ninab112.menu.debug.l0=Level 0 (Release) +ninab112.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab112.menu.debug.l1=Level 1 (Error Message) +ninab112.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab112.menu.debug.l2=Level 2 (Full Debug) +ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab112.menu.debug.l3=Level 3 (Segger SystemView) +ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/cores/nRF5/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/cores/nRF5/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/cores/nRF5/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/cores/nRF5/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/cores/nRF5/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/cores/nRF5/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/cores/nRF5/Udp.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/cores/nRF5/Udp.h new file mode 100644 index 0000000..cc814d3 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/cores/nRF5/Udp.h @@ -0,0 +1,92 @@ +/* + * Udp.cpp: Library to send/receive UDP packets. + * + * NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these) + * 1) UDP does not guarantee the order in which assembled UDP packets are received. This + * might not happen often in practice, but in larger network topologies, a UDP + * packet can be received out of sequence. + * 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being + * aware of it. Again, this may not be a concern in practice on small local networks. + * For more information, see http://www.cafeaulait.org/course/week12/35.html + * + * MIT License: + * Copyright (c) 2008 Bjoern Hartmann + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * bjoern@cs.stanford.edu 12/30/2008 + */ + +#ifndef udp_h +#define udp_h + +#include +#include + +class UDP : public Stream { + +public: + virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + + // KH, add virtual function to support Multicast, necessary for many services (MDNS, UPnP, etc.) + virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure + + virtual void stop() =0; // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port) =0; + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char *host, uint16_t port) =0; + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket() =0; + // Write a single byte into the packet + virtual size_t write(uint8_t) =0; + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t *buffer, size_t size) =0; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket() =0; + // Number of bytes remaining in the current packet + virtual int available() =0; + // Read a single byte from the current packet + virtual int read() =0; + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len) =0; + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) =0; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek() =0; + virtual void flush() =0; // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP() =0; + // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort() =0; +protected: + uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; +}; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/platform.txt new file mode 100644 index 0000000..5c9167d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/platform.txt @@ -0,0 +1,168 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All rights reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +name=Adafruit nRF52 Boards +version=0.23.0 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith + +# Allow changing optimization settings via platform.local.txt / boards.local.txt +compiler.optimization_flag=-Ofast + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD + + +# KH, Error here to use gcc, must use g++ +#compiler.c.elf.cmd=arm-none-eabi-gcc +compiler.c.elf.cmd=arm-none-eabi-g++ + +compiler.c.elf.flags={compiler.optimization_flag} -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-mcpu={build.mcu} -mthumb -mabi=aapcs {compiler.optimization_flag} -g -c {build.float_flags} -x assembler-with-cpp + +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2bin.flags=-O binary +compiler.elf2bin.cmd=arm-none-eabi-objcopy +compiler.elf2hex.flags=-O ihex +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align --specs=nano.specs --specs=nosys.specs +compiler.size.cmd=arm-none-eabi-size + +# this can be overriden in boards.txt +build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float +build.debug_flags=-DCFG_DEBUG=0 +build.logger_flags=-DCFG_LOGGER=1 +build.sysview_flags=-DCFG_SYSVIEW=0 + +# USB flags +build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.libraries.ldflags= +compiler.elf2bin.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Include/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Lib/GCC/" -larm_cortexM4lf_math + +# common compiler for nrf +rtos.path={build.core.path}/freertos +nordic.path={build.core.path}/nordic + +# build.logger_flags and build.sysview_flags are intentionally empty, +# to allow modification via a user's own boards.local.txt or platform.local.txt files. +build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 {compiler.optimization_flag} {build.debug_flags} {build.logger_flags} {build.sysview_flags} {compiler.arm.cmsis.c.flags} "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include/nrf52" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Create archives +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.core.path}/linker" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" {compiler.libraries.ldflags} -Wl,--end-group + +## Create output (bin file) +#recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +## Create dfu package zip file +recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip" + +## Create uf2 file +#recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2conv.py" -f 0xADA52840 -c -o "{build.path}/{build.project_name}.uf2" "{build.path}/{build.project_name}.hex" + +## Save bin +recipe.output.tmp_file_bin={build.project_name}.bin +recipe.output.save_file_bin={build.project_name}.save.bin + +## Save hex +recipe.output.tmp_file_hex={build.project_name}.hex +recipe.output.save_file_hexu={build.project_name}.save.hex + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +## Export Compiled Binary +recipe.output.tmp_file={build.project_name}.hex +recipe.output.save_file={build.project_name}.{build.variant}.hex + +#*************************************************** +# adafruit-nrfutil for uploading +# https://github.com/adafruit/Adafruit_nRF52_nrfutil +# pre-built binaries are provided for macos and windows +#*************************************************** +tools.nrfutil.cmd=adafruit-nrfutil +tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe +tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/macos/adafruit-nrfutil + +tools.nrfutil.upload.params.verbose=--verbose +tools.nrfutil.upload.params.quiet= +tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200 --singlebank + +#*************************************************** +# Burning bootloader with either jlink or nrfutil +#*************************************************** + +# Bootloader version +tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.6.0_{build.sd_name}_{build.sd_version} + +tools.bootburn.bootloader.params.verbose= +tools.bootburn.bootloader.params.quiet= +tools.bootburn.bootloader.pattern={program.burn_pattern} + +# erase flash page while programming +tools.bootburn.erase.params.verbose= +tools.bootburn.erase.params.quiet= +tools.bootburn.erase.pattern= + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B112_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B112_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B112_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B112_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B112_ublox/variant.cpp new file mode 100644 index 0000000..f43f3a4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B112_ublox/variant.cpp @@ -0,0 +1,59 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" + +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +const uint32_t g_ADigitalPinMap[] = { + // D0 .. D13 + 5, // D0 is P0.05 (UART RX) + 6, // D1 is P0.06 (UART TX) + 7, // D2 is P0.07 + 31, // D3 is P0.31 + 18, // D4 is P0.18 (LED Blue) + 99, // D5 (NC) + 9, // D6 is P0.09 NFC1 + 10, // D7 is P0.10 (Button) NFC2 + 99, // D8 (NC) + 8, // D9 is P0.08 + 11, // D10 is P0.11 CS + 13, // D11 is P0.13 MOSI + 12, // D12 is P0.12 MISO + 14, // D13 is P0.14 SCK + //I2C + 2, // D14 is P0.2 (SDA) + 3, // D15 is P0.3 (SCL) + // D16 .. D21 (aka A0 .. A5) + 3, // D16 is P0.03 (A0) + 2, // D17 is P0.02 (A1) + 4, // D18 is P0.04 (A2) + 30, // D19 is P0.30 (A3) SW2 + 29, // D20 is P0.29 (A4) + 28, // D21 is P0.28 (A5) + 9, // P0.09 NFC + 10, // P0.10 NFC + 16, // SW1 (LED Green) +}; \ No newline at end of file diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B112_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B112_ublox/variant.h new file mode 100644 index 0000000..833cbf6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B112_ublox/variant.h @@ -0,0 +1,172 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +#ifndef _VARIANT_NINA_B112_UBLOX_ +#define _VARIANT_NINA_B112_UBLOX_ + +#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \ + .rc_ctiv = 0, \ +.rc_temp_ctiv = 0, \ +.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM} + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (32u) +#define NUM_DIGITAL_PINS (32u) +#define NUM_ANALOG_INPUTS (6u) +#define NUM_ANALOG_OUTPUTS (0u) + +// LEDs +#define PIN_LED LED1 +#define LED_BUILTIN PIN_LED + +//LEDs onboard +#define LED1 (0) // Red +#define LED2 (24) // Green/SW1 +#define LED3 (4) // Blue + +#define LED_STATE_ON 1 // State when LED is litted + +//Switch +#define SW1 (24) +#define SW2 (19) + +// NFC +#define PIN_NFC_1 (6) // P0.9 +#define PIN_NFC_2 (7) // P0.10 + +/* + * Analog pins + */ +#define PIN_A0 (16) // P0.03 +#define PIN_A1 (17) // P0.02 +#define PIN_A2 (18) // P0.04 +#define PIN_A3 (19) // P0.30 +#define PIN_A4 (20) // P0.29 +#define PIN_A5 (21) // P0.28 + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_D0 (0) // P0.05 +#define PIN_D1 (1) // P0.06 +#define PIN_D2 (2) // P0.07 +#define PIN_D3 (4) // P0.31 +#define PIN_D4 (5) // P0.18 +#define PIN_D6 (6) // P0.09 +#define PIN_D7 (7) // P0.10 +#define PIN_D9 (9) // P0.08 +#define PIN_D10 (11) // P0.11 +#define PIN_D11 (13) // P0.13 +#define PIN_D12 (12) // P0.12 +#define PIN_D13 (14) // P0.14 +#define PIN_D14 (2) // P0.02 +#define PIN_D15 (3) // P0.03 + +static const uint8_t D0 = PIN_D0 ; +static const uint8_t D1 = PIN_D1 ; +static const uint8_t D2 = PIN_D2 ; +static const uint8_t D3 = PIN_D3 ; +static const uint8_t D4 = PIN_D4 ; +static const uint8_t D6 = PIN_D6 ; +static const uint8_t D7 = PIN_D7 ; +static const uint8_t D9 = PIN_D9 ; +static const uint8_t D10 = PIN_D10 ; +static const uint8_t D11 = PIN_D11 ; +static const uint8_t D12 = PIN_D12 ; +static const uint8_t D13 = PIN_D13 ; +static const uint8_t D14 = PIN_D14 ; +static const uint8_t D15 = PIN_D15 ; + +// Other pins +//static const uint8_t AREF = PIN_AREF; + +//#define PIN_AREF (24) +//#define PIN_VBAT PIN_A7 + +/* + * Serial interfaces + */ +#define PIN_SERIAL_RX (0) // P0.05 +#define PIN_SERIAL_TX (1) // P0.06 +#define PIN_SERIAL_CTS (2) // P0.07 +#define PIN_SERIAL_RTS (3) // P0.31 +#define PIN_SERIAL_DTR (28) // P0.28 +#define PIN_SERIAL_DSR (29) // P0.29 + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (12) // P0.12 +#define PIN_SPI_MOSI (11) // P0.13 +#define PIN_SPI_SCK (13) // P0.14 + +static const uint8_t SS = 10 ; // P0.11 +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (14) // P0.02 +#define PIN_WIRE_SCL (15) // P0.03 + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + + +#endif //_VARIANT_NINA_B112_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B302_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B302_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B302_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B302_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B302_ublox/variant.cpp new file mode 100644 index 0000000..8b4df2e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B302_ublox/variant.cpp @@ -0,0 +1,87 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#include "variant.h" +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +const uint32_t g_ADigitalPinMap[] = +{ + // D0 .. D13 + 29, // D0 is P0.29 (UART RX) + 45, // D1 is P1.13 (UART TX) + 44, // D2 is P1.12 (NFC2) + 31, // D3 is P0.31 (LED1) + 13, // D4 is P0.13 (LED2) + 11, // D5 is P0.11 + 9, // D6 is P0.09 + 10, // D7 is P0.10 (Button) + 41, // D8 is P1.09 + 12, // D9 is P0.12 + 14, // D10 is P0.14 + 15, // D11 is P0.15 + 32, // D12 is P1.00 + 7, // D13 is P0.07 + + // D14 .. D21 (aka A0 .. A5) + 4, // D14 is P0.04 (A0) + 30, // D15 is P0.30 (A1) + 5, // D16 is P0.05 (A2) + 2, // D17 is P0.02 (A3) + 28, // D18 is P0.28 (A4) + 3, // D19 is P0.03 (A5) + + // D20 .. D21 (aka I2C pins) + 16, // D20 is P0.16 (SDA) + 24, // D21 is P0.24 (SCL) + + // QSPI pins (not exposed via any header / test point) + 19, // D22 is P0.19 (QSPI CLK) + 17, // D23 is P0.17 (QSPI CS) + 20, // D24 is P0.20 (QSPI Data 0) + 21, // D25 is P0.21 (QSPI Data 1) + 22, // D26 is P0.22 (QSPI Data 2) + 26, // D27 is P0.23 (QSPI Data 3) + + 40, // D28 is P1.08 - IO34 + 41, // D29 is P1.01 - IO35 + 44, // D30 is P1.02 - IO36 + 45, // D31 is P1.03 - IO37 + 42, // D32 is P1.10 - IO38 + 43, // D33 is P1.11 - IO39 + 47, // D34 is P1.15 - IO40 + 46, // D35 is P1.14 - IO41 + 26, // D36 is P0.26 - IO42 + 6, // D37 is P0.6 - IO43 + 27, // D38 is P0.27 - IO44 +}; + +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B302_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B302_ublox/variant.h new file mode 100644 index 0000000..a69575f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B302_ublox/variant.h @@ -0,0 +1,149 @@ + /* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#ifndef _VARIANT_NINA_B302_UBLOX_ +#define _VARIANT_NINA_B302_UBLOX_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus +// Number of pins defined in PinDescription array +#define PINS_COUNT (40) +#define NUM_DIGITAL_PINS (34) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (3) +#define PIN_LED2 (4) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_RED PIN_LED1 +#define LED_BLUE PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +/* + * Buttons + */ +#define PIN_BUTTON1 (7) + +/* + * Analog pins + */ +#define PIN_A0 (14) +#define PIN_A1 (15) +#define PIN_A2 (16) +#define PIN_A3 (17) +#define PIN_A4 (18) +#define PIN_A5 (19) + +#define D0 (0) +#define D1 (1) +#define D2 (2) +#define D3 (3) +#define D4 (4) +#define D5 (5) +#define D6 (6) +#define D7 (7) +#define D8 (8) +#define D9 (9) +#define D10 (10) +#define D11 (11) +#define D12 (12) +#define D13 (13) + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_NFC1 (31) +#define PIN_NFC2 (2) + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0) +#define PIN_SERIAL1_TX (1) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (22) //24 original +#define PIN_SPI_MOSI (23) //25 original +#define PIN_SPI_SCK (24) //26 original + +static const uint8_t SS = (13); +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (20) +#define PIN_WIRE_SCL (21) + +// QSPI Pins +#define PIN_QSPI_SCK 22 +#define PIN_QSPI_CS 23 +#define PIN_QSPI_IO0 24 +#define PIN_QSPI_IO1 25 +#define PIN_QSPI_IO2 26 +#define PIN_QSPI_IO3 27 + +// On-board QSPI Flash +#define EXTERNAL_FLASH_DEVICES GD25Q16C +#define EXTERNAL_FLASH_USE_QSPI + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif //_VARIANT_NINA_B302_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/boards.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/boards.txt new file mode 100644 index 0000000..06f117a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/boards.txt @@ -0,0 +1,649 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +menu.softdevice=SoftDevice +menu.debug=Debug + +# ---------------------------------- +# Bluefruit Feather nRF52832 +# ---------------------------------- +feather52832.name=Adafruit Feather nRF52832 +feather52832.bootloader.tool=bootburn + +# Upload +feather52832.upload.tool=nrfutil +feather52832.upload.protocol=nrfutil +feather52832.upload.use_1200bps_touch=false +feather52832.upload.wait_for_upload_port=false +feather52832.upload.native_usb=false +feather52832.upload.maximum_size=290816 +feather52832.upload.maximum_data_size=52224 + +# Build +feather52832.build.mcu=cortex-m4 +feather52832.build.f_cpu=64000000 +feather52832.build.board=NRF52832_FEATHER +feather52832.build.core=nRF5 +feather52832.build.variant=feather_nrf52832 +feather52832.build.usb_manufacturer="Adafruit LLC" +feather52832.build.usb_product="Feather nRF52832" +feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52 +feather52832.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +feather52832.menu.softdevice.s132v6=S132 6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_name=s132 +feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +feather52832.menu.debug.l0=Level 0 (Release) +feather52832.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52832.menu.debug.l1=Level 1 (Error Message) +feather52832.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52832.menu.debug.l2=Level 2 (Full Debug) +feather52832.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52832.menu.debug.l3=Level 3 (Segger SystemView) +feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Bluefruit Feather nRF52840 Express +# ---------------------------------- +feather52840.name=Adafruit Feather nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840.vid.0=0x239A +feather52840.pid.0=0x8029 +feather52840.vid.1=0x239A +feather52840.pid.1=0x0029 +feather52840.vid.2=0x239A +feather52840.pid.2=0x002A +feather52840.vid.3=0x239A +feather52840.pid.3=0x802A + +# Upload +feather52840.bootloader.tool=bootburn +feather52840.upload.tool=nrfutil +feather52840.upload.protocol=nrfutil +feather52840.upload.use_1200bps_touch=true +feather52840.upload.wait_for_upload_port=true +feather52840.upload.maximum_size=815104 +feather52840.upload.maximum_data_size=237568 + +# Build +feather52840.build.mcu=cortex-m4 +feather52840.build.f_cpu=64000000 +feather52840.build.board=NRF52840_FEATHER +feather52840.build.core=nRF5 +feather52840.build.variant=feather_nrf52840_express +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52840 Express" +feather52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840.build.ldscript=nrf52840_s140_v6.ld +feather52840.build.vid=0x239A +feather52840.build.pid=0x8029 + +# SofDevice Menu +feather52840.menu.softdevice.s140v6=S140 6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_name=s140 +feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840.menu.debug.l0=Level 0 (Release) +feather52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840.menu.debug.l1=Level 1 (Error Message) +feather52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840.menu.debug.l2=Level 2 (Full Debug) +feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840.menu.debug.l3=Level 3 (Segger SystemView) +feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# ---------------------------------- +# Feather nRF52840 sense +# ---------------------------------- +feather52840sense.name=Adafruit Feather nRF52840 Sense + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840sense.vid.0=0x239A +feather52840sense.pid.0=0x8087 +feather52840sense.vid.1=0x239A +feather52840sense.pid.1=0x0087 +feather52840sense.vid.2=0x239A +feather52840sense.pid.2=0x0088 +feather52840sense.vid.3=0x239A +feather52840sense.pid.3=0x8088 + +# Upload +feather52840sense.bootloader.tool=bootburn +feather52840sense.upload.tool=nrfutil +feather52840sense.upload.protocol=nrfutil +feather52840sense.upload.use_1200bps_touch=true +feather52840sense.upload.wait_for_upload_port=true +feather52840sense.upload.maximum_size=815104 +feather52840sense.upload.maximum_data_size=237568 + +# Build +feather52840sense.build.mcu=cortex-m4 +feather52840sense.build.f_cpu=64000000 +feather52840sense.build.board=NRF52840_FEATHER_SENSE +feather52840sense.build.core=nRF5 +feather52840sense.build.variant=feather_nrf52840_sense +feather52840sense.build.usb_manufacturer="Adafruit LLC" +feather52840sense.build.usb_product="Feather nRF52840 Sense" +feather52840sense.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840sense.build.ldscript=nrf52840_s140_v6.ld +feather52840sense.build.vid=0x239A +feather52840sense.build.pid=0x8087 + +# SofDevice Menu +feather52840sense.menu.softdevice.s140v6=S140 6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_name=s140 +feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840sense.menu.debug.l0=Level 0 (Release) +feather52840sense.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840sense.menu.debug.l1=Level 1 (Error Message) +feather52840sense.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840sense.menu.debug.l2=Level 2 (Full Debug) +feather52840sense.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840sense.menu.debug.l3=Level 3 (Segger SystemView) +feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Bluefruit ItsyBitsy nRF52840 Express +# --------------------------------------------- +itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +itsybitsy52840.vid.0=0x239A +itsybitsy52840.pid.0=0x8051 +itsybitsy52840.vid.1=0x239A +itsybitsy52840.pid.1=0x0051 +itsybitsy52840.vid.2=0x239A +itsybitsy52840.pid.2=0x0052 +itsybitsy52840.vid.3=0x239A +itsybitsy52840.pid.3=0x8052 + +# Upload +itsybitsy52840.bootloader.tool=bootburn +itsybitsy52840.upload.tool=nrfutil +itsybitsy52840.upload.protocol=nrfutil +itsybitsy52840.upload.use_1200bps_touch=true +itsybitsy52840.upload.wait_for_upload_port=true +itsybitsy52840.upload.maximum_size=815104 +itsybitsy52840.upload.maximum_data_size=237568 + +# Build +itsybitsy52840.build.mcu=cortex-m4 +itsybitsy52840.build.f_cpu=64000000 +itsybitsy52840.build.board=NRF52840_ITSYBITSY +itsybitsy52840.build.core=nRF5 +itsybitsy52840.build.variant=itsybitsy_nrf52840_express +itsybitsy52840.build.usb_manufacturer="Adafruit LLC" +itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express" +itsybitsy52840.build.extra_flags=-DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY {build.flags.usb} +itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld +itsybitsy52840.build.vid=0x239A +itsybitsy52840.build.pid=0x8051 + +# SofDevice Menu +itsybitsy52840.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140 +itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +itsybitsy52840.menu.debug.l0=Level 0 (Release) +itsybitsy52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +itsybitsy52840.menu.debug.l1=Level 1 (Error Message) +itsybitsy52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +itsybitsy52840.menu.debug.l2=Level 2 (Full Debug) +itsybitsy52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView) +itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# --------------------------------------------- +# Bluefruit Circuit Playground nRF52840 Express +# --------------------------------------------- +cplaynrf52840.name=Adafruit Circuit Playground Bluefruit + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cplaynrf52840.vid.0=0x239A +cplaynrf52840.pid.0=0x8045 +cplaynrf52840.vid.1=0x239A +cplaynrf52840.pid.1=0x0045 +cplaynrf52840.vid.2=0x239A +cplaynrf52840.pid.2=0x0046 +cplaynrf52840.vid.3=0x239A +cplaynrf52840.pid.3=0x8046 + +# Upload +cplaynrf52840.bootloader.tool=bootburn +cplaynrf52840.upload.tool=nrfutil +cplaynrf52840.upload.protocol=nrfutil +cplaynrf52840.upload.use_1200bps_touch=true +cplaynrf52840.upload.wait_for_upload_port=true +cplaynrf52840.upload.maximum_size=815104 +cplaynrf52840.upload.maximum_data_size=237568 + +# Build +cplaynrf52840.build.mcu=cortex-m4 +cplaynrf52840.build.f_cpu=64000000 +cplaynrf52840.build.board=NRF52840_CIRCUITPLAY +cplaynrf52840.build.core=nRF5 +cplaynrf52840.build.variant=circuitplayground_nrf52840 +cplaynrf52840.build.usb_manufacturer="Adafruit LLC" +cplaynrf52840.build.usb_product="Circuit Playground Bluefruit" +cplaynrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld +cplaynrf52840.build.vid=0x239A +cplaynrf52840.build.pid=0x8045 + +# SofDevice Menu +cplaynrf52840.menu.softdevice.s140v6=S140 6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cplaynrf52840.menu.debug.l0=Level 0 (Release) +cplaynrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cplaynrf52840.menu.debug.l1=Level 1 (Error Message) +cplaynrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cplaynrf52840.menu.debug.l2=Level 2 (Full Debug) +cplaynrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Clue nRF52840 +# --------------------------------------------- +cluenrf52840.name=Adafruit CLUE + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cluenrf52840.vid.0=0x239A +cluenrf52840.pid.0=0x8072 +cluenrf52840.vid.1=0x239A +cluenrf52840.pid.1=0x0072 +cluenrf52840.vid.2=0x239A +cluenrf52840.pid.2=0x0071 +cluenrf52840.vid.3=0x239A +cluenrf52840.pid.3=0x8071 + +# Upload +cluenrf52840.bootloader.tool=bootburn +cluenrf52840.upload.tool=nrfutil +cluenrf52840.upload.protocol=nrfutil +cluenrf52840.upload.use_1200bps_touch=true +cluenrf52840.upload.wait_for_upload_port=true +cluenrf52840.upload.maximum_size=815104 +cluenrf52840.upload.maximum_data_size=237568 + +# Build +cluenrf52840.build.mcu=cortex-m4 +cluenrf52840.build.f_cpu=64000000 +cluenrf52840.build.board=NRF52840_CLUE +cluenrf52840.build.core=nRF5 +cluenrf52840.build.variant=clue_nrf52840 +cluenrf52840.build.usb_manufacturer="Adafruit LLC" +cluenrf52840.build.usb_product="CLUE" +cluenrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cluenrf52840.build.ldscript=nrf52840_s140_v6.ld +cluenrf52840.build.vid=0x239A +cluenrf52840.build.pid=0x8071 + +# SofDevice Menu +cluenrf52840.menu.softdevice.s140v6=S140 6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cluenrf52840.menu.debug.l0=Level 0 (Release) +cluenrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cluenrf52840.menu.debug.l1=Level 1 (Error Message) +cluenrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cluenrf52840.menu.debug.l2=Level 2 (Full Debug) +cluenrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Metro nRF52840 Express +# ---------------------------------- +metro52840.name=Adafruit Metro nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +metro52840.vid.0=0x239A +metro52840.pid.0=0x803F +metro52840.vid.1=0x239A +metro52840.pid.1=0x003F +metro52840.vid.2=0x239A +metro52840.pid.2=0x0040 +metro52840.vid.3=0x239A +metro52840.pid.3=0x8040 + +# Upload +metro52840.bootloader.tool=bootburn +metro52840.upload.tool=nrfutil +metro52840.upload.protocol=nrfutil +metro52840.upload.use_1200bps_touch=true +metro52840.upload.wait_for_upload_port=true +metro52840.upload.maximum_size=815104 +metro52840.upload.maximum_data_size=237568 + +# Build +metro52840.build.mcu=cortex-m4 +metro52840.build.f_cpu=64000000 +metro52840.build.board=NRF52840_METRO +metro52840.build.core=nRF5 +metro52840.build.variant=metro_nrf52840_express +metro52840.build.usb_manufacturer="Adafruit LLC" +metro52840.build.usb_product="Metro nRF52840 Express" +metro52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +metro52840.build.ldscript=nrf52840_s140_v6.ld +metro52840.build.vid=0x239A +metro52840.build.pid=0x803F + +# SofDevice Menu +metro52840.menu.softdevice.s140v6=S140 6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_name=s140 +metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +metro52840.menu.debug.l0=Level 0 (Release) +metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +metro52840.menu.debug.l1=Level 1 (Error Message) +metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +metro52840.menu.debug.l2=Level 2 (Full Debug) +metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +metro52840.menu.debug.l3=Level 3 (Segger SystemView) +metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + + + +# ------------------------------------------------------- +# +# Boards that aren't made by Adafruit +# +# ------------------------------------------------------- + + +# ---------------------------------- +# Nordic nRF52840DK (PCA10056) +# ---------------------------------- +pca10056.name=Nordic nRF52840DK (PCA10056) +pca10056.bootloader.tool=bootburn + +# Upload +pca10056.upload.tool=nrfutil +pca10056.upload.protocol=nrfutil +pca10056.upload.use_1200bps_touch=true +pca10056.upload.wait_for_upload_port=true +pca10056.upload.maximum_size=815104 +pca10056.upload.maximum_data_size=237568 + +# Build +pca10056.build.mcu=cortex-m4 +pca10056.build.f_cpu=64000000 +pca10056.build.board=NRF52840_PCA10056 +pca10056.build.core=nRF5 +pca10056.build.variant=pca10056 +pca10056.build.usb_manufacturer="Nordic" +pca10056.build.usb_product="nRF52840 DK" +pca10056.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +pca10056.build.ldscript=nrf52840_s140_v6.ld +pca10056.build.vid=0x239A +pca10056.build.pid=0x8029 + +# SofDevice Menu +pca10056.menu.softdevice.s140v6=S140 6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_name=s140 +pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +pca10056.menu.debug.l0=Level 0 (Release) +pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +pca10056.menu.debug.l1=Level 1 (Error Message) +pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +pca10056.menu.debug.l2=Level 2 (Full Debug) +pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +pca10056.menu.debug.l3=Level 3 (Segger SystemView) +pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Particle Xenon +# ---------------------------------- +particle_xenon.name=Particle Xenon + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +particle_xenon.vid.0=0x239A +particle_xenon.pid.0=0x8029 +particle_xenon.vid.1=0x239A +particle_xenon.pid.1=0x0029 +particle_xenon.vid.2=0x239A +particle_xenon.pid.2=0x002A +particle_xenon.vid.3=0x239A +particle_xenon.pid.3=0x802A + +# Upload +particle_xenon.bootloader.tool=bootburn +particle_xenon.upload.tool=nrfutil +particle_xenon.upload.protocol=nrfutil +particle_xenon.upload.use_1200bps_touch=true +particle_xenon.upload.wait_for_upload_port=true +particle_xenon.upload.maximum_size=815104 +particle_xenon.upload.maximum_data_size=237568 + +# Build +particle_xenon.build.mcu=cortex-m4 +particle_xenon.build.f_cpu=64000000 +particle_xenon.build.board=PARTICLE_XENON +particle_xenon.build.core=nRF5 +particle_xenon.build.variant=particle_xenon +particle_xenon.build.usb_manufacturer="Particle Industries" +particle_xenon.build.usb_product="Particle Xenon" +particle_xenon.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +particle_xenon.build.ldscript=nrf52840_s140_v6.ld +particle_xenon.build.vid=0x239A +particle_xenon.build.pid=0x8029 + +# SofDevice Menu +particle_xenon.menu.softdevice.s140v6=S140 6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_name=s140 +particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +particle_xenon.menu.debug.l0=Level 0 (Release) +particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +particle_xenon.menu.debug.l1=Level 1 (Error Message) +particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +particle_xenon.menu.debug.l2=Level 2 (Full Debug) +particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +particle_xenon.menu.debug.l3=Level 3 (Segger SystemView) +particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Raytac MDBT50Q - RX +# ---------------------------------- +mdbt50qrx.name=Raytac MDBT50Q-RX Dongle + +# VID/PID for bootloader, Arduino + Circuitpython App +mdbt50qrx.vid.0=0x239A +mdbt50qrx.pid.0=0x810B +mdbt50qrx.vid.1=0x239A +mdbt50qrx.pid.1=0x010B +mdbt50qrx.vid.2=0x239A +mdbt50qrx.pid.2=0x810C + +# Upload +mdbt50qrx.bootloader.tool=bootburn +mdbt50qrx.upload.tool=nrfutil +mdbt50qrx.upload.protocol=nrfutil +mdbt50qrx.upload.use_1200bps_touch=true +mdbt50qrx.upload.wait_for_upload_port=true +mdbt50qrx.upload.maximum_size=815104 +mdbt50qrx.upload.maximum_data_size=237568 + +# Build +mdbt50qrx.build.mcu=cortex-m4 +mdbt50qrx.build.f_cpu=64000000 +mdbt50qrx.build.board=MDBT50Q_RX +mdbt50qrx.build.core=nRF5 +mdbt50qrx.build.variant=raytac_mdbt50q_rx +mdbt50qrx.build.usb_manufacturer="Raytac" +mdbt50qrx.build.usb_product="nRF52840 Dongle" +mdbt50qrx.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +mdbt50qrx.build.ldscript=nrf52840_s140_v6.ld +mdbt50qrx.build.vid=0x239A +mdbt50qrx.build.pid=0x810B + +# SofDevice Menu +mdbt50qrx.menu.softdevice.s140v6=S140 6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_name=s140 +mdbt50qrx.menu.softdevice.s140v6.build.sd_version=6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +mdbt50qrx.menu.debug.l0=Level 0 (Release) +mdbt50qrx.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +mdbt50qrx.menu.debug.l1=Level 1 (Error Message) +mdbt50qrx.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +mdbt50qrx.menu.debug.l2=Level 2 (Full Debug) +mdbt50qrx.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +mdbt50qrx.menu.debug.l3=Level 3 (Segger SystemView) +mdbt50qrx.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +mdbt50qrx.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + + +# ---------------------------------- +# NINA B302 +# ---------------------------------- +ninab302.name=NINA B302 ublox + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +ninab302.vid.0=0x239A +ninab302.pid.0=0x8029 +ninab302.vid.1=0x239A +ninab302.pid.1=0x0029 +ninab302.vid.2=0x7239A +ninab302.pid.2=0x002A +ninab302.vid.3=0x239A +ninab302.pid.3=0x802A + +# Upload +ninab302.bootloader.tool=bootburn +ninab302.upload.tool=nrfutil +ninab302.upload.protocol=nrfutil +ninab302.upload.use_1200bps_touch=true +ninab302.upload.wait_for_upload_port=true +ninab302.upload.maximum_size=815104 +ninab302.upload.maximum_data_size=237568 + +# Build +ninab302.build.mcu=cortex-m4 +ninab302.build.f_cpu=64000000 +ninab302.build.board=NINA_B302_ublox +ninab302.build.core=nRF5 +ninab302.build.variant=NINA_B302_ublox +ninab302.build.usb_manufacturer="Nordic" +ninab302.build.usb_product="NINA B302 ublox" +ninab302.build.extra_flags=-DNRF52840_XXAA -DNINA_B302_ublox {build.flags.usb} +ninab302.build.ldscript=nrf52840_s140_v6.ld +ninab302.build.vid=0x239A +ninab302.build.pid=0x8029 + +# SofDevice Menu +ninab302.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_name=s140 +ninab302.menu.softdevice.s140v6.build.sd_version=6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +ninab302.menu.debug.l0=Level 0 (Release) +ninab302.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab302.menu.debug.l1=Level 1 (Error Message) +ninab302.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab302.menu.debug.l2=Level 2 (Full Debug) +ninab302.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab302.menu.debug.l3=Level 3 (Segger SystemView) +ninab302.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab302.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B112 +# ---------------------------------- +ninab112.name=NINA B112 ublox +ninab112.bootloader.tool=bootburn + +# Upload +ninab112.upload.tool=nrfutil +ninab112.upload.protocol=nrfutil +ninab112.upload.use_1200bps_touch=false +ninab112.upload.wait_for_upload_port=false +ninab112.upload.native_usb=false +ninab112.upload.maximum_size=290816 +ninab112.upload.maximum_data_size=52224 + +# Build +ninab112.build.mcu=cortex-m4 +ninab112.build.f_cpu=64000000 +ninab112.build.board=NINA_B112_ublox +ninab112.build.core=nRF5 +ninab112.build.variant=NINA_B112_ublox +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52832" +ninab112.build.extra_flags=-DNRF52832_XXAA -DNINA_B112_ublox -DNRF52 +ninab112.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +ninab112.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_name=s132 +ninab112.menu.softdevice.s132v6.build.sd_version=6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +ninab112.menu.debug.l0=Level 0 (Release) +ninab112.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab112.menu.debug.l1=Level 1 (Error Message) +ninab112.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab112.menu.debug.l2=Level 2 (Full Debug) +ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab112.menu.debug.l3=Level 3 (Segger SystemView) +ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/cores/nRF5/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/cores/nRF5/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/cores/nRF5/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/cores/nRF5/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/cores/nRF5/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/cores/nRF5/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/cores/nRF5/Udp.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/cores/nRF5/Udp.h new file mode 100644 index 0000000..cc814d3 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/cores/nRF5/Udp.h @@ -0,0 +1,92 @@ +/* + * Udp.cpp: Library to send/receive UDP packets. + * + * NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these) + * 1) UDP does not guarantee the order in which assembled UDP packets are received. This + * might not happen often in practice, but in larger network topologies, a UDP + * packet can be received out of sequence. + * 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being + * aware of it. Again, this may not be a concern in practice on small local networks. + * For more information, see http://www.cafeaulait.org/course/week12/35.html + * + * MIT License: + * Copyright (c) 2008 Bjoern Hartmann + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * bjoern@cs.stanford.edu 12/30/2008 + */ + +#ifndef udp_h +#define udp_h + +#include +#include + +class UDP : public Stream { + +public: + virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + + // KH, add virtual function to support Multicast, necessary for many services (MDNS, UPnP, etc.) + virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure + + virtual void stop() =0; // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port) =0; + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char *host, uint16_t port) =0; + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket() =0; + // Write a single byte into the packet + virtual size_t write(uint8_t) =0; + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t *buffer, size_t size) =0; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket() =0; + // Number of bytes remaining in the current packet + virtual int available() =0; + // Read a single byte from the current packet + virtual int read() =0; + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len) =0; + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) =0; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek() =0; + virtual void flush() =0; // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP() =0; + // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort() =0; +protected: + uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; +}; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/platform.txt new file mode 100644 index 0000000..469647d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/platform.txt @@ -0,0 +1,167 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All rights reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +name=Adafruit nRF52 Boards +version=0.24.0 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith + +# Allow changing optimization settings via platform.local.txt / boards.local.txt +compiler.optimization_flag=-Ofast + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD + +# KH, Error here to use gcc, must use g++ +#compiler.c.elf.cmd=arm-none-eabi-gcc +compiler.c.elf.cmd=arm-none-eabi-g++ + +compiler.c.elf.flags={compiler.optimization_flag} -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-mcpu={build.mcu} -mthumb -mabi=aapcs {compiler.optimization_flag} -g -c {build.float_flags} -x assembler-with-cpp + +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2bin.flags=-O binary +compiler.elf2bin.cmd=arm-none-eabi-objcopy +compiler.elf2hex.flags=-O ihex +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align --specs=nano.specs --specs=nosys.specs +compiler.size.cmd=arm-none-eabi-size + +# this can be overriden in boards.txt +build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float +build.debug_flags=-DCFG_DEBUG=0 +build.logger_flags=-DCFG_LOGGER=1 +build.sysview_flags=-DCFG_SYSVIEW=0 + +# USB flags +build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.libraries.ldflags= +compiler.elf2bin.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Include/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Lib/GCC/" -larm_cortexM4lf_math + +# common compiler for nrf +rtos.path={build.core.path}/freertos +nordic.path={build.core.path}/nordic + +# build.logger_flags and build.sysview_flags are intentionally empty, +# to allow modification via a user's own boards.local.txt or platform.local.txt files. +build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 {compiler.optimization_flag} {build.debug_flags} {build.logger_flags} {build.sysview_flags} {compiler.arm.cmsis.c.flags} "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include/nrf52" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Create archives +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.core.path}/linker" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" {compiler.libraries.ldflags} -Wl,--end-group + +## Create output (bin file) +#recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +## Create dfu package zip file +recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip" + +## Create uf2 file +#recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2conv.py" -f 0xADA52840 -c -o "{build.path}/{build.project_name}.uf2" "{build.path}/{build.project_name}.hex" + +## Save bin +recipe.output.tmp_file_bin={build.project_name}.bin +recipe.output.save_file_bin={build.project_name}.save.bin + +## Save hex +recipe.output.tmp_file_hex={build.project_name}.hex +recipe.output.save_file_hexu={build.project_name}.save.hex + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +## Export Compiled Binary +recipe.output.tmp_file={build.project_name}.hex +recipe.output.save_file={build.project_name}.{build.variant}.hex + +#*************************************************** +# adafruit-nrfutil for uploading +# https://github.com/adafruit/Adafruit_nRF52_nrfutil +# pre-built binaries are provided for macos and windows +#*************************************************** +tools.nrfutil.cmd=adafruit-nrfutil +tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe +tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/macos/adafruit-nrfutil + +tools.nrfutil.upload.params.verbose=--verbose +tools.nrfutil.upload.params.quiet= +tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200 --singlebank + +#*************************************************** +# Burning bootloader with either jlink or nrfutil +#*************************************************** + +# Bootloader version +tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.6.0_{build.sd_name}_{build.sd_version} + +tools.bootburn.bootloader.params.verbose= +tools.bootburn.bootloader.params.quiet= +tools.bootburn.bootloader.pattern={program.burn_pattern} + +# erase flash page while programming +tools.bootburn.erase.params.verbose= +tools.bootburn.erase.params.quiet= +tools.bootburn.erase.pattern= + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B112_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B112_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B112_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B112_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B112_ublox/variant.cpp new file mode 100644 index 0000000..f43f3a4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B112_ublox/variant.cpp @@ -0,0 +1,59 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" + +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +const uint32_t g_ADigitalPinMap[] = { + // D0 .. D13 + 5, // D0 is P0.05 (UART RX) + 6, // D1 is P0.06 (UART TX) + 7, // D2 is P0.07 + 31, // D3 is P0.31 + 18, // D4 is P0.18 (LED Blue) + 99, // D5 (NC) + 9, // D6 is P0.09 NFC1 + 10, // D7 is P0.10 (Button) NFC2 + 99, // D8 (NC) + 8, // D9 is P0.08 + 11, // D10 is P0.11 CS + 13, // D11 is P0.13 MOSI + 12, // D12 is P0.12 MISO + 14, // D13 is P0.14 SCK + //I2C + 2, // D14 is P0.2 (SDA) + 3, // D15 is P0.3 (SCL) + // D16 .. D21 (aka A0 .. A5) + 3, // D16 is P0.03 (A0) + 2, // D17 is P0.02 (A1) + 4, // D18 is P0.04 (A2) + 30, // D19 is P0.30 (A3) SW2 + 29, // D20 is P0.29 (A4) + 28, // D21 is P0.28 (A5) + 9, // P0.09 NFC + 10, // P0.10 NFC + 16, // SW1 (LED Green) +}; \ No newline at end of file diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B112_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B112_ublox/variant.h new file mode 100644 index 0000000..833cbf6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B112_ublox/variant.h @@ -0,0 +1,172 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +#ifndef _VARIANT_NINA_B112_UBLOX_ +#define _VARIANT_NINA_B112_UBLOX_ + +#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \ + .rc_ctiv = 0, \ +.rc_temp_ctiv = 0, \ +.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM} + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (32u) +#define NUM_DIGITAL_PINS (32u) +#define NUM_ANALOG_INPUTS (6u) +#define NUM_ANALOG_OUTPUTS (0u) + +// LEDs +#define PIN_LED LED1 +#define LED_BUILTIN PIN_LED + +//LEDs onboard +#define LED1 (0) // Red +#define LED2 (24) // Green/SW1 +#define LED3 (4) // Blue + +#define LED_STATE_ON 1 // State when LED is litted + +//Switch +#define SW1 (24) +#define SW2 (19) + +// NFC +#define PIN_NFC_1 (6) // P0.9 +#define PIN_NFC_2 (7) // P0.10 + +/* + * Analog pins + */ +#define PIN_A0 (16) // P0.03 +#define PIN_A1 (17) // P0.02 +#define PIN_A2 (18) // P0.04 +#define PIN_A3 (19) // P0.30 +#define PIN_A4 (20) // P0.29 +#define PIN_A5 (21) // P0.28 + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_D0 (0) // P0.05 +#define PIN_D1 (1) // P0.06 +#define PIN_D2 (2) // P0.07 +#define PIN_D3 (4) // P0.31 +#define PIN_D4 (5) // P0.18 +#define PIN_D6 (6) // P0.09 +#define PIN_D7 (7) // P0.10 +#define PIN_D9 (9) // P0.08 +#define PIN_D10 (11) // P0.11 +#define PIN_D11 (13) // P0.13 +#define PIN_D12 (12) // P0.12 +#define PIN_D13 (14) // P0.14 +#define PIN_D14 (2) // P0.02 +#define PIN_D15 (3) // P0.03 + +static const uint8_t D0 = PIN_D0 ; +static const uint8_t D1 = PIN_D1 ; +static const uint8_t D2 = PIN_D2 ; +static const uint8_t D3 = PIN_D3 ; +static const uint8_t D4 = PIN_D4 ; +static const uint8_t D6 = PIN_D6 ; +static const uint8_t D7 = PIN_D7 ; +static const uint8_t D9 = PIN_D9 ; +static const uint8_t D10 = PIN_D10 ; +static const uint8_t D11 = PIN_D11 ; +static const uint8_t D12 = PIN_D12 ; +static const uint8_t D13 = PIN_D13 ; +static const uint8_t D14 = PIN_D14 ; +static const uint8_t D15 = PIN_D15 ; + +// Other pins +//static const uint8_t AREF = PIN_AREF; + +//#define PIN_AREF (24) +//#define PIN_VBAT PIN_A7 + +/* + * Serial interfaces + */ +#define PIN_SERIAL_RX (0) // P0.05 +#define PIN_SERIAL_TX (1) // P0.06 +#define PIN_SERIAL_CTS (2) // P0.07 +#define PIN_SERIAL_RTS (3) // P0.31 +#define PIN_SERIAL_DTR (28) // P0.28 +#define PIN_SERIAL_DSR (29) // P0.29 + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (12) // P0.12 +#define PIN_SPI_MOSI (11) // P0.13 +#define PIN_SPI_SCK (13) // P0.14 + +static const uint8_t SS = 10 ; // P0.11 +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (14) // P0.02 +#define PIN_WIRE_SCL (15) // P0.03 + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + + +#endif //_VARIANT_NINA_B112_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B302_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B302_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B302_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B302_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B302_ublox/variant.cpp new file mode 100644 index 0000000..8b4df2e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B302_ublox/variant.cpp @@ -0,0 +1,87 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#include "variant.h" +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +const uint32_t g_ADigitalPinMap[] = +{ + // D0 .. D13 + 29, // D0 is P0.29 (UART RX) + 45, // D1 is P1.13 (UART TX) + 44, // D2 is P1.12 (NFC2) + 31, // D3 is P0.31 (LED1) + 13, // D4 is P0.13 (LED2) + 11, // D5 is P0.11 + 9, // D6 is P0.09 + 10, // D7 is P0.10 (Button) + 41, // D8 is P1.09 + 12, // D9 is P0.12 + 14, // D10 is P0.14 + 15, // D11 is P0.15 + 32, // D12 is P1.00 + 7, // D13 is P0.07 + + // D14 .. D21 (aka A0 .. A5) + 4, // D14 is P0.04 (A0) + 30, // D15 is P0.30 (A1) + 5, // D16 is P0.05 (A2) + 2, // D17 is P0.02 (A3) + 28, // D18 is P0.28 (A4) + 3, // D19 is P0.03 (A5) + + // D20 .. D21 (aka I2C pins) + 16, // D20 is P0.16 (SDA) + 24, // D21 is P0.24 (SCL) + + // QSPI pins (not exposed via any header / test point) + 19, // D22 is P0.19 (QSPI CLK) + 17, // D23 is P0.17 (QSPI CS) + 20, // D24 is P0.20 (QSPI Data 0) + 21, // D25 is P0.21 (QSPI Data 1) + 22, // D26 is P0.22 (QSPI Data 2) + 26, // D27 is P0.23 (QSPI Data 3) + + 40, // D28 is P1.08 - IO34 + 41, // D29 is P1.01 - IO35 + 44, // D30 is P1.02 - IO36 + 45, // D31 is P1.03 - IO37 + 42, // D32 is P1.10 - IO38 + 43, // D33 is P1.11 - IO39 + 47, // D34 is P1.15 - IO40 + 46, // D35 is P1.14 - IO41 + 26, // D36 is P0.26 - IO42 + 6, // D37 is P0.6 - IO43 + 27, // D38 is P0.27 - IO44 +}; + +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B302_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B302_ublox/variant.h new file mode 100644 index 0000000..a69575f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B302_ublox/variant.h @@ -0,0 +1,149 @@ + /* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#ifndef _VARIANT_NINA_B302_UBLOX_ +#define _VARIANT_NINA_B302_UBLOX_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus +// Number of pins defined in PinDescription array +#define PINS_COUNT (40) +#define NUM_DIGITAL_PINS (34) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (3) +#define PIN_LED2 (4) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_RED PIN_LED1 +#define LED_BLUE PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +/* + * Buttons + */ +#define PIN_BUTTON1 (7) + +/* + * Analog pins + */ +#define PIN_A0 (14) +#define PIN_A1 (15) +#define PIN_A2 (16) +#define PIN_A3 (17) +#define PIN_A4 (18) +#define PIN_A5 (19) + +#define D0 (0) +#define D1 (1) +#define D2 (2) +#define D3 (3) +#define D4 (4) +#define D5 (5) +#define D6 (6) +#define D7 (7) +#define D8 (8) +#define D9 (9) +#define D10 (10) +#define D11 (11) +#define D12 (12) +#define D13 (13) + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_NFC1 (31) +#define PIN_NFC2 (2) + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0) +#define PIN_SERIAL1_TX (1) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (22) //24 original +#define PIN_SPI_MOSI (23) //25 original +#define PIN_SPI_SCK (24) //26 original + +static const uint8_t SS = (13); +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (20) +#define PIN_WIRE_SCL (21) + +// QSPI Pins +#define PIN_QSPI_SCK 22 +#define PIN_QSPI_CS 23 +#define PIN_QSPI_IO0 24 +#define PIN_QSPI_IO1 25 +#define PIN_QSPI_IO2 26 +#define PIN_QSPI_IO3 27 + +// On-board QSPI Flash +#define EXTERNAL_FLASH_DEVICES GD25Q16C +#define EXTERNAL_FLASH_USE_QSPI + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif //_VARIANT_NINA_B302_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/boards.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/boards.txt new file mode 100644 index 0000000..c21a831 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/boards.txt @@ -0,0 +1,716 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +menu.softdevice=SoftDevice +menu.debug=Debug + +# ---------------------------------- +# Bluefruit Feather nRF52832 +# ---------------------------------- +feather52832.name=Adafruit Feather nRF52832 +feather52832.bootloader.tool=bootburn + +# Upload +feather52832.upload.tool=nrfutil +feather52832.upload.protocol=nrfutil +feather52832.upload.use_1200bps_touch=false +feather52832.upload.wait_for_upload_port=false +feather52832.upload.native_usb=false +feather52832.upload.maximum_size=290816 +feather52832.upload.maximum_data_size=52224 + +# Build +feather52832.build.mcu=cortex-m4 +feather52832.build.f_cpu=64000000 +feather52832.build.board=NRF52832_FEATHER +feather52832.build.core=nRF5 +feather52832.build.variant=feather_nrf52832 +feather52832.build.usb_manufacturer="Adafruit LLC" +feather52832.build.usb_product="Feather nRF52832" +feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52 +feather52832.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +feather52832.menu.softdevice.s132v6=S132 6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_name=s132 +feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +feather52832.menu.debug.l0=Level 0 (Release) +feather52832.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52832.menu.debug.l1=Level 1 (Error Message) +feather52832.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52832.menu.debug.l2=Level 2 (Full Debug) +feather52832.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52832.menu.debug.l3=Level 3 (Segger SystemView) +feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Bluefruit Feather nRF52840 Express +# ---------------------------------- +feather52840.name=Adafruit Feather nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840.vid.0=0x239A +feather52840.pid.0=0x8029 +feather52840.vid.1=0x239A +feather52840.pid.1=0x0029 +feather52840.vid.2=0x239A +feather52840.pid.2=0x002A +feather52840.vid.3=0x239A +feather52840.pid.3=0x802A + +# Upload +feather52840.bootloader.tool=bootburn +feather52840.upload.tool=nrfutil +feather52840.upload.protocol=nrfutil +feather52840.upload.use_1200bps_touch=true +feather52840.upload.wait_for_upload_port=true +feather52840.upload.maximum_size=815104 +feather52840.upload.maximum_data_size=237568 + +# Build +feather52840.build.mcu=cortex-m4 +feather52840.build.f_cpu=64000000 +feather52840.build.board=NRF52840_FEATHER +feather52840.build.core=nRF5 +feather52840.build.variant=feather_nrf52840_express +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52840 Express" +feather52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840.build.ldscript=nrf52840_s140_v6.ld +feather52840.build.vid=0x239A +feather52840.build.pid=0x8029 + +# SofDevice Menu +feather52840.menu.softdevice.s140v6=S140 6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_name=s140 +feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840.menu.debug.l0=Level 0 (Release) +feather52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840.menu.debug.l1=Level 1 (Error Message) +feather52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840.menu.debug.l2=Level 2 (Full Debug) +feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840.menu.debug.l3=Level 3 (Segger SystemView) +feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# ---------------------------------- +# Feather nRF52840 sense +# ---------------------------------- +feather52840sense.name=Adafruit Feather nRF52840 Sense + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840sense.vid.0=0x239A +feather52840sense.pid.0=0x8087 +feather52840sense.vid.1=0x239A +feather52840sense.pid.1=0x0087 +feather52840sense.vid.2=0x239A +feather52840sense.pid.2=0x0088 +feather52840sense.vid.3=0x239A +feather52840sense.pid.3=0x8088 + +# Upload +feather52840sense.bootloader.tool=bootburn +feather52840sense.upload.tool=nrfutil +feather52840sense.upload.protocol=nrfutil +feather52840sense.upload.use_1200bps_touch=true +feather52840sense.upload.wait_for_upload_port=true +feather52840sense.upload.maximum_size=815104 +feather52840sense.upload.maximum_data_size=237568 + +# Build +feather52840sense.build.mcu=cortex-m4 +feather52840sense.build.f_cpu=64000000 +feather52840sense.build.board=NRF52840_FEATHER_SENSE +feather52840sense.build.core=nRF5 +feather52840sense.build.variant=feather_nrf52840_sense +feather52840sense.build.usb_manufacturer="Adafruit LLC" +feather52840sense.build.usb_product="Feather nRF52840 Sense" +feather52840sense.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840sense.build.ldscript=nrf52840_s140_v6.ld +feather52840sense.build.vid=0x239A +feather52840sense.build.pid=0x8087 + +# SofDevice Menu +feather52840sense.menu.softdevice.s140v6=S140 6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_name=s140 +feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840sense.menu.debug.l0=Level 0 (Release) +feather52840sense.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840sense.menu.debug.l1=Level 1 (Error Message) +feather52840sense.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840sense.menu.debug.l2=Level 2 (Full Debug) +feather52840sense.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840sense.menu.debug.l3=Level 3 (Segger SystemView) +feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Bluefruit ItsyBitsy nRF52840 Express +# --------------------------------------------- +itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +itsybitsy52840.vid.0=0x239A +itsybitsy52840.pid.0=0x8051 +itsybitsy52840.vid.1=0x239A +itsybitsy52840.pid.1=0x0051 +itsybitsy52840.vid.2=0x239A +itsybitsy52840.pid.2=0x0052 +itsybitsy52840.vid.3=0x239A +itsybitsy52840.pid.3=0x8052 + +# Upload +itsybitsy52840.bootloader.tool=bootburn +itsybitsy52840.upload.tool=nrfutil +itsybitsy52840.upload.protocol=nrfutil +itsybitsy52840.upload.use_1200bps_touch=true +itsybitsy52840.upload.wait_for_upload_port=true +itsybitsy52840.upload.maximum_size=815104 +itsybitsy52840.upload.maximum_data_size=237568 + +# Build +itsybitsy52840.build.mcu=cortex-m4 +itsybitsy52840.build.f_cpu=64000000 +itsybitsy52840.build.board=NRF52840_ITSYBITSY +itsybitsy52840.build.core=nRF5 +itsybitsy52840.build.variant=itsybitsy_nrf52840_express +itsybitsy52840.build.usb_manufacturer="Adafruit LLC" +itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express" +itsybitsy52840.build.extra_flags=-DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY {build.flags.usb} +itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld +itsybitsy52840.build.vid=0x239A +itsybitsy52840.build.pid=0x8051 + +# SofDevice Menu +itsybitsy52840.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140 +itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +itsybitsy52840.menu.debug.l0=Level 0 (Release) +itsybitsy52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +itsybitsy52840.menu.debug.l1=Level 1 (Error Message) +itsybitsy52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +itsybitsy52840.menu.debug.l2=Level 2 (Full Debug) +itsybitsy52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView) +itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# --------------------------------------------- +# Bluefruit Circuit Playground nRF52840 Express +# --------------------------------------------- +cplaynrf52840.name=Adafruit Circuit Playground Bluefruit + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cplaynrf52840.vid.0=0x239A +cplaynrf52840.pid.0=0x8045 +cplaynrf52840.vid.1=0x239A +cplaynrf52840.pid.1=0x0045 +cplaynrf52840.vid.2=0x239A +cplaynrf52840.pid.2=0x0046 +cplaynrf52840.vid.3=0x239A +cplaynrf52840.pid.3=0x8046 + +# Upload +cplaynrf52840.bootloader.tool=bootburn +cplaynrf52840.upload.tool=nrfutil +cplaynrf52840.upload.protocol=nrfutil +cplaynrf52840.upload.use_1200bps_touch=true +cplaynrf52840.upload.wait_for_upload_port=true +cplaynrf52840.upload.maximum_size=815104 +cplaynrf52840.upload.maximum_data_size=237568 + +# Build +cplaynrf52840.build.mcu=cortex-m4 +cplaynrf52840.build.f_cpu=64000000 +cplaynrf52840.build.board=NRF52840_CIRCUITPLAY +cplaynrf52840.build.core=nRF5 +cplaynrf52840.build.variant=circuitplayground_nrf52840 +cplaynrf52840.build.usb_manufacturer="Adafruit LLC" +cplaynrf52840.build.usb_product="Circuit Playground Bluefruit" +cplaynrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld +cplaynrf52840.build.vid=0x239A +cplaynrf52840.build.pid=0x8045 + +# SofDevice Menu +cplaynrf52840.menu.softdevice.s140v6=S140 6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cplaynrf52840.menu.debug.l0=Level 0 (Release) +cplaynrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cplaynrf52840.menu.debug.l1=Level 1 (Error Message) +cplaynrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cplaynrf52840.menu.debug.l2=Level 2 (Full Debug) +cplaynrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Clue nRF52840 +# --------------------------------------------- +cluenrf52840.name=Adafruit CLUE + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cluenrf52840.vid.0=0x239A +cluenrf52840.pid.0=0x8072 +cluenrf52840.vid.1=0x239A +cluenrf52840.pid.1=0x0072 +cluenrf52840.vid.2=0x239A +cluenrf52840.pid.2=0x0071 +cluenrf52840.vid.3=0x239A +cluenrf52840.pid.3=0x8071 + +# Upload +cluenrf52840.bootloader.tool=bootburn +cluenrf52840.upload.tool=nrfutil +cluenrf52840.upload.protocol=nrfutil +cluenrf52840.upload.use_1200bps_touch=true +cluenrf52840.upload.wait_for_upload_port=true +cluenrf52840.upload.maximum_size=815104 +cluenrf52840.upload.maximum_data_size=237568 + +# Build +cluenrf52840.build.mcu=cortex-m4 +cluenrf52840.build.f_cpu=64000000 +cluenrf52840.build.board=NRF52840_CLUE +cluenrf52840.build.core=nRF5 +cluenrf52840.build.variant=clue_nrf52840 +cluenrf52840.build.usb_manufacturer="Adafruit LLC" +cluenrf52840.build.usb_product="CLUE" +cluenrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cluenrf52840.build.ldscript=nrf52840_s140_v6.ld +cluenrf52840.build.vid=0x239A +cluenrf52840.build.pid=0x8071 + +# SofDevice Menu +cluenrf52840.menu.softdevice.s140v6=S140 6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cluenrf52840.menu.debug.l0=Level 0 (Release) +cluenrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cluenrf52840.menu.debug.l1=Level 1 (Error Message) +cluenrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cluenrf52840.menu.debug.l2=Level 2 (Full Debug) +cluenrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Metro nRF52840 Express +# ---------------------------------- +metro52840.name=Adafruit Metro nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +metro52840.vid.0=0x239A +metro52840.pid.0=0x803F +metro52840.vid.1=0x239A +metro52840.pid.1=0x003F +metro52840.vid.2=0x239A +metro52840.pid.2=0x0040 +metro52840.vid.3=0x239A +metro52840.pid.3=0x8040 + +# Upload +metro52840.bootloader.tool=bootburn +metro52840.upload.tool=nrfutil +metro52840.upload.protocol=nrfutil +metro52840.upload.use_1200bps_touch=true +metro52840.upload.wait_for_upload_port=true +metro52840.upload.maximum_size=815104 +metro52840.upload.maximum_data_size=237568 + +# Build +metro52840.build.mcu=cortex-m4 +metro52840.build.f_cpu=64000000 +metro52840.build.board=NRF52840_METRO +metro52840.build.core=nRF5 +metro52840.build.variant=metro_nrf52840_express +metro52840.build.usb_manufacturer="Adafruit LLC" +metro52840.build.usb_product="Metro nRF52840 Express" +metro52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +metro52840.build.ldscript=nrf52840_s140_v6.ld +metro52840.build.vid=0x239A +metro52840.build.pid=0x803F + +# SofDevice Menu +metro52840.menu.softdevice.s140v6=S140 6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_name=s140 +metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +metro52840.menu.debug.l0=Level 0 (Release) +metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +metro52840.menu.debug.l1=Level 1 (Error Message) +metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +metro52840.menu.debug.l2=Level 2 (Full Debug) +metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +metro52840.menu.debug.l3=Level 3 (Segger SystemView) +metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + + + +# ------------------------------------------------------- +# +# Boards that aren't made by Adafruit +# +# ------------------------------------------------------- + + +# ---------------------------------- +# Nordic nRF52840DK (PCA10056) +# ---------------------------------- +pca10056.name=Nordic nRF52840DK (PCA10056) +pca10056.bootloader.tool=bootburn + +# Upload +pca10056.upload.tool=nrfutil +pca10056.upload.protocol=nrfutil +pca10056.upload.use_1200bps_touch=true +pca10056.upload.wait_for_upload_port=true +pca10056.upload.maximum_size=815104 +pca10056.upload.maximum_data_size=237568 + +# Build +pca10056.build.mcu=cortex-m4 +pca10056.build.f_cpu=64000000 +pca10056.build.board=NRF52840_PCA10056 +pca10056.build.core=nRF5 +pca10056.build.variant=pca10056 +pca10056.build.usb_manufacturer="Nordic" +pca10056.build.usb_product="nRF52840 DK" +pca10056.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +pca10056.build.ldscript=nrf52840_s140_v6.ld +pca10056.build.vid=0x239A +pca10056.build.pid=0x8029 + +# SofDevice Menu +pca10056.menu.softdevice.s140v6=S140 6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_name=s140 +pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +pca10056.menu.debug.l0=Level 0 (Release) +pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +pca10056.menu.debug.l1=Level 1 (Error Message) +pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +pca10056.menu.debug.l2=Level 2 (Full Debug) +pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +pca10056.menu.debug.l3=Level 3 (Segger SystemView) +pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Particle Xenon +# ---------------------------------- +particle_xenon.name=Particle Xenon + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +particle_xenon.vid.0=0x239A +particle_xenon.pid.0=0x8029 +particle_xenon.vid.1=0x239A +particle_xenon.pid.1=0x0029 +particle_xenon.vid.2=0x239A +particle_xenon.pid.2=0x002A +particle_xenon.vid.3=0x239A +particle_xenon.pid.3=0x802A + +# Upload +particle_xenon.bootloader.tool=bootburn +particle_xenon.upload.tool=nrfutil +particle_xenon.upload.protocol=nrfutil +particle_xenon.upload.use_1200bps_touch=true +particle_xenon.upload.wait_for_upload_port=true +particle_xenon.upload.maximum_size=815104 +particle_xenon.upload.maximum_data_size=237568 + +# Build +particle_xenon.build.mcu=cortex-m4 +particle_xenon.build.f_cpu=64000000 +particle_xenon.build.board=PARTICLE_XENON +particle_xenon.build.core=nRF5 +particle_xenon.build.variant=particle_xenon +particle_xenon.build.usb_manufacturer="Particle Industries" +particle_xenon.build.usb_product="Particle Xenon" +particle_xenon.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +particle_xenon.build.ldscript=nrf52840_s140_v6.ld +particle_xenon.build.vid=0x239A +particle_xenon.build.pid=0x8029 + +# SofDevice Menu +particle_xenon.menu.softdevice.s140v6=S140 6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_name=s140 +particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +particle_xenon.menu.debug.l0=Level 0 (Release) +particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +particle_xenon.menu.debug.l1=Level 1 (Error Message) +particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +particle_xenon.menu.debug.l2=Level 2 (Full Debug) +particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +particle_xenon.menu.debug.l3=Level 3 (Segger SystemView) +particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Raytac MDBT50Q - RX +# ---------------------------------- +mdbt50qrx.name=Raytac MDBT50Q-RX Dongle + +# VID/PID for bootloader, Arduino + Circuitpython App +mdbt50qrx.vid.0=0x239A +mdbt50qrx.pid.0=0x810B +mdbt50qrx.vid.1=0x239A +mdbt50qrx.pid.1=0x010B +mdbt50qrx.vid.2=0x239A +mdbt50qrx.pid.2=0x810C + +# Upload +mdbt50qrx.bootloader.tool=bootburn +mdbt50qrx.upload.tool=nrfutil +mdbt50qrx.upload.protocol=nrfutil +mdbt50qrx.upload.use_1200bps_touch=true +mdbt50qrx.upload.wait_for_upload_port=true +mdbt50qrx.upload.maximum_size=815104 +mdbt50qrx.upload.maximum_data_size=237568 + +# Build +mdbt50qrx.build.mcu=cortex-m4 +mdbt50qrx.build.f_cpu=64000000 +mdbt50qrx.build.board=MDBT50Q_RX +mdbt50qrx.build.core=nRF5 +mdbt50qrx.build.variant=raytac_mdbt50q_rx +mdbt50qrx.build.usb_manufacturer="Raytac" +mdbt50qrx.build.usb_product="nRF52840 Dongle" +mdbt50qrx.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +mdbt50qrx.build.ldscript=nrf52840_s140_v6.ld +mdbt50qrx.build.vid=0x239A +mdbt50qrx.build.pid=0x810B + +# SofDevice Menu +mdbt50qrx.menu.softdevice.s140v6=S140 6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_name=s140 +mdbt50qrx.menu.softdevice.s140v6.build.sd_version=6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +mdbt50qrx.menu.debug.l0=Level 0 (Release) +mdbt50qrx.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +mdbt50qrx.menu.debug.l1=Level 1 (Error Message) +mdbt50qrx.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +mdbt50qrx.menu.debug.l2=Level 2 (Full Debug) +mdbt50qrx.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +mdbt50qrx.menu.debug.l3=Level 3 (Segger SystemView) +mdbt50qrx.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +mdbt50qrx.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B302 +# ---------------------------------- +ninab302.name=NINA B302 ublox + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +ninab302.vid.0=0x239A +ninab302.pid.0=0x8029 +ninab302.vid.1=0x239A +ninab302.pid.1=0x0029 +ninab302.vid.2=0x7239A +ninab302.pid.2=0x002A +ninab302.vid.3=0x239A +ninab302.pid.3=0x802A + +# Upload +ninab302.bootloader.tool=bootburn +ninab302.upload.tool=nrfutil +ninab302.upload.protocol=nrfutil +ninab302.upload.use_1200bps_touch=true +ninab302.upload.wait_for_upload_port=true +ninab302.upload.maximum_size=815104 +ninab302.upload.maximum_data_size=237568 + +# Build +ninab302.build.mcu=cortex-m4 +ninab302.build.f_cpu=64000000 +ninab302.build.board=NINA_B302_ublox +ninab302.build.core=nRF5 +ninab302.build.variant=NINA_B302_ublox +ninab302.build.usb_manufacturer="Nordic" +ninab302.build.usb_product="NINA B302 ublox" +ninab302.build.extra_flags=-DNRF52840_XXAA -DNINA_B302_ublox {build.flags.usb} +ninab302.build.ldscript=nrf52840_s140_v6.ld +ninab302.build.vid=0x239A +ninab302.build.pid=0x8029 + +# SofDevice Menu +ninab302.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_name=s140 +ninab302.menu.softdevice.s140v6.build.sd_version=6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +ninab302.menu.debug.l0=Level 0 (Release) +ninab302.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab302.menu.debug.l1=Level 1 (Error Message) +ninab302.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab302.menu.debug.l2=Level 2 (Full Debug) +ninab302.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab302.menu.debug.l3=Level 3 (Segger SystemView) +ninab302.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab302.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B112 +# ---------------------------------- +ninab112.name=NINA B112 ublox +ninab112.bootloader.tool=bootburn + +# Upload +ninab112.upload.tool=nrfutil +ninab112.upload.protocol=nrfutil +ninab112.upload.use_1200bps_touch=false +ninab112.upload.wait_for_upload_port=false +ninab112.upload.native_usb=false +ninab112.upload.maximum_size=290816 +ninab112.upload.maximum_data_size=52224 + +# Build +ninab112.build.mcu=cortex-m4 +ninab112.build.f_cpu=64000000 +ninab112.build.board=NINA_B112_ublox +ninab112.build.core=nRF5 +ninab112.build.variant=NINA_B112_ublox +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52832" +ninab112.build.extra_flags=-DNRF52832_XXAA -DNINA_B112_ublox -DNRF52 +ninab112.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +ninab112.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_name=s132 +ninab112.menu.softdevice.s132v6.build.sd_version=6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +ninab112.menu.debug.l0=Level 0 (Release) +ninab112.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab112.menu.debug.l1=Level 1 (Error Message) +ninab112.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab112.menu.debug.l2=Level 2 (Full Debug) +ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab112.menu.debug.l3=Level 3 (Segger SystemView) +ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +################################################################## +## KH Add SparkFun Pro nRF52840 Mini +################################################################## +#********************************************** +# SparkFun Pro nRF52840 Mini +#********************************************** +sparkfunnrf52840mini.name=SparkFun Pro nRF52840 Mini + +# DFU Mode with CDC only +sparkfunnrf52840mini.vid.0=0x1B4F +sparkfunnrf52840mini.pid.0=0x002A + +# DFU Mode with CDC + MSC (UF2) +sparkfunnrf52840mini.vid.1=0x1B4F +sparkfunnrf52840mini.pid.1=0x0029 + +# Application with CDC + MSC +sparkfunnrf52840mini.vid.2=0x1B4F +sparkfunnrf52840mini.pid.2=0x8029 + +# CircuitPython +sparkfunnrf52840mini.vid.2=0x1B4F +sparkfunnrf52840mini.pid.2=0x802A + +sparkfunnrf52840mini.bootloader.tool=bootburn + +# Upload +sparkfunnrf52840mini.upload.tool=nrfutil +sparkfunnrf52840mini.upload.protocol=nrfutil +sparkfunnrf52840mini.upload.use_1200bps_touch=true +sparkfunnrf52840mini.upload.wait_for_upload_port=true +#sparkfunnrf52840mini.upload.native_usb=true + +# Build +sparkfunnrf52840mini.build.mcu=cortex-m4 +sparkfunnrf52840mini.build.f_cpu=64000000 +sparkfunnrf52840mini.build.board=NRF52840_FEATHER +sparkfunnrf52840mini.build.core=nRF5 +sparkfunnrf52840mini.build.variant=sparkfun_nrf52840_mini +sparkfunnrf52840mini.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +sparkfunnrf52840mini.build.vid=0x1B4F +sparkfunnrf52840mini.build.pid=0x5284 +sparkfunnrf52840mini.build.usb_manufacturer="SparkFun" +sparkfunnrf52840mini.build.usb_product="nRF52840 Mini Breakout" + +# SofDevice Menu +# Ram & ROM size varies depending on SoftDevice (check linker script) + +sparkfunnrf52840mini.menu.softdevice.s140v6=s140 6.1.1 r0 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_flags=-DS140 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_name=s140 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_version=6.1.1 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_fwid=0x00B6 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.ldscript=nrf52840_s140_v6.ld +sparkfunnrf52840mini.menu.softdevice.s140v6.upload.maximum_size=815104 +sparkfunnrf52840mini.menu.softdevice.s140v6.upload.maximum_data_size=248832 + +# Debug Menu +sparkfunnrf52840mini.menu.debug.l0=Level 0 (Release) +sparkfunnrf52840mini.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 -Os +sparkfunnrf52840mini.menu.debug.l1=Level 1 (Error Message) +sparkfunnrf52840mini.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 -Os +sparkfunnrf52840mini.menu.debug.l2=Level 2 (Full Debug) +sparkfunnrf52840mini.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 -Os +sparkfunnrf52840mini.menu.debug.l3=Level 3 (Segger SystemView) +sparkfunnrf52840mini.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 -Os + +################################################################## diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/cores/nRF5/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/cores/nRF5/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/cores/nRF5/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/cores/nRF5/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/cores/nRF5/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/cores/nRF5/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/cores/nRF5/Udp.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/cores/nRF5/Udp.h new file mode 100644 index 0000000..cc814d3 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/cores/nRF5/Udp.h @@ -0,0 +1,92 @@ +/* + * Udp.cpp: Library to send/receive UDP packets. + * + * NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these) + * 1) UDP does not guarantee the order in which assembled UDP packets are received. This + * might not happen often in practice, but in larger network topologies, a UDP + * packet can be received out of sequence. + * 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being + * aware of it. Again, this may not be a concern in practice on small local networks. + * For more information, see http://www.cafeaulait.org/course/week12/35.html + * + * MIT License: + * Copyright (c) 2008 Bjoern Hartmann + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * bjoern@cs.stanford.edu 12/30/2008 + */ + +#ifndef udp_h +#define udp_h + +#include +#include + +class UDP : public Stream { + +public: + virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + + // KH, add virtual function to support Multicast, necessary for many services (MDNS, UPnP, etc.) + virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure + + virtual void stop() =0; // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port) =0; + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char *host, uint16_t port) =0; + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket() =0; + // Write a single byte into the packet + virtual size_t write(uint8_t) =0; + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t *buffer, size_t size) =0; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket() =0; + // Number of bytes remaining in the current packet + virtual int available() =0; + // Read a single byte from the current packet + virtual int read() =0; + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len) =0; + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) =0; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek() =0; + virtual void flush() =0; // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP() =0; + // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort() =0; +protected: + uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; +}; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/platform.txt new file mode 100644 index 0000000..8e858fa --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/platform.txt @@ -0,0 +1,167 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All rights reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +name=Adafruit nRF52 Boards +version=1.0.0 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith + +# Allow changing optimization settings via platform.local.txt / boards.local.txt +compiler.optimization_flag=-Ofast + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD + +# KH, Error here to use gcc, must use g++ +#compiler.c.elf.cmd=arm-none-eabi-gcc +compiler.c.elf.cmd=arm-none-eabi-g++ + +compiler.c.elf.flags={compiler.optimization_flag} -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-mcpu={build.mcu} -mthumb -mabi=aapcs {compiler.optimization_flag} -g -c {build.float_flags} -x assembler-with-cpp + +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2bin.flags=-O binary +compiler.elf2bin.cmd=arm-none-eabi-objcopy +compiler.elf2hex.flags=-O ihex +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align --specs=nano.specs --specs=nosys.specs +compiler.size.cmd=arm-none-eabi-size + +# this can be overriden in boards.txt +build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float +build.debug_flags=-DCFG_DEBUG=0 +build.logger_flags=-DCFG_LOGGER=1 +build.sysview_flags=-DCFG_SYSVIEW=0 + +# USB flags +build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.libraries.ldflags= +compiler.elf2bin.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Include/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Lib/GCC/" -larm_cortexM4lf_math + +# common compiler for nrf +rtos.path={build.core.path}/freertos +nordic.path={build.core.path}/nordic + +# build.logger_flags and build.sysview_flags are intentionally empty, +# to allow modification via a user's own boards.local.txt or platform.local.txt files. +build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 {compiler.optimization_flag} {build.debug_flags} {build.logger_flags} {build.sysview_flags} {compiler.arm.cmsis.c.flags} "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include/nrf52" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Create archives +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.core.path}/linker" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" {compiler.libraries.ldflags} -Wl,--end-group + +## Create output (bin file) +#recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +## Create dfu package zip file +recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip" + +## Create uf2 file +#recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2conv.py" -f 0xADA52840 -c -o "{build.path}/{build.project_name}.uf2" "{build.path}/{build.project_name}.hex" + +## Save bin +recipe.output.tmp_file_bin={build.project_name}.bin +recipe.output.save_file_bin={build.project_name}.save.bin + +## Save hex +recipe.output.tmp_file_hex={build.project_name}.hex +recipe.output.save_file_hexu={build.project_name}.save.hex + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +## Export Compiled Binary +recipe.output.tmp_file={build.project_name}.hex +recipe.output.save_file={build.project_name}.{build.variant}.hex + +#*************************************************** +# adafruit-nrfutil for uploading +# https://github.com/adafruit/Adafruit_nRF52_nrfutil +# pre-built binaries are provided for macos and windows +#*************************************************** +tools.nrfutil.cmd=adafruit-nrfutil +tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe +tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/macos/adafruit-nrfutil + +tools.nrfutil.upload.params.verbose=--verbose +tools.nrfutil.upload.params.quiet= +tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200 --singlebank + +#*************************************************** +# Burning bootloader with either jlink or nrfutil +#*************************************************** + +# Bootloader version +tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.6.1_{build.sd_name}_{build.sd_version} + +tools.bootburn.bootloader.params.verbose= +tools.bootburn.bootloader.params.quiet= +tools.bootburn.bootloader.pattern={program.burn_pattern} + +# erase flash page while programming +tools.bootburn.erase.params.verbose= +tools.bootburn.erase.params.quiet= +tools.bootburn.erase.pattern= + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B112_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B112_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B112_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B112_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B112_ublox/variant.cpp new file mode 100644 index 0000000..f43f3a4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B112_ublox/variant.cpp @@ -0,0 +1,59 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" + +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +const uint32_t g_ADigitalPinMap[] = { + // D0 .. D13 + 5, // D0 is P0.05 (UART RX) + 6, // D1 is P0.06 (UART TX) + 7, // D2 is P0.07 + 31, // D3 is P0.31 + 18, // D4 is P0.18 (LED Blue) + 99, // D5 (NC) + 9, // D6 is P0.09 NFC1 + 10, // D7 is P0.10 (Button) NFC2 + 99, // D8 (NC) + 8, // D9 is P0.08 + 11, // D10 is P0.11 CS + 13, // D11 is P0.13 MOSI + 12, // D12 is P0.12 MISO + 14, // D13 is P0.14 SCK + //I2C + 2, // D14 is P0.2 (SDA) + 3, // D15 is P0.3 (SCL) + // D16 .. D21 (aka A0 .. A5) + 3, // D16 is P0.03 (A0) + 2, // D17 is P0.02 (A1) + 4, // D18 is P0.04 (A2) + 30, // D19 is P0.30 (A3) SW2 + 29, // D20 is P0.29 (A4) + 28, // D21 is P0.28 (A5) + 9, // P0.09 NFC + 10, // P0.10 NFC + 16, // SW1 (LED Green) +}; \ No newline at end of file diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B112_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B112_ublox/variant.h new file mode 100644 index 0000000..833cbf6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B112_ublox/variant.h @@ -0,0 +1,172 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +#ifndef _VARIANT_NINA_B112_UBLOX_ +#define _VARIANT_NINA_B112_UBLOX_ + +#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \ + .rc_ctiv = 0, \ +.rc_temp_ctiv = 0, \ +.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM} + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (32u) +#define NUM_DIGITAL_PINS (32u) +#define NUM_ANALOG_INPUTS (6u) +#define NUM_ANALOG_OUTPUTS (0u) + +// LEDs +#define PIN_LED LED1 +#define LED_BUILTIN PIN_LED + +//LEDs onboard +#define LED1 (0) // Red +#define LED2 (24) // Green/SW1 +#define LED3 (4) // Blue + +#define LED_STATE_ON 1 // State when LED is litted + +//Switch +#define SW1 (24) +#define SW2 (19) + +// NFC +#define PIN_NFC_1 (6) // P0.9 +#define PIN_NFC_2 (7) // P0.10 + +/* + * Analog pins + */ +#define PIN_A0 (16) // P0.03 +#define PIN_A1 (17) // P0.02 +#define PIN_A2 (18) // P0.04 +#define PIN_A3 (19) // P0.30 +#define PIN_A4 (20) // P0.29 +#define PIN_A5 (21) // P0.28 + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_D0 (0) // P0.05 +#define PIN_D1 (1) // P0.06 +#define PIN_D2 (2) // P0.07 +#define PIN_D3 (4) // P0.31 +#define PIN_D4 (5) // P0.18 +#define PIN_D6 (6) // P0.09 +#define PIN_D7 (7) // P0.10 +#define PIN_D9 (9) // P0.08 +#define PIN_D10 (11) // P0.11 +#define PIN_D11 (13) // P0.13 +#define PIN_D12 (12) // P0.12 +#define PIN_D13 (14) // P0.14 +#define PIN_D14 (2) // P0.02 +#define PIN_D15 (3) // P0.03 + +static const uint8_t D0 = PIN_D0 ; +static const uint8_t D1 = PIN_D1 ; +static const uint8_t D2 = PIN_D2 ; +static const uint8_t D3 = PIN_D3 ; +static const uint8_t D4 = PIN_D4 ; +static const uint8_t D6 = PIN_D6 ; +static const uint8_t D7 = PIN_D7 ; +static const uint8_t D9 = PIN_D9 ; +static const uint8_t D10 = PIN_D10 ; +static const uint8_t D11 = PIN_D11 ; +static const uint8_t D12 = PIN_D12 ; +static const uint8_t D13 = PIN_D13 ; +static const uint8_t D14 = PIN_D14 ; +static const uint8_t D15 = PIN_D15 ; + +// Other pins +//static const uint8_t AREF = PIN_AREF; + +//#define PIN_AREF (24) +//#define PIN_VBAT PIN_A7 + +/* + * Serial interfaces + */ +#define PIN_SERIAL_RX (0) // P0.05 +#define PIN_SERIAL_TX (1) // P0.06 +#define PIN_SERIAL_CTS (2) // P0.07 +#define PIN_SERIAL_RTS (3) // P0.31 +#define PIN_SERIAL_DTR (28) // P0.28 +#define PIN_SERIAL_DSR (29) // P0.29 + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (12) // P0.12 +#define PIN_SPI_MOSI (11) // P0.13 +#define PIN_SPI_SCK (13) // P0.14 + +static const uint8_t SS = 10 ; // P0.11 +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (14) // P0.02 +#define PIN_WIRE_SCL (15) // P0.03 + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + + +#endif //_VARIANT_NINA_B112_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B302_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B302_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B302_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B302_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B302_ublox/variant.cpp new file mode 100644 index 0000000..8b4df2e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B302_ublox/variant.cpp @@ -0,0 +1,87 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#include "variant.h" +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +const uint32_t g_ADigitalPinMap[] = +{ + // D0 .. D13 + 29, // D0 is P0.29 (UART RX) + 45, // D1 is P1.13 (UART TX) + 44, // D2 is P1.12 (NFC2) + 31, // D3 is P0.31 (LED1) + 13, // D4 is P0.13 (LED2) + 11, // D5 is P0.11 + 9, // D6 is P0.09 + 10, // D7 is P0.10 (Button) + 41, // D8 is P1.09 + 12, // D9 is P0.12 + 14, // D10 is P0.14 + 15, // D11 is P0.15 + 32, // D12 is P1.00 + 7, // D13 is P0.07 + + // D14 .. D21 (aka A0 .. A5) + 4, // D14 is P0.04 (A0) + 30, // D15 is P0.30 (A1) + 5, // D16 is P0.05 (A2) + 2, // D17 is P0.02 (A3) + 28, // D18 is P0.28 (A4) + 3, // D19 is P0.03 (A5) + + // D20 .. D21 (aka I2C pins) + 16, // D20 is P0.16 (SDA) + 24, // D21 is P0.24 (SCL) + + // QSPI pins (not exposed via any header / test point) + 19, // D22 is P0.19 (QSPI CLK) + 17, // D23 is P0.17 (QSPI CS) + 20, // D24 is P0.20 (QSPI Data 0) + 21, // D25 is P0.21 (QSPI Data 1) + 22, // D26 is P0.22 (QSPI Data 2) + 26, // D27 is P0.23 (QSPI Data 3) + + 40, // D28 is P1.08 - IO34 + 41, // D29 is P1.01 - IO35 + 44, // D30 is P1.02 - IO36 + 45, // D31 is P1.03 - IO37 + 42, // D32 is P1.10 - IO38 + 43, // D33 is P1.11 - IO39 + 47, // D34 is P1.15 - IO40 + 46, // D35 is P1.14 - IO41 + 26, // D36 is P0.26 - IO42 + 6, // D37 is P0.6 - IO43 + 27, // D38 is P0.27 - IO44 +}; + +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B302_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B302_ublox/variant.h new file mode 100644 index 0000000..a69575f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B302_ublox/variant.h @@ -0,0 +1,149 @@ + /* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#ifndef _VARIANT_NINA_B302_UBLOX_ +#define _VARIANT_NINA_B302_UBLOX_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus +// Number of pins defined in PinDescription array +#define PINS_COUNT (40) +#define NUM_DIGITAL_PINS (34) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (3) +#define PIN_LED2 (4) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_RED PIN_LED1 +#define LED_BLUE PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +/* + * Buttons + */ +#define PIN_BUTTON1 (7) + +/* + * Analog pins + */ +#define PIN_A0 (14) +#define PIN_A1 (15) +#define PIN_A2 (16) +#define PIN_A3 (17) +#define PIN_A4 (18) +#define PIN_A5 (19) + +#define D0 (0) +#define D1 (1) +#define D2 (2) +#define D3 (3) +#define D4 (4) +#define D5 (5) +#define D6 (6) +#define D7 (7) +#define D8 (8) +#define D9 (9) +#define D10 (10) +#define D11 (11) +#define D12 (12) +#define D13 (13) + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_NFC1 (31) +#define PIN_NFC2 (2) + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0) +#define PIN_SERIAL1_TX (1) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (22) //24 original +#define PIN_SPI_MOSI (23) //25 original +#define PIN_SPI_SCK (24) //26 original + +static const uint8_t SS = (13); +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (20) +#define PIN_WIRE_SCL (21) + +// QSPI Pins +#define PIN_QSPI_SCK 22 +#define PIN_QSPI_CS 23 +#define PIN_QSPI_IO0 24 +#define PIN_QSPI_IO1 25 +#define PIN_QSPI_IO2 26 +#define PIN_QSPI_IO3 27 + +// On-board QSPI Flash +#define EXTERNAL_FLASH_DEVICES GD25Q16C +#define EXTERNAL_FLASH_USE_QSPI + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif //_VARIANT_NINA_B302_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/sparkfun_nrf52840_mini/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/sparkfun_nrf52840_mini/variant.cpp new file mode 100644 index 0000000..b01c147 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/sparkfun_nrf52840_mini/variant.cpp @@ -0,0 +1,49 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +const uint32_t g_ADigitalPinMap[] = +{ + // P0 + 0 , 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, + + // P1 + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63 +}; +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/sparkfun_nrf52840_mini/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/sparkfun_nrf52840_mini/variant.h new file mode 100644 index 0000000..c534ceb --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/sparkfun_nrf52840_mini/variant.h @@ -0,0 +1,152 @@ + /* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_SPARKFUN52840MINI_ +#define _VARIANT_SPARKFUN52840MINI_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (64) +#define NUM_DIGITAL_PINS (64) +#define NUM_ANALOG_INPUTS (8) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (7) +#define PIN_LED2 (14) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_BLUE PIN_LED1 +#define LED_RED PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +// Buttons +/* +#define PIN_BUTTON1 (2) +#define PIN_BUTTON2 (3) +#define PIN_BUTTON3 (4) +#define PIN_BUTTON4 (5) +*/ + +/* + * Analog pins + */ +#define PIN_A0 (2) +#define PIN_A1 (3) +#define PIN_A2 (4) +#define PIN_A3 (5) +#define PIN_A4 (28) +#define PIN_A5 (29) +#define PIN_A6 (30) +#define PIN_A7 (31) + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; +static const uint8_t A6 = PIN_A6 ; +static const uint8_t A7 = PIN_A7 ; +#define ADC_RESOLUTION 14 + +// Other pins +#define PIN_AREF (2) +#define PIN_DFU (13) +#define PIN_NFC1 (9) +#define PIN_NFC2 (10) + +static const uint8_t AREF = PIN_AREF; + +/* + * Serial interfaces + */ +// Serial +//Previous Hardware UART definition for nRF52 Arduino Core, below 0.16.0 +//Feel free to comment out these two lines below if there are conflicts with latest release +#define PIN_SERIAL_RX (15) +#define PIN_SERIAL_TX (17) + +//Hardware UART definition for nRF52 Arduino Core, 0.17.0 and above +#define PIN_SERIAL1_RX (15) +#define PIN_SERIAL1_TX (17) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (31) +#define PIN_SPI_MOSI (3) +#define PIN_SPI_SCK (30) + +static const uint8_t SS = 2 ; +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (8) +#define PIN_WIRE_SCL (11) + +/* + * QSPI interface for external flash + */ +#define PIN_QSPI_SCK 32 +#define PIN_QSPI_CS 33 +#define PIN_QSPI_DATA0 34 +#define PIN_QSPI_DATA1 35 +#define PIN_QSPI_DATA2 36 +#define PIN_QSPI_DATA3 37 + +// On-board QSPI Flash +// If EXTERNAL_FLASH_DEVICES is not defined, all supported devices will be used +#define EXTERNAL_FLASH_DEVICES GD25Q16C + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif \ No newline at end of file diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/boards.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/boards.txt new file mode 100644 index 0000000..c21a831 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/boards.txt @@ -0,0 +1,716 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +menu.softdevice=SoftDevice +menu.debug=Debug + +# ---------------------------------- +# Bluefruit Feather nRF52832 +# ---------------------------------- +feather52832.name=Adafruit Feather nRF52832 +feather52832.bootloader.tool=bootburn + +# Upload +feather52832.upload.tool=nrfutil +feather52832.upload.protocol=nrfutil +feather52832.upload.use_1200bps_touch=false +feather52832.upload.wait_for_upload_port=false +feather52832.upload.native_usb=false +feather52832.upload.maximum_size=290816 +feather52832.upload.maximum_data_size=52224 + +# Build +feather52832.build.mcu=cortex-m4 +feather52832.build.f_cpu=64000000 +feather52832.build.board=NRF52832_FEATHER +feather52832.build.core=nRF5 +feather52832.build.variant=feather_nrf52832 +feather52832.build.usb_manufacturer="Adafruit LLC" +feather52832.build.usb_product="Feather nRF52832" +feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52 +feather52832.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +feather52832.menu.softdevice.s132v6=S132 6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_name=s132 +feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +feather52832.menu.debug.l0=Level 0 (Release) +feather52832.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52832.menu.debug.l1=Level 1 (Error Message) +feather52832.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52832.menu.debug.l2=Level 2 (Full Debug) +feather52832.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52832.menu.debug.l3=Level 3 (Segger SystemView) +feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Bluefruit Feather nRF52840 Express +# ---------------------------------- +feather52840.name=Adafruit Feather nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840.vid.0=0x239A +feather52840.pid.0=0x8029 +feather52840.vid.1=0x239A +feather52840.pid.1=0x0029 +feather52840.vid.2=0x239A +feather52840.pid.2=0x002A +feather52840.vid.3=0x239A +feather52840.pid.3=0x802A + +# Upload +feather52840.bootloader.tool=bootburn +feather52840.upload.tool=nrfutil +feather52840.upload.protocol=nrfutil +feather52840.upload.use_1200bps_touch=true +feather52840.upload.wait_for_upload_port=true +feather52840.upload.maximum_size=815104 +feather52840.upload.maximum_data_size=237568 + +# Build +feather52840.build.mcu=cortex-m4 +feather52840.build.f_cpu=64000000 +feather52840.build.board=NRF52840_FEATHER +feather52840.build.core=nRF5 +feather52840.build.variant=feather_nrf52840_express +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52840 Express" +feather52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840.build.ldscript=nrf52840_s140_v6.ld +feather52840.build.vid=0x239A +feather52840.build.pid=0x8029 + +# SofDevice Menu +feather52840.menu.softdevice.s140v6=S140 6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_name=s140 +feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840.menu.debug.l0=Level 0 (Release) +feather52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840.menu.debug.l1=Level 1 (Error Message) +feather52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840.menu.debug.l2=Level 2 (Full Debug) +feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840.menu.debug.l3=Level 3 (Segger SystemView) +feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# ---------------------------------- +# Feather nRF52840 sense +# ---------------------------------- +feather52840sense.name=Adafruit Feather nRF52840 Sense + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +feather52840sense.vid.0=0x239A +feather52840sense.pid.0=0x8087 +feather52840sense.vid.1=0x239A +feather52840sense.pid.1=0x0087 +feather52840sense.vid.2=0x239A +feather52840sense.pid.2=0x0088 +feather52840sense.vid.3=0x239A +feather52840sense.pid.3=0x8088 + +# Upload +feather52840sense.bootloader.tool=bootburn +feather52840sense.upload.tool=nrfutil +feather52840sense.upload.protocol=nrfutil +feather52840sense.upload.use_1200bps_touch=true +feather52840sense.upload.wait_for_upload_port=true +feather52840sense.upload.maximum_size=815104 +feather52840sense.upload.maximum_data_size=237568 + +# Build +feather52840sense.build.mcu=cortex-m4 +feather52840sense.build.f_cpu=64000000 +feather52840sense.build.board=NRF52840_FEATHER_SENSE +feather52840sense.build.core=nRF5 +feather52840sense.build.variant=feather_nrf52840_sense +feather52840sense.build.usb_manufacturer="Adafruit LLC" +feather52840sense.build.usb_product="Feather nRF52840 Sense" +feather52840sense.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840sense.build.ldscript=nrf52840_s140_v6.ld +feather52840sense.build.vid=0x239A +feather52840sense.build.pid=0x8087 + +# SofDevice Menu +feather52840sense.menu.softdevice.s140v6=S140 6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_name=s140 +feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840sense.menu.debug.l0=Level 0 (Release) +feather52840sense.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840sense.menu.debug.l1=Level 1 (Error Message) +feather52840sense.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840sense.menu.debug.l2=Level 2 (Full Debug) +feather52840sense.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840sense.menu.debug.l3=Level 3 (Segger SystemView) +feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Bluefruit ItsyBitsy nRF52840 Express +# --------------------------------------------- +itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +itsybitsy52840.vid.0=0x239A +itsybitsy52840.pid.0=0x8051 +itsybitsy52840.vid.1=0x239A +itsybitsy52840.pid.1=0x0051 +itsybitsy52840.vid.2=0x239A +itsybitsy52840.pid.2=0x0052 +itsybitsy52840.vid.3=0x239A +itsybitsy52840.pid.3=0x8052 + +# Upload +itsybitsy52840.bootloader.tool=bootburn +itsybitsy52840.upload.tool=nrfutil +itsybitsy52840.upload.protocol=nrfutil +itsybitsy52840.upload.use_1200bps_touch=true +itsybitsy52840.upload.wait_for_upload_port=true +itsybitsy52840.upload.maximum_size=815104 +itsybitsy52840.upload.maximum_data_size=237568 + +# Build +itsybitsy52840.build.mcu=cortex-m4 +itsybitsy52840.build.f_cpu=64000000 +itsybitsy52840.build.board=NRF52840_ITSYBITSY +itsybitsy52840.build.core=nRF5 +itsybitsy52840.build.variant=itsybitsy_nrf52840_express +itsybitsy52840.build.usb_manufacturer="Adafruit LLC" +itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express" +itsybitsy52840.build.extra_flags=-DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY {build.flags.usb} +itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld +itsybitsy52840.build.vid=0x239A +itsybitsy52840.build.pid=0x8051 + +# SofDevice Menu +itsybitsy52840.menu.softdevice.s140v6=0.2.11 SoftDevice s140 6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140 +itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +itsybitsy52840.menu.debug.l0=Level 0 (Release) +itsybitsy52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +itsybitsy52840.menu.debug.l1=Level 1 (Error Message) +itsybitsy52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +itsybitsy52840.menu.debug.l2=Level 2 (Full Debug) +itsybitsy52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView) +itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# --------------------------------------------- +# Bluefruit Circuit Playground nRF52840 Express +# --------------------------------------------- +cplaynrf52840.name=Adafruit Circuit Playground Bluefruit + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cplaynrf52840.vid.0=0x239A +cplaynrf52840.pid.0=0x8045 +cplaynrf52840.vid.1=0x239A +cplaynrf52840.pid.1=0x0045 +cplaynrf52840.vid.2=0x239A +cplaynrf52840.pid.2=0x0046 +cplaynrf52840.vid.3=0x239A +cplaynrf52840.pid.3=0x8046 + +# Upload +cplaynrf52840.bootloader.tool=bootburn +cplaynrf52840.upload.tool=nrfutil +cplaynrf52840.upload.protocol=nrfutil +cplaynrf52840.upload.use_1200bps_touch=true +cplaynrf52840.upload.wait_for_upload_port=true +cplaynrf52840.upload.maximum_size=815104 +cplaynrf52840.upload.maximum_data_size=237568 + +# Build +cplaynrf52840.build.mcu=cortex-m4 +cplaynrf52840.build.f_cpu=64000000 +cplaynrf52840.build.board=NRF52840_CIRCUITPLAY +cplaynrf52840.build.core=nRF5 +cplaynrf52840.build.variant=circuitplayground_nrf52840 +cplaynrf52840.build.usb_manufacturer="Adafruit LLC" +cplaynrf52840.build.usb_product="Circuit Playground Bluefruit" +cplaynrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld +cplaynrf52840.build.vid=0x239A +cplaynrf52840.build.pid=0x8045 + +# SofDevice Menu +cplaynrf52840.menu.softdevice.s140v6=S140 6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cplaynrf52840.menu.debug.l0=Level 0 (Release) +cplaynrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cplaynrf52840.menu.debug.l1=Level 1 (Error Message) +cplaynrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cplaynrf52840.menu.debug.l2=Level 2 (Full Debug) +cplaynrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + +# --------------------------------------------- +# Clue nRF52840 +# --------------------------------------------- +cluenrf52840.name=Adafruit CLUE + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +cluenrf52840.vid.0=0x239A +cluenrf52840.pid.0=0x8072 +cluenrf52840.vid.1=0x239A +cluenrf52840.pid.1=0x0072 +cluenrf52840.vid.2=0x239A +cluenrf52840.pid.2=0x0071 +cluenrf52840.vid.3=0x239A +cluenrf52840.pid.3=0x8071 + +# Upload +cluenrf52840.bootloader.tool=bootburn +cluenrf52840.upload.tool=nrfutil +cluenrf52840.upload.protocol=nrfutil +cluenrf52840.upload.use_1200bps_touch=true +cluenrf52840.upload.wait_for_upload_port=true +cluenrf52840.upload.maximum_size=815104 +cluenrf52840.upload.maximum_data_size=237568 + +# Build +cluenrf52840.build.mcu=cortex-m4 +cluenrf52840.build.f_cpu=64000000 +cluenrf52840.build.board=NRF52840_CLUE +cluenrf52840.build.core=nRF5 +cluenrf52840.build.variant=clue_nrf52840 +cluenrf52840.build.usb_manufacturer="Adafruit LLC" +cluenrf52840.build.usb_product="CLUE" +cluenrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cluenrf52840.build.ldscript=nrf52840_s140_v6.ld +cluenrf52840.build.vid=0x239A +cluenrf52840.build.pid=0x8071 + +# SofDevice Menu +cluenrf52840.menu.softdevice.s140v6=S140 6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cluenrf52840.menu.debug.l0=Level 0 (Release) +cluenrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cluenrf52840.menu.debug.l1=Level 1 (Error Message) +cluenrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cluenrf52840.menu.debug.l2=Level 2 (Full Debug) +cluenrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Metro nRF52840 Express +# ---------------------------------- +metro52840.name=Adafruit Metro nRF52840 Express + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +metro52840.vid.0=0x239A +metro52840.pid.0=0x803F +metro52840.vid.1=0x239A +metro52840.pid.1=0x003F +metro52840.vid.2=0x239A +metro52840.pid.2=0x0040 +metro52840.vid.3=0x239A +metro52840.pid.3=0x8040 + +# Upload +metro52840.bootloader.tool=bootburn +metro52840.upload.tool=nrfutil +metro52840.upload.protocol=nrfutil +metro52840.upload.use_1200bps_touch=true +metro52840.upload.wait_for_upload_port=true +metro52840.upload.maximum_size=815104 +metro52840.upload.maximum_data_size=237568 + +# Build +metro52840.build.mcu=cortex-m4 +metro52840.build.f_cpu=64000000 +metro52840.build.board=NRF52840_METRO +metro52840.build.core=nRF5 +metro52840.build.variant=metro_nrf52840_express +metro52840.build.usb_manufacturer="Adafruit LLC" +metro52840.build.usb_product="Metro nRF52840 Express" +metro52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +metro52840.build.ldscript=nrf52840_s140_v6.ld +metro52840.build.vid=0x239A +metro52840.build.pid=0x803F + +# SofDevice Menu +metro52840.menu.softdevice.s140v6=S140 6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_name=s140 +metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +metro52840.menu.debug.l0=Level 0 (Release) +metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +metro52840.menu.debug.l1=Level 1 (Error Message) +metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +metro52840.menu.debug.l2=Level 2 (Full Debug) +metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +metro52840.menu.debug.l3=Level 3 (Segger SystemView) +metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + + + + +# ------------------------------------------------------- +# +# Boards that aren't made by Adafruit +# +# ------------------------------------------------------- + + +# ---------------------------------- +# Nordic nRF52840DK (PCA10056) +# ---------------------------------- +pca10056.name=Nordic nRF52840DK (PCA10056) +pca10056.bootloader.tool=bootburn + +# Upload +pca10056.upload.tool=nrfutil +pca10056.upload.protocol=nrfutil +pca10056.upload.use_1200bps_touch=true +pca10056.upload.wait_for_upload_port=true +pca10056.upload.maximum_size=815104 +pca10056.upload.maximum_data_size=237568 + +# Build +pca10056.build.mcu=cortex-m4 +pca10056.build.f_cpu=64000000 +pca10056.build.board=NRF52840_PCA10056 +pca10056.build.core=nRF5 +pca10056.build.variant=pca10056 +pca10056.build.usb_manufacturer="Nordic" +pca10056.build.usb_product="nRF52840 DK" +pca10056.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +pca10056.build.ldscript=nrf52840_s140_v6.ld +pca10056.build.vid=0x239A +pca10056.build.pid=0x8029 + +# SofDevice Menu +pca10056.menu.softdevice.s140v6=S140 6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_name=s140 +pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +pca10056.menu.debug.l0=Level 0 (Release) +pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +pca10056.menu.debug.l1=Level 1 (Error Message) +pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +pca10056.menu.debug.l2=Level 2 (Full Debug) +pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +pca10056.menu.debug.l3=Level 3 (Segger SystemView) +pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Particle Xenon +# ---------------------------------- +particle_xenon.name=Particle Xenon + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +particle_xenon.vid.0=0x239A +particle_xenon.pid.0=0x8029 +particle_xenon.vid.1=0x239A +particle_xenon.pid.1=0x0029 +particle_xenon.vid.2=0x239A +particle_xenon.pid.2=0x002A +particle_xenon.vid.3=0x239A +particle_xenon.pid.3=0x802A + +# Upload +particle_xenon.bootloader.tool=bootburn +particle_xenon.upload.tool=nrfutil +particle_xenon.upload.protocol=nrfutil +particle_xenon.upload.use_1200bps_touch=true +particle_xenon.upload.wait_for_upload_port=true +particle_xenon.upload.maximum_size=815104 +particle_xenon.upload.maximum_data_size=237568 + +# Build +particle_xenon.build.mcu=cortex-m4 +particle_xenon.build.f_cpu=64000000 +particle_xenon.build.board=PARTICLE_XENON +particle_xenon.build.core=nRF5 +particle_xenon.build.variant=particle_xenon +particle_xenon.build.usb_manufacturer="Particle Industries" +particle_xenon.build.usb_product="Particle Xenon" +particle_xenon.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +particle_xenon.build.ldscript=nrf52840_s140_v6.ld +particle_xenon.build.vid=0x239A +particle_xenon.build.pid=0x8029 + +# SofDevice Menu +particle_xenon.menu.softdevice.s140v6=S140 6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_name=s140 +particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +particle_xenon.menu.debug.l0=Level 0 (Release) +particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +particle_xenon.menu.debug.l1=Level 1 (Error Message) +particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +particle_xenon.menu.debug.l2=Level 2 (Full Debug) +particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +particle_xenon.menu.debug.l3=Level 3 (Segger SystemView) +particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# Raytac MDBT50Q - RX +# ---------------------------------- +mdbt50qrx.name=Raytac MDBT50Q-RX Dongle + +# VID/PID for bootloader, Arduino + Circuitpython App +mdbt50qrx.vid.0=0x239A +mdbt50qrx.pid.0=0x810B +mdbt50qrx.vid.1=0x239A +mdbt50qrx.pid.1=0x010B +mdbt50qrx.vid.2=0x239A +mdbt50qrx.pid.2=0x810C + +# Upload +mdbt50qrx.bootloader.tool=bootburn +mdbt50qrx.upload.tool=nrfutil +mdbt50qrx.upload.protocol=nrfutil +mdbt50qrx.upload.use_1200bps_touch=true +mdbt50qrx.upload.wait_for_upload_port=true +mdbt50qrx.upload.maximum_size=815104 +mdbt50qrx.upload.maximum_data_size=237568 + +# Build +mdbt50qrx.build.mcu=cortex-m4 +mdbt50qrx.build.f_cpu=64000000 +mdbt50qrx.build.board=MDBT50Q_RX +mdbt50qrx.build.core=nRF5 +mdbt50qrx.build.variant=raytac_mdbt50q_rx +mdbt50qrx.build.usb_manufacturer="Raytac" +mdbt50qrx.build.usb_product="nRF52840 Dongle" +mdbt50qrx.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +mdbt50qrx.build.ldscript=nrf52840_s140_v6.ld +mdbt50qrx.build.vid=0x239A +mdbt50qrx.build.pid=0x810B + +# SofDevice Menu +mdbt50qrx.menu.softdevice.s140v6=S140 6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_name=s140 +mdbt50qrx.menu.softdevice.s140v6.build.sd_version=6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +mdbt50qrx.menu.debug.l0=Level 0 (Release) +mdbt50qrx.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +mdbt50qrx.menu.debug.l1=Level 1 (Error Message) +mdbt50qrx.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +mdbt50qrx.menu.debug.l2=Level 2 (Full Debug) +mdbt50qrx.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +mdbt50qrx.menu.debug.l3=Level 3 (Segger SystemView) +mdbt50qrx.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +mdbt50qrx.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B302 +# ---------------------------------- +ninab302.name=NINA B302 ublox + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +ninab302.vid.0=0x239A +ninab302.pid.0=0x8029 +ninab302.vid.1=0x239A +ninab302.pid.1=0x0029 +ninab302.vid.2=0x7239A +ninab302.pid.2=0x002A +ninab302.vid.3=0x239A +ninab302.pid.3=0x802A + +# Upload +ninab302.bootloader.tool=bootburn +ninab302.upload.tool=nrfutil +ninab302.upload.protocol=nrfutil +ninab302.upload.use_1200bps_touch=true +ninab302.upload.wait_for_upload_port=true +ninab302.upload.maximum_size=815104 +ninab302.upload.maximum_data_size=237568 + +# Build +ninab302.build.mcu=cortex-m4 +ninab302.build.f_cpu=64000000 +ninab302.build.board=NINA_B302_ublox +ninab302.build.core=nRF5 +ninab302.build.variant=NINA_B302_ublox +ninab302.build.usb_manufacturer="Nordic" +ninab302.build.usb_product="NINA B302 ublox" +ninab302.build.extra_flags=-DNRF52840_XXAA -DNINA_B302_ublox {build.flags.usb} +ninab302.build.ldscript=nrf52840_s140_v6.ld +ninab302.build.vid=0x239A +ninab302.build.pid=0x8029 + +# SofDevice Menu +ninab302.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_name=s140 +ninab302.menu.softdevice.s140v6.build.sd_version=6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +ninab302.menu.debug.l0=Level 0 (Release) +ninab302.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab302.menu.debug.l1=Level 1 (Error Message) +ninab302.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab302.menu.debug.l2=Level 2 (Full Debug) +ninab302.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab302.menu.debug.l3=Level 3 (Segger SystemView) +ninab302.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab302.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B112 +# ---------------------------------- +ninab112.name=NINA B112 ublox +ninab112.bootloader.tool=bootburn + +# Upload +ninab112.upload.tool=nrfutil +ninab112.upload.protocol=nrfutil +ninab112.upload.use_1200bps_touch=false +ninab112.upload.wait_for_upload_port=false +ninab112.upload.native_usb=false +ninab112.upload.maximum_size=290816 +ninab112.upload.maximum_data_size=52224 + +# Build +ninab112.build.mcu=cortex-m4 +ninab112.build.f_cpu=64000000 +ninab112.build.board=NINA_B112_ublox +ninab112.build.core=nRF5 +ninab112.build.variant=NINA_B112_ublox +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52832" +ninab112.build.extra_flags=-DNRF52832_XXAA -DNINA_B112_ublox -DNRF52 +ninab112.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +ninab112.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_name=s132 +ninab112.menu.softdevice.s132v6.build.sd_version=6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +ninab112.menu.debug.l0=Level 0 (Release) +ninab112.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab112.menu.debug.l1=Level 1 (Error Message) +ninab112.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab112.menu.debug.l2=Level 2 (Full Debug) +ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab112.menu.debug.l3=Level 3 (Segger SystemView) +ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +################################################################## +## KH Add SparkFun Pro nRF52840 Mini +################################################################## +#********************************************** +# SparkFun Pro nRF52840 Mini +#********************************************** +sparkfunnrf52840mini.name=SparkFun Pro nRF52840 Mini + +# DFU Mode with CDC only +sparkfunnrf52840mini.vid.0=0x1B4F +sparkfunnrf52840mini.pid.0=0x002A + +# DFU Mode with CDC + MSC (UF2) +sparkfunnrf52840mini.vid.1=0x1B4F +sparkfunnrf52840mini.pid.1=0x0029 + +# Application with CDC + MSC +sparkfunnrf52840mini.vid.2=0x1B4F +sparkfunnrf52840mini.pid.2=0x8029 + +# CircuitPython +sparkfunnrf52840mini.vid.2=0x1B4F +sparkfunnrf52840mini.pid.2=0x802A + +sparkfunnrf52840mini.bootloader.tool=bootburn + +# Upload +sparkfunnrf52840mini.upload.tool=nrfutil +sparkfunnrf52840mini.upload.protocol=nrfutil +sparkfunnrf52840mini.upload.use_1200bps_touch=true +sparkfunnrf52840mini.upload.wait_for_upload_port=true +#sparkfunnrf52840mini.upload.native_usb=true + +# Build +sparkfunnrf52840mini.build.mcu=cortex-m4 +sparkfunnrf52840mini.build.f_cpu=64000000 +sparkfunnrf52840mini.build.board=NRF52840_FEATHER +sparkfunnrf52840mini.build.core=nRF5 +sparkfunnrf52840mini.build.variant=sparkfun_nrf52840_mini +sparkfunnrf52840mini.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +sparkfunnrf52840mini.build.vid=0x1B4F +sparkfunnrf52840mini.build.pid=0x5284 +sparkfunnrf52840mini.build.usb_manufacturer="SparkFun" +sparkfunnrf52840mini.build.usb_product="nRF52840 Mini Breakout" + +# SofDevice Menu +# Ram & ROM size varies depending on SoftDevice (check linker script) + +sparkfunnrf52840mini.menu.softdevice.s140v6=s140 6.1.1 r0 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_flags=-DS140 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_name=s140 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_version=6.1.1 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_fwid=0x00B6 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.ldscript=nrf52840_s140_v6.ld +sparkfunnrf52840mini.menu.softdevice.s140v6.upload.maximum_size=815104 +sparkfunnrf52840mini.menu.softdevice.s140v6.upload.maximum_data_size=248832 + +# Debug Menu +sparkfunnrf52840mini.menu.debug.l0=Level 0 (Release) +sparkfunnrf52840mini.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 -Os +sparkfunnrf52840mini.menu.debug.l1=Level 1 (Error Message) +sparkfunnrf52840mini.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 -Os +sparkfunnrf52840mini.menu.debug.l2=Level 2 (Full Debug) +sparkfunnrf52840mini.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 -Os +sparkfunnrf52840mini.menu.debug.l3=Level 3 (Segger SystemView) +sparkfunnrf52840mini.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 -Os + +################################################################## diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/cores/nRF5/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/cores/nRF5/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/cores/nRF5/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/cores/nRF5/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/cores/nRF5/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/cores/nRF5/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/cores/nRF5/Udp.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/cores/nRF5/Udp.h new file mode 100644 index 0000000..cc814d3 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/cores/nRF5/Udp.h @@ -0,0 +1,92 @@ +/* + * Udp.cpp: Library to send/receive UDP packets. + * + * NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these) + * 1) UDP does not guarantee the order in which assembled UDP packets are received. This + * might not happen often in practice, but in larger network topologies, a UDP + * packet can be received out of sequence. + * 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being + * aware of it. Again, this may not be a concern in practice on small local networks. + * For more information, see http://www.cafeaulait.org/course/week12/35.html + * + * MIT License: + * Copyright (c) 2008 Bjoern Hartmann + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * bjoern@cs.stanford.edu 12/30/2008 + */ + +#ifndef udp_h +#define udp_h + +#include +#include + +class UDP : public Stream { + +public: + virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + + // KH, add virtual function to support Multicast, necessary for many services (MDNS, UPnP, etc.) + virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure + + virtual void stop() =0; // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port) =0; + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char *host, uint16_t port) =0; + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket() =0; + // Write a single byte into the packet + virtual size_t write(uint8_t) =0; + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t *buffer, size_t size) =0; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket() =0; + // Number of bytes remaining in the current packet + virtual int available() =0; + // Read a single byte from the current packet + virtual int read() =0; + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len) =0; + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) =0; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek() =0; + virtual void flush() =0; // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP() =0; + // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort() =0; +protected: + uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; +}; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/platform.txt new file mode 100644 index 0000000..34a515e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/platform.txt @@ -0,0 +1,167 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All rights reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +name=Adafruit nRF52 Boards +version=1.1.0 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith + +# Allow changing optimization settings via platform.local.txt / boards.local.txt +compiler.optimization_flag=-Ofast + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD + +# KH, Error here to use gcc, must use g++ +#compiler.c.elf.cmd=arm-none-eabi-gcc +compiler.c.elf.cmd=arm-none-eabi-g++ + +compiler.c.elf.flags={compiler.optimization_flag} -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-mcpu={build.mcu} -mthumb -mabi=aapcs {compiler.optimization_flag} -g -c {build.float_flags} -x assembler-with-cpp + +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2bin.flags=-O binary +compiler.elf2bin.cmd=arm-none-eabi-objcopy +compiler.elf2hex.flags=-O ihex +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--wrap=malloc -Wl,--wrap=free --specs=nano.specs --specs=nosys.specs +compiler.size.cmd=arm-none-eabi-size + +# this can be overriden in boards.txt +build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float +build.debug_flags=-DCFG_DEBUG=0 +build.logger_flags=-DCFG_LOGGER=1 +build.sysview_flags=-DCFG_SYSVIEW=0 + +# USB flags +build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.libraries.ldflags= +compiler.elf2bin.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Include/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Lib/GCC/" -larm_cortexM4lf_math + +# common compiler for nrf +rtos.path={build.core.path}/freertos +nordic.path={build.core.path}/nordic + +# build.logger_flags and build.sysview_flags are intentionally empty, +# to allow modification via a user's own boards.local.txt or platform.local.txt files. +build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 {compiler.optimization_flag} {build.debug_flags} {build.logger_flags} {build.sysview_flags} {compiler.arm.cmsis.c.flags} "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include/nrf52" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Create archives +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.core.path}/linker" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" {compiler.libraries.ldflags} -Wl,--end-group + +## Create output (bin file) +#recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +## Create dfu package zip file +recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip" + +## Create uf2 file +#recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2conv.py" -f 0xADA52840 -c -o "{build.path}/{build.project_name}.uf2" "{build.path}/{build.project_name}.hex" + +## Save bin +recipe.output.tmp_file_bin={build.project_name}.bin +recipe.output.save_file_bin={build.project_name}.save.bin + +## Save hex +recipe.output.tmp_file_hex={build.project_name}.hex +recipe.output.save_file_hexu={build.project_name}.save.hex + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +## Export Compiled Binary +recipe.output.tmp_file={build.project_name}.hex +recipe.output.save_file={build.project_name}.{build.variant}.hex + +#*************************************************** +# adafruit-nrfutil for uploading +# https://github.com/adafruit/Adafruit_nRF52_nrfutil +# pre-built binaries are provided for macos and windows +#*************************************************** +tools.nrfutil.cmd=adafruit-nrfutil +tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe +tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/macos/adafruit-nrfutil + +tools.nrfutil.upload.params.verbose=--verbose +tools.nrfutil.upload.params.quiet= +tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200 --singlebank + +#*************************************************** +# Burning bootloader with either jlink or nrfutil +#*************************************************** + +# Bootloader version +tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.6.2_{build.sd_name}_{build.sd_version} + +tools.bootburn.bootloader.params.verbose= +tools.bootburn.bootloader.params.quiet= +tools.bootburn.bootloader.pattern={program.burn_pattern} + +# erase flash page while programming +tools.bootburn.erase.params.verbose= +tools.bootburn.erase.params.quiet= +tools.bootburn.erase.pattern= + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B112_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B112_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B112_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B112_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B112_ublox/variant.cpp new file mode 100644 index 0000000..f43f3a4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B112_ublox/variant.cpp @@ -0,0 +1,59 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" + +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +const uint32_t g_ADigitalPinMap[] = { + // D0 .. D13 + 5, // D0 is P0.05 (UART RX) + 6, // D1 is P0.06 (UART TX) + 7, // D2 is P0.07 + 31, // D3 is P0.31 + 18, // D4 is P0.18 (LED Blue) + 99, // D5 (NC) + 9, // D6 is P0.09 NFC1 + 10, // D7 is P0.10 (Button) NFC2 + 99, // D8 (NC) + 8, // D9 is P0.08 + 11, // D10 is P0.11 CS + 13, // D11 is P0.13 MOSI + 12, // D12 is P0.12 MISO + 14, // D13 is P0.14 SCK + //I2C + 2, // D14 is P0.2 (SDA) + 3, // D15 is P0.3 (SCL) + // D16 .. D21 (aka A0 .. A5) + 3, // D16 is P0.03 (A0) + 2, // D17 is P0.02 (A1) + 4, // D18 is P0.04 (A2) + 30, // D19 is P0.30 (A3) SW2 + 29, // D20 is P0.29 (A4) + 28, // D21 is P0.28 (A5) + 9, // P0.09 NFC + 10, // P0.10 NFC + 16, // SW1 (LED Green) +}; \ No newline at end of file diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B112_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B112_ublox/variant.h new file mode 100644 index 0000000..833cbf6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B112_ublox/variant.h @@ -0,0 +1,172 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +#ifndef _VARIANT_NINA_B112_UBLOX_ +#define _VARIANT_NINA_B112_UBLOX_ + +#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \ + .rc_ctiv = 0, \ +.rc_temp_ctiv = 0, \ +.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM} + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (32u) +#define NUM_DIGITAL_PINS (32u) +#define NUM_ANALOG_INPUTS (6u) +#define NUM_ANALOG_OUTPUTS (0u) + +// LEDs +#define PIN_LED LED1 +#define LED_BUILTIN PIN_LED + +//LEDs onboard +#define LED1 (0) // Red +#define LED2 (24) // Green/SW1 +#define LED3 (4) // Blue + +#define LED_STATE_ON 1 // State when LED is litted + +//Switch +#define SW1 (24) +#define SW2 (19) + +// NFC +#define PIN_NFC_1 (6) // P0.9 +#define PIN_NFC_2 (7) // P0.10 + +/* + * Analog pins + */ +#define PIN_A0 (16) // P0.03 +#define PIN_A1 (17) // P0.02 +#define PIN_A2 (18) // P0.04 +#define PIN_A3 (19) // P0.30 +#define PIN_A4 (20) // P0.29 +#define PIN_A5 (21) // P0.28 + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_D0 (0) // P0.05 +#define PIN_D1 (1) // P0.06 +#define PIN_D2 (2) // P0.07 +#define PIN_D3 (4) // P0.31 +#define PIN_D4 (5) // P0.18 +#define PIN_D6 (6) // P0.09 +#define PIN_D7 (7) // P0.10 +#define PIN_D9 (9) // P0.08 +#define PIN_D10 (11) // P0.11 +#define PIN_D11 (13) // P0.13 +#define PIN_D12 (12) // P0.12 +#define PIN_D13 (14) // P0.14 +#define PIN_D14 (2) // P0.02 +#define PIN_D15 (3) // P0.03 + +static const uint8_t D0 = PIN_D0 ; +static const uint8_t D1 = PIN_D1 ; +static const uint8_t D2 = PIN_D2 ; +static const uint8_t D3 = PIN_D3 ; +static const uint8_t D4 = PIN_D4 ; +static const uint8_t D6 = PIN_D6 ; +static const uint8_t D7 = PIN_D7 ; +static const uint8_t D9 = PIN_D9 ; +static const uint8_t D10 = PIN_D10 ; +static const uint8_t D11 = PIN_D11 ; +static const uint8_t D12 = PIN_D12 ; +static const uint8_t D13 = PIN_D13 ; +static const uint8_t D14 = PIN_D14 ; +static const uint8_t D15 = PIN_D15 ; + +// Other pins +//static const uint8_t AREF = PIN_AREF; + +//#define PIN_AREF (24) +//#define PIN_VBAT PIN_A7 + +/* + * Serial interfaces + */ +#define PIN_SERIAL_RX (0) // P0.05 +#define PIN_SERIAL_TX (1) // P0.06 +#define PIN_SERIAL_CTS (2) // P0.07 +#define PIN_SERIAL_RTS (3) // P0.31 +#define PIN_SERIAL_DTR (28) // P0.28 +#define PIN_SERIAL_DSR (29) // P0.29 + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (12) // P0.12 +#define PIN_SPI_MOSI (11) // P0.13 +#define PIN_SPI_SCK (13) // P0.14 + +static const uint8_t SS = 10 ; // P0.11 +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (14) // P0.02 +#define PIN_WIRE_SCL (15) // P0.03 + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + + +#endif //_VARIANT_NINA_B112_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B302_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B302_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B302_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B302_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B302_ublox/variant.cpp new file mode 100644 index 0000000..8b4df2e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B302_ublox/variant.cpp @@ -0,0 +1,87 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#include "variant.h" +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +const uint32_t g_ADigitalPinMap[] = +{ + // D0 .. D13 + 29, // D0 is P0.29 (UART RX) + 45, // D1 is P1.13 (UART TX) + 44, // D2 is P1.12 (NFC2) + 31, // D3 is P0.31 (LED1) + 13, // D4 is P0.13 (LED2) + 11, // D5 is P0.11 + 9, // D6 is P0.09 + 10, // D7 is P0.10 (Button) + 41, // D8 is P1.09 + 12, // D9 is P0.12 + 14, // D10 is P0.14 + 15, // D11 is P0.15 + 32, // D12 is P1.00 + 7, // D13 is P0.07 + + // D14 .. D21 (aka A0 .. A5) + 4, // D14 is P0.04 (A0) + 30, // D15 is P0.30 (A1) + 5, // D16 is P0.05 (A2) + 2, // D17 is P0.02 (A3) + 28, // D18 is P0.28 (A4) + 3, // D19 is P0.03 (A5) + + // D20 .. D21 (aka I2C pins) + 16, // D20 is P0.16 (SDA) + 24, // D21 is P0.24 (SCL) + + // QSPI pins (not exposed via any header / test point) + 19, // D22 is P0.19 (QSPI CLK) + 17, // D23 is P0.17 (QSPI CS) + 20, // D24 is P0.20 (QSPI Data 0) + 21, // D25 is P0.21 (QSPI Data 1) + 22, // D26 is P0.22 (QSPI Data 2) + 26, // D27 is P0.23 (QSPI Data 3) + + 40, // D28 is P1.08 - IO34 + 41, // D29 is P1.01 - IO35 + 44, // D30 is P1.02 - IO36 + 45, // D31 is P1.03 - IO37 + 42, // D32 is P1.10 - IO38 + 43, // D33 is P1.11 - IO39 + 47, // D34 is P1.15 - IO40 + 46, // D35 is P1.14 - IO41 + 26, // D36 is P0.26 - IO42 + 6, // D37 is P0.6 - IO43 + 27, // D38 is P0.27 - IO44 +}; + +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B302_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B302_ublox/variant.h new file mode 100644 index 0000000..a69575f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B302_ublox/variant.h @@ -0,0 +1,149 @@ + /* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#ifndef _VARIANT_NINA_B302_UBLOX_ +#define _VARIANT_NINA_B302_UBLOX_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus +// Number of pins defined in PinDescription array +#define PINS_COUNT (40) +#define NUM_DIGITAL_PINS (34) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (3) +#define PIN_LED2 (4) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_RED PIN_LED1 +#define LED_BLUE PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +/* + * Buttons + */ +#define PIN_BUTTON1 (7) + +/* + * Analog pins + */ +#define PIN_A0 (14) +#define PIN_A1 (15) +#define PIN_A2 (16) +#define PIN_A3 (17) +#define PIN_A4 (18) +#define PIN_A5 (19) + +#define D0 (0) +#define D1 (1) +#define D2 (2) +#define D3 (3) +#define D4 (4) +#define D5 (5) +#define D6 (6) +#define D7 (7) +#define D8 (8) +#define D9 (9) +#define D10 (10) +#define D11 (11) +#define D12 (12) +#define D13 (13) + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_NFC1 (31) +#define PIN_NFC2 (2) + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0) +#define PIN_SERIAL1_TX (1) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (22) //24 original +#define PIN_SPI_MOSI (23) //25 original +#define PIN_SPI_SCK (24) //26 original + +static const uint8_t SS = (13); +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (20) +#define PIN_WIRE_SCL (21) + +// QSPI Pins +#define PIN_QSPI_SCK 22 +#define PIN_QSPI_CS 23 +#define PIN_QSPI_IO0 24 +#define PIN_QSPI_IO1 25 +#define PIN_QSPI_IO2 26 +#define PIN_QSPI_IO3 27 + +// On-board QSPI Flash +#define EXTERNAL_FLASH_DEVICES GD25Q16C +#define EXTERNAL_FLASH_USE_QSPI + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif //_VARIANT_NINA_B302_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/sparkfun_nrf52840_mini/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/sparkfun_nrf52840_mini/variant.cpp new file mode 100644 index 0000000..b01c147 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/sparkfun_nrf52840_mini/variant.cpp @@ -0,0 +1,49 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +const uint32_t g_ADigitalPinMap[] = +{ + // P0 + 0 , 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, + + // P1 + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63 +}; +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/sparkfun_nrf52840_mini/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/sparkfun_nrf52840_mini/variant.h new file mode 100644 index 0000000..c534ceb --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/sparkfun_nrf52840_mini/variant.h @@ -0,0 +1,152 @@ + /* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_SPARKFUN52840MINI_ +#define _VARIANT_SPARKFUN52840MINI_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (64) +#define NUM_DIGITAL_PINS (64) +#define NUM_ANALOG_INPUTS (8) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (7) +#define PIN_LED2 (14) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_BLUE PIN_LED1 +#define LED_RED PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +// Buttons +/* +#define PIN_BUTTON1 (2) +#define PIN_BUTTON2 (3) +#define PIN_BUTTON3 (4) +#define PIN_BUTTON4 (5) +*/ + +/* + * Analog pins + */ +#define PIN_A0 (2) +#define PIN_A1 (3) +#define PIN_A2 (4) +#define PIN_A3 (5) +#define PIN_A4 (28) +#define PIN_A5 (29) +#define PIN_A6 (30) +#define PIN_A7 (31) + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; +static const uint8_t A6 = PIN_A6 ; +static const uint8_t A7 = PIN_A7 ; +#define ADC_RESOLUTION 14 + +// Other pins +#define PIN_AREF (2) +#define PIN_DFU (13) +#define PIN_NFC1 (9) +#define PIN_NFC2 (10) + +static const uint8_t AREF = PIN_AREF; + +/* + * Serial interfaces + */ +// Serial +//Previous Hardware UART definition for nRF52 Arduino Core, below 0.16.0 +//Feel free to comment out these two lines below if there are conflicts with latest release +#define PIN_SERIAL_RX (15) +#define PIN_SERIAL_TX (17) + +//Hardware UART definition for nRF52 Arduino Core, 0.17.0 and above +#define PIN_SERIAL1_RX (15) +#define PIN_SERIAL1_TX (17) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (31) +#define PIN_SPI_MOSI (3) +#define PIN_SPI_SCK (30) + +static const uint8_t SS = 2 ; +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (8) +#define PIN_WIRE_SCL (11) + +/* + * QSPI interface for external flash + */ +#define PIN_QSPI_SCK 32 +#define PIN_QSPI_CS 33 +#define PIN_QSPI_DATA0 34 +#define PIN_QSPI_DATA1 35 +#define PIN_QSPI_DATA2 36 +#define PIN_QSPI_DATA3 37 + +// On-board QSPI Flash +// If EXTERNAL_FLASH_DEVICES is not defined, all supported devices will be used +#define EXTERNAL_FLASH_DEVICES GD25Q16C + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif \ No newline at end of file diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/boards.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/boards.txt new file mode 100644 index 0000000..541eb10 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/boards.txt @@ -0,0 +1,834 @@ +menu.softdevice=SoftDevice +menu.debug=Debug +menu.debug_output=Debug Output + +# ----------------------------------- +# Adafruit Feather nRF52832 +# ----------------------------------- +feather52832.name=Adafruit Feather nRF52832 + +# VID/PID for Bootloader, Arduino & CircuitPython + +# Upload +feather52832.bootloader.tool=bootburn +feather52832.upload.tool=nrfutil +feather52832.upload.protocol=nrfutil +feather52832.upload.use_1200bps_touch=false +feather52832.upload.wait_for_upload_port=false +feather52832.upload.native_usb=false +feather52832.upload.maximum_size=290816 +feather52832.upload.maximum_data_size=52224 + +# Build +feather52832.build.mcu=cortex-m4 +feather52832.build.f_cpu=64000000 +feather52832.build.board=NRF52832_FEATHER +feather52832.build.core=nRF5 +feather52832.build.variant=feather_nrf52832 +feather52832.build.usb_manufacturer="Adafruit" +feather52832.build.usb_product="Feather nRF52832" +feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52 +feather52832.build.ldscript=nrf52832_s132_v6.ld + +# SoftDevice Menu +feather52832.menu.softdevice.s132v6=S132 6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_name=s132 +feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +feather52832.menu.debug.l0=Level 0 (Release) +feather52832.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52832.menu.debug.l1=Level 1 (Error Message) +feather52832.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52832.menu.debug.l2=Level 2 (Full Debug) +feather52832.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52832.menu.debug.l3=Level 3 (Segger SystemView) +feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +feather52832.menu.debug_output.serial=Serial +feather52832.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +feather52832.menu.debug_output.serial1=Serial1 +feather52832.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +feather52832.menu.debug_output.rtt=Segger RTT +feather52832.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Adafruit Feather nRF52840 Express +# ----------------------------------- +feather52840.name=Adafruit Feather nRF52840 Express + +# VID/PID for Bootloader, Arduino & CircuitPython +feather52840.vid.0=0x239A +feather52840.pid.0=0x8029 +feather52840.vid.1=0x239A +feather52840.pid.1=0x0029 +feather52840.vid.2=0x239A +feather52840.pid.2=0x002A +feather52840.vid.3=0x239A +feather52840.pid.3=0x802A + +# Upload +feather52840.bootloader.tool=bootburn +feather52840.upload.tool=nrfutil +feather52840.upload.protocol=nrfutil +feather52840.upload.use_1200bps_touch=true +feather52840.upload.wait_for_upload_port=true +feather52840.upload.maximum_size=815104 +feather52840.upload.maximum_data_size=237568 + +# Build +feather52840.build.mcu=cortex-m4 +feather52840.build.f_cpu=64000000 +feather52840.build.board=NRF52840_FEATHER +feather52840.build.core=nRF5 +feather52840.build.variant=feather_nrf52840_express +feather52840.build.usb_manufacturer="Adafruit" +feather52840.build.usb_product="Feather nRF52840 Express" +feather52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840.build.ldscript=nrf52840_s140_v6.ld +feather52840.build.vid=0x239A +feather52840.build.pid=0x8029 + +# SoftDevice Menu +feather52840.menu.softdevice.s140v6=S140 6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_name=s140 +feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840.menu.debug.l0=Level 0 (Release) +feather52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840.menu.debug.l1=Level 1 (Error Message) +feather52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840.menu.debug.l2=Level 2 (Full Debug) +feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840.menu.debug.l3=Level 3 (Segger SystemView) +feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +feather52840.menu.debug_output.serial=Serial +feather52840.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +feather52840.menu.debug_output.serial1=Serial1 +feather52840.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +feather52840.menu.debug_output.rtt=Segger RTT +feather52840.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Adafruit Feather nRF52840 Sense +# ----------------------------------- +feather52840sense.name=Adafruit Feather nRF52840 Sense + +# VID/PID for Bootloader, Arduino & CircuitPython +feather52840sense.vid.0=0x239A +feather52840sense.pid.0=0x8087 +feather52840sense.vid.1=0x239A +feather52840sense.pid.1=0x0087 +feather52840sense.vid.2=0x239A +feather52840sense.pid.2=0x0088 +feather52840sense.vid.3=0x239A +feather52840sense.pid.3=0x8088 + +# Upload +feather52840sense.bootloader.tool=bootburn +feather52840sense.upload.tool=nrfutil +feather52840sense.upload.protocol=nrfutil +feather52840sense.upload.use_1200bps_touch=true +feather52840sense.upload.wait_for_upload_port=true +feather52840sense.upload.maximum_size=815104 +feather52840sense.upload.maximum_data_size=237568 + +# Build +feather52840sense.build.mcu=cortex-m4 +feather52840sense.build.f_cpu=64000000 +feather52840sense.build.board=NRF52840_FEATHER_SENSE +feather52840sense.build.core=nRF5 +feather52840sense.build.variant=feather_nrf52840_sense +feather52840sense.build.usb_manufacturer="Adafruit" +feather52840sense.build.usb_product="Feather nRF52840 Sense" +feather52840sense.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840sense.build.ldscript=nrf52840_s140_v6.ld +feather52840sense.build.vid=0x239A +feather52840sense.build.pid=0x8087 + +# SoftDevice Menu +feather52840sense.menu.softdevice.s140v6=S140 6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_name=s140 +feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840sense.menu.debug.l0=Level 0 (Release) +feather52840sense.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840sense.menu.debug.l1=Level 1 (Error Message) +feather52840sense.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840sense.menu.debug.l2=Level 2 (Full Debug) +feather52840sense.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840sense.menu.debug.l3=Level 3 (Segger SystemView) +feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +feather52840sense.menu.debug_output.serial=Serial +feather52840sense.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +feather52840sense.menu.debug_output.serial1=Serial1 +feather52840sense.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +feather52840sense.menu.debug_output.rtt=Segger RTT +feather52840sense.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Adafruit ItsyBitsy nRF52840 Express +# ----------------------------------- +itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express + +# VID/PID for Bootloader, Arduino & CircuitPython +itsybitsy52840.vid.0=0x239A +itsybitsy52840.pid.0=0x8051 +itsybitsy52840.vid.1=0x239A +itsybitsy52840.pid.1=0x0051 +itsybitsy52840.vid.2=0x239A +itsybitsy52840.pid.2=0x0052 +itsybitsy52840.vid.3=0x239A +itsybitsy52840.pid.3=0x8052 + +# Upload +itsybitsy52840.bootloader.tool=bootburn +itsybitsy52840.upload.tool=nrfutil +itsybitsy52840.upload.protocol=nrfutil +itsybitsy52840.upload.use_1200bps_touch=true +itsybitsy52840.upload.wait_for_upload_port=true +itsybitsy52840.upload.maximum_size=815104 +itsybitsy52840.upload.maximum_data_size=237568 + +# Build +itsybitsy52840.build.mcu=cortex-m4 +itsybitsy52840.build.f_cpu=64000000 +itsybitsy52840.build.board=NRF52840_ITSYBITSY +itsybitsy52840.build.core=nRF5 +itsybitsy52840.build.variant=itsybitsy_nrf52840_express +itsybitsy52840.build.usb_manufacturer="Adafruit" +itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express" +itsybitsy52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld +itsybitsy52840.build.vid=0x239A +itsybitsy52840.build.pid=0x8051 + +# SoftDevice Menu +itsybitsy52840.menu.softdevice.s140v6=S140 6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140 +itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +itsybitsy52840.menu.debug.l0=Level 0 (Release) +itsybitsy52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +itsybitsy52840.menu.debug.l1=Level 1 (Error Message) +itsybitsy52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +itsybitsy52840.menu.debug.l2=Level 2 (Full Debug) +itsybitsy52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView) +itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +itsybitsy52840.menu.debug_output.serial=Serial +itsybitsy52840.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +itsybitsy52840.menu.debug_output.serial1=Serial1 +itsybitsy52840.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +itsybitsy52840.menu.debug_output.rtt=Segger RTT +itsybitsy52840.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Adafruit Circuit Playground Bluefruit +# ----------------------------------- +cplaynrf52840.name=Adafruit Circuit Playground Bluefruit + +# VID/PID for Bootloader, Arduino & CircuitPython +cplaynrf52840.vid.0=0x239A +cplaynrf52840.pid.0=0x8045 +cplaynrf52840.vid.1=0x239A +cplaynrf52840.pid.1=0x0045 +cplaynrf52840.vid.2=0x239A +cplaynrf52840.pid.2=0x8046 + +# Upload +cplaynrf52840.bootloader.tool=bootburn +cplaynrf52840.upload.tool=nrfutil +cplaynrf52840.upload.protocol=nrfutil +cplaynrf52840.upload.use_1200bps_touch=true +cplaynrf52840.upload.wait_for_upload_port=true +cplaynrf52840.upload.maximum_size=815104 +cplaynrf52840.upload.maximum_data_size=237568 + +# Build +cplaynrf52840.build.mcu=cortex-m4 +cplaynrf52840.build.f_cpu=64000000 +cplaynrf52840.build.board=NRF52840_CIRCUITPLAY +cplaynrf52840.build.core=nRF5 +cplaynrf52840.build.variant=circuitplayground_nrf52840 +cplaynrf52840.build.usb_manufacturer="Adafruit" +cplaynrf52840.build.usb_product="Circuit Playground Bluefruit" +cplaynrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld +cplaynrf52840.build.vid=0x239A +cplaynrf52840.build.pid=0x8045 + +# SoftDevice Menu +cplaynrf52840.menu.softdevice.s140v6=S140 6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cplaynrf52840.menu.debug.l0=Level 0 (Release) +cplaynrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cplaynrf52840.menu.debug.l1=Level 1 (Error Message) +cplaynrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cplaynrf52840.menu.debug.l2=Level 2 (Full Debug) +cplaynrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +cplaynrf52840.menu.debug_output.serial=Serial +cplaynrf52840.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +cplaynrf52840.menu.debug_output.serial1=Serial1 +cplaynrf52840.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +cplaynrf52840.menu.debug_output.rtt=Segger RTT +cplaynrf52840.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Adafruit CLUE +# ----------------------------------- +cluenrf52840.name=Adafruit CLUE + +# VID/PID for Bootloader, Arduino & CircuitPython +cluenrf52840.vid.0=0x239A +cluenrf52840.pid.0=0x8071 +cluenrf52840.vid.1=0x239A +cluenrf52840.pid.1=0x0071 +cluenrf52840.vid.2=0x239A +cluenrf52840.pid.2=0x8072 + +# Upload +cluenrf52840.bootloader.tool=bootburn +cluenrf52840.upload.tool=nrfutil +cluenrf52840.upload.protocol=nrfutil +cluenrf52840.upload.use_1200bps_touch=true +cluenrf52840.upload.wait_for_upload_port=true +cluenrf52840.upload.maximum_size=815104 +cluenrf52840.upload.maximum_data_size=237568 + +# Build +cluenrf52840.build.mcu=cortex-m4 +cluenrf52840.build.f_cpu=64000000 +cluenrf52840.build.board=NRF52840_CLUE +cluenrf52840.build.core=nRF5 +cluenrf52840.build.variant=clue_nrf52840 +cluenrf52840.build.usb_manufacturer="Adafruit" +cluenrf52840.build.usb_product="CLUE" +cluenrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cluenrf52840.build.ldscript=nrf52840_s140_v6.ld +cluenrf52840.build.vid=0x239A +cluenrf52840.build.pid=0x8071 + +# SoftDevice Menu +cluenrf52840.menu.softdevice.s140v6=S140 6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cluenrf52840.menu.debug.l0=Level 0 (Release) +cluenrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cluenrf52840.menu.debug.l1=Level 1 (Error Message) +cluenrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cluenrf52840.menu.debug.l2=Level 2 (Full Debug) +cluenrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +cluenrf52840.menu.debug_output.serial=Serial +cluenrf52840.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +cluenrf52840.menu.debug_output.serial1=Serial1 +cluenrf52840.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +cluenrf52840.menu.debug_output.rtt=Segger RTT +cluenrf52840.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Adafruit LED Glasses Driver nRF52840 +# ----------------------------------- +ledglasses_nrf52840.name=Adafruit LED Glasses Driver nRF52840 + +# VID/PID for Bootloader, Arduino & CircuitPython +ledglasses_nrf52840.vid.0=0x239A +ledglasses_nrf52840.pid.0=0x810D +ledglasses_nrf52840.vid.1=0x239A +ledglasses_nrf52840.pid.1=0x010D +ledglasses_nrf52840.vid.2=0x239A +ledglasses_nrf52840.pid.2=0x810E + +# Upload +ledglasses_nrf52840.bootloader.tool=bootburn +ledglasses_nrf52840.upload.tool=nrfutil +ledglasses_nrf52840.upload.protocol=nrfutil +ledglasses_nrf52840.upload.use_1200bps_touch=true +ledglasses_nrf52840.upload.wait_for_upload_port=true +ledglasses_nrf52840.upload.maximum_size=815104 +ledglasses_nrf52840.upload.maximum_data_size=237568 + +# Build +ledglasses_nrf52840.build.mcu=cortex-m4 +ledglasses_nrf52840.build.f_cpu=64000000 +ledglasses_nrf52840.build.board=NRF52840_LED_GLASSES +ledglasses_nrf52840.build.core=nRF5 +ledglasses_nrf52840.build.variant=ledglasses_nrf52840 +ledglasses_nrf52840.build.usb_manufacturer="Adafruit" +ledglasses_nrf52840.build.usb_product="LED Glasses Driver nRF52840" +ledglasses_nrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +ledglasses_nrf52840.build.ldscript=nrf52840_s140_v6.ld +ledglasses_nrf52840.build.vid=0x239A +ledglasses_nrf52840.build.pid=0x810D + +# SoftDevice Menu +ledglasses_nrf52840.menu.softdevice.s140v6=S140 6.1.1 +ledglasses_nrf52840.menu.softdevice.s140v6.build.sd_name=s140 +ledglasses_nrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +ledglasses_nrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +ledglasses_nrf52840.menu.debug.l0=Level 0 (Release) +ledglasses_nrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ledglasses_nrf52840.menu.debug.l1=Level 1 (Error Message) +ledglasses_nrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ledglasses_nrf52840.menu.debug.l2=Level 2 (Full Debug) +ledglasses_nrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ledglasses_nrf52840.menu.debug.l3=Level 3 (Segger SystemView) +ledglasses_nrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ledglasses_nrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +ledglasses_nrf52840.menu.debug_output.serial=Serial +ledglasses_nrf52840.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +ledglasses_nrf52840.menu.debug_output.serial1=Serial1 +ledglasses_nrf52840.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +ledglasses_nrf52840.menu.debug_output.rtt=Segger RTT +ledglasses_nrf52840.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Raytac nRF52840 Dongle +# ----------------------------------- +mdbt50qrx.name=Raytac nRF52840 Dongle + +# VID/PID for Bootloader, Arduino & CircuitPython +mdbt50qrx.vid.0=0x239A +mdbt50qrx.pid.0=0x810B +mdbt50qrx.vid.1=0x239A +mdbt50qrx.pid.1=0x010B +mdbt50qrx.vid.2=0x239A +mdbt50qrx.pid.2=0x810C + +# Upload +mdbt50qrx.bootloader.tool=bootburn +mdbt50qrx.upload.tool=nrfutil +mdbt50qrx.upload.protocol=nrfutil +mdbt50qrx.upload.use_1200bps_touch=true +mdbt50qrx.upload.wait_for_upload_port=true +mdbt50qrx.upload.maximum_size=815104 +mdbt50qrx.upload.maximum_data_size=237568 + +# Build +mdbt50qrx.build.mcu=cortex-m4 +mdbt50qrx.build.f_cpu=64000000 +mdbt50qrx.build.board=MDBT50Q_RX +mdbt50qrx.build.core=nRF5 +mdbt50qrx.build.variant=raytac_mdbt50q_rx +mdbt50qrx.build.usb_manufacturer="Raytac" +mdbt50qrx.build.usb_product="nRF52840 Dongle" +mdbt50qrx.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +mdbt50qrx.build.ldscript=nrf52840_s140_v6.ld +mdbt50qrx.build.vid=0x239A +mdbt50qrx.build.pid=0x810B + +# SoftDevice Menu +mdbt50qrx.menu.softdevice.s140v6=S140 6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_name=s140 +mdbt50qrx.menu.softdevice.s140v6.build.sd_version=6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +mdbt50qrx.menu.debug.l0=Level 0 (Release) +mdbt50qrx.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +mdbt50qrx.menu.debug.l1=Level 1 (Error Message) +mdbt50qrx.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +mdbt50qrx.menu.debug.l2=Level 2 (Full Debug) +mdbt50qrx.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +mdbt50qrx.menu.debug.l3=Level 3 (Segger SystemView) +mdbt50qrx.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +mdbt50qrx.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +mdbt50qrx.menu.debug_output.serial=Serial +mdbt50qrx.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +mdbt50qrx.menu.debug_output.serial1=Serial1 +mdbt50qrx.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +mdbt50qrx.menu.debug_output.rtt=Segger RTT +mdbt50qrx.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Adafruit Metro nRF52840 Express +# ----------------------------------- +metro52840.name=Adafruit Metro nRF52840 Express + +# VID/PID for Bootloader, Arduino & CircuitPython +metro52840.vid.0=0x239A +metro52840.pid.0=0x803F +metro52840.vid.1=0x239A +metro52840.pid.1=0x003F +metro52840.vid.2=0x239A +metro52840.pid.2=0x0040 +metro52840.vid.3=0x239A +metro52840.pid.3=0x8040 + +# Upload +metro52840.bootloader.tool=bootburn +metro52840.upload.tool=nrfutil +metro52840.upload.protocol=nrfutil +metro52840.upload.use_1200bps_touch=true +metro52840.upload.wait_for_upload_port=true +metro52840.upload.maximum_size=815104 +metro52840.upload.maximum_data_size=237568 + +# Build +metro52840.build.mcu=cortex-m4 +metro52840.build.f_cpu=64000000 +metro52840.build.board=NRF52840_METRO +metro52840.build.core=nRF5 +metro52840.build.variant=metro_nrf52840_express +metro52840.build.usb_manufacturer="Adafruit" +metro52840.build.usb_product="Metro nRF52840 Express" +metro52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +metro52840.build.ldscript=nrf52840_s140_v6.ld +metro52840.build.vid=0x239A +metro52840.build.pid=0x803F + +# SoftDevice Menu +metro52840.menu.softdevice.s140v6=S140 6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_name=s140 +metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +metro52840.menu.debug.l0=Level 0 (Release) +metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +metro52840.menu.debug.l1=Level 1 (Error Message) +metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +metro52840.menu.debug.l2=Level 2 (Full Debug) +metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +metro52840.menu.debug.l3=Level 3 (Segger SystemView) +metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +metro52840.menu.debug_output.serial=Serial +metro52840.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +metro52840.menu.debug_output.serial1=Serial1 +metro52840.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +metro52840.menu.debug_output.rtt=Segger RTT +metro52840.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + + +# ------------------------------------------------------- +# +# Boards that aren't made by Adafruit +# +# ------------------------------------------------------- + +# ----------------------------------- +# Nordic nRF52840 DK +# ----------------------------------- +pca10056.name=Nordic nRF52840 DK + +# VID/PID for Bootloader, Arduino & CircuitPython +pca10056.vid.0=0x239A +pca10056.pid.0=0x8029 +pca10056.vid.1=0x239A +pca10056.pid.1=0x0029 + +# Upload +pca10056.bootloader.tool=bootburn +pca10056.upload.tool=nrfutil +pca10056.upload.protocol=nrfutil +pca10056.upload.use_1200bps_touch=true +pca10056.upload.wait_for_upload_port=true +pca10056.upload.maximum_size=815104 +pca10056.upload.maximum_data_size=237568 + +# Build +pca10056.build.mcu=cortex-m4 +pca10056.build.f_cpu=64000000 +pca10056.build.board=NRF52840_PCA10056 +pca10056.build.core=nRF5 +pca10056.build.variant=pca10056 +pca10056.build.usb_manufacturer="Nordic" +pca10056.build.usb_product="nRF52840 DK" +pca10056.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +pca10056.build.ldscript=nrf52840_s140_v6.ld +pca10056.build.vid=0x239A +pca10056.build.pid=0x8029 + +# SoftDevice Menu +pca10056.menu.softdevice.s140v6=S140 6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_name=s140 +pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +pca10056.menu.debug.l0=Level 0 (Release) +pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +pca10056.menu.debug.l1=Level 1 (Error Message) +pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +pca10056.menu.debug.l2=Level 2 (Full Debug) +pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +pca10056.menu.debug.l3=Level 3 (Segger SystemView) +pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +pca10056.menu.debug_output.serial=Serial +pca10056.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +pca10056.menu.debug_output.serial1=Serial1 +pca10056.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +pca10056.menu.debug_output.rtt=Segger RTT +pca10056.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Particle Xenon +# ----------------------------------- +particle_xenon.name=Particle Xenon + +# VID/PID for Bootloader, Arduino & CircuitPython +particle_xenon.vid.0=0x239A +particle_xenon.pid.0=0x8029 +particle_xenon.vid.1=0x239A +particle_xenon.pid.1=0x0029 + +# Upload +particle_xenon.bootloader.tool=bootburn +particle_xenon.upload.tool=nrfutil +particle_xenon.upload.protocol=nrfutil +particle_xenon.upload.use_1200bps_touch=true +particle_xenon.upload.wait_for_upload_port=true +particle_xenon.upload.maximum_size=815104 +particle_xenon.upload.maximum_data_size=237568 + +# Build +particle_xenon.build.mcu=cortex-m4 +particle_xenon.build.f_cpu=64000000 +particle_xenon.build.board=PARTICLE_XENON +particle_xenon.build.core=nRF5 +particle_xenon.build.variant=particle_xenon +particle_xenon.build.usb_manufacturer="Particle" +particle_xenon.build.usb_product="Xenon" +particle_xenon.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +particle_xenon.build.ldscript=nrf52840_s140_v6.ld +particle_xenon.build.vid=0x239A +particle_xenon.build.pid=0x8029 + +# SoftDevice Menu +particle_xenon.menu.softdevice.s140v6=S140 6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_name=s140 +particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +particle_xenon.menu.debug.l0=Level 0 (Release) +particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +particle_xenon.menu.debug.l1=Level 1 (Error Message) +particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +particle_xenon.menu.debug.l2=Level 2 (Full Debug) +particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +particle_xenon.menu.debug.l3=Level 3 (Segger SystemView) +particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +particle_xenon.menu.debug_output.serial=Serial +particle_xenon.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +particle_xenon.menu.debug_output.serial1=Serial1 +particle_xenon.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +particle_xenon.menu.debug_output.rtt=Segger RTT +particle_xenon.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + + +# ---------------------------------- +# NINA B302 +# ---------------------------------- +ninab302.name=NINA B302 ublox + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +ninab302.vid.0=0x239A +ninab302.pid.0=0x8029 +ninab302.vid.1=0x239A +ninab302.pid.1=0x0029 +ninab302.vid.2=0x7239A +ninab302.pid.2=0x002A +ninab302.vid.3=0x239A +ninab302.pid.3=0x802A + +# Upload +ninab302.bootloader.tool=bootburn +ninab302.upload.tool=nrfutil +ninab302.upload.protocol=nrfutil +ninab302.upload.use_1200bps_touch=true +ninab302.upload.wait_for_upload_port=true +ninab302.upload.maximum_size=815104 +ninab302.upload.maximum_data_size=237568 + +# Build +ninab302.build.mcu=cortex-m4 +ninab302.build.f_cpu=64000000 +ninab302.build.board=NINA_B302_ublox +ninab302.build.core=nRF5 +ninab302.build.variant=NINA_B302_ublox +ninab302.build.usb_manufacturer="Nordic" +ninab302.build.usb_product="NINA B302 ublox" +ninab302.build.extra_flags=-DNRF52840_XXAA -DNINA_B302_ublox {build.flags.usb} +ninab302.build.ldscript=nrf52840_s140_v6.ld +ninab302.build.vid=0x239A +ninab302.build.pid=0x8029 + +# SofDevice Menu +ninab302.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_name=s140 +ninab302.menu.softdevice.s140v6.build.sd_version=6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +ninab302.menu.debug.l0=Level 0 (Release) +ninab302.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab302.menu.debug.l1=Level 1 (Error Message) +ninab302.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab302.menu.debug.l2=Level 2 (Full Debug) +ninab302.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab302.menu.debug.l3=Level 3 (Segger SystemView) +ninab302.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab302.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B112 +# ---------------------------------- +ninab112.name=NINA B112 ublox +ninab112.bootloader.tool=bootburn + +# Upload +ninab112.upload.tool=nrfutil +ninab112.upload.protocol=nrfutil +ninab112.upload.use_1200bps_touch=false +ninab112.upload.wait_for_upload_port=false +ninab112.upload.native_usb=false +ninab112.upload.maximum_size=290816 +ninab112.upload.maximum_data_size=52224 + +# Build +ninab112.build.mcu=cortex-m4 +ninab112.build.f_cpu=64000000 +ninab112.build.board=NINA_B112_ublox +ninab112.build.core=nRF5 +ninab112.build.variant=NINA_B112_ublox +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52832" +ninab112.build.extra_flags=-DNRF52832_XXAA -DNINA_B112_ublox -DNRF52 +ninab112.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +ninab112.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_name=s132 +ninab112.menu.softdevice.s132v6.build.sd_version=6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +ninab112.menu.debug.l0=Level 0 (Release) +ninab112.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab112.menu.debug.l1=Level 1 (Error Message) +ninab112.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab112.menu.debug.l2=Level 2 (Full Debug) +ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab112.menu.debug.l3=Level 3 (Segger SystemView) +ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +################################################################## +## KH Add SparkFun Pro nRF52840 Mini +################################################################## +#********************************************** +# SparkFun Pro nRF52840 Mini +#********************************************** +sparkfunnrf52840mini.name=SparkFun Pro nRF52840 Mini + +# DFU Mode with CDC only +sparkfunnrf52840mini.vid.0=0x1B4F +sparkfunnrf52840mini.pid.0=0x002A + +# DFU Mode with CDC + MSC (UF2) +sparkfunnrf52840mini.vid.1=0x1B4F +sparkfunnrf52840mini.pid.1=0x0029 + +# Application with CDC + MSC +sparkfunnrf52840mini.vid.2=0x1B4F +sparkfunnrf52840mini.pid.2=0x8029 + +# CircuitPython +sparkfunnrf52840mini.vid.2=0x1B4F +sparkfunnrf52840mini.pid.2=0x802A + +sparkfunnrf52840mini.bootloader.tool=bootburn + +# Upload +sparkfunnrf52840mini.upload.tool=nrfutil +sparkfunnrf52840mini.upload.protocol=nrfutil +sparkfunnrf52840mini.upload.use_1200bps_touch=true +sparkfunnrf52840mini.upload.wait_for_upload_port=true +#sparkfunnrf52840mini.upload.native_usb=true + +# Build +sparkfunnrf52840mini.build.mcu=cortex-m4 +sparkfunnrf52840mini.build.f_cpu=64000000 +sparkfunnrf52840mini.build.board=NRF52840_FEATHER +sparkfunnrf52840mini.build.core=nRF5 +sparkfunnrf52840mini.build.variant=sparkfun_nrf52840_mini +sparkfunnrf52840mini.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +sparkfunnrf52840mini.build.vid=0x1B4F +sparkfunnrf52840mini.build.pid=0x5284 +sparkfunnrf52840mini.build.usb_manufacturer="SparkFun" +sparkfunnrf52840mini.build.usb_product="nRF52840 Mini Breakout" + +# SofDevice Menu +# Ram & ROM size varies depending on SoftDevice (check linker script) + +sparkfunnrf52840mini.menu.softdevice.s140v6=s140 6.1.1 r0 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_flags=-DS140 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_name=s140 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_version=6.1.1 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_fwid=0x00B6 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.ldscript=nrf52840_s140_v6.ld +sparkfunnrf52840mini.menu.softdevice.s140v6.upload.maximum_size=815104 +sparkfunnrf52840mini.menu.softdevice.s140v6.upload.maximum_data_size=248832 + +# Debug Menu +sparkfunnrf52840mini.menu.debug.l0=Level 0 (Release) +sparkfunnrf52840mini.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 -Os +sparkfunnrf52840mini.menu.debug.l1=Level 1 (Error Message) +sparkfunnrf52840mini.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 -Os +sparkfunnrf52840mini.menu.debug.l2=Level 2 (Full Debug) +sparkfunnrf52840mini.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 -Os +sparkfunnrf52840mini.menu.debug.l3=Level 3 (Segger SystemView) +sparkfunnrf52840mini.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 -Os + +################################################################## diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/cores/nRF5/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/cores/nRF5/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/cores/nRF5/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/cores/nRF5/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/cores/nRF5/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/cores/nRF5/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/cores/nRF5/Udp.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/cores/nRF5/Udp.h new file mode 100644 index 0000000..cc814d3 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/cores/nRF5/Udp.h @@ -0,0 +1,92 @@ +/* + * Udp.cpp: Library to send/receive UDP packets. + * + * NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these) + * 1) UDP does not guarantee the order in which assembled UDP packets are received. This + * might not happen often in practice, but in larger network topologies, a UDP + * packet can be received out of sequence. + * 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being + * aware of it. Again, this may not be a concern in practice on small local networks. + * For more information, see http://www.cafeaulait.org/course/week12/35.html + * + * MIT License: + * Copyright (c) 2008 Bjoern Hartmann + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * bjoern@cs.stanford.edu 12/30/2008 + */ + +#ifndef udp_h +#define udp_h + +#include +#include + +class UDP : public Stream { + +public: + virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + + // KH, add virtual function to support Multicast, necessary for many services (MDNS, UPnP, etc.) + virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure + + virtual void stop() =0; // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port) =0; + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char *host, uint16_t port) =0; + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket() =0; + // Write a single byte into the packet + virtual size_t write(uint8_t) =0; + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t *buffer, size_t size) =0; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket() =0; + // Number of bytes remaining in the current packet + virtual int available() =0; + // Read a single byte from the current packet + virtual int read() =0; + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len) =0; + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) =0; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek() =0; + virtual void flush() =0; // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP() =0; + // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort() =0; +protected: + uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; +}; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/platform.txt new file mode 100644 index 0000000..8bc132d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/platform.txt @@ -0,0 +1,166 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All rights reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +name=Adafruit nRF52 Boards +version=1.2.0 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith + +# Allow changing optimization settings via platform.local.txt / boards.local.txt +compiler.optimization_flag=-Ofast + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD + +# KH, Error here to use gcc, must use g++ +#compiler.c.elf.cmd=arm-none-eabi-gcc +compiler.c.elf.cmd=arm-none-eabi-g++ + +compiler.c.elf.flags={compiler.optimization_flag} -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-mcpu={build.mcu} -mthumb -mabi=aapcs {compiler.optimization_flag} -g -c {build.float_flags} -x assembler-with-cpp + +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2bin.flags=-O binary +compiler.elf2bin.cmd=arm-none-eabi-objcopy +compiler.elf2hex.flags=-O ihex +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--wrap=malloc -Wl,--wrap=free --specs=nano.specs --specs=nosys.specs +compiler.size.cmd=arm-none-eabi-size + +# this can be overriden in boards.txt +# Logger 0: Serial (CDC), 1 Serial1 (UART), 2 Segger RTT +build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float +build.debug_flags=-DCFG_DEBUG=0 +build.logger_flags=-DCFG_LOGGER=0 +build.sysview_flags=-DCFG_SYSVIEW=0 + +# USB flags +build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.libraries.ldflags= +compiler.elf2bin.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Include/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Lib/GCC/" -larm_cortexM4lf_math + +# common compiler for nrf +rtos.path={build.core.path}/freertos +nordic.path={build.core.path}/nordic + +build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 {compiler.optimization_flag} {build.debug_flags} {build.logger_flags} {build.sysview_flags} {compiler.arm.cmsis.c.flags} "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include/nrf52" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add '-DBOARD_NAME="{build.board}"' +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} '-DBOARD_NAME="{build.board}"' -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add '-DBOARD_NAME="{build.board}"' +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} '-DBOARD_NAME="{build.board}"' -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add '-DBOARD_NAME="{build.board}"' +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} '-DBOARD_NAME="{build.board}"' -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Create archives +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.core.path}/linker" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" {compiler.libraries.ldflags} -Wl,--end-group + +## Create output (bin file) +#recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +## Create dfu package zip file +recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip" + +## Create uf2 file +#recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2conv.py" -f 0xADA52840 -c -o "{build.path}/{build.project_name}.uf2" "{build.path}/{build.project_name}.hex" + +## Save bin +recipe.output.tmp_file_bin={build.project_name}.bin +recipe.output.save_file_bin={build.project_name}.save.bin + +## Save hex +recipe.output.tmp_file_hex={build.project_name}.hex +recipe.output.save_file_hexu={build.project_name}.save.hex + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +## Export Compiled Binary +recipe.output.tmp_file={build.project_name}.hex +recipe.output.save_file={build.project_name}.{build.variant}.hex + +#*************************************************** +# adafruit-nrfutil for uploading +# https://github.com/adafruit/Adafruit_nRF52_nrfutil +# pre-built binaries are provided for macos and windows +#*************************************************** +tools.nrfutil.cmd=adafruit-nrfutil +tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe +tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/macos/adafruit-nrfutil + +tools.nrfutil.upload.params.verbose=--verbose +tools.nrfutil.upload.params.quiet= +tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200 --singlebank + +#*************************************************** +# Burning bootloader with either jlink or nrfutil +#*************************************************** + +# Bootloader version +tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.6.2_{build.sd_name}_{build.sd_version} + +tools.bootburn.bootloader.params.verbose= +tools.bootburn.bootloader.params.quiet= +tools.bootburn.bootloader.pattern={program.burn_pattern} + +# erase flash page while programming +tools.bootburn.erase.params.verbose= +tools.bootburn.erase.params.quiet= +tools.bootburn.erase.pattern= + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B112_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B112_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B112_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B112_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B112_ublox/variant.cpp new file mode 100644 index 0000000..f43f3a4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B112_ublox/variant.cpp @@ -0,0 +1,59 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" + +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +const uint32_t g_ADigitalPinMap[] = { + // D0 .. D13 + 5, // D0 is P0.05 (UART RX) + 6, // D1 is P0.06 (UART TX) + 7, // D2 is P0.07 + 31, // D3 is P0.31 + 18, // D4 is P0.18 (LED Blue) + 99, // D5 (NC) + 9, // D6 is P0.09 NFC1 + 10, // D7 is P0.10 (Button) NFC2 + 99, // D8 (NC) + 8, // D9 is P0.08 + 11, // D10 is P0.11 CS + 13, // D11 is P0.13 MOSI + 12, // D12 is P0.12 MISO + 14, // D13 is P0.14 SCK + //I2C + 2, // D14 is P0.2 (SDA) + 3, // D15 is P0.3 (SCL) + // D16 .. D21 (aka A0 .. A5) + 3, // D16 is P0.03 (A0) + 2, // D17 is P0.02 (A1) + 4, // D18 is P0.04 (A2) + 30, // D19 is P0.30 (A3) SW2 + 29, // D20 is P0.29 (A4) + 28, // D21 is P0.28 (A5) + 9, // P0.09 NFC + 10, // P0.10 NFC + 16, // SW1 (LED Green) +}; \ No newline at end of file diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B112_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B112_ublox/variant.h new file mode 100644 index 0000000..833cbf6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B112_ublox/variant.h @@ -0,0 +1,172 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +#ifndef _VARIANT_NINA_B112_UBLOX_ +#define _VARIANT_NINA_B112_UBLOX_ + +#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \ + .rc_ctiv = 0, \ +.rc_temp_ctiv = 0, \ +.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM} + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (32u) +#define NUM_DIGITAL_PINS (32u) +#define NUM_ANALOG_INPUTS (6u) +#define NUM_ANALOG_OUTPUTS (0u) + +// LEDs +#define PIN_LED LED1 +#define LED_BUILTIN PIN_LED + +//LEDs onboard +#define LED1 (0) // Red +#define LED2 (24) // Green/SW1 +#define LED3 (4) // Blue + +#define LED_STATE_ON 1 // State when LED is litted + +//Switch +#define SW1 (24) +#define SW2 (19) + +// NFC +#define PIN_NFC_1 (6) // P0.9 +#define PIN_NFC_2 (7) // P0.10 + +/* + * Analog pins + */ +#define PIN_A0 (16) // P0.03 +#define PIN_A1 (17) // P0.02 +#define PIN_A2 (18) // P0.04 +#define PIN_A3 (19) // P0.30 +#define PIN_A4 (20) // P0.29 +#define PIN_A5 (21) // P0.28 + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_D0 (0) // P0.05 +#define PIN_D1 (1) // P0.06 +#define PIN_D2 (2) // P0.07 +#define PIN_D3 (4) // P0.31 +#define PIN_D4 (5) // P0.18 +#define PIN_D6 (6) // P0.09 +#define PIN_D7 (7) // P0.10 +#define PIN_D9 (9) // P0.08 +#define PIN_D10 (11) // P0.11 +#define PIN_D11 (13) // P0.13 +#define PIN_D12 (12) // P0.12 +#define PIN_D13 (14) // P0.14 +#define PIN_D14 (2) // P0.02 +#define PIN_D15 (3) // P0.03 + +static const uint8_t D0 = PIN_D0 ; +static const uint8_t D1 = PIN_D1 ; +static const uint8_t D2 = PIN_D2 ; +static const uint8_t D3 = PIN_D3 ; +static const uint8_t D4 = PIN_D4 ; +static const uint8_t D6 = PIN_D6 ; +static const uint8_t D7 = PIN_D7 ; +static const uint8_t D9 = PIN_D9 ; +static const uint8_t D10 = PIN_D10 ; +static const uint8_t D11 = PIN_D11 ; +static const uint8_t D12 = PIN_D12 ; +static const uint8_t D13 = PIN_D13 ; +static const uint8_t D14 = PIN_D14 ; +static const uint8_t D15 = PIN_D15 ; + +// Other pins +//static const uint8_t AREF = PIN_AREF; + +//#define PIN_AREF (24) +//#define PIN_VBAT PIN_A7 + +/* + * Serial interfaces + */ +#define PIN_SERIAL_RX (0) // P0.05 +#define PIN_SERIAL_TX (1) // P0.06 +#define PIN_SERIAL_CTS (2) // P0.07 +#define PIN_SERIAL_RTS (3) // P0.31 +#define PIN_SERIAL_DTR (28) // P0.28 +#define PIN_SERIAL_DSR (29) // P0.29 + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (12) // P0.12 +#define PIN_SPI_MOSI (11) // P0.13 +#define PIN_SPI_SCK (13) // P0.14 + +static const uint8_t SS = 10 ; // P0.11 +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (14) // P0.02 +#define PIN_WIRE_SCL (15) // P0.03 + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + + +#endif //_VARIANT_NINA_B112_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B302_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B302_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B302_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B302_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B302_ublox/variant.cpp new file mode 100644 index 0000000..8b4df2e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B302_ublox/variant.cpp @@ -0,0 +1,87 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#include "variant.h" +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +const uint32_t g_ADigitalPinMap[] = +{ + // D0 .. D13 + 29, // D0 is P0.29 (UART RX) + 45, // D1 is P1.13 (UART TX) + 44, // D2 is P1.12 (NFC2) + 31, // D3 is P0.31 (LED1) + 13, // D4 is P0.13 (LED2) + 11, // D5 is P0.11 + 9, // D6 is P0.09 + 10, // D7 is P0.10 (Button) + 41, // D8 is P1.09 + 12, // D9 is P0.12 + 14, // D10 is P0.14 + 15, // D11 is P0.15 + 32, // D12 is P1.00 + 7, // D13 is P0.07 + + // D14 .. D21 (aka A0 .. A5) + 4, // D14 is P0.04 (A0) + 30, // D15 is P0.30 (A1) + 5, // D16 is P0.05 (A2) + 2, // D17 is P0.02 (A3) + 28, // D18 is P0.28 (A4) + 3, // D19 is P0.03 (A5) + + // D20 .. D21 (aka I2C pins) + 16, // D20 is P0.16 (SDA) + 24, // D21 is P0.24 (SCL) + + // QSPI pins (not exposed via any header / test point) + 19, // D22 is P0.19 (QSPI CLK) + 17, // D23 is P0.17 (QSPI CS) + 20, // D24 is P0.20 (QSPI Data 0) + 21, // D25 is P0.21 (QSPI Data 1) + 22, // D26 is P0.22 (QSPI Data 2) + 26, // D27 is P0.23 (QSPI Data 3) + + 40, // D28 is P1.08 - IO34 + 41, // D29 is P1.01 - IO35 + 44, // D30 is P1.02 - IO36 + 45, // D31 is P1.03 - IO37 + 42, // D32 is P1.10 - IO38 + 43, // D33 is P1.11 - IO39 + 47, // D34 is P1.15 - IO40 + 46, // D35 is P1.14 - IO41 + 26, // D36 is P0.26 - IO42 + 6, // D37 is P0.6 - IO43 + 27, // D38 is P0.27 - IO44 +}; + +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B302_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B302_ublox/variant.h new file mode 100644 index 0000000..a69575f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B302_ublox/variant.h @@ -0,0 +1,149 @@ + /* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#ifndef _VARIANT_NINA_B302_UBLOX_ +#define _VARIANT_NINA_B302_UBLOX_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus +// Number of pins defined in PinDescription array +#define PINS_COUNT (40) +#define NUM_DIGITAL_PINS (34) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (3) +#define PIN_LED2 (4) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_RED PIN_LED1 +#define LED_BLUE PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +/* + * Buttons + */ +#define PIN_BUTTON1 (7) + +/* + * Analog pins + */ +#define PIN_A0 (14) +#define PIN_A1 (15) +#define PIN_A2 (16) +#define PIN_A3 (17) +#define PIN_A4 (18) +#define PIN_A5 (19) + +#define D0 (0) +#define D1 (1) +#define D2 (2) +#define D3 (3) +#define D4 (4) +#define D5 (5) +#define D6 (6) +#define D7 (7) +#define D8 (8) +#define D9 (9) +#define D10 (10) +#define D11 (11) +#define D12 (12) +#define D13 (13) + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_NFC1 (31) +#define PIN_NFC2 (2) + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0) +#define PIN_SERIAL1_TX (1) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (22) //24 original +#define PIN_SPI_MOSI (23) //25 original +#define PIN_SPI_SCK (24) //26 original + +static const uint8_t SS = (13); +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (20) +#define PIN_WIRE_SCL (21) + +// QSPI Pins +#define PIN_QSPI_SCK 22 +#define PIN_QSPI_CS 23 +#define PIN_QSPI_IO0 24 +#define PIN_QSPI_IO1 25 +#define PIN_QSPI_IO2 26 +#define PIN_QSPI_IO3 27 + +// On-board QSPI Flash +#define EXTERNAL_FLASH_DEVICES GD25Q16C +#define EXTERNAL_FLASH_USE_QSPI + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif //_VARIANT_NINA_B302_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/sparkfun_nrf52840_mini/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/sparkfun_nrf52840_mini/variant.cpp new file mode 100644 index 0000000..b01c147 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/sparkfun_nrf52840_mini/variant.cpp @@ -0,0 +1,49 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +const uint32_t g_ADigitalPinMap[] = +{ + // P0 + 0 , 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, + + // P1 + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63 +}; +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/sparkfun_nrf52840_mini/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/sparkfun_nrf52840_mini/variant.h new file mode 100644 index 0000000..c534ceb --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/sparkfun_nrf52840_mini/variant.h @@ -0,0 +1,152 @@ + /* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_SPARKFUN52840MINI_ +#define _VARIANT_SPARKFUN52840MINI_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (64) +#define NUM_DIGITAL_PINS (64) +#define NUM_ANALOG_INPUTS (8) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (7) +#define PIN_LED2 (14) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_BLUE PIN_LED1 +#define LED_RED PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +// Buttons +/* +#define PIN_BUTTON1 (2) +#define PIN_BUTTON2 (3) +#define PIN_BUTTON3 (4) +#define PIN_BUTTON4 (5) +*/ + +/* + * Analog pins + */ +#define PIN_A0 (2) +#define PIN_A1 (3) +#define PIN_A2 (4) +#define PIN_A3 (5) +#define PIN_A4 (28) +#define PIN_A5 (29) +#define PIN_A6 (30) +#define PIN_A7 (31) + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; +static const uint8_t A6 = PIN_A6 ; +static const uint8_t A7 = PIN_A7 ; +#define ADC_RESOLUTION 14 + +// Other pins +#define PIN_AREF (2) +#define PIN_DFU (13) +#define PIN_NFC1 (9) +#define PIN_NFC2 (10) + +static const uint8_t AREF = PIN_AREF; + +/* + * Serial interfaces + */ +// Serial +//Previous Hardware UART definition for nRF52 Arduino Core, below 0.16.0 +//Feel free to comment out these two lines below if there are conflicts with latest release +#define PIN_SERIAL_RX (15) +#define PIN_SERIAL_TX (17) + +//Hardware UART definition for nRF52 Arduino Core, 0.17.0 and above +#define PIN_SERIAL1_RX (15) +#define PIN_SERIAL1_TX (17) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (31) +#define PIN_SPI_MOSI (3) +#define PIN_SPI_SCK (30) + +static const uint8_t SS = 2 ; +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (8) +#define PIN_WIRE_SCL (11) + +/* + * QSPI interface for external flash + */ +#define PIN_QSPI_SCK 32 +#define PIN_QSPI_CS 33 +#define PIN_QSPI_DATA0 34 +#define PIN_QSPI_DATA1 35 +#define PIN_QSPI_DATA2 36 +#define PIN_QSPI_DATA3 37 + +// On-board QSPI Flash +// If EXTERNAL_FLASH_DEVICES is not defined, all supported devices will be used +#define EXTERNAL_FLASH_DEVICES GD25Q16C + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif \ No newline at end of file diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/boards.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/boards.txt new file mode 100644 index 0000000..541eb10 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/boards.txt @@ -0,0 +1,834 @@ +menu.softdevice=SoftDevice +menu.debug=Debug +menu.debug_output=Debug Output + +# ----------------------------------- +# Adafruit Feather nRF52832 +# ----------------------------------- +feather52832.name=Adafruit Feather nRF52832 + +# VID/PID for Bootloader, Arduino & CircuitPython + +# Upload +feather52832.bootloader.tool=bootburn +feather52832.upload.tool=nrfutil +feather52832.upload.protocol=nrfutil +feather52832.upload.use_1200bps_touch=false +feather52832.upload.wait_for_upload_port=false +feather52832.upload.native_usb=false +feather52832.upload.maximum_size=290816 +feather52832.upload.maximum_data_size=52224 + +# Build +feather52832.build.mcu=cortex-m4 +feather52832.build.f_cpu=64000000 +feather52832.build.board=NRF52832_FEATHER +feather52832.build.core=nRF5 +feather52832.build.variant=feather_nrf52832 +feather52832.build.usb_manufacturer="Adafruit" +feather52832.build.usb_product="Feather nRF52832" +feather52832.build.extra_flags=-DNRF52832_XXAA -DNRF52 +feather52832.build.ldscript=nrf52832_s132_v6.ld + +# SoftDevice Menu +feather52832.menu.softdevice.s132v6=S132 6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_name=s132 +feather52832.menu.softdevice.s132v6.build.sd_version=6.1.1 +feather52832.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +feather52832.menu.debug.l0=Level 0 (Release) +feather52832.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52832.menu.debug.l1=Level 1 (Error Message) +feather52832.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52832.menu.debug.l2=Level 2 (Full Debug) +feather52832.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52832.menu.debug.l3=Level 3 (Segger SystemView) +feather52832.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52832.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +feather52832.menu.debug_output.serial=Serial +feather52832.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +feather52832.menu.debug_output.serial1=Serial1 +feather52832.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +feather52832.menu.debug_output.rtt=Segger RTT +feather52832.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Adafruit Feather nRF52840 Express +# ----------------------------------- +feather52840.name=Adafruit Feather nRF52840 Express + +# VID/PID for Bootloader, Arduino & CircuitPython +feather52840.vid.0=0x239A +feather52840.pid.0=0x8029 +feather52840.vid.1=0x239A +feather52840.pid.1=0x0029 +feather52840.vid.2=0x239A +feather52840.pid.2=0x002A +feather52840.vid.3=0x239A +feather52840.pid.3=0x802A + +# Upload +feather52840.bootloader.tool=bootburn +feather52840.upload.tool=nrfutil +feather52840.upload.protocol=nrfutil +feather52840.upload.use_1200bps_touch=true +feather52840.upload.wait_for_upload_port=true +feather52840.upload.maximum_size=815104 +feather52840.upload.maximum_data_size=237568 + +# Build +feather52840.build.mcu=cortex-m4 +feather52840.build.f_cpu=64000000 +feather52840.build.board=NRF52840_FEATHER +feather52840.build.core=nRF5 +feather52840.build.variant=feather_nrf52840_express +feather52840.build.usb_manufacturer="Adafruit" +feather52840.build.usb_product="Feather nRF52840 Express" +feather52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840.build.ldscript=nrf52840_s140_v6.ld +feather52840.build.vid=0x239A +feather52840.build.pid=0x8029 + +# SoftDevice Menu +feather52840.menu.softdevice.s140v6=S140 6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_name=s140 +feather52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840.menu.debug.l0=Level 0 (Release) +feather52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840.menu.debug.l1=Level 1 (Error Message) +feather52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840.menu.debug.l2=Level 2 (Full Debug) +feather52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840.menu.debug.l3=Level 3 (Segger SystemView) +feather52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +feather52840.menu.debug_output.serial=Serial +feather52840.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +feather52840.menu.debug_output.serial1=Serial1 +feather52840.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +feather52840.menu.debug_output.rtt=Segger RTT +feather52840.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Adafruit Feather nRF52840 Sense +# ----------------------------------- +feather52840sense.name=Adafruit Feather nRF52840 Sense + +# VID/PID for Bootloader, Arduino & CircuitPython +feather52840sense.vid.0=0x239A +feather52840sense.pid.0=0x8087 +feather52840sense.vid.1=0x239A +feather52840sense.pid.1=0x0087 +feather52840sense.vid.2=0x239A +feather52840sense.pid.2=0x0088 +feather52840sense.vid.3=0x239A +feather52840sense.pid.3=0x8088 + +# Upload +feather52840sense.bootloader.tool=bootburn +feather52840sense.upload.tool=nrfutil +feather52840sense.upload.protocol=nrfutil +feather52840sense.upload.use_1200bps_touch=true +feather52840sense.upload.wait_for_upload_port=true +feather52840sense.upload.maximum_size=815104 +feather52840sense.upload.maximum_data_size=237568 + +# Build +feather52840sense.build.mcu=cortex-m4 +feather52840sense.build.f_cpu=64000000 +feather52840sense.build.board=NRF52840_FEATHER_SENSE +feather52840sense.build.core=nRF5 +feather52840sense.build.variant=feather_nrf52840_sense +feather52840sense.build.usb_manufacturer="Adafruit" +feather52840sense.build.usb_product="Feather nRF52840 Sense" +feather52840sense.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +feather52840sense.build.ldscript=nrf52840_s140_v6.ld +feather52840sense.build.vid=0x239A +feather52840sense.build.pid=0x8087 + +# SoftDevice Menu +feather52840sense.menu.softdevice.s140v6=S140 6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_name=s140 +feather52840sense.menu.softdevice.s140v6.build.sd_version=6.1.1 +feather52840sense.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +feather52840sense.menu.debug.l0=Level 0 (Release) +feather52840sense.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +feather52840sense.menu.debug.l1=Level 1 (Error Message) +feather52840sense.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +feather52840sense.menu.debug.l2=Level 2 (Full Debug) +feather52840sense.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +feather52840sense.menu.debug.l3=Level 3 (Segger SystemView) +feather52840sense.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +feather52840sense.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +feather52840sense.menu.debug_output.serial=Serial +feather52840sense.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +feather52840sense.menu.debug_output.serial1=Serial1 +feather52840sense.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +feather52840sense.menu.debug_output.rtt=Segger RTT +feather52840sense.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Adafruit ItsyBitsy nRF52840 Express +# ----------------------------------- +itsybitsy52840.name=Adafruit ItsyBitsy nRF52840 Express + +# VID/PID for Bootloader, Arduino & CircuitPython +itsybitsy52840.vid.0=0x239A +itsybitsy52840.pid.0=0x8051 +itsybitsy52840.vid.1=0x239A +itsybitsy52840.pid.1=0x0051 +itsybitsy52840.vid.2=0x239A +itsybitsy52840.pid.2=0x0052 +itsybitsy52840.vid.3=0x239A +itsybitsy52840.pid.3=0x8052 + +# Upload +itsybitsy52840.bootloader.tool=bootburn +itsybitsy52840.upload.tool=nrfutil +itsybitsy52840.upload.protocol=nrfutil +itsybitsy52840.upload.use_1200bps_touch=true +itsybitsy52840.upload.wait_for_upload_port=true +itsybitsy52840.upload.maximum_size=815104 +itsybitsy52840.upload.maximum_data_size=237568 + +# Build +itsybitsy52840.build.mcu=cortex-m4 +itsybitsy52840.build.f_cpu=64000000 +itsybitsy52840.build.board=NRF52840_ITSYBITSY +itsybitsy52840.build.core=nRF5 +itsybitsy52840.build.variant=itsybitsy_nrf52840_express +itsybitsy52840.build.usb_manufacturer="Adafruit" +itsybitsy52840.build.usb_product="ItsyBitsy nRF52840 Express" +itsybitsy52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +itsybitsy52840.build.ldscript=nrf52840_s140_v6.ld +itsybitsy52840.build.vid=0x239A +itsybitsy52840.build.pid=0x8051 + +# SoftDevice Menu +itsybitsy52840.menu.softdevice.s140v6=S140 6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_name=s140 +itsybitsy52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +itsybitsy52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +itsybitsy52840.menu.debug.l0=Level 0 (Release) +itsybitsy52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +itsybitsy52840.menu.debug.l1=Level 1 (Error Message) +itsybitsy52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +itsybitsy52840.menu.debug.l2=Level 2 (Full Debug) +itsybitsy52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +itsybitsy52840.menu.debug.l3=Level 3 (Segger SystemView) +itsybitsy52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +itsybitsy52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +itsybitsy52840.menu.debug_output.serial=Serial +itsybitsy52840.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +itsybitsy52840.menu.debug_output.serial1=Serial1 +itsybitsy52840.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +itsybitsy52840.menu.debug_output.rtt=Segger RTT +itsybitsy52840.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Adafruit Circuit Playground Bluefruit +# ----------------------------------- +cplaynrf52840.name=Adafruit Circuit Playground Bluefruit + +# VID/PID for Bootloader, Arduino & CircuitPython +cplaynrf52840.vid.0=0x239A +cplaynrf52840.pid.0=0x8045 +cplaynrf52840.vid.1=0x239A +cplaynrf52840.pid.1=0x0045 +cplaynrf52840.vid.2=0x239A +cplaynrf52840.pid.2=0x8046 + +# Upload +cplaynrf52840.bootloader.tool=bootburn +cplaynrf52840.upload.tool=nrfutil +cplaynrf52840.upload.protocol=nrfutil +cplaynrf52840.upload.use_1200bps_touch=true +cplaynrf52840.upload.wait_for_upload_port=true +cplaynrf52840.upload.maximum_size=815104 +cplaynrf52840.upload.maximum_data_size=237568 + +# Build +cplaynrf52840.build.mcu=cortex-m4 +cplaynrf52840.build.f_cpu=64000000 +cplaynrf52840.build.board=NRF52840_CIRCUITPLAY +cplaynrf52840.build.core=nRF5 +cplaynrf52840.build.variant=circuitplayground_nrf52840 +cplaynrf52840.build.usb_manufacturer="Adafruit" +cplaynrf52840.build.usb_product="Circuit Playground Bluefruit" +cplaynrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld +cplaynrf52840.build.vid=0x239A +cplaynrf52840.build.pid=0x8045 + +# SoftDevice Menu +cplaynrf52840.menu.softdevice.s140v6=S140 6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cplaynrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cplaynrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cplaynrf52840.menu.debug.l0=Level 0 (Release) +cplaynrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cplaynrf52840.menu.debug.l1=Level 1 (Error Message) +cplaynrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cplaynrf52840.menu.debug.l2=Level 2 (Full Debug) +cplaynrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cplaynrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cplaynrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cplaynrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +cplaynrf52840.menu.debug_output.serial=Serial +cplaynrf52840.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +cplaynrf52840.menu.debug_output.serial1=Serial1 +cplaynrf52840.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +cplaynrf52840.menu.debug_output.rtt=Segger RTT +cplaynrf52840.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Adafruit CLUE +# ----------------------------------- +cluenrf52840.name=Adafruit CLUE + +# VID/PID for Bootloader, Arduino & CircuitPython +cluenrf52840.vid.0=0x239A +cluenrf52840.pid.0=0x8071 +cluenrf52840.vid.1=0x239A +cluenrf52840.pid.1=0x0071 +cluenrf52840.vid.2=0x239A +cluenrf52840.pid.2=0x8072 + +# Upload +cluenrf52840.bootloader.tool=bootburn +cluenrf52840.upload.tool=nrfutil +cluenrf52840.upload.protocol=nrfutil +cluenrf52840.upload.use_1200bps_touch=true +cluenrf52840.upload.wait_for_upload_port=true +cluenrf52840.upload.maximum_size=815104 +cluenrf52840.upload.maximum_data_size=237568 + +# Build +cluenrf52840.build.mcu=cortex-m4 +cluenrf52840.build.f_cpu=64000000 +cluenrf52840.build.board=NRF52840_CLUE +cluenrf52840.build.core=nRF5 +cluenrf52840.build.variant=clue_nrf52840 +cluenrf52840.build.usb_manufacturer="Adafruit" +cluenrf52840.build.usb_product="CLUE" +cluenrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +cluenrf52840.build.ldscript=nrf52840_s140_v6.ld +cluenrf52840.build.vid=0x239A +cluenrf52840.build.pid=0x8071 + +# SoftDevice Menu +cluenrf52840.menu.softdevice.s140v6=S140 6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_name=s140 +cluenrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +cluenrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +cluenrf52840.menu.debug.l0=Level 0 (Release) +cluenrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +cluenrf52840.menu.debug.l1=Level 1 (Error Message) +cluenrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +cluenrf52840.menu.debug.l2=Level 2 (Full Debug) +cluenrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +cluenrf52840.menu.debug.l3=Level 3 (Segger SystemView) +cluenrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +cluenrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +cluenrf52840.menu.debug_output.serial=Serial +cluenrf52840.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +cluenrf52840.menu.debug_output.serial1=Serial1 +cluenrf52840.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +cluenrf52840.menu.debug_output.rtt=Segger RTT +cluenrf52840.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Adafruit LED Glasses Driver nRF52840 +# ----------------------------------- +ledglasses_nrf52840.name=Adafruit LED Glasses Driver nRF52840 + +# VID/PID for Bootloader, Arduino & CircuitPython +ledglasses_nrf52840.vid.0=0x239A +ledglasses_nrf52840.pid.0=0x810D +ledglasses_nrf52840.vid.1=0x239A +ledglasses_nrf52840.pid.1=0x010D +ledglasses_nrf52840.vid.2=0x239A +ledglasses_nrf52840.pid.2=0x810E + +# Upload +ledglasses_nrf52840.bootloader.tool=bootburn +ledglasses_nrf52840.upload.tool=nrfutil +ledglasses_nrf52840.upload.protocol=nrfutil +ledglasses_nrf52840.upload.use_1200bps_touch=true +ledglasses_nrf52840.upload.wait_for_upload_port=true +ledglasses_nrf52840.upload.maximum_size=815104 +ledglasses_nrf52840.upload.maximum_data_size=237568 + +# Build +ledglasses_nrf52840.build.mcu=cortex-m4 +ledglasses_nrf52840.build.f_cpu=64000000 +ledglasses_nrf52840.build.board=NRF52840_LED_GLASSES +ledglasses_nrf52840.build.core=nRF5 +ledglasses_nrf52840.build.variant=ledglasses_nrf52840 +ledglasses_nrf52840.build.usb_manufacturer="Adafruit" +ledglasses_nrf52840.build.usb_product="LED Glasses Driver nRF52840" +ledglasses_nrf52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +ledglasses_nrf52840.build.ldscript=nrf52840_s140_v6.ld +ledglasses_nrf52840.build.vid=0x239A +ledglasses_nrf52840.build.pid=0x810D + +# SoftDevice Menu +ledglasses_nrf52840.menu.softdevice.s140v6=S140 6.1.1 +ledglasses_nrf52840.menu.softdevice.s140v6.build.sd_name=s140 +ledglasses_nrf52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +ledglasses_nrf52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +ledglasses_nrf52840.menu.debug.l0=Level 0 (Release) +ledglasses_nrf52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ledglasses_nrf52840.menu.debug.l1=Level 1 (Error Message) +ledglasses_nrf52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ledglasses_nrf52840.menu.debug.l2=Level 2 (Full Debug) +ledglasses_nrf52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ledglasses_nrf52840.menu.debug.l3=Level 3 (Segger SystemView) +ledglasses_nrf52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ledglasses_nrf52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +ledglasses_nrf52840.menu.debug_output.serial=Serial +ledglasses_nrf52840.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +ledglasses_nrf52840.menu.debug_output.serial1=Serial1 +ledglasses_nrf52840.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +ledglasses_nrf52840.menu.debug_output.rtt=Segger RTT +ledglasses_nrf52840.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Raytac nRF52840 Dongle +# ----------------------------------- +mdbt50qrx.name=Raytac nRF52840 Dongle + +# VID/PID for Bootloader, Arduino & CircuitPython +mdbt50qrx.vid.0=0x239A +mdbt50qrx.pid.0=0x810B +mdbt50qrx.vid.1=0x239A +mdbt50qrx.pid.1=0x010B +mdbt50qrx.vid.2=0x239A +mdbt50qrx.pid.2=0x810C + +# Upload +mdbt50qrx.bootloader.tool=bootburn +mdbt50qrx.upload.tool=nrfutil +mdbt50qrx.upload.protocol=nrfutil +mdbt50qrx.upload.use_1200bps_touch=true +mdbt50qrx.upload.wait_for_upload_port=true +mdbt50qrx.upload.maximum_size=815104 +mdbt50qrx.upload.maximum_data_size=237568 + +# Build +mdbt50qrx.build.mcu=cortex-m4 +mdbt50qrx.build.f_cpu=64000000 +mdbt50qrx.build.board=MDBT50Q_RX +mdbt50qrx.build.core=nRF5 +mdbt50qrx.build.variant=raytac_mdbt50q_rx +mdbt50qrx.build.usb_manufacturer="Raytac" +mdbt50qrx.build.usb_product="nRF52840 Dongle" +mdbt50qrx.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +mdbt50qrx.build.ldscript=nrf52840_s140_v6.ld +mdbt50qrx.build.vid=0x239A +mdbt50qrx.build.pid=0x810B + +# SoftDevice Menu +mdbt50qrx.menu.softdevice.s140v6=S140 6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_name=s140 +mdbt50qrx.menu.softdevice.s140v6.build.sd_version=6.1.1 +mdbt50qrx.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +mdbt50qrx.menu.debug.l0=Level 0 (Release) +mdbt50qrx.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +mdbt50qrx.menu.debug.l1=Level 1 (Error Message) +mdbt50qrx.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +mdbt50qrx.menu.debug.l2=Level 2 (Full Debug) +mdbt50qrx.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +mdbt50qrx.menu.debug.l3=Level 3 (Segger SystemView) +mdbt50qrx.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +mdbt50qrx.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +mdbt50qrx.menu.debug_output.serial=Serial +mdbt50qrx.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +mdbt50qrx.menu.debug_output.serial1=Serial1 +mdbt50qrx.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +mdbt50qrx.menu.debug_output.rtt=Segger RTT +mdbt50qrx.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Adafruit Metro nRF52840 Express +# ----------------------------------- +metro52840.name=Adafruit Metro nRF52840 Express + +# VID/PID for Bootloader, Arduino & CircuitPython +metro52840.vid.0=0x239A +metro52840.pid.0=0x803F +metro52840.vid.1=0x239A +metro52840.pid.1=0x003F +metro52840.vid.2=0x239A +metro52840.pid.2=0x0040 +metro52840.vid.3=0x239A +metro52840.pid.3=0x8040 + +# Upload +metro52840.bootloader.tool=bootburn +metro52840.upload.tool=nrfutil +metro52840.upload.protocol=nrfutil +metro52840.upload.use_1200bps_touch=true +metro52840.upload.wait_for_upload_port=true +metro52840.upload.maximum_size=815104 +metro52840.upload.maximum_data_size=237568 + +# Build +metro52840.build.mcu=cortex-m4 +metro52840.build.f_cpu=64000000 +metro52840.build.board=NRF52840_METRO +metro52840.build.core=nRF5 +metro52840.build.variant=metro_nrf52840_express +metro52840.build.usb_manufacturer="Adafruit" +metro52840.build.usb_product="Metro nRF52840 Express" +metro52840.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +metro52840.build.ldscript=nrf52840_s140_v6.ld +metro52840.build.vid=0x239A +metro52840.build.pid=0x803F + +# SoftDevice Menu +metro52840.menu.softdevice.s140v6=S140 6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_name=s140 +metro52840.menu.softdevice.s140v6.build.sd_version=6.1.1 +metro52840.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +metro52840.menu.debug.l0=Level 0 (Release) +metro52840.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +metro52840.menu.debug.l1=Level 1 (Error Message) +metro52840.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +metro52840.menu.debug.l2=Level 2 (Full Debug) +metro52840.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +metro52840.menu.debug.l3=Level 3 (Segger SystemView) +metro52840.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +metro52840.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +metro52840.menu.debug_output.serial=Serial +metro52840.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +metro52840.menu.debug_output.serial1=Serial1 +metro52840.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +metro52840.menu.debug_output.rtt=Segger RTT +metro52840.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + + +# ------------------------------------------------------- +# +# Boards that aren't made by Adafruit +# +# ------------------------------------------------------- + +# ----------------------------------- +# Nordic nRF52840 DK +# ----------------------------------- +pca10056.name=Nordic nRF52840 DK + +# VID/PID for Bootloader, Arduino & CircuitPython +pca10056.vid.0=0x239A +pca10056.pid.0=0x8029 +pca10056.vid.1=0x239A +pca10056.pid.1=0x0029 + +# Upload +pca10056.bootloader.tool=bootburn +pca10056.upload.tool=nrfutil +pca10056.upload.protocol=nrfutil +pca10056.upload.use_1200bps_touch=true +pca10056.upload.wait_for_upload_port=true +pca10056.upload.maximum_size=815104 +pca10056.upload.maximum_data_size=237568 + +# Build +pca10056.build.mcu=cortex-m4 +pca10056.build.f_cpu=64000000 +pca10056.build.board=NRF52840_PCA10056 +pca10056.build.core=nRF5 +pca10056.build.variant=pca10056 +pca10056.build.usb_manufacturer="Nordic" +pca10056.build.usb_product="nRF52840 DK" +pca10056.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +pca10056.build.ldscript=nrf52840_s140_v6.ld +pca10056.build.vid=0x239A +pca10056.build.pid=0x8029 + +# SoftDevice Menu +pca10056.menu.softdevice.s140v6=S140 6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_name=s140 +pca10056.menu.softdevice.s140v6.build.sd_version=6.1.1 +pca10056.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +pca10056.menu.debug.l0=Level 0 (Release) +pca10056.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +pca10056.menu.debug.l1=Level 1 (Error Message) +pca10056.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +pca10056.menu.debug.l2=Level 2 (Full Debug) +pca10056.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +pca10056.menu.debug.l3=Level 3 (Segger SystemView) +pca10056.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +pca10056.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +pca10056.menu.debug_output.serial=Serial +pca10056.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +pca10056.menu.debug_output.serial1=Serial1 +pca10056.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +pca10056.menu.debug_output.rtt=Segger RTT +pca10056.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + +# ----------------------------------- +# Particle Xenon +# ----------------------------------- +particle_xenon.name=Particle Xenon + +# VID/PID for Bootloader, Arduino & CircuitPython +particle_xenon.vid.0=0x239A +particle_xenon.pid.0=0x8029 +particle_xenon.vid.1=0x239A +particle_xenon.pid.1=0x0029 + +# Upload +particle_xenon.bootloader.tool=bootburn +particle_xenon.upload.tool=nrfutil +particle_xenon.upload.protocol=nrfutil +particle_xenon.upload.use_1200bps_touch=true +particle_xenon.upload.wait_for_upload_port=true +particle_xenon.upload.maximum_size=815104 +particle_xenon.upload.maximum_data_size=237568 + +# Build +particle_xenon.build.mcu=cortex-m4 +particle_xenon.build.f_cpu=64000000 +particle_xenon.build.board=PARTICLE_XENON +particle_xenon.build.core=nRF5 +particle_xenon.build.variant=particle_xenon +particle_xenon.build.usb_manufacturer="Particle" +particle_xenon.build.usb_product="Xenon" +particle_xenon.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +particle_xenon.build.ldscript=nrf52840_s140_v6.ld +particle_xenon.build.vid=0x239A +particle_xenon.build.pid=0x8029 + +# SoftDevice Menu +particle_xenon.menu.softdevice.s140v6=S140 6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_name=s140 +particle_xenon.menu.softdevice.s140v6.build.sd_version=6.1.1 +particle_xenon.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +particle_xenon.menu.debug.l0=Level 0 (Release) +particle_xenon.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +particle_xenon.menu.debug.l1=Level 1 (Error Message) +particle_xenon.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +particle_xenon.menu.debug.l2=Level 2 (Full Debug) +particle_xenon.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +particle_xenon.menu.debug.l3=Level 3 (Segger SystemView) +particle_xenon.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +particle_xenon.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# Debug Output Menu +particle_xenon.menu.debug_output.serial=Serial +particle_xenon.menu.debug_output.serial.build.logger_flags=-DCFG_LOGGER=0 +particle_xenon.menu.debug_output.serial1=Serial1 +particle_xenon.menu.debug_output.serial1.build.logger_flags=-DCFG_LOGGER=1 -DCFG_TUSB_DEBUG=CFG_DEBUG +particle_xenon.menu.debug_output.rtt=Segger RTT +particle_xenon.menu.debug_output.rtt.build.logger_flags=-DCFG_LOGGER=2 -DCFG_TUSB_DEBUG=CFG_DEBUG -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + + +# ---------------------------------- +# NINA B302 +# ---------------------------------- +ninab302.name=NINA B302 ublox + +# VID/PID for bootloader with/without UF2, Arduino + Circuitpython App +ninab302.vid.0=0x239A +ninab302.pid.0=0x8029 +ninab302.vid.1=0x239A +ninab302.pid.1=0x0029 +ninab302.vid.2=0x7239A +ninab302.pid.2=0x002A +ninab302.vid.3=0x239A +ninab302.pid.3=0x802A + +# Upload +ninab302.bootloader.tool=bootburn +ninab302.upload.tool=nrfutil +ninab302.upload.protocol=nrfutil +ninab302.upload.use_1200bps_touch=true +ninab302.upload.wait_for_upload_port=true +ninab302.upload.maximum_size=815104 +ninab302.upload.maximum_data_size=237568 + +# Build +ninab302.build.mcu=cortex-m4 +ninab302.build.f_cpu=64000000 +ninab302.build.board=NINA_B302_ublox +ninab302.build.core=nRF5 +ninab302.build.variant=NINA_B302_ublox +ninab302.build.usb_manufacturer="Nordic" +ninab302.build.usb_product="NINA B302 ublox" +ninab302.build.extra_flags=-DNRF52840_XXAA -DNINA_B302_ublox {build.flags.usb} +ninab302.build.ldscript=nrf52840_s140_v6.ld +ninab302.build.vid=0x239A +ninab302.build.pid=0x8029 + +# SofDevice Menu +ninab302.menu.softdevice.s140v6=0.3.2 SoftDevice s140 6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_name=s140 +ninab302.menu.softdevice.s140v6.build.sd_version=6.1.1 +ninab302.menu.softdevice.s140v6.build.sd_fwid=0x00B6 + +# Debug Menu +ninab302.menu.debug.l0=Level 0 (Release) +ninab302.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab302.menu.debug.l1=Level 1 (Error Message) +ninab302.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab302.menu.debug.l2=Level 2 (Full Debug) +ninab302.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab302.menu.debug.l3=Level 3 (Segger SystemView) +ninab302.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab302.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +# ---------------------------------- +# NINA B112 +# ---------------------------------- +ninab112.name=NINA B112 ublox +ninab112.bootloader.tool=bootburn + +# Upload +ninab112.upload.tool=nrfutil +ninab112.upload.protocol=nrfutil +ninab112.upload.use_1200bps_touch=false +ninab112.upload.wait_for_upload_port=false +ninab112.upload.native_usb=false +ninab112.upload.maximum_size=290816 +ninab112.upload.maximum_data_size=52224 + +# Build +ninab112.build.mcu=cortex-m4 +ninab112.build.f_cpu=64000000 +ninab112.build.board=NINA_B112_ublox +ninab112.build.core=nRF5 +ninab112.build.variant=NINA_B112_ublox +feather52840.build.usb_manufacturer="Adafruit LLC" +feather52840.build.usb_product="Feather nRF52832" +ninab112.build.extra_flags=-DNRF52832_XXAA -DNINA_B112_ublox -DNRF52 +ninab112.build.ldscript=nrf52832_s132_v6.ld + +# SofDevice Menu +ninab112.menu.softdevice.s132v6=0.3.2 SoftDevice s132 6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_name=s132 +ninab112.menu.softdevice.s132v6.build.sd_version=6.1.1 +ninab112.menu.softdevice.s132v6.build.sd_fwid=0x00B7 + +# Debug Menu +ninab112.menu.debug.l0=Level 0 (Release) +ninab112.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 +ninab112.menu.debug.l1=Level 1 (Error Message) +ninab112.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 +ninab112.menu.debug.l2=Level 2 (Full Debug) +ninab112.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 +ninab112.menu.debug.l3=Level 3 (Segger SystemView) +ninab112.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 +ninab112.menu.debug.l3.build.sysview_flags=-DCFG_SYSVIEW=1 + +################################################################## +## KH Add SparkFun Pro nRF52840 Mini +################################################################## +#********************************************** +# SparkFun Pro nRF52840 Mini +#********************************************** +sparkfunnrf52840mini.name=SparkFun Pro nRF52840 Mini + +# DFU Mode with CDC only +sparkfunnrf52840mini.vid.0=0x1B4F +sparkfunnrf52840mini.pid.0=0x002A + +# DFU Mode with CDC + MSC (UF2) +sparkfunnrf52840mini.vid.1=0x1B4F +sparkfunnrf52840mini.pid.1=0x0029 + +# Application with CDC + MSC +sparkfunnrf52840mini.vid.2=0x1B4F +sparkfunnrf52840mini.pid.2=0x8029 + +# CircuitPython +sparkfunnrf52840mini.vid.2=0x1B4F +sparkfunnrf52840mini.pid.2=0x802A + +sparkfunnrf52840mini.bootloader.tool=bootburn + +# Upload +sparkfunnrf52840mini.upload.tool=nrfutil +sparkfunnrf52840mini.upload.protocol=nrfutil +sparkfunnrf52840mini.upload.use_1200bps_touch=true +sparkfunnrf52840mini.upload.wait_for_upload_port=true +#sparkfunnrf52840mini.upload.native_usb=true + +# Build +sparkfunnrf52840mini.build.mcu=cortex-m4 +sparkfunnrf52840mini.build.f_cpu=64000000 +sparkfunnrf52840mini.build.board=NRF52840_FEATHER +sparkfunnrf52840mini.build.core=nRF5 +sparkfunnrf52840mini.build.variant=sparkfun_nrf52840_mini +sparkfunnrf52840mini.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} +sparkfunnrf52840mini.build.vid=0x1B4F +sparkfunnrf52840mini.build.pid=0x5284 +sparkfunnrf52840mini.build.usb_manufacturer="SparkFun" +sparkfunnrf52840mini.build.usb_product="nRF52840 Mini Breakout" + +# SofDevice Menu +# Ram & ROM size varies depending on SoftDevice (check linker script) + +sparkfunnrf52840mini.menu.softdevice.s140v6=s140 6.1.1 r0 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_flags=-DS140 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_name=s140 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_version=6.1.1 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.sd_fwid=0x00B6 +sparkfunnrf52840mini.menu.softdevice.s140v6.build.ldscript=nrf52840_s140_v6.ld +sparkfunnrf52840mini.menu.softdevice.s140v6.upload.maximum_size=815104 +sparkfunnrf52840mini.menu.softdevice.s140v6.upload.maximum_data_size=248832 + +# Debug Menu +sparkfunnrf52840mini.menu.debug.l0=Level 0 (Release) +sparkfunnrf52840mini.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 -Os +sparkfunnrf52840mini.menu.debug.l1=Level 1 (Error Message) +sparkfunnrf52840mini.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1 -Os +sparkfunnrf52840mini.menu.debug.l2=Level 2 (Full Debug) +sparkfunnrf52840mini.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2 -Os +sparkfunnrf52840mini.menu.debug.l3=Level 3 (Segger SystemView) +sparkfunnrf52840mini.menu.debug.l3.build.debug_flags=-DCFG_DEBUG=3 -Os + +################################################################## diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Udp.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Udp.h new file mode 100644 index 0000000..cc814d3 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Udp.h @@ -0,0 +1,92 @@ +/* + * Udp.cpp: Library to send/receive UDP packets. + * + * NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these) + * 1) UDP does not guarantee the order in which assembled UDP packets are received. This + * might not happen often in practice, but in larger network topologies, a UDP + * packet can be received out of sequence. + * 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being + * aware of it. Again, this may not be a concern in practice on small local networks. + * For more information, see http://www.cafeaulait.org/course/week12/35.html + * + * MIT License: + * Copyright (c) 2008 Bjoern Hartmann + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * bjoern@cs.stanford.edu 12/30/2008 + */ + +#ifndef udp_h +#define udp_h + +#include +#include + +class UDP : public Stream { + +public: + virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + + // KH, add virtual function to support Multicast, necessary for many services (MDNS, UPnP, etc.) + virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure + + virtual void stop() =0; // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port) =0; + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char *host, uint16_t port) =0; + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket() =0; + // Write a single byte into the packet + virtual size_t write(uint8_t) =0; + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t *buffer, size_t size) =0; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket() =0; + // Number of bytes remaining in the current packet + virtual int available() =0; + // Read a single byte from the current packet + virtual int read() =0; + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len) =0; + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) =0; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek() =0; + virtual void flush() =0; // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP() =0; + // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort() =0; +protected: + uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; +}; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/platform.txt new file mode 100644 index 0000000..14296ad --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/platform.txt @@ -0,0 +1,166 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# Copyright (c) 2016 Sandeep Mistry All right reserved. +# Copyright (c) 2017 Adafruit Industries. All rights reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +name=Adafruit nRF52 Boards +version=1.3.0 + +# Compile variables +# ----------------- + +compiler.warning_flags=-Werror=return-type +compiler.warning_flags.none=-Werror=return-type +compiler.warning_flags.default=-Werror=return-type +compiler.warning_flags.more=-Wall -Werror=return-type +compiler.warning_flags.all=-Wall -Wextra -Werror=return-type -Wno-unused-parameter -Wno-missing-field-initializers -Wno-pointer-arith + +# Allow changing optimization settings via platform.local.txt / boards.local.txt +compiler.optimization_flag=-Ofast + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD + +# KH, Error here to use gcc, must use g++ +#compiler.c.elf.cmd=arm-none-eabi-gcc +compiler.c.elf.cmd=arm-none-eabi-g++ + +compiler.c.elf.flags={compiler.optimization_flag} -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-mcpu={build.mcu} -mthumb -mabi=aapcs {compiler.optimization_flag} -g -c {build.float_flags} -x assembler-with-cpp + +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2bin.flags=-O binary +compiler.elf2bin.cmd=arm-none-eabi-objcopy +compiler.elf2hex.flags=-O ihex +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb {build.float_flags} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--wrap=malloc -Wl,--wrap=free --specs=nano.specs --specs=nosys.specs +compiler.size.cmd=arm-none-eabi-size + +# this can be overriden in boards.txt +# Logger 0: Serial (CDC), 1 Serial1 (UART), 2 Segger RTT +build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float +build.debug_flags=-DCFG_DEBUG=0 +build.logger_flags=-DCFG_LOGGER=0 +build.sysview_flags=-DCFG_SYSVIEW=0 + +# USB flags +build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.libraries.ldflags= +compiler.elf2bin.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Include/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Lib/GCC/" -larm_cortexM4lf_math + +# common compiler for nrf +rtos.path={build.core.path}/freertos +nordic.path={build.core.path}/nordic + +build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 {compiler.optimization_flag} {build.debug_flags} {build.logger_flags} {build.sysview_flags} {compiler.arm.cmsis.c.flags} "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include/nrf52" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add '-DBOARD_NAME="{build.board}"' +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} '-DBOARD_NAME="{build.board}"' -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.c.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add '-DBOARD_NAME="{build.board}"' +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} '-DBOARD_NAME="{build.board}"' -DARDUINO_ARCH_{build.arch} '-DARDUINO_BSP_VERSION="{version}"' {compiler.cpp.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add '-DBOARD_NAME="{build.board}"' +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} '-DBOARD_NAME="{build.board}"' -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.flags.nrf} {includes} "{source_file}" -o "{object_file}" + +## Create archives +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.core.path}/linker" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" {compiler.libraries.ldflags} -Wl,--end-group + +## Create output (bin file) +#recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +## Create dfu package zip file +recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip" + +## Create uf2 file +#recipe.objcopy.uf2.pattern=python "{runtime.platform.path}/tools/uf2conv/uf2conv.py" -f 0xADA52840 -c -o "{build.path}/{build.project_name}.uf2" "{build.path}/{build.project_name}.hex" + +## Save bin +recipe.output.tmp_file_bin={build.project_name}.bin +recipe.output.save_file_bin={build.project_name}.save.bin + +## Save hex +recipe.output.tmp_file_hex={build.project_name}.hex +recipe.output.save_file_hexu={build.project_name}.save.hex + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +## Export Compiled Binary +recipe.output.tmp_file={build.project_name}.hex +recipe.output.save_file={build.project_name}.{build.variant}.hex + +#*************************************************** +# adafruit-nrfutil for uploading +# https://github.com/adafruit/Adafruit_nRF52_nrfutil +# pre-built binaries are provided for macos and windows +#*************************************************** +tools.nrfutil.cmd=adafruit-nrfutil +tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe +tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/macos/adafruit-nrfutil + +tools.nrfutil.upload.params.verbose=--verbose +tools.nrfutil.upload.params.quiet= +tools.nrfutil.upload.pattern="{cmd}" {upload.verbose} dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200 --singlebank + +#*************************************************** +# Burning bootloader with either jlink or nrfutil +#*************************************************** + +# Bootloader version +tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.6.2_{build.sd_name}_{build.sd_version} + +tools.bootburn.bootloader.params.verbose= +tools.bootburn.bootloader.params.quiet= +tools.bootburn.bootloader.pattern={program.burn_pattern} + +# erase flash page while programming +tools.bootburn.erase.params.verbose= +tools.bootburn.erase.params.quiet= +tools.bootburn.erase.pattern= + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/variant.cpp new file mode 100644 index 0000000..f43f3a4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/variant.cpp @@ -0,0 +1,59 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" + +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +const uint32_t g_ADigitalPinMap[] = { + // D0 .. D13 + 5, // D0 is P0.05 (UART RX) + 6, // D1 is P0.06 (UART TX) + 7, // D2 is P0.07 + 31, // D3 is P0.31 + 18, // D4 is P0.18 (LED Blue) + 99, // D5 (NC) + 9, // D6 is P0.09 NFC1 + 10, // D7 is P0.10 (Button) NFC2 + 99, // D8 (NC) + 8, // D9 is P0.08 + 11, // D10 is P0.11 CS + 13, // D11 is P0.13 MOSI + 12, // D12 is P0.12 MISO + 14, // D13 is P0.14 SCK + //I2C + 2, // D14 is P0.2 (SDA) + 3, // D15 is P0.3 (SCL) + // D16 .. D21 (aka A0 .. A5) + 3, // D16 is P0.03 (A0) + 2, // D17 is P0.02 (A1) + 4, // D18 is P0.04 (A2) + 30, // D19 is P0.30 (A3) SW2 + 29, // D20 is P0.29 (A4) + 28, // D21 is P0.28 (A5) + 9, // P0.09 NFC + 10, // P0.10 NFC + 16, // SW1 (LED Green) +}; \ No newline at end of file diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/variant.h new file mode 100644 index 0000000..833cbf6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/variant.h @@ -0,0 +1,172 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +//https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf +//https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf + +#ifndef _VARIANT_NINA_B112_UBLOX_ +#define _VARIANT_NINA_B112_UBLOX_ + +#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \ + .rc_ctiv = 0, \ +.rc_temp_ctiv = 0, \ +.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM} + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (32u) +#define NUM_DIGITAL_PINS (32u) +#define NUM_ANALOG_INPUTS (6u) +#define NUM_ANALOG_OUTPUTS (0u) + +// LEDs +#define PIN_LED LED1 +#define LED_BUILTIN PIN_LED + +//LEDs onboard +#define LED1 (0) // Red +#define LED2 (24) // Green/SW1 +#define LED3 (4) // Blue + +#define LED_STATE_ON 1 // State when LED is litted + +//Switch +#define SW1 (24) +#define SW2 (19) + +// NFC +#define PIN_NFC_1 (6) // P0.9 +#define PIN_NFC_2 (7) // P0.10 + +/* + * Analog pins + */ +#define PIN_A0 (16) // P0.03 +#define PIN_A1 (17) // P0.02 +#define PIN_A2 (18) // P0.04 +#define PIN_A3 (19) // P0.30 +#define PIN_A4 (20) // P0.29 +#define PIN_A5 (21) // P0.28 + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_D0 (0) // P0.05 +#define PIN_D1 (1) // P0.06 +#define PIN_D2 (2) // P0.07 +#define PIN_D3 (4) // P0.31 +#define PIN_D4 (5) // P0.18 +#define PIN_D6 (6) // P0.09 +#define PIN_D7 (7) // P0.10 +#define PIN_D9 (9) // P0.08 +#define PIN_D10 (11) // P0.11 +#define PIN_D11 (13) // P0.13 +#define PIN_D12 (12) // P0.12 +#define PIN_D13 (14) // P0.14 +#define PIN_D14 (2) // P0.02 +#define PIN_D15 (3) // P0.03 + +static const uint8_t D0 = PIN_D0 ; +static const uint8_t D1 = PIN_D1 ; +static const uint8_t D2 = PIN_D2 ; +static const uint8_t D3 = PIN_D3 ; +static const uint8_t D4 = PIN_D4 ; +static const uint8_t D6 = PIN_D6 ; +static const uint8_t D7 = PIN_D7 ; +static const uint8_t D9 = PIN_D9 ; +static const uint8_t D10 = PIN_D10 ; +static const uint8_t D11 = PIN_D11 ; +static const uint8_t D12 = PIN_D12 ; +static const uint8_t D13 = PIN_D13 ; +static const uint8_t D14 = PIN_D14 ; +static const uint8_t D15 = PIN_D15 ; + +// Other pins +//static const uint8_t AREF = PIN_AREF; + +//#define PIN_AREF (24) +//#define PIN_VBAT PIN_A7 + +/* + * Serial interfaces + */ +#define PIN_SERIAL_RX (0) // P0.05 +#define PIN_SERIAL_TX (1) // P0.06 +#define PIN_SERIAL_CTS (2) // P0.07 +#define PIN_SERIAL_RTS (3) // P0.31 +#define PIN_SERIAL_DTR (28) // P0.28 +#define PIN_SERIAL_DSR (29) // P0.29 + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (12) // P0.12 +#define PIN_SPI_MOSI (11) // P0.13 +#define PIN_SPI_SCK (13) // P0.14 + +static const uint8_t SS = 10 ; // P0.11 +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (14) // P0.02 +#define PIN_WIRE_SCL (15) // P0.03 + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + + +#endif //_VARIANT_NINA_B112_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/pins_arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/pins_arduino.h new file mode 100644 index 0000000..3ef4d4a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/pins_arduino.h @@ -0,0 +1,17 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/variant.cpp new file mode 100644 index 0000000..8b4df2e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/variant.cpp @@ -0,0 +1,87 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#include "variant.h" +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +const uint32_t g_ADigitalPinMap[] = +{ + // D0 .. D13 + 29, // D0 is P0.29 (UART RX) + 45, // D1 is P1.13 (UART TX) + 44, // D2 is P1.12 (NFC2) + 31, // D3 is P0.31 (LED1) + 13, // D4 is P0.13 (LED2) + 11, // D5 is P0.11 + 9, // D6 is P0.09 + 10, // D7 is P0.10 (Button) + 41, // D8 is P1.09 + 12, // D9 is P0.12 + 14, // D10 is P0.14 + 15, // D11 is P0.15 + 32, // D12 is P1.00 + 7, // D13 is P0.07 + + // D14 .. D21 (aka A0 .. A5) + 4, // D14 is P0.04 (A0) + 30, // D15 is P0.30 (A1) + 5, // D16 is P0.05 (A2) + 2, // D17 is P0.02 (A3) + 28, // D18 is P0.28 (A4) + 3, // D19 is P0.03 (A5) + + // D20 .. D21 (aka I2C pins) + 16, // D20 is P0.16 (SDA) + 24, // D21 is P0.24 (SCL) + + // QSPI pins (not exposed via any header / test point) + 19, // D22 is P0.19 (QSPI CLK) + 17, // D23 is P0.17 (QSPI CS) + 20, // D24 is P0.20 (QSPI Data 0) + 21, // D25 is P0.21 (QSPI Data 1) + 22, // D26 is P0.22 (QSPI Data 2) + 26, // D27 is P0.23 (QSPI Data 3) + + 40, // D28 is P1.08 - IO34 + 41, // D29 is P1.01 - IO35 + 44, // D30 is P1.02 - IO36 + 45, // D31 is P1.03 - IO37 + 42, // D32 is P1.10 - IO38 + 43, // D33 is P1.11 - IO39 + 47, // D34 is P1.15 - IO40 + 46, // D35 is P1.14 - IO41 + 26, // D36 is P0.26 - IO42 + 6, // D37 is P0.6 - IO43 + 27, // D38 is P0.27 - IO44 +}; + +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/variant.h new file mode 100644 index 0000000..a69575f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/variant.h @@ -0,0 +1,149 @@ + /* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). +// See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) + +#ifndef _VARIANT_NINA_B302_UBLOX_ +#define _VARIANT_NINA_B302_UBLOX_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus +// Number of pins defined in PinDescription array +#define PINS_COUNT (40) +#define NUM_DIGITAL_PINS (34) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (3) +#define PIN_LED2 (4) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_RED PIN_LED1 +#define LED_BLUE PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +/* + * Buttons + */ +#define PIN_BUTTON1 (7) + +/* + * Analog pins + */ +#define PIN_A0 (14) +#define PIN_A1 (15) +#define PIN_A2 (16) +#define PIN_A3 (17) +#define PIN_A4 (18) +#define PIN_A5 (19) + +#define D0 (0) +#define D1 (1) +#define D2 (2) +#define D3 (3) +#define D4 (4) +#define D5 (5) +#define D6 (6) +#define D7 (7) +#define D8 (8) +#define D9 (9) +#define D10 (10) +#define D11 (11) +#define D12 (12) +#define D13 (13) + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; + +#define ADC_RESOLUTION 14 + +#define PIN_NFC1 (31) +#define PIN_NFC2 (2) + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0) +#define PIN_SERIAL1_TX (1) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (22) //24 original +#define PIN_SPI_MOSI (23) //25 original +#define PIN_SPI_SCK (24) //26 original + +static const uint8_t SS = (13); +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (20) +#define PIN_WIRE_SCL (21) + +// QSPI Pins +#define PIN_QSPI_SCK 22 +#define PIN_QSPI_CS 23 +#define PIN_QSPI_IO0 24 +#define PIN_QSPI_IO1 25 +#define PIN_QSPI_IO2 26 +#define PIN_QSPI_IO3 27 + +// On-board QSPI Flash +#define EXTERNAL_FLASH_DEVICES GD25Q16C +#define EXTERNAL_FLASH_USE_QSPI + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif //_VARIANT_NINA_B302_UBLOX_ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/sparkfun_nrf52840_mini/variant.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/sparkfun_nrf52840_mini/variant.cpp new file mode 100644 index 0000000..b01c147 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/sparkfun_nrf52840_mini/variant.cpp @@ -0,0 +1,49 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" +#include "wiring_constants.h" +#include "wiring_digital.h" +#include "nrf.h" + +const uint32_t g_ADigitalPinMap[] = +{ + // P0 + 0 , 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, + + // P1 + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63 +}; +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/sparkfun_nrf52840_mini/variant.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/sparkfun_nrf52840_mini/variant.h new file mode 100644 index 0000000..c534ceb --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/sparkfun_nrf52840_mini/variant.h @@ -0,0 +1,152 @@ + /* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_SPARKFUN52840MINI_ +#define _VARIANT_SPARKFUN52840MINI_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (64) +#define NUM_DIGITAL_PINS (64) +#define NUM_ANALOG_INPUTS (8) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (7) +#define PIN_LED2 (14) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_BLUE PIN_LED1 +#define LED_RED PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +// Buttons +/* +#define PIN_BUTTON1 (2) +#define PIN_BUTTON2 (3) +#define PIN_BUTTON3 (4) +#define PIN_BUTTON4 (5) +*/ + +/* + * Analog pins + */ +#define PIN_A0 (2) +#define PIN_A1 (3) +#define PIN_A2 (4) +#define PIN_A3 (5) +#define PIN_A4 (28) +#define PIN_A5 (29) +#define PIN_A6 (30) +#define PIN_A7 (31) + +static const uint8_t A0 = PIN_A0 ; +static const uint8_t A1 = PIN_A1 ; +static const uint8_t A2 = PIN_A2 ; +static const uint8_t A3 = PIN_A3 ; +static const uint8_t A4 = PIN_A4 ; +static const uint8_t A5 = PIN_A5 ; +static const uint8_t A6 = PIN_A6 ; +static const uint8_t A7 = PIN_A7 ; +#define ADC_RESOLUTION 14 + +// Other pins +#define PIN_AREF (2) +#define PIN_DFU (13) +#define PIN_NFC1 (9) +#define PIN_NFC2 (10) + +static const uint8_t AREF = PIN_AREF; + +/* + * Serial interfaces + */ +// Serial +//Previous Hardware UART definition for nRF52 Arduino Core, below 0.16.0 +//Feel free to comment out these two lines below if there are conflicts with latest release +#define PIN_SERIAL_RX (15) +#define PIN_SERIAL_TX (17) + +//Hardware UART definition for nRF52 Arduino Core, 0.17.0 and above +#define PIN_SERIAL1_RX (15) +#define PIN_SERIAL1_TX (17) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (31) +#define PIN_SPI_MOSI (3) +#define PIN_SPI_SCK (30) + +static const uint8_t SS = 2 ; +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (8) +#define PIN_WIRE_SCL (11) + +/* + * QSPI interface for external flash + */ +#define PIN_QSPI_SCK 32 +#define PIN_QSPI_CS 33 +#define PIN_QSPI_DATA0 34 +#define PIN_QSPI_DATA1 35 +#define PIN_QSPI_DATA2 36 +#define PIN_QSPI_DATA3 37 + +// On-board QSPI Flash +// If EXTERNAL_FLASH_DEVICES is not defined, all supported devices will be used +#define EXTERNAL_FLASH_DEVICES GD25Q16C + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif \ No newline at end of file diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.5.14/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.5.14/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.5.14/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.5.14/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.5.14/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.5.14/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.5.14/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.5.14/platform.txt new file mode 100644 index 0000000..aa15090 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.5.14/platform.txt @@ -0,0 +1,232 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.5.14 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.0.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.0/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.0/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.0/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.0/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.0/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.0/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.0/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.0/platform.txt new file mode 100644 index 0000000..beb5070 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.0/platform.txt @@ -0,0 +1,232 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.6.0 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.0.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.3/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.3/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.3/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.3/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.3/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.3/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.3/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.3/platform.txt new file mode 100644 index 0000000..9683594 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.3/platform.txt @@ -0,0 +1,226 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.6.3 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.0.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.4/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.4/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.4/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.4/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.4/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.4/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.4/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.4/platform.txt new file mode 100644 index 0000000..dd35ef0 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.4/platform.txt @@ -0,0 +1,226 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.6.4 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.0.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.5/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.5/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.5/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.5/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.5/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.5/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.5/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.5/platform.txt new file mode 100644 index 0000000..f72eb2f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.5/platform.txt @@ -0,0 +1,227 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.6.5 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.0.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.6/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.6/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.6/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.6/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.6/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.6/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.6/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.6/platform.txt new file mode 100644 index 0000000..babb026 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.6/platform.txt @@ -0,0 +1,226 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.6.6 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.0.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.7/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.7/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.7/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.7/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.7/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.7/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.7/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.7/platform.txt new file mode 100644 index 0000000..a5f1d1e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.7/platform.txt @@ -0,0 +1,226 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.6.7 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.1.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.8/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.8/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.8/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.8/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.8/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.8/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.8/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.8/platform.txt new file mode 100644 index 0000000..629111a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.6.8/platform.txt @@ -0,0 +1,226 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.6.8 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.1.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.0/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.0/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.0/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.0/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.0/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.0/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.0/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.0/platform.txt new file mode 100644 index 0000000..4f32220 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.0/platform.txt @@ -0,0 +1,226 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.7.0 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.1.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.1/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.1/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.1/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.1/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.1/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.1/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.1/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.1/platform.txt new file mode 100644 index 0000000..ee0bc42 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.1/platform.txt @@ -0,0 +1,226 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.7.1 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.2.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.10/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.10/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.10/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.10/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.10/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.10/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.10/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.10/platform.txt new file mode 100644 index 0000000..2685ec7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.10/platform.txt @@ -0,0 +1,226 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.7.10 + +# Compile variables +# ----------------- + +compiler.warning_flags=-Werror=return-type +compiler.warning_flags.none=-Werror=return-type +compiler.warning_flags.default=-Werror=return-type +compiler.warning_flags.more=-Wall -Werror=return-type -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Werror=return-type -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.2.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.2/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.2/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.2/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.2/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.2/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.2/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.2/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.2/platform.txt new file mode 100644 index 0000000..508f914 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.2/platform.txt @@ -0,0 +1,226 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.7.2 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.2.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.3/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.3/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.3/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.3/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.3/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.3/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.3/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.3/platform.txt new file mode 100644 index 0000000..277397f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.3/platform.txt @@ -0,0 +1,226 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.7.3 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.2.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.4/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.4/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.4/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.4/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.4/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.4/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.4/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.4/platform.txt new file mode 100644 index 0000000..42e0777 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.4/platform.txt @@ -0,0 +1,226 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.7.4 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.2.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.5/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.5/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.5/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.5/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.5/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.5/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.5/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.5/platform.txt new file mode 100644 index 0000000..4c71d6d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.5/platform.txt @@ -0,0 +1,226 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.7.5 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.2.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.6/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.6/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.6/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.6/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.6/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.6/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.6/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.6/platform.txt new file mode 100644 index 0000000..1eaf316 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.6/platform.txt @@ -0,0 +1,226 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.7.6 + +# Compile variables +# ----------------- + +compiler.warning_flags=-Werror=return-type +compiler.warning_flags.none=-Werror=return-type +compiler.warning_flags.default=-Werror=return-type +compiler.warning_flags.more=-Wall -Werror=return-type -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Werror=return-type -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.2.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.7/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.7/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.7/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.7/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.7/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.7/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.7/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.7/platform.txt new file mode 100644 index 0000000..a23ed97 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.7/platform.txt @@ -0,0 +1,226 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.7.7 + +# Compile variables +# ----------------- + +compiler.warning_flags=-Werror=return-type +compiler.warning_flags.none=-Werror=return-type +compiler.warning_flags.default=-Werror=return-type +compiler.warning_flags.more=-Wall -Werror=return-type -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Werror=return-type -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.2.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.8/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.8/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.8/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.8/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.8/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.8/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.8/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.8/platform.txt new file mode 100644 index 0000000..534c535 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.8/platform.txt @@ -0,0 +1,238 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.7.8 + +# Compile variables +# ----------------- + +compiler.warning_flags=-Werror=return-type +compiler.warning_flags.none=-Werror=return-type +compiler.warning_flags.default=-Werror=return-type +compiler.warning_flags.more=-Wall -Werror=return-type -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Werror=return-type -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.2.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.9.1 + +tools.bossac19.path={runtime.tools.bossac-1.9.1-arduino2.path} +tools.bossac19.cmd=bossac + +tools.bossac19.upload.params.verbose=-i -d +tools.bossac19.upload.params.quiet= +tools.bossac19.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac19.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac19.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.9/cores/arduino/Print.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.9/cores/arduino/Print.cpp new file mode 100644 index 0000000..09d5864 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.9/cores/arduino/Print.cpp @@ -0,0 +1,420 @@ +/* + Copyright (c) 2014 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include +#include +#include + +#include "Arduino.h" + +#include "Print.h" + +//using namespace arduino; + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +size_t Print::write(const uint8_t *buffer, size_t size) +{ + size_t n = 0; + while (size--) { + if (write(*buffer++)) n++; + else break; + } + return n; +} + +size_t Print::print(const __FlashStringHelper *ifsh) +{ + return print(reinterpret_cast(ifsh)); +} + +size_t Print::print(const String &s) +{ + return write(s.c_str(), s.length()); +} + +size_t Print::print(const char str[]) +{ + return write(str); +} + +size_t Print::print(char c) +{ + return write(c); +} + +size_t Print::print(unsigned char b, int base) +{ + return print((unsigned long) b, base); +} + +size_t Print::print(int n, int base) +{ + return print((long) n, base); +} + +size_t Print::print(unsigned int n, int base) +{ + return print((unsigned long) n, base); +} + +size_t Print::print(long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printNumber(n, 10) + t; + } + return printNumber(n, 10); + } else { + return printNumber(n, base); + } +} + +size_t Print::print(unsigned long n, int base) +{ + if (base == 0) return write(n); + else return printNumber(n, base); +} + +size_t Print::print(long long n, int base) +{ + if (base == 0) { + return write(n); + } else if (base == 10) { + if (n < 0) { + int t = print('-'); + n = -n; + return printULLNumber(n, 10) + t; + } + return printULLNumber(n, 10); + } else { + return printULLNumber(n, base); + } +} + +size_t Print::print(unsigned long long n, int base) +{ + if (base == 0) return write(n); + else return printULLNumber(n, base); +} + +size_t Print::print(double n, int digits) +{ + return printFloat(n, digits); +} + +size_t Print::println(const __FlashStringHelper *ifsh) +{ + size_t n = print(ifsh); + n += println(); + return n; +} + +size_t Print::print(const Printable& x) +{ + return x.printTo(*this); +} + +size_t Print::println(void) +{ + return write("\r\n"); +} + +size_t Print::println(const String &s) +{ + size_t n = print(s); + n += println(); + return n; +} + +size_t Print::println(const char c[]) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(char c) +{ + size_t n = print(c); + n += println(); + return n; +} + +size_t Print::println(unsigned char b, int base) +{ + size_t n = print(b, base); + n += println(); + return n; +} + +size_t Print::println(int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned int num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(unsigned long long num, int base) +{ + size_t n = print(num, base); + n += println(); + return n; +} + +size_t Print::println(double num, int digits) +{ + size_t n = print(num, digits); + n += println(); + return n; +} + +size_t Print::println(const Printable& x) +{ + size_t n = print(x); + n += println(); + return n; +} + +size_t Print::printf(const char * format, ...) +{ + char buf[256]; + int len; + + va_list ap; + va_start(ap, format); + + len = vsnprintf(buf, 256, format, ap); + this->write(buf, len); + + va_end(ap); + return len; +} + +// Private Methods ///////////////////////////////////////////////////////////// + +size_t Print::printNumber(unsigned long n, uint8_t base) +{ + char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. + char *str = &buf[sizeof(buf) - 1]; + + *str = '\0'; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + do { + char c = n % base; + n /= base; + + *--str = c < 10 ? c + '0' : c + 'A' - 10; + } while(n); + + return write(str); +} + +// REFERENCE IMPLEMENTATION FOR ULL +// size_t Print::printULLNumber(unsigned long long n, uint8_t base) +// { + // // if limited to base 10 and 16 the bufsize can be smaller + // char buf[65]; + // char *str = &buf[64]; + + // *str = '\0'; + + // // prevent crash if called with base == 1 + // if (base < 2) base = 10; + + // do { + // unsigned long long t = n / base; + // char c = n - t * base; // faster than c = n%base; + // n = t; + // *--str = c < 10 ? c + '0' : c + 'A' - 10; + // } while(n); + + // return write(str); +// } + +// FAST IMPLEMENTATION FOR ULL +size_t Print::printULLNumber(unsigned long long n64, uint8_t base) +{ + // if limited to base 10 and 16 the bufsize can be 20 + char buf[64]; + uint8_t i = 0; + uint8_t innerLoops = 0; + + // prevent crash if called with base == 1 + if (base < 2) base = 10; + + // process chunks that fit in "16 bit math". + uint16_t top = 0xFFFF / base; + uint16_t th16 = 1; + while (th16 < top) + { + th16 *= base; + innerLoops++; + } + + while (n64 > th16) + { + // 64 bit math part + uint64_t q = n64 / th16; + uint16_t r = n64 - q*th16; + n64 = q; + + // 16 bit math loop to do remainder. (note buffer is filled reverse) + for (uint8_t j=0; j < innerLoops; j++) + { + uint16_t qq = r/base; + buf[i++] = r - qq*base; + r = qq; + } + } + + uint16_t n16 = n64; + while (n16 > 0) + { + uint16_t qq = n16/base; + buf[i++] = n16 - qq*base; + n16 = qq; + } + + size_t bytes = i; + for (; i > 0; i--) + write((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); + + return bytes; +} + +size_t Print::printFloat(double number, int digits) +{ + if (digits < 0) + digits = 2; + + size_t n = 0; + + if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); + if (number > 4294967040.0) return print ("ovf"); // constant determined empirically + if (number <-4294967040.0) return print ("ovf"); // constant determined empirically + + // Handle negative numbers + if (number < 0.0) + { + n += print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) { + n += print("."); + } + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + unsigned int toPrint = (unsigned int)remainder; + n += print(toPrint); + remainder -= toPrint; + } + + return n; +} + +size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[i]); + } + + return (len*3 - 1); +} + +size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline) +{ + if (buffer == NULL || len == 0) return 0; + + for(int i=0; iprintf("%02X", buffer[len-1-i]); + } + + return (len*3 - 1); +} + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.9/cores/arduino/Print.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.9/cores/arduino/Print.h new file mode 100644 index 0000000..793a686 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.9/cores/arduino/Print.h @@ -0,0 +1,107 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include // for size_t + +#include "WString.h" +#include "Printable.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 + +class Print +{ + private: + int write_error; + size_t printNumber(unsigned long, uint8_t); + size_t printULLNumber(unsigned long long, uint8_t); + size_t printFloat(double, int); + protected: + void setWriteError(int err = 1) { write_error = err; } + public: + Print() : write_error(0) {} + + int getWriteError() { return write_error; } + void clearWriteError() { setWriteError(0); } + + virtual size_t write(uint8_t) = 0; + size_t write(const char *str) { + if (str == NULL) return 0; + return write((const uint8_t *)str, strlen(str)); + } + virtual size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size) { + return write((const uint8_t *)buffer, size); + } + + // default to zero, meaning "a single write may block" + // should be overridden by subclasses with buffering + virtual int availableForWrite() { return 0; } + + size_t print(const __FlashStringHelper *); + size_t print(const String &); + size_t print(const char[]); + size_t print(char); + size_t print(unsigned char, int = DEC); + size_t print(int, int = DEC); + size_t print(unsigned int, int = DEC); + size_t print(long, int = DEC); + size_t print(unsigned long, int = DEC); + size_t print(long long, int = DEC); + size_t print(unsigned long long, int = DEC); + size_t print(double, int = 2); + size_t print(const Printable&); + + size_t println(const __FlashStringHelper *); + size_t println(const String &s); + size_t println(const char[]); + size_t println(char); + size_t println(unsigned char, int = DEC); + size_t println(int, int = DEC); + size_t println(unsigned int, int = DEC); + size_t println(long, int = DEC); + size_t println(unsigned long, int = DEC); + size_t println(long long, int = DEC); + size_t println(unsigned long long, int = DEC); + size_t println(double, int = 2); + size_t println(const Printable&); + size_t println(void); + + size_t printf(const char * format, ...); + + size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBuffer((uint8_t const*) buffer, size, delim, byteline); + } + + size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); + size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) + { + return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); + } + + virtual void flush() { /* Empty implementation for backward compatibility */ } +}; + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.9/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.9/platform.txt new file mode 100644 index 0000000..c364d2e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/adafruit/hardware/samd/1.7.9/platform.txt @@ -0,0 +1,238 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards +version=1.7.9 + +# Compile variables +# ----------------- + +compiler.warning_flags=-Werror=return-type +compiler.warning_flags.none=-Werror=return-type +compiler.warning_flags.default=-Werror=return-type +compiler.warning_flags.more=-Wall -Werror=return-type -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Werror=return-type -Wno-expansion-to-defined + +compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -D__SKETCH_NAME__="""{build.project_name}""" +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= +build.cache_flags= +build.flags.optimize= +build.flags.maxspi= +build.flags.maxqspi= +build.flags.usbstack= +build.flags.debug= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.2.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_CONFIG_POWER={build.usb_power} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {build.flags.usbstack} {build.flags.debug} "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" + +# Default advertised device power setting in mA +build.usb_power=100 + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.c.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.cpp.extra_flags} {build.extra_flags} {build.cache_flags} {build.flags.debug} {build.flags.optimize} {build.flags.maxspi} {build.flags.maxqspi} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.8.0 + +tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} +tools.bossac18.cmd=bossac + +tools.bossac18.upload.params.verbose=-i -d +tools.bossac18.upload.params.quiet= +tools.bossac18.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac18.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac18.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# v1.9.1 + +tools.bossac19.path={runtime.tools.bossac-1.9.1-arduino2.path} +tools.bossac19.cmd=bossac + +tools.bossac19.upload.params.verbose=-i -d +tools.bossac19.upload.params.quiet= +tools.bossac19.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i --offset={upload.offset} -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac19.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac19.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h new file mode 100644 index 0000000..84c18cf --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h @@ -0,0 +1,347 @@ +/* Copyright (C) 2012 mbed.org, MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software + * and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef LWIPOPTS_H +#define LWIPOPTS_H + +// Workaround for Linux timeval +#if defined (TOOLCHAIN_GCC) +#define LWIP_TIMEVAL_PRIVATE 0 +#include +#endif +#include "nsapi_types.h" +#include "mbed_retarget.h" + +// KH fix +#include +///////////////////////// + +// Operating System +#define NO_SYS 0 + +#if !MBED_CONF_LWIP_IPV4_ENABLED && !MBED_CONF_LWIP_IPV6_ENABLED +#error "Either IPv4 or IPv6 must be enabled." +#endif + +#define LWIP_IPV4 MBED_CONF_LWIP_IPV4_ENABLED + +#define LWIP_IPV6 MBED_CONF_LWIP_IPV6_ENABLED + +#define LWIP_PROVIDE_ERRNO 0 + +// On dual stack configuration how long to wait for both or preferred stack +// addresses before completing bring up. +#if LWIP_IPV4 && LWIP_IPV6 +#if MBED_CONF_LWIP_ADDR_TIMEOUT_MODE +#define BOTH_ADDR_TIMEOUT MBED_CONF_LWIP_ADDR_TIMEOUT +#define PREF_ADDR_TIMEOUT 0 +#else +#define PREF_ADDR_TIMEOUT MBED_CONF_LWIP_ADDR_TIMEOUT +#define BOTH_ADDR_TIMEOUT 0 +#endif +#else +#define PREF_ADDR_TIMEOUT 0 +#define BOTH_ADDR_TIMEOUT 0 +#endif + + +#define DHCP_TIMEOUT MBED_CONF_LWIP_DHCP_TIMEOUT + +#define LINK_TIMEOUT 60 + +#define PREF_IPV4 1 +#define PREF_IPV6 2 + +#if MBED_CONF_LWIP_IP_VER_PREF == 6 +#define IP_VERSION_PREF PREF_IPV6 +#elif MBED_CONF_LWIP_IP_VER_PREF == 4 +#define IP_VERSION_PREF PREF_IPV4 +#else +#error "Either IPv4 or IPv6 must be preferred." +#endif + +#undef LWIP_DEBUG +#if MBED_CONF_LWIP_DEBUG_ENABLED +#define LWIP_DEBUG 1 +#endif + +#if NO_SYS == 0 +#include "cmsis_os2.h" + +#define SYS_LIGHTWEIGHT_PROT 1 + +#define LWIP_RAW MBED_CONF_LWIP_RAW_SOCKET_ENABLED + +#define MEMP_NUM_TCPIP_MSG_INPKT MBED_CONF_LWIP_MEMP_NUM_TCPIP_MSG_INPKT + +// Thread stacks use 8-byte alignment +#define LWIP_ALIGN_UP(pos, align) ((pos) % (align) ? (pos) + ((align) - (pos) % (align)) : (pos)) + +#ifdef LWIP_DEBUG +// For LWIP debug, double the stack +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE*2, 8) +#elif MBED_DEBUG +// When debug is enabled on the build increase stack 25 percent +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE + MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE / 4, 8) +#else +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE, 8) +#endif + +// Thread priority (osPriorityNormal by default) +#define TCPIP_THREAD_PRIO (MBED_CONF_LWIP_TCPIP_THREAD_PRIORITY) + +#ifdef LWIP_DEBUG +#define DEFAULT_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE*2, 8) +#else +#define DEFAULT_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE, 8) +#endif + +#define MEMP_NUM_SYS_TIMEOUT 16 + +#define sys_msleep(ms) sys_msleep(ms) + +#endif + +// 32-bit alignment +#define MEM_ALIGNMENT 4 + +#define LWIP_RAM_HEAP_POINTER lwip_ram_heap + +// Number of simultaneously queued TCP segments. +#define MEMP_NUM_TCP_SEG MBED_CONF_LWIP_MEMP_NUM_TCP_SEG + +// TCP Maximum segment size. +#define TCP_MSS MBED_CONF_LWIP_TCP_MSS + +// TCP sender buffer space (bytes). +#define TCP_SND_BUF MBED_CONF_LWIP_TCP_SND_BUF + +// TCP sender buffer space (bytes). +#define TCP_WND MBED_CONF_LWIP_TCP_WND + +#define TCP_MAXRTX MBED_CONF_LWIP_TCP_MAXRTX + +#define TCP_SYNMAXRTX MBED_CONF_LWIP_TCP_SYNMAXRTX + +// Number of pool pbufs. +// Each requires 684 bytes of RAM (if MSS=536 and PBUF_POOL_BUFSIZE defaulting to be based on MSS) +#define PBUF_POOL_SIZE MBED_CONF_LWIP_PBUF_POOL_SIZE + +#ifdef MBED_CONF_LWIP_PBUF_POOL_BUFSIZE +#undef PBUF_POOL_BUFSIZE +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(MBED_CONF_LWIP_PBUF_POOL_BUFSIZE) +#else +#ifndef PBUF_POOL_BUFSIZE +#if LWIP_IPV6 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) +#elif LWIP_IPV4 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+20+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) +#endif +#endif +#endif + +#define MEM_SIZE MBED_CONF_LWIP_MEM_SIZE + +// One tcp_pcb_listen is needed for each TCP server. +// Each requires 72 bytes of RAM. +#define MEMP_NUM_TCP_PCB_LISTEN MBED_CONF_LWIP_TCP_SERVER_MAX + +// One is tcp_pcb needed for each TCPSocket. +// Each requires 196 bytes of RAM. +#define MEMP_NUM_TCP_PCB MBED_CONF_LWIP_TCP_SOCKET_MAX + +// One udp_pcb is needed for each UDPSocket. +// Each requires 84 bytes of RAM (total rounded to multiple of 512). +#define MEMP_NUM_UDP_PCB MBED_CONF_LWIP_UDP_SOCKET_MAX + +// Number of non-pool pbufs. +// Each requires 92 bytes of RAM. +#define MEMP_NUM_PBUF MBED_CONF_LWIP_NUM_PBUF + +// Each netbuf requires 64 bytes of RAM. +#define MEMP_NUM_NETBUF MBED_CONF_LWIP_NUM_NETBUF + +// One netconn is needed for each UDPSocket or TCPSocket. +// Each requires 236 bytes of RAM (total rounded to multiple of 512). +#define MEMP_NUM_NETCONN MBED_CONF_LWIP_SOCKET_MAX + +#if MBED_CONF_LWIP_TCP_ENABLED +#define LWIP_TCP 1 +#define TCP_OVERSIZE 0 +#define LWIP_TCP_KEEPALIVE 1 + +#define TCP_CLOSE_TIMEOUT MBED_CONF_LWIP_TCP_CLOSE_TIMEOUT + +#else +#define LWIP_TCP 0 +#endif + +#define LWIP_DNS 1 +// Only DNS address storage is enabled +#define LWIP_FULL_DNS 0 +#define LWIP_SOCKET 0 + +#define SO_REUSE 1 + +// Support Multicast +#include "stdlib.h" +#define LWIP_IGMP LWIP_IPV4 +#define LWIP_RAND() lwip_get_random() + +#define LWIP_COMPAT_SOCKETS 0 +#define LWIP_POSIX_SOCKETS_IO_NAMES 0 + +#define LWIP_BROADCAST_PING 1 + +// Fragmentation on, as per IPv4 default +#define LWIP_IPV6_FRAG LWIP_IPV6 + +// Queuing, default is "disabled", as per IPv4 default (so actually queues 1) +#define LWIP_ND6_QUEUEING MBED_CONF_ND6_QUEUEING + +// Debug Options +#define NETIF_DEBUG LWIP_DBG_OFF +#define PBUF_DEBUG LWIP_DBG_OFF +#define API_LIB_DEBUG LWIP_DBG_OFF +#define API_MSG_DEBUG LWIP_DBG_OFF +#define SOCKETS_DEBUG LWIP_DBG_OFF +#define ICMP_DEBUG LWIP_DBG_OFF +#define IGMP_DEBUG LWIP_DBG_OFF +#define INET_DEBUG LWIP_DBG_OFF +#define IP_DEBUG LWIP_DBG_OFF +#define IP_REASS_DEBUG LWIP_DBG_OFF +#define RAW_DEBUG LWIP_DBG_OFF +#define MEM_DEBUG LWIP_DBG_OFF +#define MEMP_DEBUG LWIP_DBG_OFF +#define SYS_DEBUG LWIP_DBG_OFF +#define TIMERS_DEBUG LWIP_DBG_OFF +#define TCP_DEBUG LWIP_DBG_OFF +#define TCP_INPUT_DEBUG LWIP_DBG_OFF +#define TCP_FR_DEBUG LWIP_DBG_OFF +#define TCP_RTO_DEBUG LWIP_DBG_OFF +#define TCP_CWND_DEBUG LWIP_DBG_OFF +#define TCP_WND_DEBUG LWIP_DBG_OFF +#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF +#define TCP_RST_DEBUG LWIP_DBG_OFF +#define TCP_QLEN_DEBUG LWIP_DBG_OFF +#define UDP_DEBUG LWIP_DBG_OFF +#define TCPIP_DEBUG LWIP_DBG_OFF +#define SLIP_DEBUG LWIP_DBG_OFF +#define DHCP_DEBUG LWIP_DBG_OFF +#define AUTOIP_DEBUG LWIP_DBG_OFF +#define DNS_DEBUG LWIP_DBG_OFF +#define IP6_DEBUG LWIP_DBG_OFF + +#define ETHARP_DEBUG LWIP_DBG_OFF +#define UDP_LPC_EMAC LWIP_DBG_OFF + +#ifdef LWIP_DEBUG +#define MEMP_OVERFLOW_CHECK 1 +#define MEMP_SANITY_CHECK 1 +#define LWIP_DBG_TYPES_ON LWIP_DBG_ON +#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL +#else +#define LWIP_NOASSERT 1 +#define LWIP_STATS 0 +#endif + +#define TRACE_TO_ASCII_HEX_DUMP 0 + +#define LWIP_PLATFORM_BYTESWAP 1 + +#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 1 + +// Interface type configuration + +#if MBED_CONF_LWIP_ETHERNET_ENABLED +#define LWIP_ARP 1 +#define LWIP_ETHERNET 1 +#define LWIP_DHCP LWIP_IPV4 +#else +#define LWIP_ARP 0 +#define LWIP_ETHERNET 0 +#endif // MBED_CONF_LWIP_ETHERNET_ENABLED + +#if MBED_CONF_LWIP_L3IP_ENABLED +#define LWIP_L3IP 1 +#else +#define LWIP_L3IP 0 +#endif + +//Maximum size of network interface name +#define INTERFACE_NAME_MAX_SIZE NSAPI_INTERFACE_NAME_MAX_SIZE +// Note generic macro name used rather than MBED_CONF_LWIP_PPP_ENABLED +// to allow users like PPPCellularInterface to detect that nsapi_ppp.h is available. + +// Enable PPP for now either from lwIP PPP configuration (obsolete) or from PPP service configuration +#if MBED_CONF_PPP_ENABLED || MBED_CONF_LWIP_PPP_ENABLED + +#define PPP_SUPPORT 1 + +#if MBED_CONF_PPP_IPV4_ENABLED || MBED_CONF_LWIP_IPV4_ENABLED +#define LWIP 0x11991199 +#if (MBED_CONF_NSAPI_DEFAULT_STACK == LWIP) && !MBED_CONF_LWIP_IPV4_ENABLED +#error LWIP: IPv4 PPP enabled but not IPv4 +#endif +#undef LWIP +#define PPP_IPV4_SUPPORT 1 +#endif + +#if MBED_CONF_PPP_IPV6_ENABLED || MBED_CONF_LWIP_IPV6_ENABLED +#define LWIP 0x11991199 +#if (MBED_CONF_NSAPI_DEFAULT_STACK == LWIP) && !MBED_CONF_LWIP_IPV6_ENABLED +#error LWIP: IPv6 PPP enabled but not IPv6 +#endif +#undef LWIP +#define PPP_IPV6_SUPPORT 1 +// Later to be dynamic for use for multiple interfaces +#define LWIP_IPV6_DUP_DETECT_ATTEMPTS 0 +#endif + +#endif + +#define LWIP_NETBUF_RECVINFO MBED_CONF_LWIP_NETBUF_RECVINFO_ENABLED + +// Make sure we default these to off, so +// LWIP doesn't default to on +#ifndef LWIP_ARP +#define LWIP_ARP 0 +#endif + +// Checksum-on-copy disabled due to https://savannah.nongnu.org/bugs/?50914 +#define LWIP_CHECKSUM_ON_COPY 0 + +#define LWIP_NETIF_HOSTNAME 1 +#define LWIP_NETIF_STATUS_CALLBACK 1 +#define LWIP_NETIF_LINK_CALLBACK 1 + +#define DNS_TABLE_SIZE 2 +#define DNS_MAX_NAME_LENGTH 128 + +#include "lwip_random.h" +#include "lwip_tcp_isn.h" +#define LWIP_HOOK_TCP_ISN lwip_hook_tcp_isn +#ifdef MBEDTLS_MD5_C +#define LWIP_USE_EXTERNAL_MBEDTLS 1 +#else +#define LWIP_USE_EXTERNAL_MBEDTLS 0 +#endif + +#define LWIP_ND6_RDNSS_MAX_DNS_SERVERS MBED_CONF_LWIP_ND6_RDNSS_MAX_DNS_SERVERS + +#endif /* LWIPOPTS_H_ */ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/libraries/SocketWrapper/src/MbedUdp.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/libraries/SocketWrapper/src/MbedUdp.cpp new file mode 100644 index 0000000..2a1b0fc --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/libraries/SocketWrapper/src/MbedUdp.cpp @@ -0,0 +1,217 @@ +#include "MbedUdp.h" + +arduino::MbedUDP::MbedUDP() { + _packet_buffer = new uint8_t[WIFI_UDP_BUFFER_SIZE]; + _current_packet = NULL; + _current_packet_size = 0; + // if this allocation fails then ::begin will fail +} + +arduino::MbedUDP::~MbedUDP() { + delete[] _packet_buffer; +} + +uint8_t arduino::MbedUDP::begin(uint16_t port) { + // success = 1, fail = 0 + + nsapi_error_t rt = _socket.open(getNetwork()); + if (rt != NSAPI_ERROR_OK) { + return 0; + } + + if (_socket.bind(port) < 0) { + return 0; //Failed to bind UDP Socket to port + } + + if (!_packet_buffer) { + return 0; + } + + _socket.set_blocking(false); + _socket.set_timeout(0); + + return 1; +} + +uint8_t arduino::MbedUDP::beginMulticast(IPAddress ip, uint16_t port) { + // success = 1, fail = 0 + if (begin(port) != 1) { + return 0; + } + + SocketAddress socketAddress = SocketHelpers::socketAddressFromIpAddress(ip, port); + + if (_socket.join_multicast_group(socketAddress) != NSAPI_ERROR_OK) { + printf("Error joining the multicast group\n"); + return 0; + } + + return 1; +} + +void arduino::MbedUDP::stop() { + _socket.close(); +} + +int arduino::MbedUDP::beginPacket(IPAddress ip, uint16_t port) { + _host = SocketHelpers::socketAddressFromIpAddress(ip, port); + //If IP is null and port is 0 the initialization failed + txBuffer.clear(); + return (_host.get_ip_address() == nullptr && _host.get_port() == 0) ? 0 : 1; +} + +int arduino::MbedUDP::beginPacket(const char *host, uint16_t port) { + _host = SocketAddress(host, port); + txBuffer.clear(); + getNetwork()->gethostbyname(host, &_host); + //If IP is null and port is 0 the initialization failed + return (_host.get_ip_address() == nullptr && _host.get_port() == 0) ? 0 : 1; +} + +int arduino::MbedUDP::endPacket() { + _socket.set_blocking(true); + _socket.set_timeout(1000); + + size_t size = txBuffer.available(); + uint8_t buffer[size]; + for (int i = 0; i < size; i++) { + buffer[i] = txBuffer.read_char(); + } + + nsapi_size_or_error_t ret = _socket.sendto(_host, buffer, size); + _socket.set_blocking(false); + _socket.set_timeout(0); + if (ret < 0) { + return 0; + } + return size; +} + +// Write a single byte into the packet +size_t arduino::MbedUDP::write(uint8_t byte) { + return write(&byte, 1); +} + +// Write size bytes from buffer into the packet +size_t arduino::MbedUDP::write(const uint8_t *buffer, size_t size) { + for (int i = 0; i _packet_buffer + _current_packet_size) { + // try reading the next packet... + if (parsePacket() > 0) { + // if so, read first byte of next packet; + return read(); + } else { + // no new data... not sure what to return here now + return -1; + } + } + + return _current_packet[0]; +} + +// Read up to len bytes from the current packet and place them into buffer +// Returns the number of bytes read, or 0 if none are available +int arduino::MbedUDP::read(unsigned char *buffer, size_t len) { + // Q: does Arduino read() function handle fragmentation? I won't for now... + if (_current_packet == NULL) { + if (parsePacket() == 0) return 0; + } + + // how much data do we have in the current packet? + int offset = _current_packet - _packet_buffer; + if (offset < 0) { + return 0; + } + + int max_bytes = _current_packet_size - offset; + if (max_bytes < 0) { + return 0; + } + + // at the end of the packet? + if (max_bytes == 0) { + // try read next packet... + if (parsePacket() > 0) { + return read(buffer, len); + } else { + return 0; + } + } + + if (len > (size_t)max_bytes) len = max_bytes; + + // copy to target buffer + memcpy(buffer, _current_packet, len); + + _current_packet += len; + + return len; +} + +IPAddress arduino::MbedUDP::remoteIP() { + nsapi_addr_t address = _remoteHost.get_addr(); + return IPAddress(address.bytes[0], address.bytes[1], address.bytes[2], address.bytes[3]); +} + +uint16_t arduino::MbedUDP::remotePort() { + return _remoteHost.get_port(); +} + +void arduino::MbedUDP::flush() { + // TODO: a real check to ensure transmission has been completed +} + +int arduino::MbedUDP::peek() { + if (_current_packet_size < 1) { + return -1; + } + + return _current_packet[0]; +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/libraries/SocketWrapper/src/MbedUdp.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/libraries/SocketWrapper/src/MbedUdp.h new file mode 100644 index 0000000..7f81ede --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/libraries/SocketWrapper/src/MbedUdp.h @@ -0,0 +1,105 @@ +/* + MbedUdp.h - UDP implementation using mbed Sockets + Copyright (c) 2021 Arduino SA. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef MBEDUDP_H +#define MBEDUDP_H + +#include "Arduino.h" +#include "SocketHelpers.h" +#include "api/Udp.h" + +#include "netsocket/SocketAddress.h" +#include "netsocket/UDPSocket.h" + +#ifndef WIFI_UDP_BUFFER_SIZE +#define WIFI_UDP_BUFFER_SIZE 508 +#endif + +namespace arduino { + +class MbedUDP : public UDP { +private: + UDPSocket _socket; // Mbed OS socket + SocketAddress _host; // Host to be used to send data + SocketAddress _remoteHost; // Remote host that sent incoming packets + + uint8_t* _packet_buffer; // Raw packet buffer (contains data we got from the UDPSocket) + + // The Arduino APIs allow you to iterate through this buffer, so we need to be able to iterate over the current packet + // these two variables are used to cache the state of the current packet + uint8_t* _current_packet; + size_t _current_packet_size; + + RingBufferN txBuffer; + +protected: + virtual NetworkInterface* getNetwork() = 0; + +public: + MbedUDP(); // Constructor + ~MbedUDP(); + virtual uint8_t begin(uint16_t); // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + virtual uint8_t beginMulticast(IPAddress, uint16_t); // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 if there are no sockets available to use + virtual void stop(); // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port); + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char* host, uint16_t port); + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket(); + // Write a single byte into the packet + virtual size_t write(uint8_t); + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t* buffer, size_t size); + + using Print::write; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket(); + // Number of bytes remaining in the current packet + virtual int available(); + // Read a single byte from the current packet + virtual int read(); + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len); + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) { + return read((unsigned char*)buffer, len); + }; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek(); + virtual void flush(); // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP(); + // // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort(); + + friend class MbedSocketClass; +}; + +} + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/portenta_post_install.sh b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/portenta_post_install.sh new file mode 100644 index 0000000..7fe71d6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/portenta_post_install.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +portenta_h7_rules () { + echo "" + echo "# Portenta H7 bootloader mode UDEV rules" + echo "" +cat < /etc/udev/rules.d/49-portenta_h7.rules + +# reload udev rules +echo "Reload rules..." +udevadm trigger +udevadm control --reload-rules diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h new file mode 100644 index 0000000..84c18cf --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h @@ -0,0 +1,347 @@ +/* Copyright (C) 2012 mbed.org, MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software + * and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef LWIPOPTS_H +#define LWIPOPTS_H + +// Workaround for Linux timeval +#if defined (TOOLCHAIN_GCC) +#define LWIP_TIMEVAL_PRIVATE 0 +#include +#endif +#include "nsapi_types.h" +#include "mbed_retarget.h" + +// KH fix +#include +///////////////////////// + +// Operating System +#define NO_SYS 0 + +#if !MBED_CONF_LWIP_IPV4_ENABLED && !MBED_CONF_LWIP_IPV6_ENABLED +#error "Either IPv4 or IPv6 must be enabled." +#endif + +#define LWIP_IPV4 MBED_CONF_LWIP_IPV4_ENABLED + +#define LWIP_IPV6 MBED_CONF_LWIP_IPV6_ENABLED + +#define LWIP_PROVIDE_ERRNO 0 + +// On dual stack configuration how long to wait for both or preferred stack +// addresses before completing bring up. +#if LWIP_IPV4 && LWIP_IPV6 +#if MBED_CONF_LWIP_ADDR_TIMEOUT_MODE +#define BOTH_ADDR_TIMEOUT MBED_CONF_LWIP_ADDR_TIMEOUT +#define PREF_ADDR_TIMEOUT 0 +#else +#define PREF_ADDR_TIMEOUT MBED_CONF_LWIP_ADDR_TIMEOUT +#define BOTH_ADDR_TIMEOUT 0 +#endif +#else +#define PREF_ADDR_TIMEOUT 0 +#define BOTH_ADDR_TIMEOUT 0 +#endif + + +#define DHCP_TIMEOUT MBED_CONF_LWIP_DHCP_TIMEOUT + +#define LINK_TIMEOUT 60 + +#define PREF_IPV4 1 +#define PREF_IPV6 2 + +#if MBED_CONF_LWIP_IP_VER_PREF == 6 +#define IP_VERSION_PREF PREF_IPV6 +#elif MBED_CONF_LWIP_IP_VER_PREF == 4 +#define IP_VERSION_PREF PREF_IPV4 +#else +#error "Either IPv4 or IPv6 must be preferred." +#endif + +#undef LWIP_DEBUG +#if MBED_CONF_LWIP_DEBUG_ENABLED +#define LWIP_DEBUG 1 +#endif + +#if NO_SYS == 0 +#include "cmsis_os2.h" + +#define SYS_LIGHTWEIGHT_PROT 1 + +#define LWIP_RAW MBED_CONF_LWIP_RAW_SOCKET_ENABLED + +#define MEMP_NUM_TCPIP_MSG_INPKT MBED_CONF_LWIP_MEMP_NUM_TCPIP_MSG_INPKT + +// Thread stacks use 8-byte alignment +#define LWIP_ALIGN_UP(pos, align) ((pos) % (align) ? (pos) + ((align) - (pos) % (align)) : (pos)) + +#ifdef LWIP_DEBUG +// For LWIP debug, double the stack +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE*2, 8) +#elif MBED_DEBUG +// When debug is enabled on the build increase stack 25 percent +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE + MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE / 4, 8) +#else +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE, 8) +#endif + +// Thread priority (osPriorityNormal by default) +#define TCPIP_THREAD_PRIO (MBED_CONF_LWIP_TCPIP_THREAD_PRIORITY) + +#ifdef LWIP_DEBUG +#define DEFAULT_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE*2, 8) +#else +#define DEFAULT_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE, 8) +#endif + +#define MEMP_NUM_SYS_TIMEOUT 16 + +#define sys_msleep(ms) sys_msleep(ms) + +#endif + +// 32-bit alignment +#define MEM_ALIGNMENT 4 + +#define LWIP_RAM_HEAP_POINTER lwip_ram_heap + +// Number of simultaneously queued TCP segments. +#define MEMP_NUM_TCP_SEG MBED_CONF_LWIP_MEMP_NUM_TCP_SEG + +// TCP Maximum segment size. +#define TCP_MSS MBED_CONF_LWIP_TCP_MSS + +// TCP sender buffer space (bytes). +#define TCP_SND_BUF MBED_CONF_LWIP_TCP_SND_BUF + +// TCP sender buffer space (bytes). +#define TCP_WND MBED_CONF_LWIP_TCP_WND + +#define TCP_MAXRTX MBED_CONF_LWIP_TCP_MAXRTX + +#define TCP_SYNMAXRTX MBED_CONF_LWIP_TCP_SYNMAXRTX + +// Number of pool pbufs. +// Each requires 684 bytes of RAM (if MSS=536 and PBUF_POOL_BUFSIZE defaulting to be based on MSS) +#define PBUF_POOL_SIZE MBED_CONF_LWIP_PBUF_POOL_SIZE + +#ifdef MBED_CONF_LWIP_PBUF_POOL_BUFSIZE +#undef PBUF_POOL_BUFSIZE +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(MBED_CONF_LWIP_PBUF_POOL_BUFSIZE) +#else +#ifndef PBUF_POOL_BUFSIZE +#if LWIP_IPV6 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) +#elif LWIP_IPV4 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+20+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) +#endif +#endif +#endif + +#define MEM_SIZE MBED_CONF_LWIP_MEM_SIZE + +// One tcp_pcb_listen is needed for each TCP server. +// Each requires 72 bytes of RAM. +#define MEMP_NUM_TCP_PCB_LISTEN MBED_CONF_LWIP_TCP_SERVER_MAX + +// One is tcp_pcb needed for each TCPSocket. +// Each requires 196 bytes of RAM. +#define MEMP_NUM_TCP_PCB MBED_CONF_LWIP_TCP_SOCKET_MAX + +// One udp_pcb is needed for each UDPSocket. +// Each requires 84 bytes of RAM (total rounded to multiple of 512). +#define MEMP_NUM_UDP_PCB MBED_CONF_LWIP_UDP_SOCKET_MAX + +// Number of non-pool pbufs. +// Each requires 92 bytes of RAM. +#define MEMP_NUM_PBUF MBED_CONF_LWIP_NUM_PBUF + +// Each netbuf requires 64 bytes of RAM. +#define MEMP_NUM_NETBUF MBED_CONF_LWIP_NUM_NETBUF + +// One netconn is needed for each UDPSocket or TCPSocket. +// Each requires 236 bytes of RAM (total rounded to multiple of 512). +#define MEMP_NUM_NETCONN MBED_CONF_LWIP_SOCKET_MAX + +#if MBED_CONF_LWIP_TCP_ENABLED +#define LWIP_TCP 1 +#define TCP_OVERSIZE 0 +#define LWIP_TCP_KEEPALIVE 1 + +#define TCP_CLOSE_TIMEOUT MBED_CONF_LWIP_TCP_CLOSE_TIMEOUT + +#else +#define LWIP_TCP 0 +#endif + +#define LWIP_DNS 1 +// Only DNS address storage is enabled +#define LWIP_FULL_DNS 0 +#define LWIP_SOCKET 0 + +#define SO_REUSE 1 + +// Support Multicast +#include "stdlib.h" +#define LWIP_IGMP LWIP_IPV4 +#define LWIP_RAND() lwip_get_random() + +#define LWIP_COMPAT_SOCKETS 0 +#define LWIP_POSIX_SOCKETS_IO_NAMES 0 + +#define LWIP_BROADCAST_PING 1 + +// Fragmentation on, as per IPv4 default +#define LWIP_IPV6_FRAG LWIP_IPV6 + +// Queuing, default is "disabled", as per IPv4 default (so actually queues 1) +#define LWIP_ND6_QUEUEING MBED_CONF_ND6_QUEUEING + +// Debug Options +#define NETIF_DEBUG LWIP_DBG_OFF +#define PBUF_DEBUG LWIP_DBG_OFF +#define API_LIB_DEBUG LWIP_DBG_OFF +#define API_MSG_DEBUG LWIP_DBG_OFF +#define SOCKETS_DEBUG LWIP_DBG_OFF +#define ICMP_DEBUG LWIP_DBG_OFF +#define IGMP_DEBUG LWIP_DBG_OFF +#define INET_DEBUG LWIP_DBG_OFF +#define IP_DEBUG LWIP_DBG_OFF +#define IP_REASS_DEBUG LWIP_DBG_OFF +#define RAW_DEBUG LWIP_DBG_OFF +#define MEM_DEBUG LWIP_DBG_OFF +#define MEMP_DEBUG LWIP_DBG_OFF +#define SYS_DEBUG LWIP_DBG_OFF +#define TIMERS_DEBUG LWIP_DBG_OFF +#define TCP_DEBUG LWIP_DBG_OFF +#define TCP_INPUT_DEBUG LWIP_DBG_OFF +#define TCP_FR_DEBUG LWIP_DBG_OFF +#define TCP_RTO_DEBUG LWIP_DBG_OFF +#define TCP_CWND_DEBUG LWIP_DBG_OFF +#define TCP_WND_DEBUG LWIP_DBG_OFF +#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF +#define TCP_RST_DEBUG LWIP_DBG_OFF +#define TCP_QLEN_DEBUG LWIP_DBG_OFF +#define UDP_DEBUG LWIP_DBG_OFF +#define TCPIP_DEBUG LWIP_DBG_OFF +#define SLIP_DEBUG LWIP_DBG_OFF +#define DHCP_DEBUG LWIP_DBG_OFF +#define AUTOIP_DEBUG LWIP_DBG_OFF +#define DNS_DEBUG LWIP_DBG_OFF +#define IP6_DEBUG LWIP_DBG_OFF + +#define ETHARP_DEBUG LWIP_DBG_OFF +#define UDP_LPC_EMAC LWIP_DBG_OFF + +#ifdef LWIP_DEBUG +#define MEMP_OVERFLOW_CHECK 1 +#define MEMP_SANITY_CHECK 1 +#define LWIP_DBG_TYPES_ON LWIP_DBG_ON +#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL +#else +#define LWIP_NOASSERT 1 +#define LWIP_STATS 0 +#endif + +#define TRACE_TO_ASCII_HEX_DUMP 0 + +#define LWIP_PLATFORM_BYTESWAP 1 + +#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 1 + +// Interface type configuration + +#if MBED_CONF_LWIP_ETHERNET_ENABLED +#define LWIP_ARP 1 +#define LWIP_ETHERNET 1 +#define LWIP_DHCP LWIP_IPV4 +#else +#define LWIP_ARP 0 +#define LWIP_ETHERNET 0 +#endif // MBED_CONF_LWIP_ETHERNET_ENABLED + +#if MBED_CONF_LWIP_L3IP_ENABLED +#define LWIP_L3IP 1 +#else +#define LWIP_L3IP 0 +#endif + +//Maximum size of network interface name +#define INTERFACE_NAME_MAX_SIZE NSAPI_INTERFACE_NAME_MAX_SIZE +// Note generic macro name used rather than MBED_CONF_LWIP_PPP_ENABLED +// to allow users like PPPCellularInterface to detect that nsapi_ppp.h is available. + +// Enable PPP for now either from lwIP PPP configuration (obsolete) or from PPP service configuration +#if MBED_CONF_PPP_ENABLED || MBED_CONF_LWIP_PPP_ENABLED + +#define PPP_SUPPORT 1 + +#if MBED_CONF_PPP_IPV4_ENABLED || MBED_CONF_LWIP_IPV4_ENABLED +#define LWIP 0x11991199 +#if (MBED_CONF_NSAPI_DEFAULT_STACK == LWIP) && !MBED_CONF_LWIP_IPV4_ENABLED +#error LWIP: IPv4 PPP enabled but not IPv4 +#endif +#undef LWIP +#define PPP_IPV4_SUPPORT 1 +#endif + +#if MBED_CONF_PPP_IPV6_ENABLED || MBED_CONF_LWIP_IPV6_ENABLED +#define LWIP 0x11991199 +#if (MBED_CONF_NSAPI_DEFAULT_STACK == LWIP) && !MBED_CONF_LWIP_IPV6_ENABLED +#error LWIP: IPv6 PPP enabled but not IPv6 +#endif +#undef LWIP +#define PPP_IPV6_SUPPORT 1 +// Later to be dynamic for use for multiple interfaces +#define LWIP_IPV6_DUP_DETECT_ATTEMPTS 0 +#endif + +#endif + +#define LWIP_NETBUF_RECVINFO MBED_CONF_LWIP_NETBUF_RECVINFO_ENABLED + +// Make sure we default these to off, so +// LWIP doesn't default to on +#ifndef LWIP_ARP +#define LWIP_ARP 0 +#endif + +// Checksum-on-copy disabled due to https://savannah.nongnu.org/bugs/?50914 +#define LWIP_CHECKSUM_ON_COPY 0 + +#define LWIP_NETIF_HOSTNAME 1 +#define LWIP_NETIF_STATUS_CALLBACK 1 +#define LWIP_NETIF_LINK_CALLBACK 1 + +#define DNS_TABLE_SIZE 2 +#define DNS_MAX_NAME_LENGTH 128 + +#include "lwip_random.h" +#include "lwip_tcp_isn.h" +#define LWIP_HOOK_TCP_ISN lwip_hook_tcp_isn +#ifdef MBEDTLS_MD5_C +#define LWIP_USE_EXTERNAL_MBEDTLS 1 +#else +#define LWIP_USE_EXTERNAL_MBEDTLS 0 +#endif + +#define LWIP_ND6_RDNSS_MAX_DNS_SERVERS MBED_CONF_LWIP_ND6_RDNSS_MAX_DNS_SERVERS + +#endif /* LWIPOPTS_H_ */ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/libraries/SocketWrapper/src/MbedUdp.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/libraries/SocketWrapper/src/MbedUdp.cpp new file mode 100644 index 0000000..2a1b0fc --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/libraries/SocketWrapper/src/MbedUdp.cpp @@ -0,0 +1,217 @@ +#include "MbedUdp.h" + +arduino::MbedUDP::MbedUDP() { + _packet_buffer = new uint8_t[WIFI_UDP_BUFFER_SIZE]; + _current_packet = NULL; + _current_packet_size = 0; + // if this allocation fails then ::begin will fail +} + +arduino::MbedUDP::~MbedUDP() { + delete[] _packet_buffer; +} + +uint8_t arduino::MbedUDP::begin(uint16_t port) { + // success = 1, fail = 0 + + nsapi_error_t rt = _socket.open(getNetwork()); + if (rt != NSAPI_ERROR_OK) { + return 0; + } + + if (_socket.bind(port) < 0) { + return 0; //Failed to bind UDP Socket to port + } + + if (!_packet_buffer) { + return 0; + } + + _socket.set_blocking(false); + _socket.set_timeout(0); + + return 1; +} + +uint8_t arduino::MbedUDP::beginMulticast(IPAddress ip, uint16_t port) { + // success = 1, fail = 0 + if (begin(port) != 1) { + return 0; + } + + SocketAddress socketAddress = SocketHelpers::socketAddressFromIpAddress(ip, port); + + if (_socket.join_multicast_group(socketAddress) != NSAPI_ERROR_OK) { + printf("Error joining the multicast group\n"); + return 0; + } + + return 1; +} + +void arduino::MbedUDP::stop() { + _socket.close(); +} + +int arduino::MbedUDP::beginPacket(IPAddress ip, uint16_t port) { + _host = SocketHelpers::socketAddressFromIpAddress(ip, port); + //If IP is null and port is 0 the initialization failed + txBuffer.clear(); + return (_host.get_ip_address() == nullptr && _host.get_port() == 0) ? 0 : 1; +} + +int arduino::MbedUDP::beginPacket(const char *host, uint16_t port) { + _host = SocketAddress(host, port); + txBuffer.clear(); + getNetwork()->gethostbyname(host, &_host); + //If IP is null and port is 0 the initialization failed + return (_host.get_ip_address() == nullptr && _host.get_port() == 0) ? 0 : 1; +} + +int arduino::MbedUDP::endPacket() { + _socket.set_blocking(true); + _socket.set_timeout(1000); + + size_t size = txBuffer.available(); + uint8_t buffer[size]; + for (int i = 0; i < size; i++) { + buffer[i] = txBuffer.read_char(); + } + + nsapi_size_or_error_t ret = _socket.sendto(_host, buffer, size); + _socket.set_blocking(false); + _socket.set_timeout(0); + if (ret < 0) { + return 0; + } + return size; +} + +// Write a single byte into the packet +size_t arduino::MbedUDP::write(uint8_t byte) { + return write(&byte, 1); +} + +// Write size bytes from buffer into the packet +size_t arduino::MbedUDP::write(const uint8_t *buffer, size_t size) { + for (int i = 0; i _packet_buffer + _current_packet_size) { + // try reading the next packet... + if (parsePacket() > 0) { + // if so, read first byte of next packet; + return read(); + } else { + // no new data... not sure what to return here now + return -1; + } + } + + return _current_packet[0]; +} + +// Read up to len bytes from the current packet and place them into buffer +// Returns the number of bytes read, or 0 if none are available +int arduino::MbedUDP::read(unsigned char *buffer, size_t len) { + // Q: does Arduino read() function handle fragmentation? I won't for now... + if (_current_packet == NULL) { + if (parsePacket() == 0) return 0; + } + + // how much data do we have in the current packet? + int offset = _current_packet - _packet_buffer; + if (offset < 0) { + return 0; + } + + int max_bytes = _current_packet_size - offset; + if (max_bytes < 0) { + return 0; + } + + // at the end of the packet? + if (max_bytes == 0) { + // try read next packet... + if (parsePacket() > 0) { + return read(buffer, len); + } else { + return 0; + } + } + + if (len > (size_t)max_bytes) len = max_bytes; + + // copy to target buffer + memcpy(buffer, _current_packet, len); + + _current_packet += len; + + return len; +} + +IPAddress arduino::MbedUDP::remoteIP() { + nsapi_addr_t address = _remoteHost.get_addr(); + return IPAddress(address.bytes[0], address.bytes[1], address.bytes[2], address.bytes[3]); +} + +uint16_t arduino::MbedUDP::remotePort() { + return _remoteHost.get_port(); +} + +void arduino::MbedUDP::flush() { + // TODO: a real check to ensure transmission has been completed +} + +int arduino::MbedUDP::peek() { + if (_current_packet_size < 1) { + return -1; + } + + return _current_packet[0]; +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/libraries/SocketWrapper/src/MbedUdp.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/libraries/SocketWrapper/src/MbedUdp.h new file mode 100644 index 0000000..7f81ede --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/libraries/SocketWrapper/src/MbedUdp.h @@ -0,0 +1,105 @@ +/* + MbedUdp.h - UDP implementation using mbed Sockets + Copyright (c) 2021 Arduino SA. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef MBEDUDP_H +#define MBEDUDP_H + +#include "Arduino.h" +#include "SocketHelpers.h" +#include "api/Udp.h" + +#include "netsocket/SocketAddress.h" +#include "netsocket/UDPSocket.h" + +#ifndef WIFI_UDP_BUFFER_SIZE +#define WIFI_UDP_BUFFER_SIZE 508 +#endif + +namespace arduino { + +class MbedUDP : public UDP { +private: + UDPSocket _socket; // Mbed OS socket + SocketAddress _host; // Host to be used to send data + SocketAddress _remoteHost; // Remote host that sent incoming packets + + uint8_t* _packet_buffer; // Raw packet buffer (contains data we got from the UDPSocket) + + // The Arduino APIs allow you to iterate through this buffer, so we need to be able to iterate over the current packet + // these two variables are used to cache the state of the current packet + uint8_t* _current_packet; + size_t _current_packet_size; + + RingBufferN txBuffer; + +protected: + virtual NetworkInterface* getNetwork() = 0; + +public: + MbedUDP(); // Constructor + ~MbedUDP(); + virtual uint8_t begin(uint16_t); // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + virtual uint8_t beginMulticast(IPAddress, uint16_t); // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 if there are no sockets available to use + virtual void stop(); // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port); + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char* host, uint16_t port); + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket(); + // Write a single byte into the packet + virtual size_t write(uint8_t); + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t* buffer, size_t size); + + using Print::write; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket(); + // Number of bytes remaining in the current packet + virtual int available(); + // Read a single byte from the current packet + virtual int read(); + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len); + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) { + return read((unsigned char*)buffer, len); + }; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek(); + virtual void flush(); // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP(); + // // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort(); + + friend class MbedSocketClass; +}; + +} + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/portenta_post_install.sh b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/portenta_post_install.sh new file mode 100644 index 0000000..7fe71d6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/portenta_post_install.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +portenta_h7_rules () { + echo "" + echo "# Portenta H7 bootloader mode UDEV rules" + echo "" +cat < /etc/udev/rules.d/49-portenta_h7.rules + +# reload udev rules +echo "Reload rules..." +udevadm trigger +udevadm control --reload-rules diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h new file mode 100644 index 0000000..84c18cf --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h @@ -0,0 +1,347 @@ +/* Copyright (C) 2012 mbed.org, MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software + * and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef LWIPOPTS_H +#define LWIPOPTS_H + +// Workaround for Linux timeval +#if defined (TOOLCHAIN_GCC) +#define LWIP_TIMEVAL_PRIVATE 0 +#include +#endif +#include "nsapi_types.h" +#include "mbed_retarget.h" + +// KH fix +#include +///////////////////////// + +// Operating System +#define NO_SYS 0 + +#if !MBED_CONF_LWIP_IPV4_ENABLED && !MBED_CONF_LWIP_IPV6_ENABLED +#error "Either IPv4 or IPv6 must be enabled." +#endif + +#define LWIP_IPV4 MBED_CONF_LWIP_IPV4_ENABLED + +#define LWIP_IPV6 MBED_CONF_LWIP_IPV6_ENABLED + +#define LWIP_PROVIDE_ERRNO 0 + +// On dual stack configuration how long to wait for both or preferred stack +// addresses before completing bring up. +#if LWIP_IPV4 && LWIP_IPV6 +#if MBED_CONF_LWIP_ADDR_TIMEOUT_MODE +#define BOTH_ADDR_TIMEOUT MBED_CONF_LWIP_ADDR_TIMEOUT +#define PREF_ADDR_TIMEOUT 0 +#else +#define PREF_ADDR_TIMEOUT MBED_CONF_LWIP_ADDR_TIMEOUT +#define BOTH_ADDR_TIMEOUT 0 +#endif +#else +#define PREF_ADDR_TIMEOUT 0 +#define BOTH_ADDR_TIMEOUT 0 +#endif + + +#define DHCP_TIMEOUT MBED_CONF_LWIP_DHCP_TIMEOUT + +#define LINK_TIMEOUT 60 + +#define PREF_IPV4 1 +#define PREF_IPV6 2 + +#if MBED_CONF_LWIP_IP_VER_PREF == 6 +#define IP_VERSION_PREF PREF_IPV6 +#elif MBED_CONF_LWIP_IP_VER_PREF == 4 +#define IP_VERSION_PREF PREF_IPV4 +#else +#error "Either IPv4 or IPv6 must be preferred." +#endif + +#undef LWIP_DEBUG +#if MBED_CONF_LWIP_DEBUG_ENABLED +#define LWIP_DEBUG 1 +#endif + +#if NO_SYS == 0 +#include "cmsis_os2.h" + +#define SYS_LIGHTWEIGHT_PROT 1 + +#define LWIP_RAW MBED_CONF_LWIP_RAW_SOCKET_ENABLED + +#define MEMP_NUM_TCPIP_MSG_INPKT MBED_CONF_LWIP_MEMP_NUM_TCPIP_MSG_INPKT + +// Thread stacks use 8-byte alignment +#define LWIP_ALIGN_UP(pos, align) ((pos) % (align) ? (pos) + ((align) - (pos) % (align)) : (pos)) + +#ifdef LWIP_DEBUG +// For LWIP debug, double the stack +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE*2, 8) +#elif MBED_DEBUG +// When debug is enabled on the build increase stack 25 percent +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE + MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE / 4, 8) +#else +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE, 8) +#endif + +// Thread priority (osPriorityNormal by default) +#define TCPIP_THREAD_PRIO (MBED_CONF_LWIP_TCPIP_THREAD_PRIORITY) + +#ifdef LWIP_DEBUG +#define DEFAULT_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE*2, 8) +#else +#define DEFAULT_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE, 8) +#endif + +#define MEMP_NUM_SYS_TIMEOUT 16 + +#define sys_msleep(ms) sys_msleep(ms) + +#endif + +// 32-bit alignment +#define MEM_ALIGNMENT 4 + +#define LWIP_RAM_HEAP_POINTER lwip_ram_heap + +// Number of simultaneously queued TCP segments. +#define MEMP_NUM_TCP_SEG MBED_CONF_LWIP_MEMP_NUM_TCP_SEG + +// TCP Maximum segment size. +#define TCP_MSS MBED_CONF_LWIP_TCP_MSS + +// TCP sender buffer space (bytes). +#define TCP_SND_BUF MBED_CONF_LWIP_TCP_SND_BUF + +// TCP sender buffer space (bytes). +#define TCP_WND MBED_CONF_LWIP_TCP_WND + +#define TCP_MAXRTX MBED_CONF_LWIP_TCP_MAXRTX + +#define TCP_SYNMAXRTX MBED_CONF_LWIP_TCP_SYNMAXRTX + +// Number of pool pbufs. +// Each requires 684 bytes of RAM (if MSS=536 and PBUF_POOL_BUFSIZE defaulting to be based on MSS) +#define PBUF_POOL_SIZE MBED_CONF_LWIP_PBUF_POOL_SIZE + +#ifdef MBED_CONF_LWIP_PBUF_POOL_BUFSIZE +#undef PBUF_POOL_BUFSIZE +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(MBED_CONF_LWIP_PBUF_POOL_BUFSIZE) +#else +#ifndef PBUF_POOL_BUFSIZE +#if LWIP_IPV6 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) +#elif LWIP_IPV4 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+20+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) +#endif +#endif +#endif + +#define MEM_SIZE MBED_CONF_LWIP_MEM_SIZE + +// One tcp_pcb_listen is needed for each TCP server. +// Each requires 72 bytes of RAM. +#define MEMP_NUM_TCP_PCB_LISTEN MBED_CONF_LWIP_TCP_SERVER_MAX + +// One is tcp_pcb needed for each TCPSocket. +// Each requires 196 bytes of RAM. +#define MEMP_NUM_TCP_PCB MBED_CONF_LWIP_TCP_SOCKET_MAX + +// One udp_pcb is needed for each UDPSocket. +// Each requires 84 bytes of RAM (total rounded to multiple of 512). +#define MEMP_NUM_UDP_PCB MBED_CONF_LWIP_UDP_SOCKET_MAX + +// Number of non-pool pbufs. +// Each requires 92 bytes of RAM. +#define MEMP_NUM_PBUF MBED_CONF_LWIP_NUM_PBUF + +// Each netbuf requires 64 bytes of RAM. +#define MEMP_NUM_NETBUF MBED_CONF_LWIP_NUM_NETBUF + +// One netconn is needed for each UDPSocket or TCPSocket. +// Each requires 236 bytes of RAM (total rounded to multiple of 512). +#define MEMP_NUM_NETCONN MBED_CONF_LWIP_SOCKET_MAX + +#if MBED_CONF_LWIP_TCP_ENABLED +#define LWIP_TCP 1 +#define TCP_OVERSIZE 0 +#define LWIP_TCP_KEEPALIVE 1 + +#define TCP_CLOSE_TIMEOUT MBED_CONF_LWIP_TCP_CLOSE_TIMEOUT + +#else +#define LWIP_TCP 0 +#endif + +#define LWIP_DNS 1 +// Only DNS address storage is enabled +#define LWIP_FULL_DNS 0 +#define LWIP_SOCKET 0 + +#define SO_REUSE 1 + +// Support Multicast +#include "stdlib.h" +#define LWIP_IGMP LWIP_IPV4 +#define LWIP_RAND() lwip_get_random() + +#define LWIP_COMPAT_SOCKETS 0 +#define LWIP_POSIX_SOCKETS_IO_NAMES 0 + +#define LWIP_BROADCAST_PING 1 + +// Fragmentation on, as per IPv4 default +#define LWIP_IPV6_FRAG LWIP_IPV6 + +// Queuing, default is "disabled", as per IPv4 default (so actually queues 1) +#define LWIP_ND6_QUEUEING MBED_CONF_ND6_QUEUEING + +// Debug Options +#define NETIF_DEBUG LWIP_DBG_OFF +#define PBUF_DEBUG LWIP_DBG_OFF +#define API_LIB_DEBUG LWIP_DBG_OFF +#define API_MSG_DEBUG LWIP_DBG_OFF +#define SOCKETS_DEBUG LWIP_DBG_OFF +#define ICMP_DEBUG LWIP_DBG_OFF +#define IGMP_DEBUG LWIP_DBG_OFF +#define INET_DEBUG LWIP_DBG_OFF +#define IP_DEBUG LWIP_DBG_OFF +#define IP_REASS_DEBUG LWIP_DBG_OFF +#define RAW_DEBUG LWIP_DBG_OFF +#define MEM_DEBUG LWIP_DBG_OFF +#define MEMP_DEBUG LWIP_DBG_OFF +#define SYS_DEBUG LWIP_DBG_OFF +#define TIMERS_DEBUG LWIP_DBG_OFF +#define TCP_DEBUG LWIP_DBG_OFF +#define TCP_INPUT_DEBUG LWIP_DBG_OFF +#define TCP_FR_DEBUG LWIP_DBG_OFF +#define TCP_RTO_DEBUG LWIP_DBG_OFF +#define TCP_CWND_DEBUG LWIP_DBG_OFF +#define TCP_WND_DEBUG LWIP_DBG_OFF +#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF +#define TCP_RST_DEBUG LWIP_DBG_OFF +#define TCP_QLEN_DEBUG LWIP_DBG_OFF +#define UDP_DEBUG LWIP_DBG_OFF +#define TCPIP_DEBUG LWIP_DBG_OFF +#define SLIP_DEBUG LWIP_DBG_OFF +#define DHCP_DEBUG LWIP_DBG_OFF +#define AUTOIP_DEBUG LWIP_DBG_OFF +#define DNS_DEBUG LWIP_DBG_OFF +#define IP6_DEBUG LWIP_DBG_OFF + +#define ETHARP_DEBUG LWIP_DBG_OFF +#define UDP_LPC_EMAC LWIP_DBG_OFF + +#ifdef LWIP_DEBUG +#define MEMP_OVERFLOW_CHECK 1 +#define MEMP_SANITY_CHECK 1 +#define LWIP_DBG_TYPES_ON LWIP_DBG_ON +#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL +#else +#define LWIP_NOASSERT 1 +#define LWIP_STATS 0 +#endif + +#define TRACE_TO_ASCII_HEX_DUMP 0 + +#define LWIP_PLATFORM_BYTESWAP 1 + +#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 1 + +// Interface type configuration + +#if MBED_CONF_LWIP_ETHERNET_ENABLED +#define LWIP_ARP 1 +#define LWIP_ETHERNET 1 +#define LWIP_DHCP LWIP_IPV4 +#else +#define LWIP_ARP 0 +#define LWIP_ETHERNET 0 +#endif // MBED_CONF_LWIP_ETHERNET_ENABLED + +#if MBED_CONF_LWIP_L3IP_ENABLED +#define LWIP_L3IP 1 +#else +#define LWIP_L3IP 0 +#endif + +//Maximum size of network interface name +#define INTERFACE_NAME_MAX_SIZE NSAPI_INTERFACE_NAME_MAX_SIZE +// Note generic macro name used rather than MBED_CONF_LWIP_PPP_ENABLED +// to allow users like PPPCellularInterface to detect that nsapi_ppp.h is available. + +// Enable PPP for now either from lwIP PPP configuration (obsolete) or from PPP service configuration +#if MBED_CONF_PPP_ENABLED || MBED_CONF_LWIP_PPP_ENABLED + +#define PPP_SUPPORT 1 + +#if MBED_CONF_PPP_IPV4_ENABLED || MBED_CONF_LWIP_IPV4_ENABLED +#define LWIP 0x11991199 +#if (MBED_CONF_NSAPI_DEFAULT_STACK == LWIP) && !MBED_CONF_LWIP_IPV4_ENABLED +#error LWIP: IPv4 PPP enabled but not IPv4 +#endif +#undef LWIP +#define PPP_IPV4_SUPPORT 1 +#endif + +#if MBED_CONF_PPP_IPV6_ENABLED || MBED_CONF_LWIP_IPV6_ENABLED +#define LWIP 0x11991199 +#if (MBED_CONF_NSAPI_DEFAULT_STACK == LWIP) && !MBED_CONF_LWIP_IPV6_ENABLED +#error LWIP: IPv6 PPP enabled but not IPv6 +#endif +#undef LWIP +#define PPP_IPV6_SUPPORT 1 +// Later to be dynamic for use for multiple interfaces +#define LWIP_IPV6_DUP_DETECT_ATTEMPTS 0 +#endif + +#endif + +#define LWIP_NETBUF_RECVINFO MBED_CONF_LWIP_NETBUF_RECVINFO_ENABLED + +// Make sure we default these to off, so +// LWIP doesn't default to on +#ifndef LWIP_ARP +#define LWIP_ARP 0 +#endif + +// Checksum-on-copy disabled due to https://savannah.nongnu.org/bugs/?50914 +#define LWIP_CHECKSUM_ON_COPY 0 + +#define LWIP_NETIF_HOSTNAME 1 +#define LWIP_NETIF_STATUS_CALLBACK 1 +#define LWIP_NETIF_LINK_CALLBACK 1 + +#define DNS_TABLE_SIZE 2 +#define DNS_MAX_NAME_LENGTH 128 + +#include "lwip_random.h" +#include "lwip_tcp_isn.h" +#define LWIP_HOOK_TCP_ISN lwip_hook_tcp_isn +#ifdef MBEDTLS_MD5_C +#define LWIP_USE_EXTERNAL_MBEDTLS 1 +#else +#define LWIP_USE_EXTERNAL_MBEDTLS 0 +#endif + +#define LWIP_ND6_RDNSS_MAX_DNS_SERVERS MBED_CONF_LWIP_ND6_RDNSS_MAX_DNS_SERVERS + +#endif /* LWIPOPTS_H_ */ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/libraries/SocketWrapper/src/MbedUdp.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/libraries/SocketWrapper/src/MbedUdp.cpp new file mode 100644 index 0000000..2a1b0fc --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/libraries/SocketWrapper/src/MbedUdp.cpp @@ -0,0 +1,217 @@ +#include "MbedUdp.h" + +arduino::MbedUDP::MbedUDP() { + _packet_buffer = new uint8_t[WIFI_UDP_BUFFER_SIZE]; + _current_packet = NULL; + _current_packet_size = 0; + // if this allocation fails then ::begin will fail +} + +arduino::MbedUDP::~MbedUDP() { + delete[] _packet_buffer; +} + +uint8_t arduino::MbedUDP::begin(uint16_t port) { + // success = 1, fail = 0 + + nsapi_error_t rt = _socket.open(getNetwork()); + if (rt != NSAPI_ERROR_OK) { + return 0; + } + + if (_socket.bind(port) < 0) { + return 0; //Failed to bind UDP Socket to port + } + + if (!_packet_buffer) { + return 0; + } + + _socket.set_blocking(false); + _socket.set_timeout(0); + + return 1; +} + +uint8_t arduino::MbedUDP::beginMulticast(IPAddress ip, uint16_t port) { + // success = 1, fail = 0 + if (begin(port) != 1) { + return 0; + } + + SocketAddress socketAddress = SocketHelpers::socketAddressFromIpAddress(ip, port); + + if (_socket.join_multicast_group(socketAddress) != NSAPI_ERROR_OK) { + printf("Error joining the multicast group\n"); + return 0; + } + + return 1; +} + +void arduino::MbedUDP::stop() { + _socket.close(); +} + +int arduino::MbedUDP::beginPacket(IPAddress ip, uint16_t port) { + _host = SocketHelpers::socketAddressFromIpAddress(ip, port); + //If IP is null and port is 0 the initialization failed + txBuffer.clear(); + return (_host.get_ip_address() == nullptr && _host.get_port() == 0) ? 0 : 1; +} + +int arduino::MbedUDP::beginPacket(const char *host, uint16_t port) { + _host = SocketAddress(host, port); + txBuffer.clear(); + getNetwork()->gethostbyname(host, &_host); + //If IP is null and port is 0 the initialization failed + return (_host.get_ip_address() == nullptr && _host.get_port() == 0) ? 0 : 1; +} + +int arduino::MbedUDP::endPacket() { + _socket.set_blocking(true); + _socket.set_timeout(1000); + + size_t size = txBuffer.available(); + uint8_t buffer[size]; + for (int i = 0; i < size; i++) { + buffer[i] = txBuffer.read_char(); + } + + nsapi_size_or_error_t ret = _socket.sendto(_host, buffer, size); + _socket.set_blocking(false); + _socket.set_timeout(0); + if (ret < 0) { + return 0; + } + return size; +} + +// Write a single byte into the packet +size_t arduino::MbedUDP::write(uint8_t byte) { + return write(&byte, 1); +} + +// Write size bytes from buffer into the packet +size_t arduino::MbedUDP::write(const uint8_t *buffer, size_t size) { + for (int i = 0; i _packet_buffer + _current_packet_size) { + // try reading the next packet... + if (parsePacket() > 0) { + // if so, read first byte of next packet; + return read(); + } else { + // no new data... not sure what to return here now + return -1; + } + } + + return _current_packet[0]; +} + +// Read up to len bytes from the current packet and place them into buffer +// Returns the number of bytes read, or 0 if none are available +int arduino::MbedUDP::read(unsigned char *buffer, size_t len) { + // Q: does Arduino read() function handle fragmentation? I won't for now... + if (_current_packet == NULL) { + if (parsePacket() == 0) return 0; + } + + // how much data do we have in the current packet? + int offset = _current_packet - _packet_buffer; + if (offset < 0) { + return 0; + } + + int max_bytes = _current_packet_size - offset; + if (max_bytes < 0) { + return 0; + } + + // at the end of the packet? + if (max_bytes == 0) { + // try read next packet... + if (parsePacket() > 0) { + return read(buffer, len); + } else { + return 0; + } + } + + if (len > (size_t)max_bytes) len = max_bytes; + + // copy to target buffer + memcpy(buffer, _current_packet, len); + + _current_packet += len; + + return len; +} + +IPAddress arduino::MbedUDP::remoteIP() { + nsapi_addr_t address = _remoteHost.get_addr(); + return IPAddress(address.bytes[0], address.bytes[1], address.bytes[2], address.bytes[3]); +} + +uint16_t arduino::MbedUDP::remotePort() { + return _remoteHost.get_port(); +} + +void arduino::MbedUDP::flush() { + // TODO: a real check to ensure transmission has been completed +} + +int arduino::MbedUDP::peek() { + if (_current_packet_size < 1) { + return -1; + } + + return _current_packet[0]; +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/libraries/SocketWrapper/src/MbedUdp.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/libraries/SocketWrapper/src/MbedUdp.h new file mode 100644 index 0000000..7f81ede --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/libraries/SocketWrapper/src/MbedUdp.h @@ -0,0 +1,105 @@ +/* + MbedUdp.h - UDP implementation using mbed Sockets + Copyright (c) 2021 Arduino SA. All right reserved. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef MBEDUDP_H +#define MBEDUDP_H + +#include "Arduino.h" +#include "SocketHelpers.h" +#include "api/Udp.h" + +#include "netsocket/SocketAddress.h" +#include "netsocket/UDPSocket.h" + +#ifndef WIFI_UDP_BUFFER_SIZE +#define WIFI_UDP_BUFFER_SIZE 508 +#endif + +namespace arduino { + +class MbedUDP : public UDP { +private: + UDPSocket _socket; // Mbed OS socket + SocketAddress _host; // Host to be used to send data + SocketAddress _remoteHost; // Remote host that sent incoming packets + + uint8_t* _packet_buffer; // Raw packet buffer (contains data we got from the UDPSocket) + + // The Arduino APIs allow you to iterate through this buffer, so we need to be able to iterate over the current packet + // these two variables are used to cache the state of the current packet + uint8_t* _current_packet; + size_t _current_packet_size; + + RingBufferN txBuffer; + +protected: + virtual NetworkInterface* getNetwork() = 0; + +public: + MbedUDP(); // Constructor + ~MbedUDP(); + virtual uint8_t begin(uint16_t); // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + virtual uint8_t beginMulticast(IPAddress, uint16_t); // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 if there are no sockets available to use + virtual void stop(); // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port); + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char* host, uint16_t port); + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket(); + // Write a single byte into the packet + virtual size_t write(uint8_t); + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t* buffer, size_t size); + + using Print::write; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket(); + // Number of bytes remaining in the current packet + virtual int available(); + // Read a single byte from the current packet + virtual int read(); + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len); + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) { + return read((unsigned char*)buffer, len); + }; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek(); + virtual void flush(); // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP(); + // // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort(); + + friend class MbedSocketClass; +}; + +} + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/portenta_post_install.sh b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/portenta_post_install.sh new file mode 100644 index 0000000..7fe71d6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/portenta_post_install.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +portenta_h7_rules () { + echo "" + echo "# Portenta H7 bootloader mode UDEV rules" + echo "" +cat < /etc/udev/rules.d/49-portenta_h7.rules + +# reload udev rules +echo "Reload rules..." +udevadm trigger +udevadm control --reload-rules diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.7.2/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.7.2/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h new file mode 100644 index 0000000..84c18cf --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.7.2/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h @@ -0,0 +1,347 @@ +/* Copyright (C) 2012 mbed.org, MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software + * and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef LWIPOPTS_H +#define LWIPOPTS_H + +// Workaround for Linux timeval +#if defined (TOOLCHAIN_GCC) +#define LWIP_TIMEVAL_PRIVATE 0 +#include +#endif +#include "nsapi_types.h" +#include "mbed_retarget.h" + +// KH fix +#include +///////////////////////// + +// Operating System +#define NO_SYS 0 + +#if !MBED_CONF_LWIP_IPV4_ENABLED && !MBED_CONF_LWIP_IPV6_ENABLED +#error "Either IPv4 or IPv6 must be enabled." +#endif + +#define LWIP_IPV4 MBED_CONF_LWIP_IPV4_ENABLED + +#define LWIP_IPV6 MBED_CONF_LWIP_IPV6_ENABLED + +#define LWIP_PROVIDE_ERRNO 0 + +// On dual stack configuration how long to wait for both or preferred stack +// addresses before completing bring up. +#if LWIP_IPV4 && LWIP_IPV6 +#if MBED_CONF_LWIP_ADDR_TIMEOUT_MODE +#define BOTH_ADDR_TIMEOUT MBED_CONF_LWIP_ADDR_TIMEOUT +#define PREF_ADDR_TIMEOUT 0 +#else +#define PREF_ADDR_TIMEOUT MBED_CONF_LWIP_ADDR_TIMEOUT +#define BOTH_ADDR_TIMEOUT 0 +#endif +#else +#define PREF_ADDR_TIMEOUT 0 +#define BOTH_ADDR_TIMEOUT 0 +#endif + + +#define DHCP_TIMEOUT MBED_CONF_LWIP_DHCP_TIMEOUT + +#define LINK_TIMEOUT 60 + +#define PREF_IPV4 1 +#define PREF_IPV6 2 + +#if MBED_CONF_LWIP_IP_VER_PREF == 6 +#define IP_VERSION_PREF PREF_IPV6 +#elif MBED_CONF_LWIP_IP_VER_PREF == 4 +#define IP_VERSION_PREF PREF_IPV4 +#else +#error "Either IPv4 or IPv6 must be preferred." +#endif + +#undef LWIP_DEBUG +#if MBED_CONF_LWIP_DEBUG_ENABLED +#define LWIP_DEBUG 1 +#endif + +#if NO_SYS == 0 +#include "cmsis_os2.h" + +#define SYS_LIGHTWEIGHT_PROT 1 + +#define LWIP_RAW MBED_CONF_LWIP_RAW_SOCKET_ENABLED + +#define MEMP_NUM_TCPIP_MSG_INPKT MBED_CONF_LWIP_MEMP_NUM_TCPIP_MSG_INPKT + +// Thread stacks use 8-byte alignment +#define LWIP_ALIGN_UP(pos, align) ((pos) % (align) ? (pos) + ((align) - (pos) % (align)) : (pos)) + +#ifdef LWIP_DEBUG +// For LWIP debug, double the stack +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE*2, 8) +#elif MBED_DEBUG +// When debug is enabled on the build increase stack 25 percent +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE + MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE / 4, 8) +#else +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE, 8) +#endif + +// Thread priority (osPriorityNormal by default) +#define TCPIP_THREAD_PRIO (MBED_CONF_LWIP_TCPIP_THREAD_PRIORITY) + +#ifdef LWIP_DEBUG +#define DEFAULT_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE*2, 8) +#else +#define DEFAULT_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE, 8) +#endif + +#define MEMP_NUM_SYS_TIMEOUT 16 + +#define sys_msleep(ms) sys_msleep(ms) + +#endif + +// 32-bit alignment +#define MEM_ALIGNMENT 4 + +#define LWIP_RAM_HEAP_POINTER lwip_ram_heap + +// Number of simultaneously queued TCP segments. +#define MEMP_NUM_TCP_SEG MBED_CONF_LWIP_MEMP_NUM_TCP_SEG + +// TCP Maximum segment size. +#define TCP_MSS MBED_CONF_LWIP_TCP_MSS + +// TCP sender buffer space (bytes). +#define TCP_SND_BUF MBED_CONF_LWIP_TCP_SND_BUF + +// TCP sender buffer space (bytes). +#define TCP_WND MBED_CONF_LWIP_TCP_WND + +#define TCP_MAXRTX MBED_CONF_LWIP_TCP_MAXRTX + +#define TCP_SYNMAXRTX MBED_CONF_LWIP_TCP_SYNMAXRTX + +// Number of pool pbufs. +// Each requires 684 bytes of RAM (if MSS=536 and PBUF_POOL_BUFSIZE defaulting to be based on MSS) +#define PBUF_POOL_SIZE MBED_CONF_LWIP_PBUF_POOL_SIZE + +#ifdef MBED_CONF_LWIP_PBUF_POOL_BUFSIZE +#undef PBUF_POOL_BUFSIZE +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(MBED_CONF_LWIP_PBUF_POOL_BUFSIZE) +#else +#ifndef PBUF_POOL_BUFSIZE +#if LWIP_IPV6 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) +#elif LWIP_IPV4 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+20+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) +#endif +#endif +#endif + +#define MEM_SIZE MBED_CONF_LWIP_MEM_SIZE + +// One tcp_pcb_listen is needed for each TCP server. +// Each requires 72 bytes of RAM. +#define MEMP_NUM_TCP_PCB_LISTEN MBED_CONF_LWIP_TCP_SERVER_MAX + +// One is tcp_pcb needed for each TCPSocket. +// Each requires 196 bytes of RAM. +#define MEMP_NUM_TCP_PCB MBED_CONF_LWIP_TCP_SOCKET_MAX + +// One udp_pcb is needed for each UDPSocket. +// Each requires 84 bytes of RAM (total rounded to multiple of 512). +#define MEMP_NUM_UDP_PCB MBED_CONF_LWIP_UDP_SOCKET_MAX + +// Number of non-pool pbufs. +// Each requires 92 bytes of RAM. +#define MEMP_NUM_PBUF MBED_CONF_LWIP_NUM_PBUF + +// Each netbuf requires 64 bytes of RAM. +#define MEMP_NUM_NETBUF MBED_CONF_LWIP_NUM_NETBUF + +// One netconn is needed for each UDPSocket or TCPSocket. +// Each requires 236 bytes of RAM (total rounded to multiple of 512). +#define MEMP_NUM_NETCONN MBED_CONF_LWIP_SOCKET_MAX + +#if MBED_CONF_LWIP_TCP_ENABLED +#define LWIP_TCP 1 +#define TCP_OVERSIZE 0 +#define LWIP_TCP_KEEPALIVE 1 + +#define TCP_CLOSE_TIMEOUT MBED_CONF_LWIP_TCP_CLOSE_TIMEOUT + +#else +#define LWIP_TCP 0 +#endif + +#define LWIP_DNS 1 +// Only DNS address storage is enabled +#define LWIP_FULL_DNS 0 +#define LWIP_SOCKET 0 + +#define SO_REUSE 1 + +// Support Multicast +#include "stdlib.h" +#define LWIP_IGMP LWIP_IPV4 +#define LWIP_RAND() lwip_get_random() + +#define LWIP_COMPAT_SOCKETS 0 +#define LWIP_POSIX_SOCKETS_IO_NAMES 0 + +#define LWIP_BROADCAST_PING 1 + +// Fragmentation on, as per IPv4 default +#define LWIP_IPV6_FRAG LWIP_IPV6 + +// Queuing, default is "disabled", as per IPv4 default (so actually queues 1) +#define LWIP_ND6_QUEUEING MBED_CONF_ND6_QUEUEING + +// Debug Options +#define NETIF_DEBUG LWIP_DBG_OFF +#define PBUF_DEBUG LWIP_DBG_OFF +#define API_LIB_DEBUG LWIP_DBG_OFF +#define API_MSG_DEBUG LWIP_DBG_OFF +#define SOCKETS_DEBUG LWIP_DBG_OFF +#define ICMP_DEBUG LWIP_DBG_OFF +#define IGMP_DEBUG LWIP_DBG_OFF +#define INET_DEBUG LWIP_DBG_OFF +#define IP_DEBUG LWIP_DBG_OFF +#define IP_REASS_DEBUG LWIP_DBG_OFF +#define RAW_DEBUG LWIP_DBG_OFF +#define MEM_DEBUG LWIP_DBG_OFF +#define MEMP_DEBUG LWIP_DBG_OFF +#define SYS_DEBUG LWIP_DBG_OFF +#define TIMERS_DEBUG LWIP_DBG_OFF +#define TCP_DEBUG LWIP_DBG_OFF +#define TCP_INPUT_DEBUG LWIP_DBG_OFF +#define TCP_FR_DEBUG LWIP_DBG_OFF +#define TCP_RTO_DEBUG LWIP_DBG_OFF +#define TCP_CWND_DEBUG LWIP_DBG_OFF +#define TCP_WND_DEBUG LWIP_DBG_OFF +#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF +#define TCP_RST_DEBUG LWIP_DBG_OFF +#define TCP_QLEN_DEBUG LWIP_DBG_OFF +#define UDP_DEBUG LWIP_DBG_OFF +#define TCPIP_DEBUG LWIP_DBG_OFF +#define SLIP_DEBUG LWIP_DBG_OFF +#define DHCP_DEBUG LWIP_DBG_OFF +#define AUTOIP_DEBUG LWIP_DBG_OFF +#define DNS_DEBUG LWIP_DBG_OFF +#define IP6_DEBUG LWIP_DBG_OFF + +#define ETHARP_DEBUG LWIP_DBG_OFF +#define UDP_LPC_EMAC LWIP_DBG_OFF + +#ifdef LWIP_DEBUG +#define MEMP_OVERFLOW_CHECK 1 +#define MEMP_SANITY_CHECK 1 +#define LWIP_DBG_TYPES_ON LWIP_DBG_ON +#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL +#else +#define LWIP_NOASSERT 1 +#define LWIP_STATS 0 +#endif + +#define TRACE_TO_ASCII_HEX_DUMP 0 + +#define LWIP_PLATFORM_BYTESWAP 1 + +#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 1 + +// Interface type configuration + +#if MBED_CONF_LWIP_ETHERNET_ENABLED +#define LWIP_ARP 1 +#define LWIP_ETHERNET 1 +#define LWIP_DHCP LWIP_IPV4 +#else +#define LWIP_ARP 0 +#define LWIP_ETHERNET 0 +#endif // MBED_CONF_LWIP_ETHERNET_ENABLED + +#if MBED_CONF_LWIP_L3IP_ENABLED +#define LWIP_L3IP 1 +#else +#define LWIP_L3IP 0 +#endif + +//Maximum size of network interface name +#define INTERFACE_NAME_MAX_SIZE NSAPI_INTERFACE_NAME_MAX_SIZE +// Note generic macro name used rather than MBED_CONF_LWIP_PPP_ENABLED +// to allow users like PPPCellularInterface to detect that nsapi_ppp.h is available. + +// Enable PPP for now either from lwIP PPP configuration (obsolete) or from PPP service configuration +#if MBED_CONF_PPP_ENABLED || MBED_CONF_LWIP_PPP_ENABLED + +#define PPP_SUPPORT 1 + +#if MBED_CONF_PPP_IPV4_ENABLED || MBED_CONF_LWIP_IPV4_ENABLED +#define LWIP 0x11991199 +#if (MBED_CONF_NSAPI_DEFAULT_STACK == LWIP) && !MBED_CONF_LWIP_IPV4_ENABLED +#error LWIP: IPv4 PPP enabled but not IPv4 +#endif +#undef LWIP +#define PPP_IPV4_SUPPORT 1 +#endif + +#if MBED_CONF_PPP_IPV6_ENABLED || MBED_CONF_LWIP_IPV6_ENABLED +#define LWIP 0x11991199 +#if (MBED_CONF_NSAPI_DEFAULT_STACK == LWIP) && !MBED_CONF_LWIP_IPV6_ENABLED +#error LWIP: IPv6 PPP enabled but not IPv6 +#endif +#undef LWIP +#define PPP_IPV6_SUPPORT 1 +// Later to be dynamic for use for multiple interfaces +#define LWIP_IPV6_DUP_DETECT_ATTEMPTS 0 +#endif + +#endif + +#define LWIP_NETBUF_RECVINFO MBED_CONF_LWIP_NETBUF_RECVINFO_ENABLED + +// Make sure we default these to off, so +// LWIP doesn't default to on +#ifndef LWIP_ARP +#define LWIP_ARP 0 +#endif + +// Checksum-on-copy disabled due to https://savannah.nongnu.org/bugs/?50914 +#define LWIP_CHECKSUM_ON_COPY 0 + +#define LWIP_NETIF_HOSTNAME 1 +#define LWIP_NETIF_STATUS_CALLBACK 1 +#define LWIP_NETIF_LINK_CALLBACK 1 + +#define DNS_TABLE_SIZE 2 +#define DNS_MAX_NAME_LENGTH 128 + +#include "lwip_random.h" +#include "lwip_tcp_isn.h" +#define LWIP_HOOK_TCP_ISN lwip_hook_tcp_isn +#ifdef MBEDTLS_MD5_C +#define LWIP_USE_EXTERNAL_MBEDTLS 1 +#else +#define LWIP_USE_EXTERNAL_MBEDTLS 0 +#endif + +#define LWIP_ND6_RDNSS_MAX_DNS_SERVERS MBED_CONF_LWIP_ND6_RDNSS_MAX_DNS_SERVERS + +#endif /* LWIPOPTS_H_ */ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.7.2/portenta_post_install.sh b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.7.2/portenta_post_install.sh new file mode 100644 index 0000000..7fe71d6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.7.2/portenta_post_install.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +portenta_h7_rules () { + echo "" + echo "# Portenta H7 bootloader mode UDEV rules" + echo "" +cat < /etc/udev/rules.d/49-portenta_h7.rules + +# reload udev rules +echo "Reload rules..." +udevadm trigger +udevadm control --reload-rules diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.8.0/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.8.0/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h new file mode 100644 index 0000000..84c18cf --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.8.0/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h @@ -0,0 +1,347 @@ +/* Copyright (C) 2012 mbed.org, MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software + * and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef LWIPOPTS_H +#define LWIPOPTS_H + +// Workaround for Linux timeval +#if defined (TOOLCHAIN_GCC) +#define LWIP_TIMEVAL_PRIVATE 0 +#include +#endif +#include "nsapi_types.h" +#include "mbed_retarget.h" + +// KH fix +#include +///////////////////////// + +// Operating System +#define NO_SYS 0 + +#if !MBED_CONF_LWIP_IPV4_ENABLED && !MBED_CONF_LWIP_IPV6_ENABLED +#error "Either IPv4 or IPv6 must be enabled." +#endif + +#define LWIP_IPV4 MBED_CONF_LWIP_IPV4_ENABLED + +#define LWIP_IPV6 MBED_CONF_LWIP_IPV6_ENABLED + +#define LWIP_PROVIDE_ERRNO 0 + +// On dual stack configuration how long to wait for both or preferred stack +// addresses before completing bring up. +#if LWIP_IPV4 && LWIP_IPV6 +#if MBED_CONF_LWIP_ADDR_TIMEOUT_MODE +#define BOTH_ADDR_TIMEOUT MBED_CONF_LWIP_ADDR_TIMEOUT +#define PREF_ADDR_TIMEOUT 0 +#else +#define PREF_ADDR_TIMEOUT MBED_CONF_LWIP_ADDR_TIMEOUT +#define BOTH_ADDR_TIMEOUT 0 +#endif +#else +#define PREF_ADDR_TIMEOUT 0 +#define BOTH_ADDR_TIMEOUT 0 +#endif + + +#define DHCP_TIMEOUT MBED_CONF_LWIP_DHCP_TIMEOUT + +#define LINK_TIMEOUT 60 + +#define PREF_IPV4 1 +#define PREF_IPV6 2 + +#if MBED_CONF_LWIP_IP_VER_PREF == 6 +#define IP_VERSION_PREF PREF_IPV6 +#elif MBED_CONF_LWIP_IP_VER_PREF == 4 +#define IP_VERSION_PREF PREF_IPV4 +#else +#error "Either IPv4 or IPv6 must be preferred." +#endif + +#undef LWIP_DEBUG +#if MBED_CONF_LWIP_DEBUG_ENABLED +#define LWIP_DEBUG 1 +#endif + +#if NO_SYS == 0 +#include "cmsis_os2.h" + +#define SYS_LIGHTWEIGHT_PROT 1 + +#define LWIP_RAW MBED_CONF_LWIP_RAW_SOCKET_ENABLED + +#define MEMP_NUM_TCPIP_MSG_INPKT MBED_CONF_LWIP_MEMP_NUM_TCPIP_MSG_INPKT + +// Thread stacks use 8-byte alignment +#define LWIP_ALIGN_UP(pos, align) ((pos) % (align) ? (pos) + ((align) - (pos) % (align)) : (pos)) + +#ifdef LWIP_DEBUG +// For LWIP debug, double the stack +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE*2, 8) +#elif MBED_DEBUG +// When debug is enabled on the build increase stack 25 percent +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE + MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE / 4, 8) +#else +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE, 8) +#endif + +// Thread priority (osPriorityNormal by default) +#define TCPIP_THREAD_PRIO (MBED_CONF_LWIP_TCPIP_THREAD_PRIORITY) + +#ifdef LWIP_DEBUG +#define DEFAULT_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE*2, 8) +#else +#define DEFAULT_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE, 8) +#endif + +#define MEMP_NUM_SYS_TIMEOUT 16 + +#define sys_msleep(ms) sys_msleep(ms) + +#endif + +// 32-bit alignment +#define MEM_ALIGNMENT 4 + +#define LWIP_RAM_HEAP_POINTER lwip_ram_heap + +// Number of simultaneously queued TCP segments. +#define MEMP_NUM_TCP_SEG MBED_CONF_LWIP_MEMP_NUM_TCP_SEG + +// TCP Maximum segment size. +#define TCP_MSS MBED_CONF_LWIP_TCP_MSS + +// TCP sender buffer space (bytes). +#define TCP_SND_BUF MBED_CONF_LWIP_TCP_SND_BUF + +// TCP sender buffer space (bytes). +#define TCP_WND MBED_CONF_LWIP_TCP_WND + +#define TCP_MAXRTX MBED_CONF_LWIP_TCP_MAXRTX + +#define TCP_SYNMAXRTX MBED_CONF_LWIP_TCP_SYNMAXRTX + +// Number of pool pbufs. +// Each requires 684 bytes of RAM (if MSS=536 and PBUF_POOL_BUFSIZE defaulting to be based on MSS) +#define PBUF_POOL_SIZE MBED_CONF_LWIP_PBUF_POOL_SIZE + +#ifdef MBED_CONF_LWIP_PBUF_POOL_BUFSIZE +#undef PBUF_POOL_BUFSIZE +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(MBED_CONF_LWIP_PBUF_POOL_BUFSIZE) +#else +#ifndef PBUF_POOL_BUFSIZE +#if LWIP_IPV6 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) +#elif LWIP_IPV4 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+20+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) +#endif +#endif +#endif + +#define MEM_SIZE MBED_CONF_LWIP_MEM_SIZE + +// One tcp_pcb_listen is needed for each TCP server. +// Each requires 72 bytes of RAM. +#define MEMP_NUM_TCP_PCB_LISTEN MBED_CONF_LWIP_TCP_SERVER_MAX + +// One is tcp_pcb needed for each TCPSocket. +// Each requires 196 bytes of RAM. +#define MEMP_NUM_TCP_PCB MBED_CONF_LWIP_TCP_SOCKET_MAX + +// One udp_pcb is needed for each UDPSocket. +// Each requires 84 bytes of RAM (total rounded to multiple of 512). +#define MEMP_NUM_UDP_PCB MBED_CONF_LWIP_UDP_SOCKET_MAX + +// Number of non-pool pbufs. +// Each requires 92 bytes of RAM. +#define MEMP_NUM_PBUF MBED_CONF_LWIP_NUM_PBUF + +// Each netbuf requires 64 bytes of RAM. +#define MEMP_NUM_NETBUF MBED_CONF_LWIP_NUM_NETBUF + +// One netconn is needed for each UDPSocket or TCPSocket. +// Each requires 236 bytes of RAM (total rounded to multiple of 512). +#define MEMP_NUM_NETCONN MBED_CONF_LWIP_SOCKET_MAX + +#if MBED_CONF_LWIP_TCP_ENABLED +#define LWIP_TCP 1 +#define TCP_OVERSIZE 0 +#define LWIP_TCP_KEEPALIVE 1 + +#define TCP_CLOSE_TIMEOUT MBED_CONF_LWIP_TCP_CLOSE_TIMEOUT + +#else +#define LWIP_TCP 0 +#endif + +#define LWIP_DNS 1 +// Only DNS address storage is enabled +#define LWIP_FULL_DNS 0 +#define LWIP_SOCKET 0 + +#define SO_REUSE 1 + +// Support Multicast +#include "stdlib.h" +#define LWIP_IGMP LWIP_IPV4 +#define LWIP_RAND() lwip_get_random() + +#define LWIP_COMPAT_SOCKETS 0 +#define LWIP_POSIX_SOCKETS_IO_NAMES 0 + +#define LWIP_BROADCAST_PING 1 + +// Fragmentation on, as per IPv4 default +#define LWIP_IPV6_FRAG LWIP_IPV6 + +// Queuing, default is "disabled", as per IPv4 default (so actually queues 1) +#define LWIP_ND6_QUEUEING MBED_CONF_ND6_QUEUEING + +// Debug Options +#define NETIF_DEBUG LWIP_DBG_OFF +#define PBUF_DEBUG LWIP_DBG_OFF +#define API_LIB_DEBUG LWIP_DBG_OFF +#define API_MSG_DEBUG LWIP_DBG_OFF +#define SOCKETS_DEBUG LWIP_DBG_OFF +#define ICMP_DEBUG LWIP_DBG_OFF +#define IGMP_DEBUG LWIP_DBG_OFF +#define INET_DEBUG LWIP_DBG_OFF +#define IP_DEBUG LWIP_DBG_OFF +#define IP_REASS_DEBUG LWIP_DBG_OFF +#define RAW_DEBUG LWIP_DBG_OFF +#define MEM_DEBUG LWIP_DBG_OFF +#define MEMP_DEBUG LWIP_DBG_OFF +#define SYS_DEBUG LWIP_DBG_OFF +#define TIMERS_DEBUG LWIP_DBG_OFF +#define TCP_DEBUG LWIP_DBG_OFF +#define TCP_INPUT_DEBUG LWIP_DBG_OFF +#define TCP_FR_DEBUG LWIP_DBG_OFF +#define TCP_RTO_DEBUG LWIP_DBG_OFF +#define TCP_CWND_DEBUG LWIP_DBG_OFF +#define TCP_WND_DEBUG LWIP_DBG_OFF +#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF +#define TCP_RST_DEBUG LWIP_DBG_OFF +#define TCP_QLEN_DEBUG LWIP_DBG_OFF +#define UDP_DEBUG LWIP_DBG_OFF +#define TCPIP_DEBUG LWIP_DBG_OFF +#define SLIP_DEBUG LWIP_DBG_OFF +#define DHCP_DEBUG LWIP_DBG_OFF +#define AUTOIP_DEBUG LWIP_DBG_OFF +#define DNS_DEBUG LWIP_DBG_OFF +#define IP6_DEBUG LWIP_DBG_OFF + +#define ETHARP_DEBUG LWIP_DBG_OFF +#define UDP_LPC_EMAC LWIP_DBG_OFF + +#ifdef LWIP_DEBUG +#define MEMP_OVERFLOW_CHECK 1 +#define MEMP_SANITY_CHECK 1 +#define LWIP_DBG_TYPES_ON LWIP_DBG_ON +#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL +#else +#define LWIP_NOASSERT 1 +#define LWIP_STATS 0 +#endif + +#define TRACE_TO_ASCII_HEX_DUMP 0 + +#define LWIP_PLATFORM_BYTESWAP 1 + +#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 1 + +// Interface type configuration + +#if MBED_CONF_LWIP_ETHERNET_ENABLED +#define LWIP_ARP 1 +#define LWIP_ETHERNET 1 +#define LWIP_DHCP LWIP_IPV4 +#else +#define LWIP_ARP 0 +#define LWIP_ETHERNET 0 +#endif // MBED_CONF_LWIP_ETHERNET_ENABLED + +#if MBED_CONF_LWIP_L3IP_ENABLED +#define LWIP_L3IP 1 +#else +#define LWIP_L3IP 0 +#endif + +//Maximum size of network interface name +#define INTERFACE_NAME_MAX_SIZE NSAPI_INTERFACE_NAME_MAX_SIZE +// Note generic macro name used rather than MBED_CONF_LWIP_PPP_ENABLED +// to allow users like PPPCellularInterface to detect that nsapi_ppp.h is available. + +// Enable PPP for now either from lwIP PPP configuration (obsolete) or from PPP service configuration +#if MBED_CONF_PPP_ENABLED || MBED_CONF_LWIP_PPP_ENABLED + +#define PPP_SUPPORT 1 + +#if MBED_CONF_PPP_IPV4_ENABLED || MBED_CONF_LWIP_IPV4_ENABLED +#define LWIP 0x11991199 +#if (MBED_CONF_NSAPI_DEFAULT_STACK == LWIP) && !MBED_CONF_LWIP_IPV4_ENABLED +#error LWIP: IPv4 PPP enabled but not IPv4 +#endif +#undef LWIP +#define PPP_IPV4_SUPPORT 1 +#endif + +#if MBED_CONF_PPP_IPV6_ENABLED || MBED_CONF_LWIP_IPV6_ENABLED +#define LWIP 0x11991199 +#if (MBED_CONF_NSAPI_DEFAULT_STACK == LWIP) && !MBED_CONF_LWIP_IPV6_ENABLED +#error LWIP: IPv6 PPP enabled but not IPv6 +#endif +#undef LWIP +#define PPP_IPV6_SUPPORT 1 +// Later to be dynamic for use for multiple interfaces +#define LWIP_IPV6_DUP_DETECT_ATTEMPTS 0 +#endif + +#endif + +#define LWIP_NETBUF_RECVINFO MBED_CONF_LWIP_NETBUF_RECVINFO_ENABLED + +// Make sure we default these to off, so +// LWIP doesn't default to on +#ifndef LWIP_ARP +#define LWIP_ARP 0 +#endif + +// Checksum-on-copy disabled due to https://savannah.nongnu.org/bugs/?50914 +#define LWIP_CHECKSUM_ON_COPY 0 + +#define LWIP_NETIF_HOSTNAME 1 +#define LWIP_NETIF_STATUS_CALLBACK 1 +#define LWIP_NETIF_LINK_CALLBACK 1 + +#define DNS_TABLE_SIZE 2 +#define DNS_MAX_NAME_LENGTH 128 + +#include "lwip_random.h" +#include "lwip_tcp_isn.h" +#define LWIP_HOOK_TCP_ISN lwip_hook_tcp_isn +#ifdef MBEDTLS_MD5_C +#define LWIP_USE_EXTERNAL_MBEDTLS 1 +#else +#define LWIP_USE_EXTERNAL_MBEDTLS 0 +#endif + +#define LWIP_ND6_RDNSS_MAX_DNS_SERVERS MBED_CONF_LWIP_ND6_RDNSS_MAX_DNS_SERVERS + +#endif /* LWIPOPTS_H_ */ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.8.0/portenta_post_install.sh b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.8.0/portenta_post_install.sh new file mode 100644 index 0000000..7fe71d6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/2.8.0/portenta_post_install.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +portenta_h7_rules () { + echo "" + echo "# Portenta H7 bootloader mode UDEV rules" + echo "" +cat < /etc/udev/rules.d/49-portenta_h7.rules + +# reload udev rules +echo "Reload rules..." +udevadm trigger +udevadm control --reload-rules diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/3.0.0/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/3.0.0/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h new file mode 100644 index 0000000..84c18cf --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/3.0.0/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h @@ -0,0 +1,347 @@ +/* Copyright (C) 2012 mbed.org, MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software + * and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef LWIPOPTS_H +#define LWIPOPTS_H + +// Workaround for Linux timeval +#if defined (TOOLCHAIN_GCC) +#define LWIP_TIMEVAL_PRIVATE 0 +#include +#endif +#include "nsapi_types.h" +#include "mbed_retarget.h" + +// KH fix +#include +///////////////////////// + +// Operating System +#define NO_SYS 0 + +#if !MBED_CONF_LWIP_IPV4_ENABLED && !MBED_CONF_LWIP_IPV6_ENABLED +#error "Either IPv4 or IPv6 must be enabled." +#endif + +#define LWIP_IPV4 MBED_CONF_LWIP_IPV4_ENABLED + +#define LWIP_IPV6 MBED_CONF_LWIP_IPV6_ENABLED + +#define LWIP_PROVIDE_ERRNO 0 + +// On dual stack configuration how long to wait for both or preferred stack +// addresses before completing bring up. +#if LWIP_IPV4 && LWIP_IPV6 +#if MBED_CONF_LWIP_ADDR_TIMEOUT_MODE +#define BOTH_ADDR_TIMEOUT MBED_CONF_LWIP_ADDR_TIMEOUT +#define PREF_ADDR_TIMEOUT 0 +#else +#define PREF_ADDR_TIMEOUT MBED_CONF_LWIP_ADDR_TIMEOUT +#define BOTH_ADDR_TIMEOUT 0 +#endif +#else +#define PREF_ADDR_TIMEOUT 0 +#define BOTH_ADDR_TIMEOUT 0 +#endif + + +#define DHCP_TIMEOUT MBED_CONF_LWIP_DHCP_TIMEOUT + +#define LINK_TIMEOUT 60 + +#define PREF_IPV4 1 +#define PREF_IPV6 2 + +#if MBED_CONF_LWIP_IP_VER_PREF == 6 +#define IP_VERSION_PREF PREF_IPV6 +#elif MBED_CONF_LWIP_IP_VER_PREF == 4 +#define IP_VERSION_PREF PREF_IPV4 +#else +#error "Either IPv4 or IPv6 must be preferred." +#endif + +#undef LWIP_DEBUG +#if MBED_CONF_LWIP_DEBUG_ENABLED +#define LWIP_DEBUG 1 +#endif + +#if NO_SYS == 0 +#include "cmsis_os2.h" + +#define SYS_LIGHTWEIGHT_PROT 1 + +#define LWIP_RAW MBED_CONF_LWIP_RAW_SOCKET_ENABLED + +#define MEMP_NUM_TCPIP_MSG_INPKT MBED_CONF_LWIP_MEMP_NUM_TCPIP_MSG_INPKT + +// Thread stacks use 8-byte alignment +#define LWIP_ALIGN_UP(pos, align) ((pos) % (align) ? (pos) + ((align) - (pos) % (align)) : (pos)) + +#ifdef LWIP_DEBUG +// For LWIP debug, double the stack +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE*2, 8) +#elif MBED_DEBUG +// When debug is enabled on the build increase stack 25 percent +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE + MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE / 4, 8) +#else +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE, 8) +#endif + +// Thread priority (osPriorityNormal by default) +#define TCPIP_THREAD_PRIO (MBED_CONF_LWIP_TCPIP_THREAD_PRIORITY) + +#ifdef LWIP_DEBUG +#define DEFAULT_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE*2, 8) +#else +#define DEFAULT_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE, 8) +#endif + +#define MEMP_NUM_SYS_TIMEOUT 16 + +#define sys_msleep(ms) sys_msleep(ms) + +#endif + +// 32-bit alignment +#define MEM_ALIGNMENT 4 + +#define LWIP_RAM_HEAP_POINTER lwip_ram_heap + +// Number of simultaneously queued TCP segments. +#define MEMP_NUM_TCP_SEG MBED_CONF_LWIP_MEMP_NUM_TCP_SEG + +// TCP Maximum segment size. +#define TCP_MSS MBED_CONF_LWIP_TCP_MSS + +// TCP sender buffer space (bytes). +#define TCP_SND_BUF MBED_CONF_LWIP_TCP_SND_BUF + +// TCP sender buffer space (bytes). +#define TCP_WND MBED_CONF_LWIP_TCP_WND + +#define TCP_MAXRTX MBED_CONF_LWIP_TCP_MAXRTX + +#define TCP_SYNMAXRTX MBED_CONF_LWIP_TCP_SYNMAXRTX + +// Number of pool pbufs. +// Each requires 684 bytes of RAM (if MSS=536 and PBUF_POOL_BUFSIZE defaulting to be based on MSS) +#define PBUF_POOL_SIZE MBED_CONF_LWIP_PBUF_POOL_SIZE + +#ifdef MBED_CONF_LWIP_PBUF_POOL_BUFSIZE +#undef PBUF_POOL_BUFSIZE +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(MBED_CONF_LWIP_PBUF_POOL_BUFSIZE) +#else +#ifndef PBUF_POOL_BUFSIZE +#if LWIP_IPV6 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) +#elif LWIP_IPV4 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+20+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) +#endif +#endif +#endif + +#define MEM_SIZE MBED_CONF_LWIP_MEM_SIZE + +// One tcp_pcb_listen is needed for each TCP server. +// Each requires 72 bytes of RAM. +#define MEMP_NUM_TCP_PCB_LISTEN MBED_CONF_LWIP_TCP_SERVER_MAX + +// One is tcp_pcb needed for each TCPSocket. +// Each requires 196 bytes of RAM. +#define MEMP_NUM_TCP_PCB MBED_CONF_LWIP_TCP_SOCKET_MAX + +// One udp_pcb is needed for each UDPSocket. +// Each requires 84 bytes of RAM (total rounded to multiple of 512). +#define MEMP_NUM_UDP_PCB MBED_CONF_LWIP_UDP_SOCKET_MAX + +// Number of non-pool pbufs. +// Each requires 92 bytes of RAM. +#define MEMP_NUM_PBUF MBED_CONF_LWIP_NUM_PBUF + +// Each netbuf requires 64 bytes of RAM. +#define MEMP_NUM_NETBUF MBED_CONF_LWIP_NUM_NETBUF + +// One netconn is needed for each UDPSocket or TCPSocket. +// Each requires 236 bytes of RAM (total rounded to multiple of 512). +#define MEMP_NUM_NETCONN MBED_CONF_LWIP_SOCKET_MAX + +#if MBED_CONF_LWIP_TCP_ENABLED +#define LWIP_TCP 1 +#define TCP_OVERSIZE 0 +#define LWIP_TCP_KEEPALIVE 1 + +#define TCP_CLOSE_TIMEOUT MBED_CONF_LWIP_TCP_CLOSE_TIMEOUT + +#else +#define LWIP_TCP 0 +#endif + +#define LWIP_DNS 1 +// Only DNS address storage is enabled +#define LWIP_FULL_DNS 0 +#define LWIP_SOCKET 0 + +#define SO_REUSE 1 + +// Support Multicast +#include "stdlib.h" +#define LWIP_IGMP LWIP_IPV4 +#define LWIP_RAND() lwip_get_random() + +#define LWIP_COMPAT_SOCKETS 0 +#define LWIP_POSIX_SOCKETS_IO_NAMES 0 + +#define LWIP_BROADCAST_PING 1 + +// Fragmentation on, as per IPv4 default +#define LWIP_IPV6_FRAG LWIP_IPV6 + +// Queuing, default is "disabled", as per IPv4 default (so actually queues 1) +#define LWIP_ND6_QUEUEING MBED_CONF_ND6_QUEUEING + +// Debug Options +#define NETIF_DEBUG LWIP_DBG_OFF +#define PBUF_DEBUG LWIP_DBG_OFF +#define API_LIB_DEBUG LWIP_DBG_OFF +#define API_MSG_DEBUG LWIP_DBG_OFF +#define SOCKETS_DEBUG LWIP_DBG_OFF +#define ICMP_DEBUG LWIP_DBG_OFF +#define IGMP_DEBUG LWIP_DBG_OFF +#define INET_DEBUG LWIP_DBG_OFF +#define IP_DEBUG LWIP_DBG_OFF +#define IP_REASS_DEBUG LWIP_DBG_OFF +#define RAW_DEBUG LWIP_DBG_OFF +#define MEM_DEBUG LWIP_DBG_OFF +#define MEMP_DEBUG LWIP_DBG_OFF +#define SYS_DEBUG LWIP_DBG_OFF +#define TIMERS_DEBUG LWIP_DBG_OFF +#define TCP_DEBUG LWIP_DBG_OFF +#define TCP_INPUT_DEBUG LWIP_DBG_OFF +#define TCP_FR_DEBUG LWIP_DBG_OFF +#define TCP_RTO_DEBUG LWIP_DBG_OFF +#define TCP_CWND_DEBUG LWIP_DBG_OFF +#define TCP_WND_DEBUG LWIP_DBG_OFF +#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF +#define TCP_RST_DEBUG LWIP_DBG_OFF +#define TCP_QLEN_DEBUG LWIP_DBG_OFF +#define UDP_DEBUG LWIP_DBG_OFF +#define TCPIP_DEBUG LWIP_DBG_OFF +#define SLIP_DEBUG LWIP_DBG_OFF +#define DHCP_DEBUG LWIP_DBG_OFF +#define AUTOIP_DEBUG LWIP_DBG_OFF +#define DNS_DEBUG LWIP_DBG_OFF +#define IP6_DEBUG LWIP_DBG_OFF + +#define ETHARP_DEBUG LWIP_DBG_OFF +#define UDP_LPC_EMAC LWIP_DBG_OFF + +#ifdef LWIP_DEBUG +#define MEMP_OVERFLOW_CHECK 1 +#define MEMP_SANITY_CHECK 1 +#define LWIP_DBG_TYPES_ON LWIP_DBG_ON +#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL +#else +#define LWIP_NOASSERT 1 +#define LWIP_STATS 0 +#endif + +#define TRACE_TO_ASCII_HEX_DUMP 0 + +#define LWIP_PLATFORM_BYTESWAP 1 + +#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 1 + +// Interface type configuration + +#if MBED_CONF_LWIP_ETHERNET_ENABLED +#define LWIP_ARP 1 +#define LWIP_ETHERNET 1 +#define LWIP_DHCP LWIP_IPV4 +#else +#define LWIP_ARP 0 +#define LWIP_ETHERNET 0 +#endif // MBED_CONF_LWIP_ETHERNET_ENABLED + +#if MBED_CONF_LWIP_L3IP_ENABLED +#define LWIP_L3IP 1 +#else +#define LWIP_L3IP 0 +#endif + +//Maximum size of network interface name +#define INTERFACE_NAME_MAX_SIZE NSAPI_INTERFACE_NAME_MAX_SIZE +// Note generic macro name used rather than MBED_CONF_LWIP_PPP_ENABLED +// to allow users like PPPCellularInterface to detect that nsapi_ppp.h is available. + +// Enable PPP for now either from lwIP PPP configuration (obsolete) or from PPP service configuration +#if MBED_CONF_PPP_ENABLED || MBED_CONF_LWIP_PPP_ENABLED + +#define PPP_SUPPORT 1 + +#if MBED_CONF_PPP_IPV4_ENABLED || MBED_CONF_LWIP_IPV4_ENABLED +#define LWIP 0x11991199 +#if (MBED_CONF_NSAPI_DEFAULT_STACK == LWIP) && !MBED_CONF_LWIP_IPV4_ENABLED +#error LWIP: IPv4 PPP enabled but not IPv4 +#endif +#undef LWIP +#define PPP_IPV4_SUPPORT 1 +#endif + +#if MBED_CONF_PPP_IPV6_ENABLED || MBED_CONF_LWIP_IPV6_ENABLED +#define LWIP 0x11991199 +#if (MBED_CONF_NSAPI_DEFAULT_STACK == LWIP) && !MBED_CONF_LWIP_IPV6_ENABLED +#error LWIP: IPv6 PPP enabled but not IPv6 +#endif +#undef LWIP +#define PPP_IPV6_SUPPORT 1 +// Later to be dynamic for use for multiple interfaces +#define LWIP_IPV6_DUP_DETECT_ATTEMPTS 0 +#endif + +#endif + +#define LWIP_NETBUF_RECVINFO MBED_CONF_LWIP_NETBUF_RECVINFO_ENABLED + +// Make sure we default these to off, so +// LWIP doesn't default to on +#ifndef LWIP_ARP +#define LWIP_ARP 0 +#endif + +// Checksum-on-copy disabled due to https://savannah.nongnu.org/bugs/?50914 +#define LWIP_CHECKSUM_ON_COPY 0 + +#define LWIP_NETIF_HOSTNAME 1 +#define LWIP_NETIF_STATUS_CALLBACK 1 +#define LWIP_NETIF_LINK_CALLBACK 1 + +#define DNS_TABLE_SIZE 2 +#define DNS_MAX_NAME_LENGTH 128 + +#include "lwip_random.h" +#include "lwip_tcp_isn.h" +#define LWIP_HOOK_TCP_ISN lwip_hook_tcp_isn +#ifdef MBEDTLS_MD5_C +#define LWIP_USE_EXTERNAL_MBEDTLS 1 +#else +#define LWIP_USE_EXTERNAL_MBEDTLS 0 +#endif + +#define LWIP_ND6_RDNSS_MAX_DNS_SERVERS MBED_CONF_LWIP_ND6_RDNSS_MAX_DNS_SERVERS + +#endif /* LWIPOPTS_H_ */ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/3.0.0/portenta_post_install.sh b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/3.0.0/portenta_post_install.sh new file mode 100644 index 0000000..7fe71d6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/3.0.0/portenta_post_install.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +portenta_h7_rules () { + echo "" + echo "# Portenta H7 bootloader mode UDEV rules" + echo "" +cat < /etc/udev/rules.d/49-portenta_h7.rules + +# reload udev rules +echo "Reload rules..." +udevadm trigger +udevadm control --reload-rules diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/3.0.1/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/3.0.1/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h new file mode 100644 index 0000000..84c18cf --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/3.0.1/cores/arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h @@ -0,0 +1,347 @@ +/* Copyright (C) 2012 mbed.org, MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software + * and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef LWIPOPTS_H +#define LWIPOPTS_H + +// Workaround for Linux timeval +#if defined (TOOLCHAIN_GCC) +#define LWIP_TIMEVAL_PRIVATE 0 +#include +#endif +#include "nsapi_types.h" +#include "mbed_retarget.h" + +// KH fix +#include +///////////////////////// + +// Operating System +#define NO_SYS 0 + +#if !MBED_CONF_LWIP_IPV4_ENABLED && !MBED_CONF_LWIP_IPV6_ENABLED +#error "Either IPv4 or IPv6 must be enabled." +#endif + +#define LWIP_IPV4 MBED_CONF_LWIP_IPV4_ENABLED + +#define LWIP_IPV6 MBED_CONF_LWIP_IPV6_ENABLED + +#define LWIP_PROVIDE_ERRNO 0 + +// On dual stack configuration how long to wait for both or preferred stack +// addresses before completing bring up. +#if LWIP_IPV4 && LWIP_IPV6 +#if MBED_CONF_LWIP_ADDR_TIMEOUT_MODE +#define BOTH_ADDR_TIMEOUT MBED_CONF_LWIP_ADDR_TIMEOUT +#define PREF_ADDR_TIMEOUT 0 +#else +#define PREF_ADDR_TIMEOUT MBED_CONF_LWIP_ADDR_TIMEOUT +#define BOTH_ADDR_TIMEOUT 0 +#endif +#else +#define PREF_ADDR_TIMEOUT 0 +#define BOTH_ADDR_TIMEOUT 0 +#endif + + +#define DHCP_TIMEOUT MBED_CONF_LWIP_DHCP_TIMEOUT + +#define LINK_TIMEOUT 60 + +#define PREF_IPV4 1 +#define PREF_IPV6 2 + +#if MBED_CONF_LWIP_IP_VER_PREF == 6 +#define IP_VERSION_PREF PREF_IPV6 +#elif MBED_CONF_LWIP_IP_VER_PREF == 4 +#define IP_VERSION_PREF PREF_IPV4 +#else +#error "Either IPv4 or IPv6 must be preferred." +#endif + +#undef LWIP_DEBUG +#if MBED_CONF_LWIP_DEBUG_ENABLED +#define LWIP_DEBUG 1 +#endif + +#if NO_SYS == 0 +#include "cmsis_os2.h" + +#define SYS_LIGHTWEIGHT_PROT 1 + +#define LWIP_RAW MBED_CONF_LWIP_RAW_SOCKET_ENABLED + +#define MEMP_NUM_TCPIP_MSG_INPKT MBED_CONF_LWIP_MEMP_NUM_TCPIP_MSG_INPKT + +// Thread stacks use 8-byte alignment +#define LWIP_ALIGN_UP(pos, align) ((pos) % (align) ? (pos) + ((align) - (pos) % (align)) : (pos)) + +#ifdef LWIP_DEBUG +// For LWIP debug, double the stack +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE*2, 8) +#elif MBED_DEBUG +// When debug is enabled on the build increase stack 25 percent +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE + MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE / 4, 8) +#else +#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE, 8) +#endif + +// Thread priority (osPriorityNormal by default) +#define TCPIP_THREAD_PRIO (MBED_CONF_LWIP_TCPIP_THREAD_PRIORITY) + +#ifdef LWIP_DEBUG +#define DEFAULT_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE*2, 8) +#else +#define DEFAULT_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE, 8) +#endif + +#define MEMP_NUM_SYS_TIMEOUT 16 + +#define sys_msleep(ms) sys_msleep(ms) + +#endif + +// 32-bit alignment +#define MEM_ALIGNMENT 4 + +#define LWIP_RAM_HEAP_POINTER lwip_ram_heap + +// Number of simultaneously queued TCP segments. +#define MEMP_NUM_TCP_SEG MBED_CONF_LWIP_MEMP_NUM_TCP_SEG + +// TCP Maximum segment size. +#define TCP_MSS MBED_CONF_LWIP_TCP_MSS + +// TCP sender buffer space (bytes). +#define TCP_SND_BUF MBED_CONF_LWIP_TCP_SND_BUF + +// TCP sender buffer space (bytes). +#define TCP_WND MBED_CONF_LWIP_TCP_WND + +#define TCP_MAXRTX MBED_CONF_LWIP_TCP_MAXRTX + +#define TCP_SYNMAXRTX MBED_CONF_LWIP_TCP_SYNMAXRTX + +// Number of pool pbufs. +// Each requires 684 bytes of RAM (if MSS=536 and PBUF_POOL_BUFSIZE defaulting to be based on MSS) +#define PBUF_POOL_SIZE MBED_CONF_LWIP_PBUF_POOL_SIZE + +#ifdef MBED_CONF_LWIP_PBUF_POOL_BUFSIZE +#undef PBUF_POOL_BUFSIZE +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(MBED_CONF_LWIP_PBUF_POOL_BUFSIZE) +#else +#ifndef PBUF_POOL_BUFSIZE +#if LWIP_IPV6 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) +#elif LWIP_IPV4 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+20+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) +#endif +#endif +#endif + +#define MEM_SIZE MBED_CONF_LWIP_MEM_SIZE + +// One tcp_pcb_listen is needed for each TCP server. +// Each requires 72 bytes of RAM. +#define MEMP_NUM_TCP_PCB_LISTEN MBED_CONF_LWIP_TCP_SERVER_MAX + +// One is tcp_pcb needed for each TCPSocket. +// Each requires 196 bytes of RAM. +#define MEMP_NUM_TCP_PCB MBED_CONF_LWIP_TCP_SOCKET_MAX + +// One udp_pcb is needed for each UDPSocket. +// Each requires 84 bytes of RAM (total rounded to multiple of 512). +#define MEMP_NUM_UDP_PCB MBED_CONF_LWIP_UDP_SOCKET_MAX + +// Number of non-pool pbufs. +// Each requires 92 bytes of RAM. +#define MEMP_NUM_PBUF MBED_CONF_LWIP_NUM_PBUF + +// Each netbuf requires 64 bytes of RAM. +#define MEMP_NUM_NETBUF MBED_CONF_LWIP_NUM_NETBUF + +// One netconn is needed for each UDPSocket or TCPSocket. +// Each requires 236 bytes of RAM (total rounded to multiple of 512). +#define MEMP_NUM_NETCONN MBED_CONF_LWIP_SOCKET_MAX + +#if MBED_CONF_LWIP_TCP_ENABLED +#define LWIP_TCP 1 +#define TCP_OVERSIZE 0 +#define LWIP_TCP_KEEPALIVE 1 + +#define TCP_CLOSE_TIMEOUT MBED_CONF_LWIP_TCP_CLOSE_TIMEOUT + +#else +#define LWIP_TCP 0 +#endif + +#define LWIP_DNS 1 +// Only DNS address storage is enabled +#define LWIP_FULL_DNS 0 +#define LWIP_SOCKET 0 + +#define SO_REUSE 1 + +// Support Multicast +#include "stdlib.h" +#define LWIP_IGMP LWIP_IPV4 +#define LWIP_RAND() lwip_get_random() + +#define LWIP_COMPAT_SOCKETS 0 +#define LWIP_POSIX_SOCKETS_IO_NAMES 0 + +#define LWIP_BROADCAST_PING 1 + +// Fragmentation on, as per IPv4 default +#define LWIP_IPV6_FRAG LWIP_IPV6 + +// Queuing, default is "disabled", as per IPv4 default (so actually queues 1) +#define LWIP_ND6_QUEUEING MBED_CONF_ND6_QUEUEING + +// Debug Options +#define NETIF_DEBUG LWIP_DBG_OFF +#define PBUF_DEBUG LWIP_DBG_OFF +#define API_LIB_DEBUG LWIP_DBG_OFF +#define API_MSG_DEBUG LWIP_DBG_OFF +#define SOCKETS_DEBUG LWIP_DBG_OFF +#define ICMP_DEBUG LWIP_DBG_OFF +#define IGMP_DEBUG LWIP_DBG_OFF +#define INET_DEBUG LWIP_DBG_OFF +#define IP_DEBUG LWIP_DBG_OFF +#define IP_REASS_DEBUG LWIP_DBG_OFF +#define RAW_DEBUG LWIP_DBG_OFF +#define MEM_DEBUG LWIP_DBG_OFF +#define MEMP_DEBUG LWIP_DBG_OFF +#define SYS_DEBUG LWIP_DBG_OFF +#define TIMERS_DEBUG LWIP_DBG_OFF +#define TCP_DEBUG LWIP_DBG_OFF +#define TCP_INPUT_DEBUG LWIP_DBG_OFF +#define TCP_FR_DEBUG LWIP_DBG_OFF +#define TCP_RTO_DEBUG LWIP_DBG_OFF +#define TCP_CWND_DEBUG LWIP_DBG_OFF +#define TCP_WND_DEBUG LWIP_DBG_OFF +#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF +#define TCP_RST_DEBUG LWIP_DBG_OFF +#define TCP_QLEN_DEBUG LWIP_DBG_OFF +#define UDP_DEBUG LWIP_DBG_OFF +#define TCPIP_DEBUG LWIP_DBG_OFF +#define SLIP_DEBUG LWIP_DBG_OFF +#define DHCP_DEBUG LWIP_DBG_OFF +#define AUTOIP_DEBUG LWIP_DBG_OFF +#define DNS_DEBUG LWIP_DBG_OFF +#define IP6_DEBUG LWIP_DBG_OFF + +#define ETHARP_DEBUG LWIP_DBG_OFF +#define UDP_LPC_EMAC LWIP_DBG_OFF + +#ifdef LWIP_DEBUG +#define MEMP_OVERFLOW_CHECK 1 +#define MEMP_SANITY_CHECK 1 +#define LWIP_DBG_TYPES_ON LWIP_DBG_ON +#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL +#else +#define LWIP_NOASSERT 1 +#define LWIP_STATS 0 +#endif + +#define TRACE_TO_ASCII_HEX_DUMP 0 + +#define LWIP_PLATFORM_BYTESWAP 1 + +#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 1 + +// Interface type configuration + +#if MBED_CONF_LWIP_ETHERNET_ENABLED +#define LWIP_ARP 1 +#define LWIP_ETHERNET 1 +#define LWIP_DHCP LWIP_IPV4 +#else +#define LWIP_ARP 0 +#define LWIP_ETHERNET 0 +#endif // MBED_CONF_LWIP_ETHERNET_ENABLED + +#if MBED_CONF_LWIP_L3IP_ENABLED +#define LWIP_L3IP 1 +#else +#define LWIP_L3IP 0 +#endif + +//Maximum size of network interface name +#define INTERFACE_NAME_MAX_SIZE NSAPI_INTERFACE_NAME_MAX_SIZE +// Note generic macro name used rather than MBED_CONF_LWIP_PPP_ENABLED +// to allow users like PPPCellularInterface to detect that nsapi_ppp.h is available. + +// Enable PPP for now either from lwIP PPP configuration (obsolete) or from PPP service configuration +#if MBED_CONF_PPP_ENABLED || MBED_CONF_LWIP_PPP_ENABLED + +#define PPP_SUPPORT 1 + +#if MBED_CONF_PPP_IPV4_ENABLED || MBED_CONF_LWIP_IPV4_ENABLED +#define LWIP 0x11991199 +#if (MBED_CONF_NSAPI_DEFAULT_STACK == LWIP) && !MBED_CONF_LWIP_IPV4_ENABLED +#error LWIP: IPv4 PPP enabled but not IPv4 +#endif +#undef LWIP +#define PPP_IPV4_SUPPORT 1 +#endif + +#if MBED_CONF_PPP_IPV6_ENABLED || MBED_CONF_LWIP_IPV6_ENABLED +#define LWIP 0x11991199 +#if (MBED_CONF_NSAPI_DEFAULT_STACK == LWIP) && !MBED_CONF_LWIP_IPV6_ENABLED +#error LWIP: IPv6 PPP enabled but not IPv6 +#endif +#undef LWIP +#define PPP_IPV6_SUPPORT 1 +// Later to be dynamic for use for multiple interfaces +#define LWIP_IPV6_DUP_DETECT_ATTEMPTS 0 +#endif + +#endif + +#define LWIP_NETBUF_RECVINFO MBED_CONF_LWIP_NETBUF_RECVINFO_ENABLED + +// Make sure we default these to off, so +// LWIP doesn't default to on +#ifndef LWIP_ARP +#define LWIP_ARP 0 +#endif + +// Checksum-on-copy disabled due to https://savannah.nongnu.org/bugs/?50914 +#define LWIP_CHECKSUM_ON_COPY 0 + +#define LWIP_NETIF_HOSTNAME 1 +#define LWIP_NETIF_STATUS_CALLBACK 1 +#define LWIP_NETIF_LINK_CALLBACK 1 + +#define DNS_TABLE_SIZE 2 +#define DNS_MAX_NAME_LENGTH 128 + +#include "lwip_random.h" +#include "lwip_tcp_isn.h" +#define LWIP_HOOK_TCP_ISN lwip_hook_tcp_isn +#ifdef MBEDTLS_MD5_C +#define LWIP_USE_EXTERNAL_MBEDTLS 1 +#else +#define LWIP_USE_EXTERNAL_MBEDTLS 0 +#endif + +#define LWIP_ND6_RDNSS_MAX_DNS_SERVERS MBED_CONF_LWIP_ND6_RDNSS_MAX_DNS_SERVERS + +#endif /* LWIPOPTS_H_ */ diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/3.0.1/portenta_post_install.sh b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/3.0.1/portenta_post_install.sh new file mode 100644 index 0000000..7fe71d6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/mbed_portenta/3.0.1/portenta_post_install.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +portenta_h7_rules () { + echo "" + echo "# Portenta H7 bootloader mode UDEV rules" + echo "" +cat < /etc/udev/rules.d/49-portenta_h7.rules + +# reload udev rules +echo "Reload rules..." +udevadm trigger +udevadm control --reload-rules diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/sam/1.6.12/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/sam/1.6.12/platform.txt new file mode 100644 index 0000000..52a7aa1 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/sam/1.6.12/platform.txt @@ -0,0 +1,110 @@ + +# Arduino SAM Core and platform. +# ------------------------------ +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification + +name=Arduino ARM (32-bits) Boards +version=1.6.12 + +# SAM3 compile variables +# ---------------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra + +compiler.path={runtime.tools.arm-none-eabi-gcc-4.8.3-2014q1.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -MMD +# KH, Error here to use gcc, mjust use g++ +#compiler.c.elf.cmd=arm-none-eabi-gcc +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags=-Os -Wl,--gc-sections +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.flags=-O binary +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags= +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.combine.flags=-u _sbrk -u link -u _close -u _fstat -u _isatty -u _lseek -u _read -u _write -u _exit -u kill -u _getpid + +# This can be overridden in boards.txt +build.extra_flags= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + + +compiler.libsam.c.flags="-I{build.system.path}/libsam" "-I{build.system.path}/CMSIS/CMSIS/Include/" "-I{build.system.path}/CMSIS/Device/ATMEL/" + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + + +# SAM3 compile patterns +# --------------------- + +## Compile c files +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mcpu={build.mcu} -mthumb -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.libsam.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mcpu={build.mcu} -mthumb -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.libsam.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -mcpu={build.mcu} -mthumb -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {compiler.libsam.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" -mcpu={build.mcu} -mthumb {compiler.c.elf.flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--start-group {compiler.combine.flags} {object_files} "{build.variant.path}/{build.variant_system_lib}" "{build.path}/{archive_file}" -Wl,--end-group -lm -lgcc + +## Create output (.bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Save hex +recipe.output.tmp_file={build.project_name}.bin +recipe.output.save_file={build.project_name}.{build.variant}.bin + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=\.text\s+([0-9]+).* + + +# SAM3 Uploader tools +# ------------------- + +# BOSSA +tools.bossac.path={runtime.tools.bossac.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.params.verify=-v +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -e -w {upload.verify} -b "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v -b /tmp/sketch.bin -R diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.10/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.10/platform.txt new file mode 100644 index 0000000..e144b5d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.10/platform.txt @@ -0,0 +1,246 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Arduino SAMD (32-bits ARM Cortex-M0+) Boards +version=1.8.10 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra + +# EXPERIMENTAL feature: optimization flags +# - this is alpha and may be subject to change without notice +compiler.optimization_flags=-Os +compiler.optimization_flags.release=-Os +compiler.optimization_flags.debug=-Og -g3 + +compiler.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags={compiler.optimization_flags} -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.0.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + + +# Debugger configuration (general options) +# ---------------------------------------- +# EXPERIMENTAL feature: +# - this is alpha and may be subject to change without notice +debug.executable={build.path}/{build.project_name}.elf +debug.toolchain=gcc +debug.toolchain.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +debug.toolchain.prefix=arm-none-eabi- +debug.server=openocd +debug.server.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path}/bin/openocd +debug.server.openocd.scripts_dir={runtime.tools.openocd-0.10.0-arduino7.path}/share/openocd/scripts/ +debug.server.openocd.script={runtime.platform.path}/variants/{build.variant}/{build.openocdscript} + +# Upload/Debug tools +# ------------------ + +# +# AVRDUDE +# +tools.avrdude.path={runtime.tools.avrdude.path} +tools.avrdude.cmd={path}/bin/avrdude +tools.avrdude.config.path={path}/etc/avrdude.conf + +tools.avrdude.upload.params.verbose=-v -v +tools.avrdude.upload.params.quiet=-q -q +tools.avrdude.upload.params.noverify=-V +tools.avrdude.upload.pattern="{cmd}" "-C{config.path}" {upload.verbose} -p{build.emu.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} "-Uflash:w:{build.path}/{build.project_name}.hex:i" + +tools.avrdude_remote.upload.pattern="openocd --version 2>&1 | grep 2016 && if opkg update; then opkg upgrade openocd; exit 1; else echo 'Please connect your board to the Internet in order to upgrade tools' >&2; exit 1; fi || /usr/bin/run-avrdude /tmp/sketch.hex" + +tools.avrdude.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.avrdude.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +arduinoota.extraflags= +tools.bossac.network_cmd={runtime.tools.arduinoOTA-1.3.0.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b {arduinoota.extraflags} + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.hex} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.11/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.11/platform.txt new file mode 100644 index 0000000..b071d27 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.11/platform.txt @@ -0,0 +1,246 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Arduino SAMD (32-bits ARM Cortex-M0+) Boards +version=1.8.11 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra + +# EXPERIMENTAL feature: optimization flags +# - this is alpha and may be subject to change without notice +compiler.optimization_flags=-Os +compiler.optimization_flags.release=-Os +compiler.optimization_flags.debug=-Og -g3 + +compiler.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags={compiler.optimization_flags} -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.0.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DBOARD_NAME="{build.board}" -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + + +# Debugger configuration (general options) +# ---------------------------------------- +# EXPERIMENTAL feature: +# - this is alpha and may be subject to change without notice +debug.executable={build.path}/{build.project_name}.elf +debug.toolchain=gcc +debug.toolchain.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +debug.toolchain.prefix=arm-none-eabi- +debug.server=openocd +debug.server.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path}/bin/openocd +debug.server.openocd.scripts_dir={runtime.tools.openocd-0.10.0-arduino7.path}/share/openocd/scripts/ +debug.server.openocd.script={runtime.platform.path}/variants/{build.variant}/{build.openocdscript} + +# Upload/Debug tools +# ------------------ + +# +# AVRDUDE +# +tools.avrdude.path={runtime.tools.avrdude.path} +tools.avrdude.cmd={path}/bin/avrdude +tools.avrdude.config.path={path}/etc/avrdude.conf + +tools.avrdude.upload.params.verbose=-v -v +tools.avrdude.upload.params.quiet=-q -q +tools.avrdude.upload.params.noverify=-V +tools.avrdude.upload.pattern="{cmd}" "-C{config.path}" {upload.verbose} -p{build.emu.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} "-Uflash:w:{build.path}/{build.project_name}.hex:i" + +tools.avrdude_remote.upload.pattern="openocd --version 2>&1 | grep 2016 && if opkg update; then opkg upgrade openocd; exit 1; else echo 'Please connect your board to the Internet in order to upgrade tools' >&2; exit 1; fi || /usr/bin/run-avrdude /tmp/sketch.hex" + +tools.avrdude.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.avrdude.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +arduinoota.extraflags= +tools.bossac.network_cmd={runtime.tools.arduinoOTA-1.3.0.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b {arduinoota.extraflags} + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.hex} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.12/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.12/platform.txt new file mode 100644 index 0000000..1e761f4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.12/platform.txt @@ -0,0 +1,258 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Arduino SAMD (32-bits ARM Cortex-M0+) Boards +version=1.8.12 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra + +# EXPERIMENTAL feature: optimization flags +# - this is alpha and may be subject to change without notice +compiler.optimization_flags=-Os +compiler.optimization_flags.release=-Os +compiler.optimization_flags.debug=-Og -g3 + +compiler.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags={compiler.optimization_flags} -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-mcpu={build.mcu} -mthumb -c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.0.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +# Required discoveries and monitors +# --------------------------------- +pluggable_discovery.required.0=builtin:serial-discovery +pluggable_discovery.required.1=builtin:mdns-discovery +pluggable_monitor.required.serial=builtin:serial-monitor + +# Debugger configuration (general options) +# ---------------------------------------- +# EXPERIMENTAL feature: +# - this is alpha and may be subject to change without notice +debug.executable={build.path}/{build.project_name}.elf +debug.toolchain=gcc +debug.toolchain.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +debug.toolchain.prefix=arm-none-eabi- +debug.server=openocd +debug.server.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path}/bin/openocd +debug.server.openocd.scripts_dir={runtime.tools.openocd-0.10.0-arduino7.path}/share/openocd/scripts/ +debug.server.openocd.script={runtime.platform.path}/variants/{build.variant}/{build.openocdscript} + +# Upload/Debug tools +# ------------------ + +# +# AVRDUDE +# +tools.avrdude.path={runtime.tools.avrdude.path} +tools.avrdude.cmd={path}/bin/avrdude +tools.avrdude.config.path={path}/etc/avrdude.conf + +tools.avrdude.upload.params.verbose=-v -v +tools.avrdude.upload.params.quiet=-q -q +tools.avrdude.upload.params.noverify=-V +tools.avrdude.upload.pattern="{cmd}" "-C{config.path}" {upload.verbose} -p{build.emu.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} "-Uflash:w:{build.path}/{build.project_name}.hex:i" + +tools.avrdude_remote.upload.pattern="openocd --version 2>&1 | grep 2016 && if opkg update; then opkg upgrade openocd; exit 1; else echo 'Please connect your board to the Internet in order to upgrade tools' >&2; exit 1; fi || /usr/bin/run-avrdude /tmp/sketch.hex" + +# the following rule is deprecated by pluggable discovery +tools.avrdude.upload.network_pattern="{tools.arduino_ota.cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +# the following rule is deprecated by pluggable discovery +tools.bossac.upload.network_pattern="{tools.arduino_ota.cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b {arduinoota.extraflags} + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +# the following rule is deprecated by pluggable discovery +tools.bossacI.upload.network_pattern="{tools.arduino_ota.cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "interface/{protocol}" -c "set telnet_port 0" {extra_params} -f "target/at91samdXX.cfg" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +# the following rule is deprecated by pluggable discovery +tools.openocd.upload.network_pattern={tools.arduino_ota.cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "interface/{protocol}" -c "set telnet_port 0" {extra_params} -f "target/at91samdXX.cfg" -c "telnet_port disabled; program {{build.path}/{build.project_name}.hex} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "interface/{protocol}" -c "set telnet_port 0" {extra_params} -f "target/at91samdXX.cfg" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# Arduino OTA +# +arduinoota.extraflags= +tools.arduino_ota.cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.arduino_ota.upload.field.password=Password +tools.arduino_ota.upload.field.password.secret=true +tools.arduino_ota.upload.pattern="{cmd}" -address "{upload.port.address}" -port 65280 -username arduino -password "{upload.field.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b {arduinoota.extraflags} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.13/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.13/platform.txt new file mode 100644 index 0000000..0e5ebb9 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.13/platform.txt @@ -0,0 +1,266 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Arduino SAMD (32-bits ARM Cortex-M0+) Boards +version=1.8.13 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra + +# EXPERIMENTAL feature: optimization flags +# - this is alpha and may be subject to change without notice +compiler.optimization_flags=-Os +compiler.optimization_flags.release=-Os +compiler.optimization_flags.debug=-Og -g3 + +compiler.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags={compiler.optimization_flags} -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-mcpu={build.mcu} -mthumb -c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.0.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +# Required discoveries and monitors +# --------------------------------- +pluggable_discovery.required.0=builtin:serial-discovery +pluggable_discovery.required.1=builtin:mdns-discovery +pluggable_monitor.required.serial=builtin:serial-monitor + +# Debugger configuration (general options) +# ---------------------------------------- +# EXPERIMENTAL feature: +# - this is alpha and may be subject to change without notice +debug.executable={build.path}/{build.project_name}.elf +debug.toolchain=gcc +debug.toolchain.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +debug.toolchain.prefix=arm-none-eabi- +debug.server=openocd +debug.server.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path}/bin/openocd +debug.server.openocd.scripts_dir={runtime.tools.openocd-0.10.0-arduino7.path}/share/openocd/scripts/ +debug.server.openocd.script={runtime.platform.path}/variants/{build.variant}/{build.openocdscript} + +# Upload/Debug tools +# ------------------ + +# +# AVRDUDE +# +tools.avrdude.path={runtime.tools.avrdude.path} +tools.avrdude.cmd={path}/bin/avrdude +tools.avrdude.config.path={path}/etc/avrdude.conf + +tools.avrdude.upload.params.verbose=-v -v +tools.avrdude.upload.params.quiet=-q -q +tools.avrdude.upload.params.noverify=-V +tools.avrdude.upload.pattern="{cmd}" "-C{config.path}" {upload.verbose} -p{build.emu.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} "-Uflash:w:{build.path}/{build.project_name}.hex:i" + +tools.avrdude_remote.upload.pattern="openocd --version 2>&1 | grep 2016 && if opkg update; then opkg upgrade openocd; exit 1; else echo 'Please connect your board to the Internet in order to upgrade tools' >&2; exit 1; fi || /usr/bin/run-avrdude /tmp/sketch.hex" + +# The following rule is deprecated by pluggable discovery. +# We keep it to avoid breaking compatibility with the Arduino Java IDE. +tools.avrdude.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.avrdude.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +# The following rule is deprecated by pluggable discovery. +# We keep it to avoid breaking compatibility with the Arduino Java IDE. +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b {arduinoota.extraflags} + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +# The following rule is deprecated by pluggable discovery. +# We keep it to avoid breaking compatibility with the Arduino Java IDE. +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +# The following rule is deprecated by pluggable discovery. +# We keep it to avoid breaking compatibility with the Arduino Java IDE. +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "interface/{protocol}" -c "set telnet_port 0" {extra_params} -f "target/at91samdXX.cfg" -c "telnet_port disabled; program {{build.path}/{build.project_name}.hex} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "interface/{protocol}" -c "set telnet_port 0" {extra_params} -f "target/at91samdXX.cfg" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# Arduino OTA +# +arduinoota.extraflags= +tools.arduino_ota.cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.arduino_ota.upload.field.password=Password +tools.arduino_ota.upload.field.password.secret=true +tools.arduino_ota.upload.pattern="{cmd}" -address "{upload.port.address}" -port 65280 -username arduino -password "{upload.field.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b {arduinoota.extraflags} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.6/cores/arduino/Arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.6/cores/arduino/Arduino.h new file mode 100644 index 0000000..795f605 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.6/cores/arduino/Arduino.h @@ -0,0 +1,160 @@ +/* + Arduino.h - Main include file for the Arduino SDK + Copyright (c) 2014 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// KH, This is the fix according to https://github.com/arduino/ArduinoCore-samd/pull/399 +// to avoid notorious compiler error while uing STL (min and max macro error) +// It's terrible Arduino has just released new core and still don't merge the PR + +#ifndef Arduino_h +#define Arduino_h + +#include +#include +#include +#include +#include + +typedef bool boolean; +typedef uint8_t byte; +typedef uint16_t word; + +// some libraries and sketches depend on this AVR stuff, +// assuming Arduino.h or WProgram.h automatically includes it... +// +#include "avr/pgmspace.h" +#include "avr/interrupt.h" +#include "avr/io.h" +#include "binary.h" +#include "itoa.h" + +#ifdef __cplusplus + extern "C"{ +#endif // __cplusplus + +// Include Atmel headers +#include "sam.h" +#include "wiring_constants.h" + +#define clockCyclesPerMicrosecond() ( SystemCoreClock / 1000000L ) +#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (SystemCoreClock / 1000L) ) +#define microsecondsToClockCycles(a) ( (a) * (SystemCoreClock / 1000000L) ) +void yield( void ) ; +/* system functions */ +int main( void ); +void init( void ); +/* sketch */ +void setup( void ) ; +void loop( void ) ; +#include "WVariant.h" + +#ifdef __cplusplus +} // extern "C" +#endif + + +// The following headers are for C++ only compilation +#ifdef __cplusplus + #include "WCharacter.h" + #include "WString.h" + #include "Tone.h" + #include "WMath.h" + #include "HardwareSerial.h" + #include "pulse.h" + #include +#endif + +#include "delay.h" + +#ifdef __cplusplus + #include "Uart.h" +#endif + +// Include board variant +#include "variant.h" +#include "wiring.h" +#include "wiring_digital.h" +#include "wiring_analog.h" +#include "wiring_shift.h" +#include "WInterrupts.h" + +#ifndef __cplusplus + // undefine stdlib's abs if encountered + #ifdef abs + #undef abs + #endif // abs + + #define min(a,b) ((a)<(b)?(a):(b)) + #define max(a,b) ((a)>(b)?(a):(b)) + #define abs(x) ((x)>0?(x):-(x)) + #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) + +#else + //using std::min; + //using std::max; + template + auto min(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (b < a) ? b : a; + } + + template + auto max(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (a < b) ? b : a; + } +#endif + +#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) +#define radians(deg) ((deg)*DEG_TO_RAD) +#define degrees(rad) ((rad)*RAD_TO_DEG) +#define sq(x) ((x)*(x)) + +#define interrupts() __enable_irq() +#define noInterrupts() __disable_irq() + +#define lowByte(w) ((uint8_t) ((w) & 0xff)) +#define highByte(w) ((uint8_t) ((w) >> 8)) + +#define bitRead(value, bit) (((value) >> (bit)) & 0x01) +#define bitSet(value, bit) ((value) |= (1UL << (bit))) +#define bitClear(value, bit) ((value) &= ~(1UL << (bit))) +#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit)) +#define bit(b) (1UL << (b)) + +#if (ARDUINO_SAMD_VARIANT_COMPLIANCE >= 10606) + // Interrupts + #define digitalPinToInterrupt(P) ( P ) +#endif + +// Allows publishing the Beta core under samd-beta / arduino organization +#ifndef ARDUINO_ARCH_SAMD +#define ARDUINO_ARCH_SAMD +#endif + +// USB Device +#include "USB/USBDesc.h" +#include "USB/USBCore.h" +#include "USB/USBAPI.h" +#include "USB/USB_host.h" + +#ifdef __cplusplus + #include "USB/CDC.h" +#endif + +#endif // Arduino_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.6/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.6/platform.txt new file mode 100644 index 0000000..3516ebe --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.6/platform.txt @@ -0,0 +1,248 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Arduino SAMD (32-bits ARM Cortex-M0+) Boards +version=1.8.6 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +# EXPERIMENTAL feature: optimization flags +# - this is alpha and may be subject to change without notice +compiler.optimization_flags=-Os +compiler.optimization_flags.release=-Os +compiler.optimization_flags.debug=-Og -g3 + +compiler.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags={compiler.optimization_flags} -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.0.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +# Upload/Debug tools +# ------------------ + +# +# AVRDUDE +# +tools.avrdude.path={runtime.tools.avrdude.path} +tools.avrdude.cmd={path}/bin/avrdude +tools.avrdude.config.path={path}/etc/avrdude.conf + +tools.avrdude.upload.params.verbose=-v -v +tools.avrdude.upload.params.quiet=-q -q +tools.avrdude.upload.params.noverify=-V +tools.avrdude.upload.pattern="{cmd}" "-C{config.path}" {upload.verbose} -p{build.emu.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} "-Uflash:w:{build.path}/{build.project_name}.hex:i" + +tools.avrdude_remote.upload.pattern="openocd --version 2>&1 | grep 2016 && if opkg update; then opkg upgrade openocd; exit 1; else echo 'Please connect your board to the Internet in order to upgrade tools' >&2; exit 1; fi || /usr/bin/run-avrdude /tmp/sketch.hex" + +tools.avrdude.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.avrdude.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# GDB (Debugger) +# +# EXPERIMENTAL feature: debug.pattern +# - this is alpha and may be subject to change without notice + +tools.gdb.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +tools.gdb.cmd=arm-none-eabi-gdb +tools.gdb.cmd.windows=arm-none-eabi-gdb.exe +tools.gdb.debug.pattern="{path}/{cmd}" --interpreter=mi2 -ex "set pagination off" -ex 'target extended-remote | {tools.openocd.path}/{tools.openocd.cmd} -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0"' {build.path}/{build.project_name}.elf diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.7/cores/arduino/Arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.7/cores/arduino/Arduino.h new file mode 100644 index 0000000..795f605 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.7/cores/arduino/Arduino.h @@ -0,0 +1,160 @@ +/* + Arduino.h - Main include file for the Arduino SDK + Copyright (c) 2014 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// KH, This is the fix according to https://github.com/arduino/ArduinoCore-samd/pull/399 +// to avoid notorious compiler error while uing STL (min and max macro error) +// It's terrible Arduino has just released new core and still don't merge the PR + +#ifndef Arduino_h +#define Arduino_h + +#include +#include +#include +#include +#include + +typedef bool boolean; +typedef uint8_t byte; +typedef uint16_t word; + +// some libraries and sketches depend on this AVR stuff, +// assuming Arduino.h or WProgram.h automatically includes it... +// +#include "avr/pgmspace.h" +#include "avr/interrupt.h" +#include "avr/io.h" +#include "binary.h" +#include "itoa.h" + +#ifdef __cplusplus + extern "C"{ +#endif // __cplusplus + +// Include Atmel headers +#include "sam.h" +#include "wiring_constants.h" + +#define clockCyclesPerMicrosecond() ( SystemCoreClock / 1000000L ) +#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (SystemCoreClock / 1000L) ) +#define microsecondsToClockCycles(a) ( (a) * (SystemCoreClock / 1000000L) ) +void yield( void ) ; +/* system functions */ +int main( void ); +void init( void ); +/* sketch */ +void setup( void ) ; +void loop( void ) ; +#include "WVariant.h" + +#ifdef __cplusplus +} // extern "C" +#endif + + +// The following headers are for C++ only compilation +#ifdef __cplusplus + #include "WCharacter.h" + #include "WString.h" + #include "Tone.h" + #include "WMath.h" + #include "HardwareSerial.h" + #include "pulse.h" + #include +#endif + +#include "delay.h" + +#ifdef __cplusplus + #include "Uart.h" +#endif + +// Include board variant +#include "variant.h" +#include "wiring.h" +#include "wiring_digital.h" +#include "wiring_analog.h" +#include "wiring_shift.h" +#include "WInterrupts.h" + +#ifndef __cplusplus + // undefine stdlib's abs if encountered + #ifdef abs + #undef abs + #endif // abs + + #define min(a,b) ((a)<(b)?(a):(b)) + #define max(a,b) ((a)>(b)?(a):(b)) + #define abs(x) ((x)>0?(x):-(x)) + #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) + +#else + //using std::min; + //using std::max; + template + auto min(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (b < a) ? b : a; + } + + template + auto max(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (a < b) ? b : a; + } +#endif + +#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) +#define radians(deg) ((deg)*DEG_TO_RAD) +#define degrees(rad) ((rad)*RAD_TO_DEG) +#define sq(x) ((x)*(x)) + +#define interrupts() __enable_irq() +#define noInterrupts() __disable_irq() + +#define lowByte(w) ((uint8_t) ((w) & 0xff)) +#define highByte(w) ((uint8_t) ((w) >> 8)) + +#define bitRead(value, bit) (((value) >> (bit)) & 0x01) +#define bitSet(value, bit) ((value) |= (1UL << (bit))) +#define bitClear(value, bit) ((value) &= ~(1UL << (bit))) +#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit)) +#define bit(b) (1UL << (b)) + +#if (ARDUINO_SAMD_VARIANT_COMPLIANCE >= 10606) + // Interrupts + #define digitalPinToInterrupt(P) ( P ) +#endif + +// Allows publishing the Beta core under samd-beta / arduino organization +#ifndef ARDUINO_ARCH_SAMD +#define ARDUINO_ARCH_SAMD +#endif + +// USB Device +#include "USB/USBDesc.h" +#include "USB/USBCore.h" +#include "USB/USBAPI.h" +#include "USB/USB_host.h" + +#ifdef __cplusplus + #include "USB/CDC.h" +#endif + +#endif // Arduino_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.7/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.7/platform.txt new file mode 100644 index 0000000..4157aa4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.7/platform.txt @@ -0,0 +1,248 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Arduino SAMD (32-bits ARM Cortex-M0+) Boards +version=1.8.7 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +# EXPERIMENTAL feature: optimization flags +# - this is alpha and may be subject to change without notice +compiler.optimization_flags=-Os +compiler.optimization_flags.release=-Os +compiler.optimization_flags.debug=-Og -g3 + +compiler.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags={compiler.optimization_flags} -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.0.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +# Upload/Debug tools +# ------------------ + +# +# AVRDUDE +# +tools.avrdude.path={runtime.tools.avrdude.path} +tools.avrdude.cmd={path}/bin/avrdude +tools.avrdude.config.path={path}/etc/avrdude.conf + +tools.avrdude.upload.params.verbose=-v -v +tools.avrdude.upload.params.quiet=-q -q +tools.avrdude.upload.params.noverify=-V +tools.avrdude.upload.pattern="{cmd}" "-C{config.path}" {upload.verbose} -p{build.emu.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} "-Uflash:w:{build.path}/{build.project_name}.hex:i" + +tools.avrdude_remote.upload.pattern="openocd --version 2>&1 | grep 2016 && if opkg update; then opkg upgrade openocd; exit 1; else echo 'Please connect your board to the Internet in order to upgrade tools' >&2; exit 1; fi || /usr/bin/run-avrdude /tmp/sketch.hex" + +tools.avrdude.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.avrdude.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +arduinoota.extraflags= +tools.bossac.network_cmd={runtime.tools.arduinoOTA-1.3.0.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b {arduinoota.extraflags} + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.hex} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# GDB (Debugger) +# +# EXPERIMENTAL feature: debug.pattern +# - this is alpha and may be subject to change without notice +tools.gdb-openocd.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +tools.gdb-openocd.cmd=arm-none-eabi-gdb +tools.gdb-openocd.cmd.windows=arm-none-eabi-gdb.exe +tools.gdb-openocd.interpreter=console +tools.gdb-openocd.debug.pattern="{path}/{cmd}" --interpreter={interpreter} -ex "set remotetimeout 5" -ex "set pagination off" -ex 'target extended-remote | "{tools.openocd.path}/{tools.openocd.cmd}" -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0"' "{build.path}/{build.project_name}.elf" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.8/cores/Arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.8/cores/Arduino.h new file mode 100644 index 0000000..4c47b5c --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.8/cores/Arduino.h @@ -0,0 +1,165 @@ +/* + Arduino.h - Main include file for the Arduino SDK + Copyright (c) 2014 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// KH, This is the fix according to https://github.com/arduino/ArduinoCore-samd/pull/399 +// to avoid notorious compiler error while uing STL (min and max macro error) +// It's terrible Arduino has just released new core and still don't merge the PR + +#ifndef Arduino_h +#define Arduino_h + +#include +#include +#include +#include +#include + +typedef bool boolean; +typedef uint8_t byte; +typedef uint16_t word; + +// some libraries and sketches depend on this AVR stuff, +// assuming Arduino.h or WProgram.h automatically includes it... +// +#include "avr/pgmspace.h" +#include "avr/interrupt.h" +#include "avr/io.h" + +#include "binary.h" +#include "itoa.h" + +#ifdef __cplusplus + extern "C"{ +#endif // __cplusplus + +// Include Atmel headers +#include "sam.h" + +#include "wiring_constants.h" + +#define clockCyclesPerMicrosecond() ( SystemCoreClock / 1000000L ) +#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (SystemCoreClock / 1000L) ) +#define microsecondsToClockCycles(a) ( (a) * (SystemCoreClock / 1000000L) ) + +void yield( void ) ; + +/* system functions */ +int main( void ); +void init( void ); + +/* sketch */ +void setup( void ) ; +void loop( void ) ; + +#include "WVariant.h" + +#ifdef __cplusplus +} // extern "C" +#endif + +// The following headers are for C++ only compilation +#ifdef __cplusplus + #include "WCharacter.h" + #include "WString.h" + #include "Tone.h" + #include "WMath.h" + #include "HardwareSerial.h" + #include "pulse.h" + #include +#endif + +#include "delay.h" + +#ifdef __cplusplus + #include "Uart.h" +#endif + +// Include board variant +#include "variant.h" +#include "wiring.h" +#include "wiring_digital.h" +#include "wiring_analog.h" +#include "wiring_shift.h" +#include "WInterrupts.h" + +#ifndef __cplusplus + // undefine stdlib's abs if encountered + #ifdef abs + #undef abs + #endif // abs + + #define min(a,b) ((a)<(b)?(a):(b)) + #define max(a,b) ((a)>(b)?(a):(b)) + #define abs(x) ((x)>0?(x):-(x)) + #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) + +#else + //using std::min; + //using std::max; + template + auto min(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (b < a) ? b : a; + } + + template + auto max(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (a < b) ? b : a; + } +#endif + +#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) +#define radians(deg) ((deg)*DEG_TO_RAD) +#define degrees(rad) ((rad)*RAD_TO_DEG) +#define sq(x) ((x)*(x)) + +#define interrupts() __enable_irq() +#define noInterrupts() __disable_irq() + +#define lowByte(w) ((uint8_t) ((w) & 0xff)) +#define highByte(w) ((uint8_t) ((w) >> 8)) + +#define bitRead(value, bit) (((value) >> (bit)) & 0x01) +#define bitSet(value, bit) ((value) |= (1UL << (bit))) +#define bitClear(value, bit) ((value) &= ~(1UL << (bit))) +#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit)) +#define bit(b) (1UL << (b)) + +#if (ARDUINO_SAMD_VARIANT_COMPLIANCE >= 10606) + // Interrupts + #define digitalPinToInterrupt(P) ( P ) +#endif + +// Allows publishing the Beta core under samd-beta / arduino organization +#ifndef ARDUINO_ARCH_SAMD +#define ARDUINO_ARCH_SAMD +#endif + +// USB Device +#include "USB/USBDesc.h" +#include "USB/USBCore.h" +#include "USB/USBAPI.h" +#include "USB/USB_host.h" + +#ifdef __cplusplus + #include "USB/CDC.h" +#endif + +#endif // Arduino_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.8/cores/arduino/Arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.8/cores/arduino/Arduino.h new file mode 100644 index 0000000..4c47b5c --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.8/cores/arduino/Arduino.h @@ -0,0 +1,165 @@ +/* + Arduino.h - Main include file for the Arduino SDK + Copyright (c) 2014 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// KH, This is the fix according to https://github.com/arduino/ArduinoCore-samd/pull/399 +// to avoid notorious compiler error while uing STL (min and max macro error) +// It's terrible Arduino has just released new core and still don't merge the PR + +#ifndef Arduino_h +#define Arduino_h + +#include +#include +#include +#include +#include + +typedef bool boolean; +typedef uint8_t byte; +typedef uint16_t word; + +// some libraries and sketches depend on this AVR stuff, +// assuming Arduino.h or WProgram.h automatically includes it... +// +#include "avr/pgmspace.h" +#include "avr/interrupt.h" +#include "avr/io.h" + +#include "binary.h" +#include "itoa.h" + +#ifdef __cplusplus + extern "C"{ +#endif // __cplusplus + +// Include Atmel headers +#include "sam.h" + +#include "wiring_constants.h" + +#define clockCyclesPerMicrosecond() ( SystemCoreClock / 1000000L ) +#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (SystemCoreClock / 1000L) ) +#define microsecondsToClockCycles(a) ( (a) * (SystemCoreClock / 1000000L) ) + +void yield( void ) ; + +/* system functions */ +int main( void ); +void init( void ); + +/* sketch */ +void setup( void ) ; +void loop( void ) ; + +#include "WVariant.h" + +#ifdef __cplusplus +} // extern "C" +#endif + +// The following headers are for C++ only compilation +#ifdef __cplusplus + #include "WCharacter.h" + #include "WString.h" + #include "Tone.h" + #include "WMath.h" + #include "HardwareSerial.h" + #include "pulse.h" + #include +#endif + +#include "delay.h" + +#ifdef __cplusplus + #include "Uart.h" +#endif + +// Include board variant +#include "variant.h" +#include "wiring.h" +#include "wiring_digital.h" +#include "wiring_analog.h" +#include "wiring_shift.h" +#include "WInterrupts.h" + +#ifndef __cplusplus + // undefine stdlib's abs if encountered + #ifdef abs + #undef abs + #endif // abs + + #define min(a,b) ((a)<(b)?(a):(b)) + #define max(a,b) ((a)>(b)?(a):(b)) + #define abs(x) ((x)>0?(x):-(x)) + #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) + +#else + //using std::min; + //using std::max; + template + auto min(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (b < a) ? b : a; + } + + template + auto max(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (a < b) ? b : a; + } +#endif + +#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) +#define radians(deg) ((deg)*DEG_TO_RAD) +#define degrees(rad) ((rad)*RAD_TO_DEG) +#define sq(x) ((x)*(x)) + +#define interrupts() __enable_irq() +#define noInterrupts() __disable_irq() + +#define lowByte(w) ((uint8_t) ((w) & 0xff)) +#define highByte(w) ((uint8_t) ((w) >> 8)) + +#define bitRead(value, bit) (((value) >> (bit)) & 0x01) +#define bitSet(value, bit) ((value) |= (1UL << (bit))) +#define bitClear(value, bit) ((value) &= ~(1UL << (bit))) +#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit)) +#define bit(b) (1UL << (b)) + +#if (ARDUINO_SAMD_VARIANT_COMPLIANCE >= 10606) + // Interrupts + #define digitalPinToInterrupt(P) ( P ) +#endif + +// Allows publishing the Beta core under samd-beta / arduino organization +#ifndef ARDUINO_ARCH_SAMD +#define ARDUINO_ARCH_SAMD +#endif + +// USB Device +#include "USB/USBDesc.h" +#include "USB/USBCore.h" +#include "USB/USBAPI.h" +#include "USB/USB_host.h" + +#ifdef __cplusplus + #include "USB/CDC.h" +#endif + +#endif // Arduino_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.8/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.8/platform.txt new file mode 100644 index 0000000..abcb1ed --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.8/platform.txt @@ -0,0 +1,248 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Arduino SAMD (32-bits ARM Cortex-M0+) Boards +version=1.8.8 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +# EXPERIMENTAL feature: optimization flags +# - this is alpha and may be subject to change without notice +compiler.optimization_flags=-Os +compiler.optimization_flags.release=-Os +compiler.optimization_flags.debug=-Og -g3 + +compiler.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags={compiler.optimization_flags} -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.0.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +##recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +# Upload/Debug tools +# ------------------ + +# +# AVRDUDE +# +tools.avrdude.path={runtime.tools.avrdude.path} +tools.avrdude.cmd={path}/bin/avrdude +tools.avrdude.config.path={path}/etc/avrdude.conf + +tools.avrdude.upload.params.verbose=-v -v +tools.avrdude.upload.params.quiet=-q -q +tools.avrdude.upload.params.noverify=-V +tools.avrdude.upload.pattern="{cmd}" "-C{config.path}" {upload.verbose} -p{build.emu.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} "-Uflash:w:{build.path}/{build.project_name}.hex:i" + +tools.avrdude_remote.upload.pattern="openocd --version 2>&1 | grep 2016 && if opkg update; then opkg upgrade openocd; exit 1; else echo 'Please connect your board to the Internet in order to upgrade tools' >&2; exit 1; fi || /usr/bin/run-avrdude /tmp/sketch.hex" + +tools.avrdude.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.avrdude.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +arduinoota.extraflags= +tools.bossac.network_cmd={runtime.tools.arduinoOTA-1.3.0.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b {arduinoota.extraflags} + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.hex} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# GDB (Debugger) +# +# EXPERIMENTAL feature: debug.pattern +# - this is alpha and may be subject to change without notice +tools.gdb-openocd.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +tools.gdb-openocd.cmd=arm-none-eabi-gdb +tools.gdb-openocd.cmd.windows=arm-none-eabi-gdb.exe +tools.gdb-openocd.interpreter=console +tools.gdb-openocd.debug.pattern="{path}/{cmd}" --interpreter={interpreter} -ex "set remotetimeout 5" -ex "set pagination off" -ex 'target extended-remote | "{tools.openocd.path}/{tools.openocd.cmd}" -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0"' "{build.path}/{build.project_name}.elf" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.9/cores/arduino/Arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.9/cores/arduino/Arduino.h new file mode 100644 index 0000000..4c47b5c --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.9/cores/arduino/Arduino.h @@ -0,0 +1,165 @@ +/* + Arduino.h - Main include file for the Arduino SDK + Copyright (c) 2014 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// KH, This is the fix according to https://github.com/arduino/ArduinoCore-samd/pull/399 +// to avoid notorious compiler error while uing STL (min and max macro error) +// It's terrible Arduino has just released new core and still don't merge the PR + +#ifndef Arduino_h +#define Arduino_h + +#include +#include +#include +#include +#include + +typedef bool boolean; +typedef uint8_t byte; +typedef uint16_t word; + +// some libraries and sketches depend on this AVR stuff, +// assuming Arduino.h or WProgram.h automatically includes it... +// +#include "avr/pgmspace.h" +#include "avr/interrupt.h" +#include "avr/io.h" + +#include "binary.h" +#include "itoa.h" + +#ifdef __cplusplus + extern "C"{ +#endif // __cplusplus + +// Include Atmel headers +#include "sam.h" + +#include "wiring_constants.h" + +#define clockCyclesPerMicrosecond() ( SystemCoreClock / 1000000L ) +#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (SystemCoreClock / 1000L) ) +#define microsecondsToClockCycles(a) ( (a) * (SystemCoreClock / 1000000L) ) + +void yield( void ) ; + +/* system functions */ +int main( void ); +void init( void ); + +/* sketch */ +void setup( void ) ; +void loop( void ) ; + +#include "WVariant.h" + +#ifdef __cplusplus +} // extern "C" +#endif + +// The following headers are for C++ only compilation +#ifdef __cplusplus + #include "WCharacter.h" + #include "WString.h" + #include "Tone.h" + #include "WMath.h" + #include "HardwareSerial.h" + #include "pulse.h" + #include +#endif + +#include "delay.h" + +#ifdef __cplusplus + #include "Uart.h" +#endif + +// Include board variant +#include "variant.h" +#include "wiring.h" +#include "wiring_digital.h" +#include "wiring_analog.h" +#include "wiring_shift.h" +#include "WInterrupts.h" + +#ifndef __cplusplus + // undefine stdlib's abs if encountered + #ifdef abs + #undef abs + #endif // abs + + #define min(a,b) ((a)<(b)?(a):(b)) + #define max(a,b) ((a)>(b)?(a):(b)) + #define abs(x) ((x)>0?(x):-(x)) + #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) + +#else + //using std::min; + //using std::max; + template + auto min(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (b < a) ? b : a; + } + + template + auto max(const T& a, const L& b) -> decltype((b < a) ? b : a) + { + return (a < b) ? b : a; + } +#endif + +#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) +#define radians(deg) ((deg)*DEG_TO_RAD) +#define degrees(rad) ((rad)*RAD_TO_DEG) +#define sq(x) ((x)*(x)) + +#define interrupts() __enable_irq() +#define noInterrupts() __disable_irq() + +#define lowByte(w) ((uint8_t) ((w) & 0xff)) +#define highByte(w) ((uint8_t) ((w) >> 8)) + +#define bitRead(value, bit) (((value) >> (bit)) & 0x01) +#define bitSet(value, bit) ((value) |= (1UL << (bit))) +#define bitClear(value, bit) ((value) &= ~(1UL << (bit))) +#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit)) +#define bit(b) (1UL << (b)) + +#if (ARDUINO_SAMD_VARIANT_COMPLIANCE >= 10606) + // Interrupts + #define digitalPinToInterrupt(P) ( P ) +#endif + +// Allows publishing the Beta core under samd-beta / arduino organization +#ifndef ARDUINO_ARCH_SAMD +#define ARDUINO_ARCH_SAMD +#endif + +// USB Device +#include "USB/USBDesc.h" +#include "USB/USBCore.h" +#include "USB/USBAPI.h" +#include "USB/USB_host.h" + +#ifdef __cplusplus + #include "USB/CDC.h" +#endif + +#endif // Arduino_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.9/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.9/platform.txt new file mode 100644 index 0000000..9aa0320 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/arduino/hardware/samd/1.8.9/platform.txt @@ -0,0 +1,242 @@ +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Arduino SAMD Core and platform. +# +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Arduino SAMD (32-bits ARM Cortex-M0+) Boards +version=1.8.9 + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall -Wno-expansion-to-defined +compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined + +# EXPERIMENTAL feature: optimization flags +# - this is alpha and may be subject to change without notice +compiler.optimization_flags=-Os +compiler.optimization_flags.release=-Os +compiler.optimization_flags.debug=-Og -g3 + +compiler.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags={compiler.optimization_flags} -Wl,--gc-sections -save-temps +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +#compiler.c.elf.extra_flags=-v +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.0.path}/CMSIS/Device/ATMEL/" +compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math + +compiler.libraries.ldflags= + +# USB Flags +# --------- +build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' + +# Default usb manufacturer will be replaced at compile time using +# numeric vendor ID if available or by board's specific value. +build.usb_manufacturer="Unknown" + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DBOARD_NAME="{build.board}" -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" -Wl,--end-group + +## Create output (bin file) +recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" + +## Create output (hex file) +recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" + +build.preferred_out_format=bin + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).* + +# Upload/Debug tools +# ------------------ + +# +# AVRDUDE +# +tools.avrdude.path={runtime.tools.avrdude.path} +tools.avrdude.cmd={path}/bin/avrdude +tools.avrdude.config.path={path}/etc/avrdude.conf + +tools.avrdude.upload.params.verbose=-v -v +tools.avrdude.upload.params.quiet=-q -q +tools.avrdude.upload.params.noverify=-V +tools.avrdude.upload.pattern="{cmd}" "-C{config.path}" {upload.verbose} -p{build.emu.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} "-Uflash:w:{build.path}/{build.project_name}.hex:i" + +tools.avrdude_remote.upload.pattern="openocd --version 2>&1 | grep 2016 && if opkg update; then opkg upgrade openocd; exit 1; else echo 'Please connect your board to the Internet in order to upgrade tools' >&2; exit 1; fi || /usr/bin/run-avrdude /tmp/sketch.hex" + +tools.avrdude.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.avrdude.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +# +# BOSSA +# +tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossac.cmd=bossac +tools.bossac.cmd.windows=bossac.exe + +tools.bossac.upload.params.verbose=-i -d +tools.bossac.upload.params.quiet= +tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R + +tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +arduinoota.extraflags= +tools.bossac.network_cmd={runtime.tools.arduinoOTA-1.3.0.path}/bin/arduinoOTA +tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b {arduinoota.extraflags} + +# +# BOSSA (ignore binary size) +# +tools.bossacI.path={runtime.tools.bossac-1.7.0-arduino3.path} +tools.bossacI.cmd=bossac +tools.bossacI.cmd.windows=bossac.exe + +tools.bossacI.upload.params.verbose=-i -d +tools.bossacI.upload.params.quiet= +tools.bossacI.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -I -U {upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R + +tools.bossacI_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R + +tools.bossacI.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + + +# +# OpenOCD sketch upload +# + +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe + +tools.openocd.upload.params.verbose=-d2 +tools.openocd.upload.params.quiet=-d0 +tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown" + +tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b + +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.hex} verify reset; shutdown" + +tools.openocd.erase.params.verbose=-d3 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# OpenOCD sketch upload - version with configurable bootloader size +# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences +# + +tools.openocd-withbootsize.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd-withbootsize.cmd=bin/openocd +tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +tools.openocd-withbootsize.upload.params.verbose=-d2 +tools.openocd-withbootsize.upload.params.quiet=-d0 +tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown" + +# Program flashes the binary at 0x0000, so use the linker script without_bootloader +tools.openocd-withbootsize.program.params.verbose=-d2 +tools.openocd-withbootsize.program.params.quiet=-d0 +tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown" + +tools.openocd-withbootsize.erase.params.verbose=-d3 +tools.openocd-withbootsize.erase.params.quiet=-d0 +tools.openocd-withbootsize.erase.pattern= + +tools.openocd-withbootsize.bootloader.params.verbose=-d2 +tools.openocd-withbootsize.bootloader.params.quiet=-d0 +tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown" + +# +# GDB (Debugger) +# +# EXPERIMENTAL feature: debug.pattern +# - this is alpha and may be subject to change without notice +tools.gdb-openocd.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +tools.gdb-openocd.cmd=arm-none-eabi-gdb +tools.gdb-openocd.cmd.windows=arm-none-eabi-gdb.exe +tools.gdb-openocd.interpreter=console +tools.gdb-openocd.debug.pattern="{path}/{cmd}" --interpreter={interpreter} -ex "set remotetimeout 5" -ex "set pagination off" -ex 'target extended-remote | "{tools.openocd.path}/{tools.openocd.cmd}" -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0"' "{build.path}/{build.project_name}.elf" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/boards.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/boards.txt new file mode 100644 index 0000000..693927f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/boards.txt @@ -0,0 +1,1798 @@ +menu.usb=USB Type +menu.speed=CPU Speed +menu.opt=Optimize +menu.keys=Keyboard Layout + + +# TODO: consider whether these compiler warnings are worthwhile +# -Wno-error=unused-function +# -Wno-error=unused-but-set-variable +# -Wno-error=unused-variable +# -Wno-unused-parameter +# -Wno-unused-but-set-parameter +# -Wno-sign-compare + + +teensy41.name=Teensy 4.1 +#teensy41.upload.maximum_size=8126464 +teensy41.build.board=TEENSY41 +teensy41.build.flags.ld=-Wl,--gc-sections,--relax "-T{build.core.path}/imxrt1062_t41.ld" +#teensy41.upload.maximum_data_size=524288 +teensy41.upload.tool=teensyloader +teensy41.upload.protocol=halfkay +teensy41.build.core=teensy4 +teensy41.build.mcu=imxrt1062 +teensy41.build.warn_data_percentage=99 +teensy41.build.toolchain=arm/bin/ +teensy41.build.command.gcc=arm-none-eabi-gcc +teensy41.build.command.g++=arm-none-eabi-g++ +teensy41.build.command.ar=arm-none-eabi-gcc-ar +teensy41.build.command.objcopy=arm-none-eabi-objcopy +teensy41.build.command.objdump=arm-none-eabi-objdump +teensy41.build.command.linker=arm-none-eabi-gcc +teensy41.build.command.size=arm-none-eabi-size +teensy41.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib +teensy41.build.flags.dep=-MMD +teensy41.build.flags.optimize=-Os +teensy41.build.flags.cpu=-mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 +teensy41.build.flags.defs=-D__IMXRT1062__ -DTEENSYDUINO=156 +teensy41.build.flags.cpp=-std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing +teensy41.build.flags.c= +teensy41.build.flags.S=-x assembler-with-cpp +teensy41.build.flags.libs=-larm_cortexM7lfsp_math -lm -lstdc++ +teensy41.serial.restart_cmd=false +teensy41.menu.usb.serial=Serial +teensy41.menu.usb.serial.build.usbtype=USB_SERIAL +teensy41.menu.usb.serial2=Dual Serial +teensy41.menu.usb.serial2.build.usbtype=USB_DUAL_SERIAL +teensy41.menu.usb.serial3=Triple Serial +teensy41.menu.usb.serial3.build.usbtype=USB_TRIPLE_SERIAL +teensy41.menu.usb.keyboard=Keyboard +teensy41.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY +teensy41.menu.usb.keyboard.fake_serial=teensy_gateway +teensy41.menu.usb.touch=Keyboard + Touch Screen +teensy41.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN +teensy41.menu.usb.touch.fake_serial=teensy_gateway +teensy41.menu.usb.hidtouch=Keyboard + Mouse + Touch Screen +teensy41.menu.usb.hidtouch.build.usbtype=USB_HID_TOUCHSCREEN +teensy41.menu.usb.hidtouch.fake_serial=teensy_gateway +teensy41.menu.usb.hid=Keyboard + Mouse + Joystick +teensy41.menu.usb.hid.build.usbtype=USB_HID +teensy41.menu.usb.hid.fake_serial=teensy_gateway +teensy41.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick +teensy41.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID +teensy41.menu.usb.midi=MIDI +teensy41.menu.usb.midi.build.usbtype=USB_MIDI +teensy41.menu.usb.midi.fake_serial=teensy_gateway +teensy41.menu.usb.midi4=MIDIx4 +teensy41.menu.usb.midi4.build.usbtype=USB_MIDI4 +teensy41.menu.usb.midi4.fake_serial=teensy_gateway +teensy41.menu.usb.midi16=MIDIx16 +teensy41.menu.usb.midi16.build.usbtype=USB_MIDI16 +teensy41.menu.usb.midi16.fake_serial=teensy_gateway +teensy41.menu.usb.serialmidi=Serial + MIDI +teensy41.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL +teensy41.menu.usb.serialmidi4=Serial + MIDIx4 +teensy41.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL +teensy41.menu.usb.serialmidi16=Serial + MIDIx16 +teensy41.menu.usb.serialmidi16.build.usbtype=USB_MIDI16_SERIAL +teensy41.menu.usb.audio=Audio +teensy41.menu.usb.audio.build.usbtype=USB_AUDIO +teensy41.menu.usb.audio.fake_serial=teensy_gateway +teensy41.menu.usb.serialmidiaudio=Serial + MIDI + Audio +teensy41.menu.usb.serialmidiaudio.build.usbtype=USB_MIDI_AUDIO_SERIAL +teensy41.menu.usb.serialmidi16audio=Serial + MIDIx16 + Audio +teensy41.menu.usb.serialmidi16audio.build.usbtype=USB_MIDI16_AUDIO_SERIAL +teensy41.menu.usb.mtp=MTP Disk (Experimental) +teensy41.menu.usb.mtp.build.usbtype=USB_MTPDISK +teensy41.menu.usb.mtp.fake_serial=teensy_gateway +teensy41.menu.usb.rawhid=Raw HID +teensy41.menu.usb.rawhid.build.usbtype=USB_RAWHID +teensy41.menu.usb.rawhid.fake_serial=teensy_gateway +teensy41.menu.usb.flightsim=Flight Sim Controls +teensy41.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM +teensy41.menu.usb.flightsim.fake_serial=teensy_gateway +teensy41.menu.usb.flightsimjoystick=Flight Sim Controls + Joystick +teensy41.menu.usb.flightsimjoystick.build.usbtype=USB_FLIGHTSIM_JOYSTICK +teensy41.menu.usb.flightsimjoystick.fake_serial=teensy_gateway +#teensy41.menu.usb.disable=No USB +#teensy41.menu.usb.disable.build.usbtype=USB_DISABLED + +teensy41.menu.speed.600=600 MHz +teensy41.menu.speed.528=528 MHz +teensy41.menu.speed.450=450 MHz +teensy41.menu.speed.396=396 MHz +teensy41.menu.speed.150=150 MHz +teensy41.menu.speed.24=24 MHz +teensy41.menu.speed.720=720 MHz (overclock) +teensy41.menu.speed.816=816 MHz (overclock) +teensy41.menu.speed.912=912 MHz (overclock, cooling req'd) +teensy41.menu.speed.960=960 MHz (overclock, cooling req'd) +teensy41.menu.speed.1008=1.008 GHz (overclock, cooling req'd) +teensy41.menu.speed.1008.build.fcpu=1008000000 +teensy41.menu.speed.960.build.fcpu=960000000 +teensy41.menu.speed.912.build.fcpu=912000000 +teensy41.menu.speed.816.build.fcpu=816000000 +teensy41.menu.speed.720.build.fcpu=720000000 +teensy41.menu.speed.600.build.fcpu=600000000 +teensy41.menu.speed.528.build.fcpu=528000000 +teensy41.menu.speed.450.build.fcpu=450000000 +teensy41.menu.speed.396.build.fcpu=396000000 +teensy41.menu.speed.150.build.fcpu=150000000 +teensy41.menu.speed.24.build.fcpu=24000000 + +teensy41.menu.opt.o2std=Faster +teensy41.menu.opt.o2std.build.flags.optimize=-O2 +teensy41.menu.opt.o2std.build.flags.ldspecs= +#teensy41.menu.opt.o2lto=Faster with LTO +#teensy41.menu.opt.o2lto.build.flags.optimize=-O2 -flto -fno-fat-lto-objects +#teensy41.menu.opt.o2lto.build.flags.ldspecs=-fuse-linker-plugin +teensy41.menu.opt.o1std=Fast +teensy41.menu.opt.o1std.build.flags.optimize=-O1 +teensy41.menu.opt.o1std.build.flags.ldspecs= +#teensy41.menu.opt.o1lto=Fast with LTO +#teensy41.menu.opt.o1lto.build.flags.optimize=-O1 -flto -fno-fat-lto-objects +#teensy41.menu.opt.o1lto.build.flags.ldspecs=-fuse-linker-plugin +teensy41.menu.opt.o3std=Fastest +teensy41.menu.opt.o3std.build.flags.optimize=-O3 +teensy41.menu.opt.o3std.build.flags.ldspecs= +#teensy41.menu.opt.o3purestd=Fastest + pure-code +#teensy41.menu.opt.o3purestd.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ +#teensy41.menu.opt.o3purestd.build.flags.ldspecs= +#teensy41.menu.opt.o3lto=Fastest with LTO +#teensy41.menu.opt.o3lto.build.flags.optimize=-O3 -flto -fno-fat-lto-objects +#teensy41.menu.opt.o3lto.build.flags.ldspecs=-fuse-linker-plugin +#teensy41.menu.opt.o3purelto=Fastest + pure-code with LTO +#teensy41.menu.opt.o3purelto.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ -flto -fno-fat-lto-objects +#teensy41.menu.opt.o3purelto.build.flags.ldspecs=-fuse-linker-plugin +teensy41.menu.opt.ogstd=Debug +teensy41.menu.opt.ogstd.build.flags.optimize=-Og +teensy41.menu.opt.ogstd.build.flags.ldspecs= +#teensy41.menu.opt.oglto=Debug with LTO +#teensy41.menu.opt.oglto.build.flags.optimize=-Og -flto -fno-fat-lto-objects +#teensy41.menu.opt.oglto.build.flags.ldspecs=-fuse-linker-plugin +teensy41.menu.opt.osstd=Smallest Code +teensy41.menu.opt.osstd.build.flags.optimize=-Os --specs=nano.specs +teensy41.menu.opt.osstd.build.flags.ldspecs= +#teensy41.menu.opt.oslto=Smallest Code with LTO +#teensy41.menu.opt.oslto.build.flags.optimize=-Os -flto -fno-fat-lto-objects --specs=nano.specs +#teensy41.menu.opt.oslto.build.flags.ldspecs=-fuse-linker-plugin + +teensy41.menu.keys.en-us=US English +teensy41.menu.keys.en-us.build.keylayout=US_ENGLISH +teensy41.menu.keys.fr-ca=Canadian French +teensy41.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH +teensy41.menu.keys.xx-ca=Canadian Multilingual +teensy41.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL +teensy41.menu.keys.cz-cz=Czech +teensy41.menu.keys.cz-cz.build.keylayout=CZECH +teensy41.menu.keys.da-da=Danish +teensy41.menu.keys.da-da.build.keylayout=DANISH +teensy41.menu.keys.fi-fi=Finnish +teensy41.menu.keys.fi-fi.build.keylayout=FINNISH +teensy41.menu.keys.fr-fr=French +teensy41.menu.keys.fr-fr.build.keylayout=FRENCH +teensy41.menu.keys.fr-be=French Belgian +teensy41.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN +teensy41.menu.keys.fr-ch=French Swiss +teensy41.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS +teensy41.menu.keys.de-de=German +teensy41.menu.keys.de-de.build.keylayout=GERMAN +teensy41.menu.keys.de-dm=German (Mac) +teensy41.menu.keys.de-dm.build.keylayout=GERMAN_MAC +teensy41.menu.keys.de-ch=German Swiss +teensy41.menu.keys.de-ch.build.keylayout=GERMAN_SWISS +teensy41.menu.keys.is-is=Icelandic +teensy41.menu.keys.is-is.build.keylayout=ICELANDIC +teensy41.menu.keys.en-ie=Irish +teensy41.menu.keys.en-ie.build.keylayout=IRISH +teensy41.menu.keys.it-it=Italian +teensy41.menu.keys.it-it.build.keylayout=ITALIAN +teensy41.menu.keys.no-no=Norwegian +teensy41.menu.keys.no-no.build.keylayout=NORWEGIAN +teensy41.menu.keys.pt-pt=Portuguese +teensy41.menu.keys.pt-pt.build.keylayout=PORTUGUESE +teensy41.menu.keys.pt-br=Portuguese Brazilian +teensy41.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN +teensy41.menu.keys.rs-rs=Serbian (Latin Only) +teensy41.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY +teensy41.menu.keys.es-es=Spanish +teensy41.menu.keys.es-es.build.keylayout=SPANISH +teensy41.menu.keys.es-mx=Spanish Latin America +teensy41.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA +teensy41.menu.keys.sv-se=Swedish +teensy41.menu.keys.sv-se.build.keylayout=SWEDISH +teensy41.menu.keys.tr-tr=Turkish (partial) +teensy41.menu.keys.tr-tr.build.keylayout=TURKISH +teensy41.menu.keys.en-gb=United Kingdom +teensy41.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM +teensy41.menu.keys.usint=US International +teensy41.menu.keys.usint.build.keylayout=US_INTERNATIONAL + + + + +teensyMM.name=Teensy MicroMod +#teensyMM.upload.maximum_size=16515072 +teensyMM.build.board=TEENSY_MICROMOD +teensyMM.build.flags.ld=-Wl,--gc-sections,--relax "-T{build.core.path}/imxrt1062_mm.ld" +#teensyMM.upload.maximum_data_size=524288 +#teensyMM.upload.maximum_data_size=1048576 +teensyMM.upload.tool=teensyloader +teensyMM.upload.protocol=halfkay +teensyMM.build.core=teensy4 +teensyMM.build.mcu=imxrt1062 +teensyMM.build.warn_data_percentage=99 +teensyMM.build.toolchain=arm/bin/ +teensyMM.build.command.gcc=arm-none-eabi-gcc +teensyMM.build.command.g++=arm-none-eabi-g++ +teensyMM.build.command.ar=arm-none-eabi-gcc-ar +teensyMM.build.command.objcopy=arm-none-eabi-objcopy +teensyMM.build.command.objdump=arm-none-eabi-objdump +teensyMM.build.command.linker=arm-none-eabi-gcc +teensyMM.build.command.size=arm-none-eabi-size +teensyMM.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib +teensyMM.build.flags.dep=-MMD +teensyMM.build.flags.optimize=-Os +teensyMM.build.flags.cpu=-mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 +teensyMM.build.flags.defs=-D__IMXRT1062__ -DTEENSYDUINO=156 +teensyMM.build.flags.cpp=-std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing +teensyMM.build.flags.c= +teensyMM.build.flags.S=-x assembler-with-cpp +teensyMM.build.flags.libs=-larm_cortexM7lfsp_math -lm -lstdc++ +teensyMM.serial.restart_cmd=false +teensyMM.menu.usb.serial=Serial +teensyMM.menu.usb.serial.build.usbtype=USB_SERIAL +teensyMM.menu.usb.serial2=Dual Serial +teensyMM.menu.usb.serial2.build.usbtype=USB_DUAL_SERIAL +teensyMM.menu.usb.serial3=Triple Serial +teensyMM.menu.usb.serial3.build.usbtype=USB_TRIPLE_SERIAL +teensyMM.menu.usb.keyboard=Keyboard +teensyMM.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY +teensyMM.menu.usb.keyboard.fake_serial=teensy_gateway +teensyMM.menu.usb.touch=Keyboard + Touch Screen +teensyMM.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN +teensyMM.menu.usb.touch.fake_serial=teensy_gateway +teensyMM.menu.usb.hidtouch=Keyboard + Mouse + Touch Screen +teensyMM.menu.usb.hidtouch.build.usbtype=USB_HID_TOUCHSCREEN +teensyMM.menu.usb.hidtouch.fake_serial=teensy_gateway +teensyMM.menu.usb.hid=Keyboard + Mouse + Joystick +teensyMM.menu.usb.hid.build.usbtype=USB_HID +teensyMM.menu.usb.hid.fake_serial=teensy_gateway +teensyMM.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick +teensyMM.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID +teensyMM.menu.usb.midi=MIDI +teensyMM.menu.usb.midi.build.usbtype=USB_MIDI +teensyMM.menu.usb.midi.fake_serial=teensy_gateway +teensyMM.menu.usb.midi4=MIDIx4 +teensyMM.menu.usb.midi4.build.usbtype=USB_MIDI4 +teensyMM.menu.usb.midi4.fake_serial=teensy_gateway +teensyMM.menu.usb.midi16=MIDIx16 +teensyMM.menu.usb.midi16.build.usbtype=USB_MIDI16 +teensyMM.menu.usb.midi16.fake_serial=teensy_gateway +teensyMM.menu.usb.serialmidi=Serial + MIDI +teensyMM.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL +teensyMM.menu.usb.serialmidi4=Serial + MIDIx4 +teensyMM.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL +teensyMM.menu.usb.serialmidi16=Serial + MIDIx16 +teensyMM.menu.usb.serialmidi16.build.usbtype=USB_MIDI16_SERIAL +teensyMM.menu.usb.audio=Audio +teensyMM.menu.usb.audio.build.usbtype=USB_AUDIO +teensyMM.menu.usb.audio.fake_serial=teensy_gateway +teensyMM.menu.usb.serialmidiaudio=Serial + MIDI + Audio +teensyMM.menu.usb.serialmidiaudio.build.usbtype=USB_MIDI_AUDIO_SERIAL +teensyMM.menu.usb.serialmidi16audio=Serial + MIDIx16 + Audio +teensyMM.menu.usb.serialmidi16audio.build.usbtype=USB_MIDI16_AUDIO_SERIAL +teensyMM.menu.usb.mtp=MTP Disk (Experimental) +teensyMM.menu.usb.mtp.build.usbtype=USB_MTPDISK +teensyMM.menu.usb.mtp.fake_serial=teensy_gateway +teensyMM.menu.usb.rawhid=Raw HID +teensyMM.menu.usb.rawhid.build.usbtype=USB_RAWHID +teensyMM.menu.usb.rawhid.fake_serial=teensy_gateway +teensyMM.menu.usb.flightsim=Flight Sim Controls +teensyMM.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM +teensyMM.menu.usb.flightsim.fake_serial=teensy_gateway +teensyMM.menu.usb.flightsimjoystick=Flight Sim Controls + Joystick +teensyMM.menu.usb.flightsimjoystick.build.usbtype=USB_FLIGHTSIM_JOYSTICK +teensyMM.menu.usb.flightsimjoystick.fake_serial=teensy_gateway +#teensyMM.menu.usb.disable=No USB +#teensyMM.menu.usb.disable.build.usbtype=USB_DISABLED + +teensyMM.menu.speed.600=600 MHz +teensyMM.menu.speed.528=528 MHz +teensyMM.menu.speed.450=450 MHz +teensyMM.menu.speed.396=396 MHz +teensyMM.menu.speed.150=150 MHz +teensyMM.menu.speed.24=24 MHz +teensyMM.menu.speed.720=720 MHz (overclock) +teensyMM.menu.speed.816=816 MHz (overclock) +teensyMM.menu.speed.912=912 MHz (overclock, cooling req'd) +teensyMM.menu.speed.960=960 MHz (overclock, cooling req'd) +teensyMM.menu.speed.1008=1.008 GHz (overclock, cooling req'd) +teensyMM.menu.speed.1008.build.fcpu=1008000000 +teensyMM.menu.speed.960.build.fcpu=960000000 +teensyMM.menu.speed.912.build.fcpu=912000000 +teensyMM.menu.speed.816.build.fcpu=816000000 +teensyMM.menu.speed.720.build.fcpu=720000000 +teensyMM.menu.speed.600.build.fcpu=600000000 +teensyMM.menu.speed.528.build.fcpu=528000000 +teensyMM.menu.speed.450.build.fcpu=450000000 +teensyMM.menu.speed.396.build.fcpu=396000000 +teensyMM.menu.speed.150.build.fcpu=150000000 +teensyMM.menu.speed.24.build.fcpu=24000000 + +teensyMM.menu.opt.o2std=Faster +teensyMM.menu.opt.o2std.build.flags.optimize=-O2 +teensyMM.menu.opt.o2std.build.flags.ldspecs= +#teensyMM.menu.opt.o2lto=Faster with LTO +#teensyMM.menu.opt.o2lto.build.flags.optimize=-O2 -flto -fno-fat-lto-objects +#teensyMM.menu.opt.o2lto.build.flags.ldspecs=-fuse-linker-plugin +teensyMM.menu.opt.o1std=Fast +teensyMM.menu.opt.o1std.build.flags.optimize=-O1 +teensyMM.menu.opt.o1std.build.flags.ldspecs= +#teensyMM.menu.opt.o1lto=Fast with LTO +#teensyMM.menu.opt.o1lto.build.flags.optimize=-O1 -flto -fno-fat-lto-objects +#teensyMM.menu.opt.o1lto.build.flags.ldspecs=-fuse-linker-plugin +teensyMM.menu.opt.o3std=Fastest +teensyMM.menu.opt.o3std.build.flags.optimize=-O3 +teensyMM.menu.opt.o3std.build.flags.ldspecs= +#teensyMM.menu.opt.o3purestd=Fastest + pure-code +#teensyMM.menu.opt.o3purestd.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ +#teensyMM.menu.opt.o3purestd.build.flags.ldspecs= +#teensyMM.menu.opt.o3lto=Fastest with LTO +#teensyMM.menu.opt.o3lto.build.flags.optimize=-O3 -flto -fno-fat-lto-objects +#teensyMM.menu.opt.o3lto.build.flags.ldspecs=-fuse-linker-plugin +#teensyMM.menu.opt.o3purelto=Fastest + pure-code with LTO +#teensyMM.menu.opt.o3purelto.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ -flto -fno-fat-lto-objects +#teensyMM.menu.opt.o3purelto.build.flags.ldspecs=-fuse-linker-plugin +teensyMM.menu.opt.ogstd=Debug +teensyMM.menu.opt.ogstd.build.flags.optimize=-Og +teensyMM.menu.opt.ogstd.build.flags.ldspecs= +#teensyMM.menu.opt.oglto=Debug with LTO +#teensyMM.menu.opt.oglto.build.flags.optimize=-Og -flto -fno-fat-lto-objects +#teensyMM.menu.opt.oglto.build.flags.ldspecs=-fuse-linker-plugin +teensyMM.menu.opt.osstd=Smallest Code +teensyMM.menu.opt.osstd.build.flags.optimize=-Os --specs=nano.specs +teensyMM.menu.opt.osstd.build.flags.ldspecs= +#teensyMM.menu.opt.oslto=Smallest Code with LTO +#teensyMM.menu.opt.oslto.build.flags.optimize=-Os -flto -fno-fat-lto-objects --specs=nano.specs +#teensyMM.menu.opt.oslto.build.flags.ldspecs=-fuse-linker-plugin + +teensyMM.menu.keys.en-us=US English +teensyMM.menu.keys.en-us.build.keylayout=US_ENGLISH +teensyMM.menu.keys.fr-ca=Canadian French +teensyMM.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH +teensyMM.menu.keys.xx-ca=Canadian Multilingual +teensyMM.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL +teensyMM.menu.keys.cz-cz=Czech +teensyMM.menu.keys.cz-cz.build.keylayout=CZECH +teensyMM.menu.keys.da-da=Danish +teensyMM.menu.keys.da-da.build.keylayout=DANISH +teensyMM.menu.keys.fi-fi=Finnish +teensyMM.menu.keys.fi-fi.build.keylayout=FINNISH +teensyMM.menu.keys.fr-fr=French +teensyMM.menu.keys.fr-fr.build.keylayout=FRENCH +teensyMM.menu.keys.fr-be=French Belgian +teensyMM.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN +teensyMM.menu.keys.fr-ch=French Swiss +teensyMM.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS +teensyMM.menu.keys.de-de=German +teensyMM.menu.keys.de-de.build.keylayout=GERMAN +teensyMM.menu.keys.de-dm=German (Mac) +teensyMM.menu.keys.de-dm.build.keylayout=GERMAN_MAC +teensyMM.menu.keys.de-ch=German Swiss +teensyMM.menu.keys.de-ch.build.keylayout=GERMAN_SWISS +teensyMM.menu.keys.is-is=Icelandic +teensyMM.menu.keys.is-is.build.keylayout=ICELANDIC +teensyMM.menu.keys.en-ie=Irish +teensyMM.menu.keys.en-ie.build.keylayout=IRISH +teensyMM.menu.keys.it-it=Italian +teensyMM.menu.keys.it-it.build.keylayout=ITALIAN +teensyMM.menu.keys.no-no=Norwegian +teensyMM.menu.keys.no-no.build.keylayout=NORWEGIAN +teensyMM.menu.keys.pt-pt=Portuguese +teensyMM.menu.keys.pt-pt.build.keylayout=PORTUGUESE +teensyMM.menu.keys.pt-br=Portuguese Brazilian +teensyMM.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN +teensyMM.menu.keys.rs-rs=Serbian (Latin Only) +teensyMM.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY +teensyMM.menu.keys.es-es=Spanish +teensyMM.menu.keys.es-es.build.keylayout=SPANISH +teensyMM.menu.keys.es-mx=Spanish Latin America +teensyMM.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA +teensyMM.menu.keys.sv-se=Swedish +teensyMM.menu.keys.sv-se.build.keylayout=SWEDISH +teensyMM.menu.keys.tr-tr=Turkish (partial) +teensyMM.menu.keys.tr-tr.build.keylayout=TURKISH +teensyMM.menu.keys.en-gb=United Kingdom +teensyMM.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM +teensyMM.menu.keys.usint=US International +teensyMM.menu.keys.usint.build.keylayout=US_INTERNATIONAL + + + + +teensy40.name=Teensy 4.0 +#teensy40.upload.maximum_size=2031616 +teensy40.build.board=TEENSY40 +teensy40.build.flags.ld=-Wl,--gc-sections,--relax "-T{build.core.path}/imxrt1062.ld" +#teensy40.upload.maximum_data_size=524288 +#teensy40.upload.maximum_data_size=1048576 +teensy40.upload.tool=teensyloader +teensy40.upload.protocol=halfkay +teensy40.build.core=teensy4 +teensy40.build.mcu=imxrt1062 +teensy40.build.warn_data_percentage=99 +teensy40.build.toolchain=arm/bin/ +teensy40.build.command.gcc=arm-none-eabi-gcc +teensy40.build.command.g++=arm-none-eabi-g++ +teensy40.build.command.ar=arm-none-eabi-gcc-ar +teensy40.build.command.objcopy=arm-none-eabi-objcopy +teensy40.build.command.objdump=arm-none-eabi-objdump +teensy40.build.command.linker=arm-none-eabi-gcc +teensy40.build.command.size=arm-none-eabi-size +teensy40.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib +teensy40.build.flags.dep=-MMD +teensy40.build.flags.optimize=-Os +teensy40.build.flags.cpu=-mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 +teensy40.build.flags.defs=-D__IMXRT1062__ -DTEENSYDUINO=156 +teensy40.build.flags.cpp=-std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing +teensy40.build.flags.c= +teensy40.build.flags.S=-x assembler-with-cpp +teensy40.build.flags.libs=-larm_cortexM7lfsp_math -lm -lstdc++ +teensy40.serial.restart_cmd=false +teensy40.menu.usb.serial=Serial +teensy40.menu.usb.serial.build.usbtype=USB_SERIAL +teensy40.menu.usb.serial2=Dual Serial +teensy40.menu.usb.serial2.build.usbtype=USB_DUAL_SERIAL +teensy40.menu.usb.serial3=Triple Serial +teensy40.menu.usb.serial3.build.usbtype=USB_TRIPLE_SERIAL +teensy40.menu.usb.keyboard=Keyboard +teensy40.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY +teensy40.menu.usb.keyboard.fake_serial=teensy_gateway +teensy40.menu.usb.touch=Keyboard + Touch Screen +teensy40.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN +teensy40.menu.usb.touch.fake_serial=teensy_gateway +teensy40.menu.usb.hidtouch=Keyboard + Mouse + Touch Screen +teensy40.menu.usb.hidtouch.build.usbtype=USB_HID_TOUCHSCREEN +teensy40.menu.usb.hidtouch.fake_serial=teensy_gateway +teensy40.menu.usb.hid=Keyboard + Mouse + Joystick +teensy40.menu.usb.hid.build.usbtype=USB_HID +teensy40.menu.usb.hid.fake_serial=teensy_gateway +teensy40.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick +teensy40.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID +teensy40.menu.usb.midi=MIDI +teensy40.menu.usb.midi.build.usbtype=USB_MIDI +teensy40.menu.usb.midi.fake_serial=teensy_gateway +teensy40.menu.usb.midi4=MIDIx4 +teensy40.menu.usb.midi4.build.usbtype=USB_MIDI4 +teensy40.menu.usb.midi4.fake_serial=teensy_gateway +teensy40.menu.usb.midi16=MIDIx16 +teensy40.menu.usb.midi16.build.usbtype=USB_MIDI16 +teensy40.menu.usb.midi16.fake_serial=teensy_gateway +teensy40.menu.usb.serialmidi=Serial + MIDI +teensy40.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL +teensy40.menu.usb.serialmidi4=Serial + MIDIx4 +teensy40.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL +teensy40.menu.usb.serialmidi16=Serial + MIDIx16 +teensy40.menu.usb.serialmidi16.build.usbtype=USB_MIDI16_SERIAL +teensy40.menu.usb.audio=Audio +teensy40.menu.usb.audio.build.usbtype=USB_AUDIO +teensy40.menu.usb.audio.fake_serial=teensy_gateway +teensy40.menu.usb.serialmidiaudio=Serial + MIDI + Audio +teensy40.menu.usb.serialmidiaudio.build.usbtype=USB_MIDI_AUDIO_SERIAL +teensy40.menu.usb.serialmidi16audio=Serial + MIDIx16 + Audio +teensy40.menu.usb.serialmidi16audio.build.usbtype=USB_MIDI16_AUDIO_SERIAL +teensy40.menu.usb.mtp=MTP Disk (Experimental) +teensy40.menu.usb.mtp.build.usbtype=USB_MTPDISK +teensy40.menu.usb.mtp.fake_serial=teensy_gateway +teensy40.menu.usb.rawhid=Raw HID +teensy40.menu.usb.rawhid.build.usbtype=USB_RAWHID +teensy40.menu.usb.rawhid.fake_serial=teensy_gateway +teensy40.menu.usb.flightsim=Flight Sim Controls +teensy40.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM +teensy40.menu.usb.flightsim.fake_serial=teensy_gateway +teensy40.menu.usb.flightsimjoystick=Flight Sim Controls + Joystick +teensy40.menu.usb.flightsimjoystick.build.usbtype=USB_FLIGHTSIM_JOYSTICK +teensy40.menu.usb.flightsimjoystick.fake_serial=teensy_gateway +#teensy40.menu.usb.disable=No USB +#teensy40.menu.usb.disable.build.usbtype=USB_DISABLED + +teensy40.menu.speed.600=600 MHz +teensy40.menu.speed.528=528 MHz +teensy40.menu.speed.450=450 MHz +teensy40.menu.speed.396=396 MHz +teensy40.menu.speed.150=150 MHz +teensy40.menu.speed.24=24 MHz +teensy40.menu.speed.720=720 MHz (overclock) +teensy40.menu.speed.816=816 MHz (overclock) +teensy40.menu.speed.912=912 MHz (overclock, cooling req'd) +teensy40.menu.speed.960=960 MHz (overclock, cooling req'd) +teensy40.menu.speed.1008=1.008 GHz (overclock, cooling req'd) +teensy40.menu.speed.1008.build.fcpu=1008000000 +teensy40.menu.speed.960.build.fcpu=960000000 +teensy40.menu.speed.912.build.fcpu=912000000 +teensy40.menu.speed.816.build.fcpu=816000000 +teensy40.menu.speed.720.build.fcpu=720000000 +teensy40.menu.speed.600.build.fcpu=600000000 +teensy40.menu.speed.528.build.fcpu=528000000 +teensy40.menu.speed.450.build.fcpu=450000000 +teensy40.menu.speed.396.build.fcpu=396000000 +teensy40.menu.speed.150.build.fcpu=150000000 +teensy40.menu.speed.24.build.fcpu=24000000 + +teensy40.menu.opt.o2std=Faster +teensy40.menu.opt.o2std.build.flags.optimize=-O2 +teensy40.menu.opt.o2std.build.flags.ldspecs= +#teensy40.menu.opt.o2lto=Faster with LTO +#teensy40.menu.opt.o2lto.build.flags.optimize=-O2 -flto -fno-fat-lto-objects +#teensy40.menu.opt.o2lto.build.flags.ldspecs=-fuse-linker-plugin +teensy40.menu.opt.o1std=Fast +teensy40.menu.opt.o1std.build.flags.optimize=-O1 +teensy40.menu.opt.o1std.build.flags.ldspecs= +#teensy40.menu.opt.o1lto=Fast with LTO +#teensy40.menu.opt.o1lto.build.flags.optimize=-O1 -flto -fno-fat-lto-objects +#teensy40.menu.opt.o1lto.build.flags.ldspecs=-fuse-linker-plugin +teensy40.menu.opt.o3std=Fastest +teensy40.menu.opt.o3std.build.flags.optimize=-O3 +teensy40.menu.opt.o3std.build.flags.ldspecs= +#teensy40.menu.opt.o3purestd=Fastest + pure-code +#teensy40.menu.opt.o3purestd.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ +#teensy40.menu.opt.o3purestd.build.flags.ldspecs= +#teensy40.menu.opt.o3lto=Fastest with LTO +#teensy40.menu.opt.o3lto.build.flags.optimize=-O3 -flto -fno-fat-lto-objects +#teensy40.menu.opt.o3lto.build.flags.ldspecs=-fuse-linker-plugin +#teensy40.menu.opt.o3purelto=Fastest + pure-code with LTO +#teensy40.menu.opt.o3purelto.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ -flto -fno-fat-lto-objects +#teensy40.menu.opt.o3purelto.build.flags.ldspecs=-fuse-linker-plugin +teensy40.menu.opt.ogstd=Debug +teensy40.menu.opt.ogstd.build.flags.optimize=-Og +teensy40.menu.opt.ogstd.build.flags.ldspecs= +#teensy40.menu.opt.oglto=Debug with LTO +#teensy40.menu.opt.oglto.build.flags.optimize=-Og -flto -fno-fat-lto-objects +#teensy40.menu.opt.oglto.build.flags.ldspecs=-fuse-linker-plugin +teensy40.menu.opt.osstd=Smallest Code +teensy40.menu.opt.osstd.build.flags.optimize=-Os --specs=nano.specs +teensy40.menu.opt.osstd.build.flags.ldspecs= +#teensy40.menu.opt.oslto=Smallest Code with LTO +#teensy40.menu.opt.oslto.build.flags.optimize=-Os -flto -fno-fat-lto-objects --specs=nano.specs +#teensy40.menu.opt.oslto.build.flags.ldspecs=-fuse-linker-plugin + +teensy40.menu.keys.en-us=US English +teensy40.menu.keys.en-us.build.keylayout=US_ENGLISH +teensy40.menu.keys.fr-ca=Canadian French +teensy40.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH +teensy40.menu.keys.xx-ca=Canadian Multilingual +teensy40.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL +teensy40.menu.keys.cz-cz=Czech +teensy40.menu.keys.cz-cz.build.keylayout=CZECH +teensy40.menu.keys.da-da=Danish +teensy40.menu.keys.da-da.build.keylayout=DANISH +teensy40.menu.keys.fi-fi=Finnish +teensy40.menu.keys.fi-fi.build.keylayout=FINNISH +teensy40.menu.keys.fr-fr=French +teensy40.menu.keys.fr-fr.build.keylayout=FRENCH +teensy40.menu.keys.fr-be=French Belgian +teensy40.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN +teensy40.menu.keys.fr-ch=French Swiss +teensy40.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS +teensy40.menu.keys.de-de=German +teensy40.menu.keys.de-de.build.keylayout=GERMAN +teensy40.menu.keys.de-dm=German (Mac) +teensy40.menu.keys.de-dm.build.keylayout=GERMAN_MAC +teensy40.menu.keys.de-ch=German Swiss +teensy40.menu.keys.de-ch.build.keylayout=GERMAN_SWISS +teensy40.menu.keys.is-is=Icelandic +teensy40.menu.keys.is-is.build.keylayout=ICELANDIC +teensy40.menu.keys.en-ie=Irish +teensy40.menu.keys.en-ie.build.keylayout=IRISH +teensy40.menu.keys.it-it=Italian +teensy40.menu.keys.it-it.build.keylayout=ITALIAN +teensy40.menu.keys.no-no=Norwegian +teensy40.menu.keys.no-no.build.keylayout=NORWEGIAN +teensy40.menu.keys.pt-pt=Portuguese +teensy40.menu.keys.pt-pt.build.keylayout=PORTUGUESE +teensy40.menu.keys.pt-br=Portuguese Brazilian +teensy40.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN +teensy40.menu.keys.rs-rs=Serbian (Latin Only) +teensy40.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY +teensy40.menu.keys.es-es=Spanish +teensy40.menu.keys.es-es.build.keylayout=SPANISH +teensy40.menu.keys.es-mx=Spanish Latin America +teensy40.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA +teensy40.menu.keys.sv-se=Swedish +teensy40.menu.keys.sv-se.build.keylayout=SWEDISH +teensy40.menu.keys.tr-tr=Turkish (partial) +teensy40.menu.keys.tr-tr.build.keylayout=TURKISH +teensy40.menu.keys.en-gb=United Kingdom +teensy40.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM +teensy40.menu.keys.usint=US International +teensy40.menu.keys.usint.build.keylayout=US_INTERNATIONAL + + +teensy36.name=Teensy 3.6 +teensy36.upload.maximum_size=1048576 +teensy36.upload.maximum_data_size=262144 +teensy36.upload.tool=teensyloader +teensy36.upload.protocol=halfkay +teensy36.build.board=TEENSY36 +teensy36.build.core=teensy3 +teensy36.build.mcu=mk66fx1m0 +teensy36.build.warn_data_percentage=99 +teensy36.build.toolchain=arm/bin/ +teensy36.build.command.gcc=arm-none-eabi-gcc +teensy36.build.command.g++=arm-none-eabi-g++ +teensy36.build.command.ar=arm-none-eabi-gcc-ar +teensy36.build.command.objcopy=arm-none-eabi-objcopy +teensy36.build.command.objdump=arm-none-eabi-objdump + +# KH, Fix linker error when using STL library +#teensy36.build.command.linker=arm-none-eabi-gcc +teensy36.build.command.linker=arm-none-eabi-g++ + +teensy36.build.command.size=arm-none-eabi-size +teensy36.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib -mno-unaligned-access +teensy36.build.flags.dep=-MMD +teensy36.build.flags.optimize=-Os +teensy36.build.flags.cpu=-mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant +teensy36.build.flags.defs=-D__MK66FX1M0__ -DTEENSYDUINO=156 +teensy36.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti +teensy36.build.flags.c= +teensy36.build.flags.S=-x assembler-with-cpp +teensy36.build.flags.ld=-Wl,--gc-sections,--relax,--defsym=__rtc_localtime={extra.time.local} "-T{build.core.path}/mk66fx1m0.ld" +teensy36.build.flags.libs=-larm_cortexM4lf_math -lm -lstdc++ +teensy36.serial.restart_cmd=false +teensy36.menu.usb.serial=Serial +teensy36.menu.usb.serial.build.usbtype=USB_SERIAL +teensy36.menu.usb.serial2=Dual Serial +teensy36.menu.usb.serial2.build.usbtype=USB_DUAL_SERIAL +teensy36.menu.usb.serial3=Triple Serial +teensy36.menu.usb.serial3.build.usbtype=USB_TRIPLE_SERIAL +teensy36.menu.usb.keyboard=Keyboard +teensy36.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY +teensy36.menu.usb.keyboard.fake_serial=teensy_gateway +teensy36.menu.usb.touch=Keyboard + Touch Screen +teensy36.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN +teensy36.menu.usb.touch.fake_serial=teensy_gateway +teensy36.menu.usb.hidtouch=Keyboard + Mouse + Touch Screen +teensy36.menu.usb.hidtouch.build.usbtype=USB_HID_TOUCHSCREEN +teensy36.menu.usb.hidtouch.fake_serial=teensy_gateway +teensy36.menu.usb.hid=Keyboard + Mouse + Joystick +teensy36.menu.usb.hid.build.usbtype=USB_HID +teensy36.menu.usb.hid.fake_serial=teensy_gateway +teensy36.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick +teensy36.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID +teensy36.menu.usb.midi=MIDI +teensy36.menu.usb.midi.build.usbtype=USB_MIDI +teensy36.menu.usb.midi.fake_serial=teensy_gateway +teensy36.menu.usb.midi4=MIDIx4 +teensy36.menu.usb.midi4.build.usbtype=USB_MIDI4 +teensy36.menu.usb.midi4.fake_serial=teensy_gateway +teensy36.menu.usb.midi16=MIDIx16 +teensy36.menu.usb.midi16.build.usbtype=USB_MIDI16 +teensy36.menu.usb.midi16.fake_serial=teensy_gateway +teensy36.menu.usb.serialmidi=Serial + MIDI +teensy36.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL +teensy36.menu.usb.serialmidi4=Serial + MIDIx4 +teensy36.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL +teensy36.menu.usb.serialmidi16=Serial + MIDIx16 +teensy36.menu.usb.serialmidi16.build.usbtype=USB_MIDI16_SERIAL +teensy36.menu.usb.audio=Audio +teensy36.menu.usb.audio.build.usbtype=USB_AUDIO +teensy36.menu.usb.audio.fake_serial=teensy_gateway +teensy36.menu.usb.serialmidiaudio=Serial + MIDI + Audio +teensy36.menu.usb.serialmidiaudio.build.usbtype=USB_MIDI_AUDIO_SERIAL +teensy36.menu.usb.serialmidi16audio=Serial + MIDIx16 + Audio +teensy36.menu.usb.serialmidi16audio.build.usbtype=USB_MIDI16_AUDIO_SERIAL +teensy36.menu.usb.mtp=MTP Disk (Experimental) +teensy36.menu.usb.mtp.build.usbtype=USB_MTPDISK +teensy36.menu.usb.mtp.fake_serial=teensy_gateway +teensy36.menu.usb.rawhid=Raw HID +teensy36.menu.usb.rawhid.build.usbtype=USB_RAWHID +teensy36.menu.usb.rawhid.fake_serial=teensy_gateway +teensy36.menu.usb.flightsim=Flight Sim Controls +teensy36.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM +teensy36.menu.usb.flightsim.fake_serial=teensy_gateway +teensy36.menu.usb.flightsimjoystick=Flight Sim Controls + Joystick +teensy36.menu.usb.flightsimjoystick.build.usbtype=USB_FLIGHTSIM_JOYSTICK +teensy36.menu.usb.flightsimjoystick.fake_serial=teensy_gateway +teensy36.menu.usb.everything=All of the Above +teensy36.menu.usb.everything.build.usbtype=USB_EVERYTHING +teensy36.menu.usb.disable=No USB +teensy36.menu.usb.disable.build.usbtype=USB_DISABLED + +teensy36.menu.speed.180=180 MHz +teensy36.menu.speed.168=168 MHz +teensy36.menu.speed.144=144 MHz +teensy36.menu.speed.120=120 MHz +teensy36.menu.speed.96=96 MHz +teensy36.menu.speed.72=72 MHz +teensy36.menu.speed.48=48 MHz +teensy36.menu.speed.24=24 MHz +teensy36.menu.speed.16=16 MHz (No USB) +teensy36.menu.speed.8=8 MHz (No USB) +teensy36.menu.speed.4=4 MHz (No USB) +teensy36.menu.speed.2=2 MHz (No USB) +teensy36.menu.speed.192=192 MHz (overclock) +teensy36.menu.speed.216=216 MHz (overclock) +teensy36.menu.speed.240=240 MHz (overclock) +teensy36.menu.speed.256=256 MHz (overclock) +teensy36.menu.speed.256.build.fcpu=256000000 +teensy36.menu.speed.240.build.fcpu=240000000 +teensy36.menu.speed.216.build.fcpu=216000000 +teensy36.menu.speed.192.build.fcpu=192000000 +teensy36.menu.speed.180.build.fcpu=180000000 +teensy36.menu.speed.168.build.fcpu=168000000 +teensy36.menu.speed.144.build.fcpu=144000000 +teensy36.menu.speed.120.build.fcpu=120000000 +teensy36.menu.speed.96.build.fcpu=96000000 +teensy36.menu.speed.72.build.fcpu=72000000 +teensy36.menu.speed.48.build.fcpu=48000000 +teensy36.menu.speed.24.build.fcpu=24000000 +teensy36.menu.speed.16.build.fcpu=16000000 +teensy36.menu.speed.8.build.fcpu=8000000 +teensy36.menu.speed.4.build.fcpu=4000000 +teensy36.menu.speed.2.build.fcpu=2000000 + +teensy36.menu.opt.o2std=Faster +teensy36.menu.opt.o2std.build.flags.optimize=-O2 +teensy36.menu.opt.o2std.build.flags.ldspecs= +teensy36.menu.opt.o2lto=Faster with LTO +teensy36.menu.opt.o2lto.build.flags.optimize=-O2 -flto -fno-fat-lto-objects +teensy36.menu.opt.o2lto.build.flags.ldspecs=-fuse-linker-plugin +teensy36.menu.opt.o1std=Fast +teensy36.menu.opt.o1std.build.flags.optimize=-O1 +teensy36.menu.opt.o1std.build.flags.ldspecs= +teensy36.menu.opt.o1lto=Fast with LTO +teensy36.menu.opt.o1lto.build.flags.optimize=-O1 -flto -fno-fat-lto-objects +teensy36.menu.opt.o1lto.build.flags.ldspecs=-fuse-linker-plugin +teensy36.menu.opt.o3std=Fastest +teensy36.menu.opt.o3std.build.flags.optimize=-O3 +teensy36.menu.opt.o3std.build.flags.ldspecs= +teensy36.menu.opt.o3purestd=Fastest + pure-code +teensy36.menu.opt.o3purestd.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ +teensy36.menu.opt.o3purestd.build.flags.ldspecs= +teensy36.menu.opt.o3lto=Fastest with LTO +teensy36.menu.opt.o3lto.build.flags.optimize=-O3 -flto -fno-fat-lto-objects +teensy36.menu.opt.o3lto.build.flags.ldspecs=-fuse-linker-plugin +teensy36.menu.opt.o3purelto=Fastest + pure-code with LTO +teensy36.menu.opt.o3purelto.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ -flto -fno-fat-lto-objects +teensy36.menu.opt.o3purelto.build.flags.ldspecs=-fuse-linker-plugin +teensy36.menu.opt.ogstd=Debug +teensy36.menu.opt.ogstd.build.flags.optimize=-Og +teensy36.menu.opt.ogstd.build.flags.ldspecs= +teensy36.menu.opt.oglto=Debug with LTO +teensy36.menu.opt.oglto.build.flags.optimize=-Og -flto -fno-fat-lto-objects +teensy36.menu.opt.oglto.build.flags.ldspecs=-fuse-linker-plugin +teensy36.menu.opt.osstd=Smallest Code +teensy36.menu.opt.osstd.build.flags.optimize=-Os --specs=nano.specs +teensy36.menu.opt.osstd.build.flags.ldspecs= +teensy36.menu.opt.oslto=Smallest Code with LTO +teensy36.menu.opt.oslto.build.flags.optimize=-Os -flto -fno-fat-lto-objects --specs=nano.specs +teensy36.menu.opt.oslto.build.flags.ldspecs=-fuse-linker-plugin + +teensy36.menu.keys.en-us=US English +teensy36.menu.keys.en-us.build.keylayout=US_ENGLISH +teensy36.menu.keys.fr-ca=Canadian French +teensy36.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH +teensy36.menu.keys.xx-ca=Canadian Multilingual +teensy36.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL +teensy36.menu.keys.cz-cz=Czech +teensy36.menu.keys.cz-cz.build.keylayout=CZECH +teensy36.menu.keys.da-da=Danish +teensy36.menu.keys.da-da.build.keylayout=DANISH +teensy36.menu.keys.fi-fi=Finnish +teensy36.menu.keys.fi-fi.build.keylayout=FINNISH +teensy36.menu.keys.fr-fr=French +teensy36.menu.keys.fr-fr.build.keylayout=FRENCH +teensy36.menu.keys.fr-be=French Belgian +teensy36.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN +teensy36.menu.keys.fr-ch=French Swiss +teensy36.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS +teensy36.menu.keys.de-de=German +teensy36.menu.keys.de-de.build.keylayout=GERMAN +teensy36.menu.keys.de-dm=German (Mac) +teensy36.menu.keys.de-dm.build.keylayout=GERMAN_MAC +teensy36.menu.keys.de-ch=German Swiss +teensy36.menu.keys.de-ch.build.keylayout=GERMAN_SWISS +teensy36.menu.keys.is-is=Icelandic +teensy36.menu.keys.is-is.build.keylayout=ICELANDIC +teensy36.menu.keys.en-ie=Irish +teensy36.menu.keys.en-ie.build.keylayout=IRISH +teensy36.menu.keys.it-it=Italian +teensy36.menu.keys.it-it.build.keylayout=ITALIAN +teensy36.menu.keys.no-no=Norwegian +teensy36.menu.keys.no-no.build.keylayout=NORWEGIAN +teensy36.menu.keys.pt-pt=Portuguese +teensy36.menu.keys.pt-pt.build.keylayout=PORTUGUESE +teensy36.menu.keys.pt-br=Portuguese Brazilian +teensy36.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN +teensy36.menu.keys.rs-rs=Serbian (Latin Only) +teensy36.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY +teensy36.menu.keys.es-es=Spanish +teensy36.menu.keys.es-es.build.keylayout=SPANISH +teensy36.menu.keys.es-mx=Spanish Latin America +teensy36.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA +teensy36.menu.keys.sv-se=Swedish +teensy36.menu.keys.sv-se.build.keylayout=SWEDISH +teensy36.menu.keys.tr-tr=Turkish (partial) +teensy36.menu.keys.tr-tr.build.keylayout=TURKISH +teensy36.menu.keys.en-gb=United Kingdom +teensy36.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM +teensy36.menu.keys.usint=US International +teensy36.menu.keys.usint.build.keylayout=US_INTERNATIONAL + + +teensy35.name=Teensy 3.5 +teensy35.upload.maximum_size=524288 +teensy35.upload.maximum_data_size=262136 +teensy35.upload.tool=teensyloader +teensy35.upload.protocol=halfkay +teensy35.build.board=TEENSY35 +teensy35.build.core=teensy3 +teensy35.build.mcu=mk64fx512 +teensy35.build.warn_data_percentage=98 +teensy35.build.toolchain=arm/bin/ +teensy35.build.command.gcc=arm-none-eabi-gcc +teensy35.build.command.g++=arm-none-eabi-g++ +teensy35.build.command.ar=arm-none-eabi-gcc-ar +teensy35.build.command.objcopy=arm-none-eabi-objcopy +teensy35.build.command.objdump=arm-none-eabi-objdump + +# KH, Fix linker error when using STL library +#teensy35.build.command.linker=arm-none-eabi-gcc +teensy35.build.command.linker=arm-none-eabi-g++ + +teensy35.build.command.size=arm-none-eabi-size +teensy35.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib -mno-unaligned-access +teensy35.build.flags.dep=-MMD +teensy35.build.flags.optimize=-Os +teensy35.build.flags.cpu=-mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant +teensy35.build.flags.defs=-D__MK64FX512__ -DTEENSYDUINO=156 +teensy35.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti +teensy35.build.flags.c= +teensy35.build.flags.S=-x assembler-with-cpp +teensy35.build.flags.ld=-Wl,--gc-sections,--relax,--defsym=__rtc_localtime={extra.time.local} "-T{build.core.path}/mk64fx512.ld" +teensy35.build.flags.libs=-larm_cortexM4lf_math -lm -lstdc++ +teensy35.serial.restart_cmd=false +teensy35.menu.usb.serial=Serial +teensy35.menu.usb.serial.build.usbtype=USB_SERIAL +teensy35.menu.usb.serial2=Dual Serial +teensy35.menu.usb.serial2.build.usbtype=USB_DUAL_SERIAL +teensy35.menu.usb.serial3=Triple Serial +teensy35.menu.usb.serial3.build.usbtype=USB_TRIPLE_SERIAL +teensy35.menu.usb.keyboard=Keyboard +teensy35.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY +teensy35.menu.usb.keyboard.fake_serial=teensy_gateway +teensy35.menu.usb.touch=Keyboard + Touch Screen +teensy35.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN +teensy35.menu.usb.touch.fake_serial=teensy_gateway +teensy35.menu.usb.hidtouch=Keyboard + Mouse + Touch Screen +teensy35.menu.usb.hidtouch.build.usbtype=USB_HID_TOUCHSCREEN +teensy35.menu.usb.hidtouch.fake_serial=teensy_gateway +teensy35.menu.usb.hid=Keyboard + Mouse + Joystick +teensy35.menu.usb.hid.build.usbtype=USB_HID +teensy35.menu.usb.hid.fake_serial=teensy_gateway +teensy35.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick +teensy35.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID +teensy35.menu.usb.midi=MIDI +teensy35.menu.usb.midi.build.usbtype=USB_MIDI +teensy35.menu.usb.midi.fake_serial=teensy_gateway +teensy35.menu.usb.midi4=MIDIx4 +teensy35.menu.usb.midi4.build.usbtype=USB_MIDI4 +teensy35.menu.usb.midi4.fake_serial=teensy_gateway +teensy35.menu.usb.midi16=MIDIx16 +teensy35.menu.usb.midi16.build.usbtype=USB_MIDI16 +teensy35.menu.usb.midi16.fake_serial=teensy_gateway +teensy35.menu.usb.serialmidi=Serial + MIDI +teensy35.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL +teensy35.menu.usb.serialmidi4=Serial + MIDIx4 +teensy35.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL +teensy35.menu.usb.serialmidi16=Serial + MIDIx16 +teensy35.menu.usb.serialmidi16.build.usbtype=USB_MIDI16_SERIAL +teensy35.menu.usb.audio=Audio +teensy35.menu.usb.audio.build.usbtype=USB_AUDIO +teensy35.menu.usb.audio.fake_serial=teensy_gateway +teensy35.menu.usb.serialmidiaudio=Serial + MIDI + Audio +teensy35.menu.usb.serialmidiaudio.build.usbtype=USB_MIDI_AUDIO_SERIAL +teensy35.menu.usb.serialmidi16audio=Serial + MIDIx16 + Audio +teensy35.menu.usb.serialmidi16audio.build.usbtype=USB_MIDI16_AUDIO_SERIAL +teensy35.menu.usb.mtp=MTP Disk (Experimental) +teensy35.menu.usb.mtp.build.usbtype=USB_MTPDISK +teensy35.menu.usb.mtp.fake_serial=teensy_gateway +teensy35.menu.usb.rawhid=Raw HID +teensy35.menu.usb.rawhid.build.usbtype=USB_RAWHID +teensy35.menu.usb.rawhid.fake_serial=teensy_gateway +teensy35.menu.usb.flightsim=Flight Sim Controls +teensy35.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM +teensy35.menu.usb.flightsim.fake_serial=teensy_gateway +teensy35.menu.usb.flightsimjoystick=Flight Sim Controls + Joystick +teensy35.menu.usb.flightsimjoystick.build.usbtype=USB_FLIGHTSIM_JOYSTICK +teensy35.menu.usb.flightsimjoystick.fake_serial=teensy_gateway +teensy35.menu.usb.everything=All of the Above +teensy35.menu.usb.everything.build.usbtype=USB_EVERYTHING +teensy35.menu.usb.disable=No USB +teensy35.menu.usb.disable.build.usbtype=USB_DISABLED + +teensy35.menu.speed.120=120 MHz +teensy35.menu.speed.96=96 MHz +teensy35.menu.speed.72=72 MHz +teensy35.menu.speed.48=48 MHz +teensy35.menu.speed.24=24 MHz +teensy35.menu.speed.16=16 MHz (No USB) +teensy35.menu.speed.8=8 MHz (No USB) +teensy35.menu.speed.4=4 MHz (No USB) +teensy35.menu.speed.2=2 MHz (No USB) +teensy35.menu.speed.144=144 MHz (overclock) +teensy35.menu.speed.168=168 MHz (overclock) +teensy35.menu.speed.168.build.fcpu=168000000 +teensy35.menu.speed.144.build.fcpu=144000000 +teensy35.menu.speed.120.build.fcpu=120000000 +teensy35.menu.speed.96.build.fcpu=96000000 +teensy35.menu.speed.72.build.fcpu=72000000 +teensy35.menu.speed.48.build.fcpu=48000000 +teensy35.menu.speed.24.build.fcpu=24000000 +teensy35.menu.speed.16.build.fcpu=16000000 +teensy35.menu.speed.8.build.fcpu=8000000 +teensy35.menu.speed.4.build.fcpu=4000000 +teensy35.menu.speed.2.build.fcpu=2000000 + +teensy35.menu.opt.o2std=Faster +teensy35.menu.opt.o2std.build.flags.optimize=-O2 +teensy35.menu.opt.o2std.build.flags.ldspecs= +teensy35.menu.opt.o2lto=Faster with LTO +teensy35.menu.opt.o2lto.build.flags.optimize=-O2 -flto -fno-fat-lto-objects +teensy35.menu.opt.o2lto.build.flags.ldspecs=-fuse-linker-plugin +teensy35.menu.opt.o1std=Fast +teensy35.menu.opt.o1std.build.flags.optimize=-O1 +teensy35.menu.opt.o1std.build.flags.ldspecs= +teensy35.menu.opt.o1lto=Fast with LTO +teensy35.menu.opt.o1lto.build.flags.optimize=-O1 -flto -fno-fat-lto-objects +teensy35.menu.opt.o1lto.build.flags.ldspecs=-fuse-linker-plugin +teensy35.menu.opt.o3std=Fastest +teensy35.menu.opt.o3std.build.flags.optimize=-O3 +teensy35.menu.opt.o3std.build.flags.ldspecs= +teensy35.menu.opt.o3purestd=Fastest + pure-code +teensy35.menu.opt.o3purestd.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ +teensy35.menu.opt.o3purestd.build.flags.ldspecs= +teensy35.menu.opt.o3lto=Fastest with LTO +teensy35.menu.opt.o3lto.build.flags.optimize=-O3 -flto -fno-fat-lto-objects +teensy35.menu.opt.o3lto.build.flags.ldspecs=-fuse-linker-plugin +teensy35.menu.opt.o3purelto=Fastest + pure-code with LTO +teensy35.menu.opt.o3purelto.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ -flto -fno-fat-lto-objects +teensy35.menu.opt.o3purelto.build.flags.ldspecs=-fuse-linker-plugin +teensy35.menu.opt.ogstd=Debug +teensy35.menu.opt.ogstd.build.flags.optimize=-Og +teensy35.menu.opt.ogstd.build.flags.ldspecs= +teensy35.menu.opt.oglto=Debug with LTO +teensy35.menu.opt.oglto.build.flags.optimize=-Og -flto -fno-fat-lto-objects +teensy35.menu.opt.oglto.build.flags.ldspecs=-fuse-linker-plugin +teensy35.menu.opt.osstd=Smallest Code +teensy35.menu.opt.osstd.build.flags.optimize=-Os --specs=nano.specs +teensy35.menu.opt.osstd.build.flags.ldspecs= +teensy35.menu.opt.oslto=Smallest Code with LTO +teensy35.menu.opt.oslto.build.flags.optimize=-Os -flto -fno-fat-lto-objects --specs=nano.specs +teensy35.menu.opt.oslto.build.flags.ldspecs=-fuse-linker-plugin + +teensy35.menu.keys.en-us=US English +teensy35.menu.keys.en-us.build.keylayout=US_ENGLISH +teensy35.menu.keys.fr-ca=Canadian French +teensy35.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH +teensy35.menu.keys.xx-ca=Canadian Multilingual +teensy35.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL +teensy35.menu.keys.cz-cz=Czech +teensy35.menu.keys.cz-cz.build.keylayout=CZECH +teensy35.menu.keys.da-da=Danish +teensy35.menu.keys.da-da.build.keylayout=DANISH +teensy35.menu.keys.fi-fi=Finnish +teensy35.menu.keys.fi-fi.build.keylayout=FINNISH +teensy35.menu.keys.fr-fr=French +teensy35.menu.keys.fr-fr.build.keylayout=FRENCH +teensy35.menu.keys.fr-be=French Belgian +teensy35.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN +teensy35.menu.keys.fr-ch=French Swiss +teensy35.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS +teensy35.menu.keys.de-de=German +teensy35.menu.keys.de-de.build.keylayout=GERMAN +teensy35.menu.keys.de-dm=German (Mac) +teensy35.menu.keys.de-dm.build.keylayout=GERMAN_MAC +teensy35.menu.keys.de-ch=German Swiss +teensy35.menu.keys.de-ch.build.keylayout=GERMAN_SWISS +teensy35.menu.keys.is-is=Icelandic +teensy35.menu.keys.is-is.build.keylayout=ICELANDIC +teensy35.menu.keys.en-ie=Irish +teensy35.menu.keys.en-ie.build.keylayout=IRISH +teensy35.menu.keys.it-it=Italian +teensy35.menu.keys.it-it.build.keylayout=ITALIAN +teensy35.menu.keys.no-no=Norwegian +teensy35.menu.keys.no-no.build.keylayout=NORWEGIAN +teensy35.menu.keys.pt-pt=Portuguese +teensy35.menu.keys.pt-pt.build.keylayout=PORTUGUESE +teensy35.menu.keys.pt-br=Portuguese Brazilian +teensy35.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN +teensy35.menu.keys.rs-rs=Serbian (Latin Only) +teensy35.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY +teensy35.menu.keys.es-es=Spanish +teensy35.menu.keys.es-es.build.keylayout=SPANISH +teensy35.menu.keys.es-mx=Spanish Latin America +teensy35.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA +teensy35.menu.keys.sv-se=Swedish +teensy35.menu.keys.sv-se.build.keylayout=SWEDISH +teensy35.menu.keys.tr-tr=Turkish (partial) +teensy35.menu.keys.tr-tr.build.keylayout=TURKISH +teensy35.menu.keys.en-gb=United Kingdom +teensy35.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM +teensy35.menu.keys.usint=US International +teensy35.menu.keys.usint.build.keylayout=US_INTERNATIONAL + + +teensy31.name=Teensy 3.2 / 3.1 +teensy31.upload.maximum_size=262144 +teensy31.upload.maximum_data_size=65536 +teensy31.upload.tool=teensyloader +teensy31.upload.protocol=halfkay +teensy31.build.board=TEENSY32 +teensy31.build.core=teensy3 +teensy31.build.mcu=mk20dx256 +teensy31.build.warn_data_percentage=97 +teensy31.build.toolchain=arm/bin/ +teensy31.build.command.gcc=arm-none-eabi-gcc +teensy31.build.command.g++=arm-none-eabi-g++ +teensy31.build.command.ar=arm-none-eabi-gcc-ar +teensy31.build.command.objcopy=arm-none-eabi-objcopy +teensy31.build.command.objdump=arm-none-eabi-objdump + +# KH, Fix linker error when using STL library +#teensy31.build.command.linker=arm-none-eabi-gcc +teensy31.build.command.linker=arm-none-eabi-g++ + +teensy31.build.command.size=arm-none-eabi-size +teensy31.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib -mno-unaligned-access +teensy31.build.flags.dep=-MMD +teensy31.build.flags.optimize=-Os +teensy31.build.flags.cpu=-mthumb -mcpu=cortex-m4 -fsingle-precision-constant +teensy31.build.flags.defs=-D__MK20DX256__ -DTEENSYDUINO=156 +teensy31.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti +teensy31.build.flags.c= +teensy31.build.flags.S=-x assembler-with-cpp +teensy31.build.flags.ld=-Wl,--gc-sections,--relax,--defsym=__rtc_localtime={extra.time.local} "-T{build.core.path}/mk20dx256.ld" +teensy31.build.flags.libs=-larm_cortexM4l_math -lm -lstdc++ +teensy31.serial.restart_cmd=false +teensy31.menu.usb.serial=Serial +teensy31.menu.usb.serial.build.usbtype=USB_SERIAL +teensy31.menu.usb.serial2=Dual Serial +teensy31.menu.usb.serial2.build.usbtype=USB_DUAL_SERIAL +teensy31.menu.usb.serial3=Triple Serial +teensy31.menu.usb.serial3.build.usbtype=USB_TRIPLE_SERIAL +teensy31.menu.usb.keyboard=Keyboard +teensy31.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY +teensy31.menu.usb.keyboard.fake_serial=teensy_gateway +teensy31.menu.usb.touch=Keyboard + Touch Screen +teensy31.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN +teensy31.menu.usb.touch.fake_serial=teensy_gateway +teensy31.menu.usb.hidtouch=Keyboard + Mouse + Touch Screen +teensy31.menu.usb.hidtouch.build.usbtype=USB_HID_TOUCHSCREEN +teensy31.menu.usb.hidtouch.fake_serial=teensy_gateway +teensy31.menu.usb.hid=Keyboard + Mouse + Joystick +teensy31.menu.usb.hid.build.usbtype=USB_HID +teensy31.menu.usb.hid.fake_serial=teensy_gateway +teensy31.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick +teensy31.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID +teensy31.menu.usb.midi=MIDI +teensy31.menu.usb.midi.build.usbtype=USB_MIDI +teensy31.menu.usb.midi.fake_serial=teensy_gateway +teensy31.menu.usb.midi4=MIDIx4 +teensy31.menu.usb.midi4.build.usbtype=USB_MIDI4 +teensy31.menu.usb.midi4.fake_serial=teensy_gateway +teensy31.menu.usb.midi16=MIDIx16 +teensy31.menu.usb.midi16.build.usbtype=USB_MIDI16 +teensy31.menu.usb.midi16.fake_serial=teensy_gateway +teensy31.menu.usb.serialmidi=Serial + MIDI +teensy31.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL +teensy31.menu.usb.serialmidi4=Serial + MIDIx4 +teensy31.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL +teensy31.menu.usb.serialmidi16=Serial + MIDIx16 +teensy31.menu.usb.serialmidi16.build.usbtype=USB_MIDI16_SERIAL +teensy31.menu.usb.audio=Audio +teensy31.menu.usb.audio.build.usbtype=USB_AUDIO +teensy31.menu.usb.audio.fake_serial=teensy_gateway +teensy31.menu.usb.serialmidiaudio=Serial + MIDI + Audio +teensy31.menu.usb.serialmidiaudio.build.usbtype=USB_MIDI_AUDIO_SERIAL +teensy31.menu.usb.serialmidi16audio=Serial + MIDIx16 + Audio +teensy31.menu.usb.serialmidi16audio.build.usbtype=USB_MIDI16_AUDIO_SERIAL +teensy31.menu.usb.mtp=MTP Disk (Experimental) +teensy31.menu.usb.mtp.build.usbtype=USB_MTPDISK +teensy31.menu.usb.mtp.fake_serial=teensy_gateway +teensy31.menu.usb.rawhid=Raw HID +teensy31.menu.usb.rawhid.build.usbtype=USB_RAWHID +teensy31.menu.usb.rawhid.fake_serial=teensy_gateway +teensy31.menu.usb.flightsim=Flight Sim Controls +teensy31.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM +teensy31.menu.usb.flightsim.fake_serial=teensy_gateway +teensy31.menu.usb.flightsimjoystick=Flight Sim Controls + Joystick +teensy31.menu.usb.flightsimjoystick.build.usbtype=USB_FLIGHTSIM_JOYSTICK +teensy31.menu.usb.flightsimjoystick.fake_serial=teensy_gateway +teensy31.menu.usb.everything=All of the Above +teensy31.menu.usb.everything.build.usbtype=USB_EVERYTHING +teensy31.menu.usb.disable=No USB +teensy31.menu.usb.disable.build.usbtype=USB_DISABLED + +teensy31.menu.speed.96=96 MHz (overclock) +teensy31.menu.speed.72=72 MHz +teensy31.menu.speed.48=48 MHz +teensy31.menu.speed.24=24 MHz +teensy31.menu.speed.16=16 MHz (No USB) +teensy31.menu.speed.8=8 MHz (No USB) +teensy31.menu.speed.4=4 MHz (No USB) +teensy31.menu.speed.2=2 MHz (No USB) +teensy31.menu.speed.120=120 MHz (overclock) +#uncomment these if you want to try faster overclocking +#teensy31.menu.speed.144=144 MHz (overclock) +#teensy31.menu.speed.168=168 MHz (overclock) +teensy31.menu.speed.168.build.fcpu=168000000 +teensy31.menu.speed.144.build.fcpu=144000000 +teensy31.menu.speed.120.build.fcpu=120000000 +teensy31.menu.speed.96.build.fcpu=96000000 +teensy31.menu.speed.72.build.fcpu=72000000 +teensy31.menu.speed.48.build.fcpu=48000000 +teensy31.menu.speed.24.build.fcpu=24000000 +teensy31.menu.speed.16.build.fcpu=16000000 +teensy31.menu.speed.8.build.fcpu=8000000 +teensy31.menu.speed.4.build.fcpu=4000000 +teensy31.menu.speed.2.build.fcpu=2000000 + +teensy31.menu.opt.o2std=Faster +teensy31.menu.opt.o2std.build.flags.optimize=-O2 +teensy31.menu.opt.o2std.build.flags.ldspecs= +teensy31.menu.opt.o2lto=Faster with LTO +teensy31.menu.opt.o2lto.build.flags.optimize=-O2 -flto -fno-fat-lto-objects +teensy31.menu.opt.o2lto.build.flags.ldspecs=-fuse-linker-plugin +teensy31.menu.opt.o1std=Fast +teensy31.menu.opt.o1std.build.flags.optimize=-O1 +teensy31.menu.opt.o1std.build.flags.ldspecs= +teensy31.menu.opt.o1lto=Fast with LTO +teensy31.menu.opt.o1lto.build.flags.optimize=-O1 -flto -fno-fat-lto-objects +teensy31.menu.opt.o1lto.build.flags.ldspecs=-fuse-linker-plugin +teensy31.menu.opt.o3std=Fastest +teensy31.menu.opt.o3std.build.flags.optimize=-O3 +teensy31.menu.opt.o3std.build.flags.ldspecs= +teensy31.menu.opt.o3purestd=Fastest + pure-code +teensy31.menu.opt.o3purestd.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ +teensy31.menu.opt.o3purestd.build.flags.ldspecs= +teensy31.menu.opt.o3lto=Fastest with LTO +teensy31.menu.opt.o3lto.build.flags.optimize=-O3 -flto -fno-fat-lto-objects +teensy31.menu.opt.o3lto.build.flags.ldspecs=-fuse-linker-plugin +teensy31.menu.opt.o3purelto=Fastest + pure-code with LTO +teensy31.menu.opt.o3purelto.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ -flto -fno-fat-lto-objects +teensy31.menu.opt.o3purelto.build.flags.ldspecs=-fuse-linker-plugin +teensy31.menu.opt.ogstd=Debug +teensy31.menu.opt.ogstd.build.flags.optimize=-Og +teensy31.menu.opt.ogstd.build.flags.ldspecs= +teensy31.menu.opt.oglto=Debug with LTO +teensy31.menu.opt.oglto.build.flags.optimize=-Og -flto -fno-fat-lto-objects +teensy31.menu.opt.oglto.build.flags.ldspecs=-fuse-linker-plugin +teensy31.menu.opt.osstd=Smallest Code +teensy31.menu.opt.osstd.build.flags.optimize=-Os --specs=nano.specs +teensy31.menu.opt.osstd.build.flags.ldspecs= +teensy31.menu.opt.oslto=Smallest Code with LTO +teensy31.menu.opt.oslto.build.flags.optimize=-Os -flto -fno-fat-lto-objects --specs=nano.specs +teensy31.menu.opt.oslto.build.flags.ldspecs=-fuse-linker-plugin + +teensy31.menu.keys.en-us=US English +teensy31.menu.keys.en-us.build.keylayout=US_ENGLISH +teensy31.menu.keys.fr-ca=Canadian French +teensy31.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH +teensy31.menu.keys.xx-ca=Canadian Multilingual +teensy31.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL +teensy31.menu.keys.cz-cz=Czech +teensy31.menu.keys.cz-cz.build.keylayout=CZECH +teensy31.menu.keys.da-da=Danish +teensy31.menu.keys.da-da.build.keylayout=DANISH +teensy31.menu.keys.fi-fi=Finnish +teensy31.menu.keys.fi-fi.build.keylayout=FINNISH +teensy31.menu.keys.fr-fr=French +teensy31.menu.keys.fr-fr.build.keylayout=FRENCH +teensy31.menu.keys.fr-be=French Belgian +teensy31.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN +teensy31.menu.keys.fr-ch=French Swiss +teensy31.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS +teensy31.menu.keys.de-de=German +teensy31.menu.keys.de-de.build.keylayout=GERMAN +teensy31.menu.keys.de-dm=German (Mac) +teensy31.menu.keys.de-dm.build.keylayout=GERMAN_MAC +teensy31.menu.keys.de-ch=German Swiss +teensy31.menu.keys.de-ch.build.keylayout=GERMAN_SWISS +teensy31.menu.keys.is-is=Icelandic +teensy31.menu.keys.is-is.build.keylayout=ICELANDIC +teensy31.menu.keys.en-ie=Irish +teensy31.menu.keys.en-ie.build.keylayout=IRISH +teensy31.menu.keys.it-it=Italian +teensy31.menu.keys.it-it.build.keylayout=ITALIAN +teensy31.menu.keys.no-no=Norwegian +teensy31.menu.keys.no-no.build.keylayout=NORWEGIAN +teensy31.menu.keys.pt-pt=Portuguese +teensy31.menu.keys.pt-pt.build.keylayout=PORTUGUESE +teensy31.menu.keys.pt-br=Portuguese Brazilian +teensy31.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN +teensy31.menu.keys.rs-rs=Serbian (Latin Only) +teensy31.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY +teensy31.menu.keys.es-es=Spanish +teensy31.menu.keys.es-es.build.keylayout=SPANISH +teensy31.menu.keys.es-mx=Spanish Latin America +teensy31.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA +teensy31.menu.keys.sv-se=Swedish +teensy31.menu.keys.sv-se.build.keylayout=SWEDISH +teensy31.menu.keys.tr-tr=Turkish (partial) +teensy31.menu.keys.tr-tr.build.keylayout=TURKISH +teensy31.menu.keys.en-gb=United Kingdom +teensy31.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM +teensy31.menu.keys.usint=US International +teensy31.menu.keys.usint.build.keylayout=US_INTERNATIONAL + +teensy31.vid.0=0x16C0 +teensy31.vid.1=0x16C0 +teensy31.vid.2=0x16C0 +teensy31.vid.3=0x16C0 +teensy31.vid.4=0x16C0 +teensy31.pid.0=0x0483 +teensy31.pid.1=0x0487 +teensy31.pid.2=0x0489 +teensy31.pid.3=0x048A +teensy31.pid.4=0x0476 + +teensy30.name=Teensy 3.0 +teensy30.upload.maximum_size=131072 +teensy30.upload.maximum_data_size=16384 +teensy30.upload.tool=teensyloader +teensy30.upload.protocol=halfkay +teensy30.build.board=TEENSY30 +teensy30.build.core=teensy3 +teensy30.build.mcu=mk20dx128 +teensy30.build.warn_data_percentage=94 +teensy30.build.toolchain=arm/bin/ +teensy30.build.command.gcc=arm-none-eabi-gcc +teensy30.build.command.g++=arm-none-eabi-g++ +teensy30.build.command.ar=arm-none-eabi-gcc-ar +teensy30.build.command.objcopy=arm-none-eabi-objcopy +teensy30.build.command.objdump=arm-none-eabi-objdump + +# KH, Fix linker error when using STL library +#teensy30.build.command.linker=arm-none-eabi-gcc +teensy30.build.command.linker=arm-none-eabi-g++ + +teensy30.build.command.size=arm-none-eabi-size +teensy30.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib -mno-unaligned-access +teensy30.build.flags.dep=-MMD +teensy30.build.flags.optimize=-Os +teensy30.build.flags.cpu=-mthumb -mcpu=cortex-m4 -fsingle-precision-constant +teensy30.build.flags.defs=-D__MK20DX128__ -DTEENSYDUINO=156 +teensy30.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti +teensy30.build.flags.c= +teensy30.build.flags.S=-x assembler-with-cpp +teensy30.build.flags.ld=-Wl,--gc-sections,--relax,--defsym=__rtc_localtime={extra.time.local} "-T{build.core.path}/mk20dx128.ld" +teensy30.build.flags.ldspecs=--specs=nano.specs +teensy30.build.flags.libs=-larm_cortexM4l_math -lm -lstdc++ +teensy30.serial.restart_cmd=false + +teensy30.menu.usb.serial=Serial +teensy30.menu.usb.serial.build.usbtype=USB_SERIAL +teensy30.menu.usb.keyboard=Keyboard +teensy30.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY +teensy30.menu.usb.keyboard.fake_serial=teensy_gateway +teensy30.menu.usb.hid=Keyboard + Mouse + Joystick +teensy30.menu.usb.hid.build.usbtype=USB_HID +teensy30.menu.usb.hid.fake_serial=teensy_gateway +teensy30.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick +teensy30.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID +teensy30.menu.usb.touch=Keyboard + Touch Screen +teensy30.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN +teensy30.menu.usb.touch.fake_serial=teensy_gateway +teensy30.menu.usb.midi=MIDI +teensy30.menu.usb.midi.build.usbtype=USB_MIDI +teensy30.menu.usb.midi.fake_serial=teensy_gateway +teensy30.menu.usb.midi4=MIDIx4 +teensy30.menu.usb.midi4.build.usbtype=USB_MIDI4 +teensy30.menu.usb.midi4.fake_serial=teensy_gateway +teensy30.menu.usb.serialmidi=Serial + MIDI +teensy30.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL +teensy30.menu.usb.serialmidi4=Serial + MIDIx4 +teensy30.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL +teensy30.menu.usb.audio=Audio +teensy30.menu.usb.audio.build.usbtype=USB_AUDIO +teensy30.menu.usb.audio.fake_serial=teensy_gateway +teensy30.menu.usb.serialmidiaudio=Serial + MIDI + Audio +teensy30.menu.usb.serialmidiaudio.build.usbtype=USB_MIDI_AUDIO_SERIAL +teensy30.menu.usb.mtp=MTP Disk (Experimental) +teensy30.menu.usb.mtp.build.usbtype=USB_MTPDISK +teensy30.menu.usb.mtp.fake_serial=teensy_gateway +teensy30.menu.usb.rawhid=Raw HID +teensy30.menu.usb.rawhid.build.usbtype=USB_RAWHID +teensy30.menu.usb.rawhid.fake_serial=teensy_gateway +teensy30.menu.usb.flightsim=Flight Sim Controls +teensy30.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM +teensy30.menu.usb.flightsim.fake_serial=teensy_gateway +teensy30.menu.usb.disable=No USB +teensy30.menu.usb.disable.build.usbtype=USB_DISABLED + +teensy30.menu.speed.96=96 MHz (overclock) +teensy30.menu.speed.48=48 MHz +teensy30.menu.speed.24=24 MHz +teensy30.menu.speed.96.build.fcpu=96000000 +teensy30.menu.speed.48.build.fcpu=48000000 +teensy30.menu.speed.24.build.fcpu=24000000 + +teensy30.menu.opt.o2std=Faster +teensy30.menu.opt.o2std.build.flags.optimize=-O2 +teensy30.menu.opt.o2std.build.flags.ldspecs= +teensy30.menu.opt.o2lto=Faster with LTO +teensy30.menu.opt.o2lto.build.flags.optimize=-O2 -flto -fno-fat-lto-objects +teensy30.menu.opt.o2lto.build.flags.ldspecs=-fuse-linker-plugin +teensy30.menu.opt.o1std=Fast +teensy30.menu.opt.o1std.build.flags.optimize=-O1 +teensy30.menu.opt.o1std.build.flags.ldspecs= +teensy30.menu.opt.o1lto=Fast with LTO +teensy30.menu.opt.o1lto.build.flags.optimize=-O1 -flto -fno-fat-lto-objects +teensy30.menu.opt.o1lto.build.flags.ldspecs=-fuse-linker-plugin +teensy30.menu.opt.o3std=Fastest +teensy30.menu.opt.o3std.build.flags.optimize=-O3 +teensy30.menu.opt.o3std.build.flags.ldspecs= +teensy30.menu.opt.o3lto=Fastest with LTO +teensy30.menu.opt.o3lto.build.flags.optimize=-O3 -flto -fno-fat-lto-objects +teensy30.menu.opt.o3lto.build.flags.ldspecs=-fuse-linker-plugin +teensy30.menu.opt.ogstd=Debug +teensy30.menu.opt.ogstd.build.flags.optimize=-Og +teensy30.menu.opt.ogstd.build.flags.ldspecs= +teensy30.menu.opt.oglto=Debug with LTO +teensy30.menu.opt.oglto.build.flags.optimize=-Og -flto -fno-fat-lto-objects +teensy30.menu.opt.oglto.build.flags.ldspecs=-fuse-linker-plugin +teensy30.menu.opt.osstd=Smallest Code +teensy30.menu.opt.osstd.build.flags.optimize=-Os --specs=nano.specs +teensy30.menu.opt.osstd.build.flags.ldspecs= +teensy30.menu.opt.oslto=Smallest Code with LTO +teensy30.menu.opt.oslto.build.flags.optimize=-Os -flto -fno-fat-lto-objects --specs=nano.specs +teensy30.menu.opt.oslto.build.flags.ldspecs=-fuse-linker-plugin + +teensy30.menu.keys.en-us=US English +teensy30.menu.keys.en-us.build.keylayout=US_ENGLISH +teensy30.menu.keys.fr-ca=Canadian French +teensy30.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH +teensy30.menu.keys.xx-ca=Canadian Multilingual +teensy30.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL +teensy30.menu.keys.cz-cz=Czech +teensy30.menu.keys.cz-cz.build.keylayout=CZECH +teensy30.menu.keys.da-da=Danish +teensy30.menu.keys.da-da.build.keylayout=DANISH +teensy30.menu.keys.fi-fi=Finnish +teensy30.menu.keys.fi-fi.build.keylayout=FINNISH +teensy30.menu.keys.fr-fr=French +teensy30.menu.keys.fr-fr.build.keylayout=FRENCH +teensy30.menu.keys.fr-be=French Belgian +teensy30.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN +teensy30.menu.keys.fr-ch=French Swiss +teensy30.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS +teensy30.menu.keys.de-de=German +teensy30.menu.keys.de-de.build.keylayout=GERMAN +teensy30.menu.keys.de-dm=German (Mac) +teensy30.menu.keys.de-dm.build.keylayout=GERMAN_MAC +teensy30.menu.keys.de-ch=German Swiss +teensy30.menu.keys.de-ch.build.keylayout=GERMAN_SWISS +teensy30.menu.keys.is-is=Icelandic +teensy30.menu.keys.is-is.build.keylayout=ICELANDIC +teensy30.menu.keys.en-ie=Irish +teensy30.menu.keys.en-ie.build.keylayout=IRISH +teensy30.menu.keys.it-it=Italian +teensy30.menu.keys.it-it.build.keylayout=ITALIAN +teensy30.menu.keys.no-no=Norwegian +teensy30.menu.keys.no-no.build.keylayout=NORWEGIAN +teensy30.menu.keys.pt-pt=Portuguese +teensy30.menu.keys.pt-pt.build.keylayout=PORTUGUESE +teensy30.menu.keys.pt-br=Portuguese Brazilian +teensy30.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN +teensy30.menu.keys.rs-rs=Serbian (Latin Only) +teensy30.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY +teensy30.menu.keys.es-es=Spanish +teensy30.menu.keys.es-es.build.keylayout=SPANISH +teensy30.menu.keys.es-mx=Spanish Latin America +teensy30.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA +teensy30.menu.keys.sv-se=Swedish +teensy30.menu.keys.sv-se.build.keylayout=SWEDISH +teensy30.menu.keys.tr-tr=Turkish (partial) +teensy30.menu.keys.tr-tr.build.keylayout=TURKISH +teensy30.menu.keys.en-gb=United Kingdom +teensy30.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM +teensy30.menu.keys.usint=US International +teensy30.menu.keys.usint.build.keylayout=US_INTERNATIONAL + + +teensyLC.name=Teensy LC +teensyLC.upload.maximum_size=63488 +teensyLC.upload.maximum_data_size=8192 +teensyLC.upload.tool=teensyloader +teensyLC.upload.protocol=halfkay +teensyLC.build.board=TEENSYLC +teensyLC.build.core=teensy3 +teensyLC.build.mcu=mkl26z64 +teensyLC.build.warn_data_percentage=88 +teensyLC.build.toolchain=arm/bin/ +teensyLC.build.command.gcc=arm-none-eabi-gcc +teensyLC.build.command.g++=arm-none-eabi-g++ +teensyLC.build.command.ar=arm-none-eabi-gcc-ar +teensyLC.build.command.objcopy=arm-none-eabi-objcopy +teensyLC.build.command.objdump=arm-none-eabi-objdump + +# KH, Fix linker error when using STL library +#teensyLC.build.command.linker=arm-none-eabi-gcc +teensyLC.build.command.linker=arm-none-eabi-g++ + +teensyLC.build.command.size=arm-none-eabi-size +teensyLC.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib -mno-unaligned-access +teensyLC.build.flags.dep=-MMD +teensyLC.build.flags.cpu=-mthumb -mcpu=cortex-m0plus -fsingle-precision-constant +teensyLC.build.flags.defs=-D__MKL26Z64__ -DTEENSYDUINO=156 +teensyLC.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti +teensyLC.build.flags.c= +teensyLC.build.flags.S=-x assembler-with-cpp +teensyLC.build.flags.ld=-Wl,--gc-sections,--relax,--defsym=__rtc_localtime={extra.time.local} "-T{build.core.path}/mkl26z64.ld" +teensyLC.build.flags.libs=-larm_cortexM0l_math -lm -lstdc++ +teensyLC.serial.restart_cmd=false +teensyLC.menu.usb.serial=Serial +teensyLC.menu.usb.serial.build.usbtype=USB_SERIAL +teensyLC.menu.usb.serial2=Dual Serial +teensyLC.menu.usb.serial2.build.usbtype=USB_DUAL_SERIAL +teensyLC.menu.usb.serial3=Triple Serial +teensyLC.menu.usb.serial3.build.usbtype=USB_TRIPLE_SERIAL +teensyLC.menu.usb.keyboard=Keyboard +teensyLC.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY +teensyLC.menu.usb.keyboard.fake_serial=teensy_gateway +teensyLC.menu.usb.hid=Keyboard + Mouse + Joystick +teensyLC.menu.usb.hid.build.usbtype=USB_HID +teensyLC.menu.usb.hid.fake_serial=teensy_gateway +teensyLC.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick +teensyLC.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID +teensyLC.menu.usb.touch=Keyboard + Touch Screen +teensyLC.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN +teensyLC.menu.usb.touch.fake_serial=teensy_gateway +teensyLC.menu.usb.midi=MIDI +teensyLC.menu.usb.midi.build.usbtype=USB_MIDI +teensyLC.menu.usb.midi.fake_serial=teensy_gateway +teensyLC.menu.usb.midi4=MIDIx4 +teensyLC.menu.usb.midi4.build.usbtype=USB_MIDI4 +teensyLC.menu.usb.midi4.fake_serial=teensy_gateway +teensyLC.menu.usb.serialmidi=Serial + MIDI +teensyLC.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL +teensyLC.menu.usb.serialmidi4=Serial + MIDIx4 +teensyLC.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL +teensyLC.menu.usb.mtp=MTP Disk (Experimental) +teensyLC.menu.usb.mtp.build.usbtype=USB_MTPDISK +teensyLC.menu.usb.mtp.fake_serial=teensy_gateway +teensyLC.menu.usb.rawhid=Raw HID +teensyLC.menu.usb.rawhid.build.usbtype=USB_RAWHID +teensyLC.menu.usb.rawhid.fake_serial=teensy_gateway +teensyLC.menu.usb.flightsim=Flight Sim Controls +teensyLC.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM +teensyLC.menu.usb.flightsim.fake_serial=teensy_gateway +teensyLC.menu.usb.disable=No USB +teensyLC.menu.usb.disable.build.usbtype=USB_DISABLED + +teensyLC.menu.speed.48=48 MHz +teensyLC.menu.speed.24=24 MHz +teensyLC.menu.speed.48.build.fcpu=48000000 +teensyLC.menu.speed.24.build.fcpu=24000000 + +teensyLC.menu.opt.osstd=Smallest Code +teensyLC.menu.opt.osstd.build.flags.optimize=-Os --specs=nano.specs +teensyLC.menu.opt.osstd.build.flags.ldspecs= +teensyLC.menu.opt.oslto=Smallest Code with LTO +teensyLC.menu.opt.oslto.build.flags.optimize=-Os -flto -fno-fat-lto-objects --specs=nano.specs +teensyLC.menu.opt.oslto.build.flags.ldspecs=-fuse-linker-plugin +teensyLC.menu.opt.ogstd=Debug +teensyLC.menu.opt.ogstd.build.flags.optimize=-Og +teensyLC.menu.opt.ogstd.build.flags.ldspecs= +teensyLC.menu.opt.oglto=Debug with LTO +teensyLC.menu.opt.oglto.build.flags.optimize=-Og -flto -fno-fat-lto-objects +teensyLC.menu.opt.oglto.build.flags.ldspecs=-fuse-linker-plugin +teensyLC.menu.opt.o3std=Fastest +teensyLC.menu.opt.o3std.build.flags.optimize=-O3 +teensyLC.menu.opt.o3std.build.flags.ldspecs= +teensyLC.menu.opt.o3lto=Fastest with LTO +teensyLC.menu.opt.o3lto.build.flags.optimize=-O3 -flto -fno-fat-lto-objects +teensyLC.menu.opt.o3lto.build.flags.ldspecs=-fuse-linker-plugin +teensyLC.menu.opt.o2std=Faster +teensyLC.menu.opt.o2std.build.flags.optimize=-O2 +teensyLC.menu.opt.o2std.build.flags.ldspecs= +teensyLC.menu.opt.o2lto=Faster with LTO +teensyLC.menu.opt.o2lto.build.flags.optimize=-O2 -flto -fno-fat-lto-objects +teensyLC.menu.opt.o2lto.build.flags.ldspecs=-fuse-linker-plugin +teensyLC.menu.opt.o1std=Fast +teensyLC.menu.opt.o1std.build.flags.optimize=-O1 +teensyLC.menu.opt.o1std.build.flags.ldspecs= +teensyLC.menu.opt.o1lto=Fast with LTO +teensyLC.menu.opt.o1lto.build.flags.optimize=-O1 -flto -fno-fat-lto-objects +teensyLC.menu.opt.o1lto.build.flags.ldspecs=-fuse-linker-plugin + +teensyLC.menu.keys.en-us=US English +teensyLC.menu.keys.en-us.build.keylayout=US_ENGLISH +teensyLC.menu.keys.fr-ca=Canadian French +teensyLC.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH +teensyLC.menu.keys.xx-ca=Canadian Multilingual +teensyLC.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL +teensyLC.menu.keys.cz-cz=Czech +teensyLC.menu.keys.cz-cz.build.keylayout=CZECH +teensyLC.menu.keys.da-da=Danish +teensyLC.menu.keys.da-da.build.keylayout=DANISH +teensyLC.menu.keys.fi-fi=Finnish +teensyLC.menu.keys.fi-fi.build.keylayout=FINNISH +teensyLC.menu.keys.fr-fr=French +teensyLC.menu.keys.fr-fr.build.keylayout=FRENCH +teensyLC.menu.keys.fr-be=French Belgian +teensyLC.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN +teensyLC.menu.keys.fr-ch=French Swiss +teensyLC.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS +teensyLC.menu.keys.de-de=German +teensyLC.menu.keys.de-de.build.keylayout=GERMAN +teensyLC.menu.keys.de-dm=German (Mac) +teensyLC.menu.keys.de-dm.build.keylayout=GERMAN_MAC +teensyLC.menu.keys.de-ch=German Swiss +teensyLC.menu.keys.de-ch.build.keylayout=GERMAN_SWISS +teensyLC.menu.keys.is-is=Icelandic +teensyLC.menu.keys.is-is.build.keylayout=ICELANDIC +teensyLC.menu.keys.en-ie=Irish +teensyLC.menu.keys.en-ie.build.keylayout=IRISH +teensyLC.menu.keys.it-it=Italian +teensyLC.menu.keys.it-it.build.keylayout=ITALIAN +teensyLC.menu.keys.no-no=Norwegian +teensyLC.menu.keys.no-no.build.keylayout=NORWEGIAN +teensyLC.menu.keys.pt-pt=Portuguese +teensyLC.menu.keys.pt-pt.build.keylayout=PORTUGUESE +teensyLC.menu.keys.pt-br=Portuguese Brazilian +teensyLC.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN +teensyLC.menu.keys.rs-rs=Serbian (Latin Only) +teensyLC.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY +teensyLC.menu.keys.es-es=Spanish +teensyLC.menu.keys.es-es.build.keylayout=SPANISH +teensyLC.menu.keys.es-mx=Spanish Latin America +teensyLC.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA +teensyLC.menu.keys.sv-se=Swedish +teensyLC.menu.keys.sv-se.build.keylayout=SWEDISH +teensyLC.menu.keys.tr-tr=Turkish (partial) +teensyLC.menu.keys.tr-tr.build.keylayout=TURKISH +teensyLC.menu.keys.en-gb=United Kingdom +teensyLC.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM +teensyLC.menu.keys.usint=US International +teensyLC.menu.keys.usint.build.keylayout=US_INTERNATIONAL + + +teensypp2.name=Teensy++ 2.0 +teensypp2.upload.maximum_size=130048 +teensypp2.upload.maximum_data_size=8192 +teensypp2.upload.tool=teensyloader +teensypp2.upload.protocol=halfkay +teensypp2.build.board=TEENSY2PP +teensypp2.build.core=teensy +teensypp2.build.mcu=at90usb1286 +teensypp2.build.warn_data_percentage=94 +teensypp2.build.toolchain=avr/bin/ +teensypp2.build.command.gcc=avr-gcc +teensypp2.build.command.g++=avr-g++ +teensypp2.build.command.ar=avr-ar +teensypp2.build.command.objcopy=avr-objcopy +teensypp2.build.command.objdump=avr-objdump +teensypp2.build.command.linker=avr-gcc +teensypp2.build.command.size=avr-size +teensypp2.build.flags.common=-g -Wall -ffunction-sections -fdata-sections +teensypp2.build.flags.dep=-MMD +teensypp2.build.flags.optimize=-Os +teensypp2.build.flags.cpu=-mmcu=at90usb1286 +teensypp2.build.flags.defs=-DTEENSYDUINO=156 -DARDUINO_ARCH_AVR +teensypp2.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++11 +teensypp2.build.flags.c= +teensypp2.build.flags.S=-x assembler-with-cpp +teensypp2.build.flags.ld=-Wl,--gc-sections,--relax +teensypp2.build.flags.ldspecs= +teensypp2.build.flags.libs=-lm +teensypp2.build.serial_number=true +teensypp2.serial.restart_cmd=true + +teensypp2.menu.usb.serial=Serial +teensypp2.menu.usb.serial.build.usbtype=USB_SERIAL +teensypp2.menu.usb.hid=Keyboard + Mouse + Joystick +teensypp2.menu.usb.hid.build.usbtype=USB_HID +teensypp2.menu.usb.hid.fake_serial=teensy_gateway +teensypp2.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick +teensypp2.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID +teensypp2.menu.usb.int_disk=Disk(Internal) + Keyboard +teensypp2.menu.usb.int_disk.build.usbtype=USB_DISK +teensypp2.menu.usb.int_disk.fake_serial=teensy_gateway +teensypp2.menu.usb.int_disk.build.elfpatch=mktinyfat +teensypp2.menu.usb.sd_disk=Disk(SD Card) + Keyboard +teensypp2.menu.usb.sd_disk.build.usbtype=USB_DISK_SDFLASH +teensypp2.menu.usb.sd_disk.fake_serial=teensy_gateway +teensypp2.menu.usb.midi=MIDI +teensypp2.menu.usb.midi.build.usbtype=USB_MIDI +teensypp2.menu.usb.midi.fake_serial=teensy_gateway +teensypp2.menu.usb.rawhid=Raw HID +teensypp2.menu.usb.rawhid.build.usbtype=USB_RAWHID +teensypp2.menu.usb.rawhid.fake_serial=teensy_gateway +teensypp2.menu.usb.flightsim=Flight Sim Controls +teensypp2.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM +teensypp2.menu.usb.flightsim.fake_serial=teensy_gateway +teensypp2.menu.speed.16=16 MHz +teensypp2.menu.speed.8=8 MHz +teensypp2.menu.speed.4=4 MHz +teensypp2.menu.speed.2=2 MHz +teensypp2.menu.speed.1=1 MHz +teensypp2.menu.speed.16.build.fcpu=16000000L +teensypp2.menu.speed.8.build.fcpu=8000000L +teensypp2.menu.speed.4.build.fcpu=4000000L +teensypp2.menu.speed.2.build.fcpu=2000000L +teensypp2.menu.speed.1.build.fcpu=1000000L + +teensypp2.menu.keys.en-us=US English +teensypp2.menu.keys.en-us.build.keylayout=US_ENGLISH +teensypp2.menu.keys.fr-ca=Canadian French +teensypp2.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH +teensypp2.menu.keys.xx-ca=Canadian Multilingual +teensypp2.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL +teensypp2.menu.keys.cz-cz=Czech +teensypp2.menu.keys.cz-cz.build.keylayout=CZECH +teensypp2.menu.keys.da-da=Danish +teensypp2.menu.keys.da-da.build.keylayout=DANISH +teensypp2.menu.keys.fi-fi=Finnish +teensypp2.menu.keys.fi-fi.build.keylayout=FINNISH +teensypp2.menu.keys.fr-fr=French +teensypp2.menu.keys.fr-fr.build.keylayout=FRENCH +teensypp2.menu.keys.fr-be=French Belgian +teensypp2.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN +teensypp2.menu.keys.fr-ch=French Swiss +teensypp2.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS +teensypp2.menu.keys.de-de=German +teensypp2.menu.keys.de-de.build.keylayout=GERMAN +teensypp2.menu.keys.de-dm=German (Mac) +teensypp2.menu.keys.de-dm.build.keylayout=GERMAN_MAC +teensypp2.menu.keys.de-ch=German Swiss +teensypp2.menu.keys.de-ch.build.keylayout=GERMAN_SWISS +teensypp2.menu.keys.is-is=Icelandic +teensypp2.menu.keys.is-is.build.keylayout=ICELANDIC +teensypp2.menu.keys.en-ie=Irish +teensypp2.menu.keys.en-ie.build.keylayout=IRISH +teensypp2.menu.keys.it-it=Italian +teensypp2.menu.keys.it-it.build.keylayout=ITALIAN +teensypp2.menu.keys.no-no=Norwegian +teensypp2.menu.keys.no-no.build.keylayout=NORWEGIAN +teensypp2.menu.keys.pt-pt=Portuguese +teensypp2.menu.keys.pt-pt.build.keylayout=PORTUGUESE +teensypp2.menu.keys.pt-br=Portuguese Brazilian +teensypp2.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN +teensypp2.menu.keys.rs-rs=Serbian (Latin Only) +teensypp2.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY +teensypp2.menu.keys.es-es=Spanish +teensypp2.menu.keys.es-es.build.keylayout=SPANISH +teensypp2.menu.keys.es-mx=Spanish Latin America +teensypp2.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA +teensypp2.menu.keys.sv-se=Swedish +teensypp2.menu.keys.sv-se.build.keylayout=SWEDISH +teensypp2.menu.keys.tr-tr=Turkish (partial) +teensypp2.menu.keys.tr-tr.build.keylayout=TURKISH +teensypp2.menu.keys.en-gb=United Kingdom +teensypp2.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM +teensypp2.menu.keys.usint=US International +teensypp2.menu.keys.usint.build.keylayout=US_INTERNATIONAL + + +teensy2.name=Teensy 2.0 +teensy2.upload.maximum_size=32256 +teensy2.upload.maximum_data_size=2560 +teensy2.upload.tool=teensyloader +teensy2.upload.protocol=halfkay +teensy2.build.board=TEENSY2 +teensy2.build.core=teensy +teensy2.build.mcu=atmega32u4 +teensy2.build.warn_data_percentage=80 +teensy2.build.toolchain=avr/bin/ +teensy2.build.command.gcc=avr-gcc +teensy2.build.command.g++=avr-g++ +teensy2.build.command.ar=avr-ar +teensy2.build.command.objcopy=avr-objcopy +teensy2.build.command.objdump=avr-objdump +teensy2.build.command.linker=avr-gcc +teensy2.build.command.size=avr-size +teensy2.build.flags.common=-g -Wall -ffunction-sections -fdata-sections +teensy2.build.flags.dep=-MMD +teensy2.build.flags.optimize=-Os +teensy2.build.flags.cpu=-mmcu=atmega32u4 +teensy2.build.flags.defs=-DTEENSYDUINO=156 -DARDUINO_ARCH_AVR +teensy2.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++11 +teensy2.build.flags.c= +teensy2.build.flags.S=-x assembler-with-cpp +teensy2.build.flags.ld=-Wl,--gc-sections,--relax +teensy2.build.flags.ldspecs= +teensy2.build.flags.libs=-lm +teensy2.build.serial_number=true +teensy2.serial.restart_cmd=true + +teensy2.menu.usb.serial=Serial +teensy2.menu.usb.serial.build.usbtype=USB_SERIAL +teensy2.menu.usb.hid=Keyboard + Mouse + Joystick +teensy2.menu.usb.hid.build.usbtype=USB_HID +teensy2.menu.usb.hid.fake_serial=teensy_gateway +teensy2.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick +teensy2.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID +teensy2.menu.usb.int_disk=Disk(Internal) + Keyboard +teensy2.menu.usb.int_disk.build.usbtype=USB_DISK +teensy2.menu.usb.int_disk.fake_serial=teensy_gateway +teensy2.menu.usb.int_disk.build.elfpatch=mktinyfat +teensy2.menu.usb.sd_disk=Disk(SD Card) + Keyboard +teensy2.menu.usb.sd_disk.build.usbtype=USB_DISK_SDFLASH +teensy2.menu.usb.sd_disk.fake_serial=teensy_gateway +teensy2.menu.usb.midi=MIDI +teensy2.menu.usb.midi.build.usbtype=USB_MIDI +teensy2.menu.usb.midi.fake_serial=teensy_gateway +teensy2.menu.usb.rawhid=Raw HID +teensy2.menu.usb.rawhid.build.usbtype=USB_RAWHID +teensy2.menu.usb.rawhid.fake_serial=teensy_gateway +teensy2.menu.usb.flightsim=Flight Sim Controls +teensy2.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM +teensy2.menu.usb.flightsim.fake_serial=teensy_gateway +teensy2.menu.speed.16=16 MHz +teensy2.menu.speed.8=8 MHz +teensy2.menu.speed.4=4 MHz +teensy2.menu.speed.2=2 MHz +teensy2.menu.speed.1=1 MHz +teensy2.menu.speed.16.build.fcpu=16000000L +teensy2.menu.speed.8.build.fcpu=8000000L +teensy2.menu.speed.4.build.fcpu=4000000L +teensy2.menu.speed.2.build.fcpu=2000000L +teensy2.menu.speed.1.build.fcpu=1000000L + +teensy2.menu.keys.en-us=US English +teensy2.menu.keys.en-us.build.keylayout=US_ENGLISH +teensy2.menu.keys.fr-ca=Canadian French +teensy2.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH +teensy2.menu.keys.xx-ca=Canadian Multilingual +teensy2.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL +teensy2.menu.keys.cz-cz=Czech +teensy2.menu.keys.cz-cz.build.keylayout=CZECH +teensy2.menu.keys.da-da=Danish +teensy2.menu.keys.da-da.build.keylayout=DANISH +teensy2.menu.keys.fi-fi=Finnish +teensy2.menu.keys.fi-fi.build.keylayout=FINNISH +teensy2.menu.keys.fr-fr=French +teensy2.menu.keys.fr-fr.build.keylayout=FRENCH +teensy2.menu.keys.fr-be=French Belgian +teensy2.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN +teensy2.menu.keys.fr-ch=French Swiss +teensy2.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS +teensy2.menu.keys.de-de=German +teensy2.menu.keys.de-de.build.keylayout=GERMAN +teensy2.menu.keys.de-dm=German (Mac) +teensy2.menu.keys.de-dm.build.keylayout=GERMAN_MAC +teensy2.menu.keys.de-ch=German Swiss +teensy2.menu.keys.de-ch.build.keylayout=GERMAN_SWISS +teensy2.menu.keys.is-is=Icelandic +teensy2.menu.keys.is-is.build.keylayout=ICELANDIC +teensy2.menu.keys.en-ie=Irish +teensy2.menu.keys.en-ie.build.keylayout=IRISH +teensy2.menu.keys.it-it=Italian +teensy2.menu.keys.it-it.build.keylayout=ITALIAN +teensy2.menu.keys.no-no=Norwegian +teensy2.menu.keys.no-no.build.keylayout=NORWEGIAN +teensy2.menu.keys.pt-pt=Portuguese +teensy2.menu.keys.pt-pt.build.keylayout=PORTUGUESE +teensy2.menu.keys.pt-br=Portuguese Brazilian +teensy2.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN +teensy2.menu.keys.rs-rs=Serbian (Latin Only) +teensy2.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY +teensy2.menu.keys.es-es=Spanish +teensy2.menu.keys.es-es.build.keylayout=SPANISH +teensy2.menu.keys.es-mx=Spanish Latin America +teensy2.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA +teensy2.menu.keys.sv-se=Swedish +teensy2.menu.keys.sv-se.build.keylayout=SWEDISH +teensy2.menu.keys.tr-tr=Turkish (partial) +teensy2.menu.keys.tr-tr.build.keylayout=TURKISH +teensy2.menu.keys.en-gb=United Kingdom +teensy2.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM +teensy2.menu.keys.usint=US International +teensy2.menu.keys.usint.build.keylayout=US_INTERNATIONAL + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy/Stream.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy/Stream.cpp new file mode 100644 index 0000000..6c78ed5 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy/Stream.cpp @@ -0,0 +1,446 @@ +/* + Stream.cpp - adds parsing methods to Stream class + Copyright (c) 2008 David A. Mellis. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Created July 2011 + parsing functions based on TextFinder library by Michael Margolis + */ + +#include + +#define PARSE_TIMEOUT 1000 // default number of milli-seconds to wait +#define NO_SKIP_CHAR 1 // a magic char not found in a valid ASCII numeric field + +// private method to read stream with timeout +int Stream::timedRead() +{ + int c; + unsigned long startMillis = millis(); + + do + { + c = read(); + + if (c >= 0) + return c; + + yield(); + } while (millis() - startMillis < _timeout); + + Serial.print(("timedRead timeout = ")); + Serial.println(_timeout); + + return -1; // -1 indicates timeout +} + +// private method to peek stream with timeout +int Stream::timedPeek() +{ + int c; + unsigned long startMillis = millis(); + + do + { + c = peek(); + + if (c >= 0) + return c; + + yield(); + } while (millis() - startMillis < _timeout); + + return -1; // -1 indicates timeout +} + +// returns peek of the next digit in the stream or -1 if timeout +// discards non-numeric characters +int Stream::peekNextDigit() +{ + int c; + + while (1) + { + c = timedPeek(); + + if (c < 0) + return c; // timeout + + if (c == '-') + return c; + + if (c >= '0' && c <= '9') + return c; + + read(); // discard non-numeric + } +} + +// Public Methods +////////////////////////////////////////////////////////////// + +void Stream::setTimeout(unsigned long timeout) // sets the maximum number of milliseconds to wait +{ + _timeout = timeout; +} + +// find returns true if the target string is found +bool Stream::find(const char *target) +{ + return findUntil(target, NULL); +} + +// reads data from the stream until the target string of given length is found +// returns true if target string is found, false if timed out +bool Stream::find(const char *target, size_t length) +{ + return findUntil(target, length, NULL, 0); +} + +// as find but search ends if the terminator string is found +bool Stream::findUntil(const char *target, const char *terminator) +{ + if (target == nullptr) + return true; + + size_t tlen = (terminator == nullptr) ? 0 : strlen(terminator); + + return findUntil(target, strlen(target), terminator, tlen); +} + +// reads data from the stream until the target string of the given length is found +// search terminated if the terminator string is found +// returns true if target string is found, false if terminated or timed out +bool Stream::findUntil(const char *target, size_t targetLen, const char *terminator, size_t termLen) +{ + size_t index = 0; // maximum target string length is 64k bytes! + size_t termIndex = 0; + int c; + + if ( target == nullptr) + return true; + + if ( *target == 0) + return true; // return true if target is a null string + + if (terminator == nullptr) + termLen = 0; + + while ( (c = timedRead()) > 0) + { + if ( c == target[index]) + { + //////Serial.print("found "); Serial.write(c); Serial.print("index now"); Serial.println(index+1); + if (++index >= targetLen) + { + // return true if all chars in the target match + return true; + } + } + else + { + index = 0; // reset index if any char does not match + } + + if (termLen > 0 && c == terminator[termIndex]) + { + if (++termIndex >= termLen) + return false; // return false if terminate string found before target string + } + else + termIndex = 0; + } + + return false; +} + + +// returns the first valid (long) integer value from the current position. +// initial characters that are not digits (or the minus sign) are skipped +// function is terminated by the first character that is not a digit. +long Stream::parseInt() +{ + return parseInt(NO_SKIP_CHAR); // terminate on first non-digit character (or timeout) +} + +// as above but a given skipChar is ignored +// this allows format characters (typically commas) in values to be ignored +long Stream::parseInt(char skipChar) +{ + boolean isNegative = false; + long value = 0; + int c; + + c = peekNextDigit(); + + // ignore non numeric leading characters + if (c < 0) + return 0; // zero returned if timeout + + do + { + if (c == skipChar) + ; // ignore this charactor + else if (c == '-') + isNegative = true; + else if (c >= '0' && c <= '9') // is c a digit? + value = value * 10 + c - '0'; + + read(); // consume the character we got with peek + c = timedPeek(); + } + while ( (c >= '0' && c <= '9') || c == skipChar ); + + if (isNegative) + value = -value; + + return value; +} + + +// as parseInt but returns a floating point value +float Stream::parseFloat() +{ + return parseFloat(NO_SKIP_CHAR); +} + +// as above but the given skipChar is ignored +// this allows format characters (typically commas) in values to be ignored +float Stream::parseFloat(char skipChar) +{ + boolean isNegative = false; + boolean isFraction = false; + long value = 0; + int c; + float fraction = 1.0; + + c = peekNextDigit(); + + // ignore non numeric leading characters + if (c < 0) + return 0; // zero returned if timeout + + do + { + if (c == skipChar) + ; // ignore + else if (c == '-') + isNegative = true; + else if (c == '.') + isFraction = true; + else if (c >= '0' && c <= '9') + { + // is c a digit? + value = value * 10 + c - '0'; + + if (isFraction) + fraction *= 0.1f; + } + + read(); // consume the character we got with peek + c = timedPeek(); + } + while ( (c >= '0' && c <= '9') || c == '.' || c == skipChar ); + + if (isNegative) + value = -value; + + if (isFraction) + return value * fraction; + else + return value; +} + +// read characters from stream into buffer +// terminates if length characters have been read, or timeout (see setTimeout) +// returns the number of characters placed in the buffer +// the buffer is NOT null terminated. +// +size_t Stream::readBytes(char *buffer, size_t length) +{ + if (buffer == nullptr) + return 0; + + size_t count = 0; + + while (count < length) + { + int c = timedRead(); + + if (c < 0) + { + setReadError(); + break; + } + + *buffer++ = (char)c; + count++; + } + + return count; +} + + +// as readBytes with terminator character +// terminates if length characters have been read, timeout, or if the terminator character detected +// returns the number of characters placed in the buffer (0 means no valid data found) + +size_t Stream::readBytesUntil(char terminator, char *buffer, size_t length) +{ + if (buffer == nullptr) + return 0; + + if (length < 1) + return 0; + + length--; + size_t index = 0; + + while (index < length) + { + int c = timedRead(); + + if (c == terminator) + break; + + if (c < 0) + { + setReadError(); + break; + } + + *buffer++ = (char)c; + index++; + } + + *buffer = 0; + return index; // return number of characters, not including null terminator +} + +#if 1 +// From nRF52 + +String Stream::readString(size_t max) +{ + String ret; + int c = timedRead(); + + while (c >= 0) + { + ret += (char)c; + c = timedRead(); + } + + return ret; +} + +char readStringBuffer[2048]; + +char* Stream::readCharsUntil(char terminator, size_t max) +{ + uint16_t offset = 0; + + int c = timedRead(); + + readStringBuffer[offset++] = c; + + while (c >= 0 && c != terminator) + { + c = timedRead(); + + readStringBuffer[offset++] = c; + } + + readStringBuffer[offset] = 0; + + return readStringBuffer; +} + +String Stream::readStringUntil(char terminator, size_t max) +{ + String ret; + uint16_t offset = 0; + + int c = timedRead(); + + readStringBuffer[offset++] = c; + + while (c >= 0 && c != terminator) + { + c = timedRead(); + + readStringBuffer[offset++] = c; + } + + readStringBuffer[offset] = 0; + + ret = String(readStringBuffer); + + return String(readStringBuffer); +} + +#else + +String Stream::readString(size_t max) +{ + String str; + size_t length = 0; + + while (length < max) + { + int c = timedRead(); + + if (c < 0) + { + setReadError(); + break; // timeout + } + + if (c == 0) + break; + + str += (char)c; + length++; + } + + return str; +} + +String Stream::readStringUntil(char terminator, size_t max) +{ + String str; + size_t length = 0; + + while (length < max) + { + int c = timedRead(); + + if (c < 0) + { + setReadError(); + break; // timeout + } + + if (c == 0 || c == terminator) + break; + + str += (char)c; + length++; + } + + return str; +} +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy/Stream.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy/Stream.h new file mode 100644 index 0000000..e63330a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy/Stream.h @@ -0,0 +1,149 @@ +/* + Stream.h - base class for character-based streams. + Copyright (c) 2010 David A. Mellis. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef Stream_h +#define Stream_h + +#include +#include "Print.h" + +class Stream : public Print +{ + public: + constexpr Stream() : _timeout(1000), read_error(0) {} + virtual int available() = 0; + virtual int read() = 0; + virtual int peek() = 0; + + void setTimeout(unsigned long timeout); + bool find(const char *target); + + bool find(const uint8_t *target) + { + return find ((const char *)target); + } + + bool find(const String &target) + { + return find(target.c_str()); + } + + bool find(const char *target, size_t length); + + bool find(const uint8_t *target, size_t length) + { + return find ((const char *)target, length); + } + + bool find(const String &target, size_t length) + { + return find(target.c_str(), length); + } + + bool findUntil(const char *target, const char *terminator); + + bool findUntil(const uint8_t *target, const char *terminator) + { + return findUntil((const char *)target, terminator); + } + + bool findUntil(const String &target, const char *terminator) + { + return findUntil(target.c_str(), terminator); + } + + bool findUntil(const char *target, const String &terminator) + { + return findUntil(target, terminator.c_str()); + } + + bool findUntil(const String &target, const String &terminator) + { + return findUntil(target.c_str(), terminator.c_str()); + } + + bool findUntil(const char *target, size_t targetLen, const char *terminate, size_t termLen); + + bool findUntil(const uint8_t *target, size_t targetLen, const char *terminate, size_t termLen) + { + return findUntil((const char *)target, targetLen, terminate, termLen); + } + + bool findUntil(const String &target, size_t targetLen, const char *terminate, size_t termLen); + bool findUntil(const char *target, size_t targetLen, const String &terminate, size_t termLen); + bool findUntil(const String &target, size_t targetLen, const String &terminate, size_t termLen); + + long parseInt(); + long parseInt(char skipChar); + + float parseFloat(); + float parseFloat(char skipChar); + + size_t readBytes(char *buffer, size_t length); + + size_t readBytes(uint8_t *buffer, size_t length) + { + return readBytes((char *)buffer, length); + } + + size_t readBytesUntil(char terminator, char *buffer, size_t length); + + size_t readBytesUntil(char terminator, uint8_t *buffer, size_t length) + { + return readBytesUntil(terminator, (char *)buffer, length); + } + + //////////////////////////////////////////////////////////// + String readString(size_t max = 512); + String readStringUntil(char terminator, size_t max = 512); + + // KH, to not use String + char* readCharsUntil(char terminator, size_t max = 512); + //////////////////////////////////////////////////////////// + + int getReadError() + { + return read_error; + } + + void clearReadError() + { + setReadError(0); + } + + protected: + void setReadError(int err = 1) + { + read_error = err; + } + + unsigned long _timeout; + + // KH + int timedRead(); + int timedPeek(); + int peekNextDigit(); + ////// + + private: + char read_error; +}; + +#endif + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy3/Stream.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy3/Stream.cpp new file mode 100644 index 0000000..6c78ed5 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy3/Stream.cpp @@ -0,0 +1,446 @@ +/* + Stream.cpp - adds parsing methods to Stream class + Copyright (c) 2008 David A. Mellis. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Created July 2011 + parsing functions based on TextFinder library by Michael Margolis + */ + +#include + +#define PARSE_TIMEOUT 1000 // default number of milli-seconds to wait +#define NO_SKIP_CHAR 1 // a magic char not found in a valid ASCII numeric field + +// private method to read stream with timeout +int Stream::timedRead() +{ + int c; + unsigned long startMillis = millis(); + + do + { + c = read(); + + if (c >= 0) + return c; + + yield(); + } while (millis() - startMillis < _timeout); + + Serial.print(("timedRead timeout = ")); + Serial.println(_timeout); + + return -1; // -1 indicates timeout +} + +// private method to peek stream with timeout +int Stream::timedPeek() +{ + int c; + unsigned long startMillis = millis(); + + do + { + c = peek(); + + if (c >= 0) + return c; + + yield(); + } while (millis() - startMillis < _timeout); + + return -1; // -1 indicates timeout +} + +// returns peek of the next digit in the stream or -1 if timeout +// discards non-numeric characters +int Stream::peekNextDigit() +{ + int c; + + while (1) + { + c = timedPeek(); + + if (c < 0) + return c; // timeout + + if (c == '-') + return c; + + if (c >= '0' && c <= '9') + return c; + + read(); // discard non-numeric + } +} + +// Public Methods +////////////////////////////////////////////////////////////// + +void Stream::setTimeout(unsigned long timeout) // sets the maximum number of milliseconds to wait +{ + _timeout = timeout; +} + +// find returns true if the target string is found +bool Stream::find(const char *target) +{ + return findUntil(target, NULL); +} + +// reads data from the stream until the target string of given length is found +// returns true if target string is found, false if timed out +bool Stream::find(const char *target, size_t length) +{ + return findUntil(target, length, NULL, 0); +} + +// as find but search ends if the terminator string is found +bool Stream::findUntil(const char *target, const char *terminator) +{ + if (target == nullptr) + return true; + + size_t tlen = (terminator == nullptr) ? 0 : strlen(terminator); + + return findUntil(target, strlen(target), terminator, tlen); +} + +// reads data from the stream until the target string of the given length is found +// search terminated if the terminator string is found +// returns true if target string is found, false if terminated or timed out +bool Stream::findUntil(const char *target, size_t targetLen, const char *terminator, size_t termLen) +{ + size_t index = 0; // maximum target string length is 64k bytes! + size_t termIndex = 0; + int c; + + if ( target == nullptr) + return true; + + if ( *target == 0) + return true; // return true if target is a null string + + if (terminator == nullptr) + termLen = 0; + + while ( (c = timedRead()) > 0) + { + if ( c == target[index]) + { + //////Serial.print("found "); Serial.write(c); Serial.print("index now"); Serial.println(index+1); + if (++index >= targetLen) + { + // return true if all chars in the target match + return true; + } + } + else + { + index = 0; // reset index if any char does not match + } + + if (termLen > 0 && c == terminator[termIndex]) + { + if (++termIndex >= termLen) + return false; // return false if terminate string found before target string + } + else + termIndex = 0; + } + + return false; +} + + +// returns the first valid (long) integer value from the current position. +// initial characters that are not digits (or the minus sign) are skipped +// function is terminated by the first character that is not a digit. +long Stream::parseInt() +{ + return parseInt(NO_SKIP_CHAR); // terminate on first non-digit character (or timeout) +} + +// as above but a given skipChar is ignored +// this allows format characters (typically commas) in values to be ignored +long Stream::parseInt(char skipChar) +{ + boolean isNegative = false; + long value = 0; + int c; + + c = peekNextDigit(); + + // ignore non numeric leading characters + if (c < 0) + return 0; // zero returned if timeout + + do + { + if (c == skipChar) + ; // ignore this charactor + else if (c == '-') + isNegative = true; + else if (c >= '0' && c <= '9') // is c a digit? + value = value * 10 + c - '0'; + + read(); // consume the character we got with peek + c = timedPeek(); + } + while ( (c >= '0' && c <= '9') || c == skipChar ); + + if (isNegative) + value = -value; + + return value; +} + + +// as parseInt but returns a floating point value +float Stream::parseFloat() +{ + return parseFloat(NO_SKIP_CHAR); +} + +// as above but the given skipChar is ignored +// this allows format characters (typically commas) in values to be ignored +float Stream::parseFloat(char skipChar) +{ + boolean isNegative = false; + boolean isFraction = false; + long value = 0; + int c; + float fraction = 1.0; + + c = peekNextDigit(); + + // ignore non numeric leading characters + if (c < 0) + return 0; // zero returned if timeout + + do + { + if (c == skipChar) + ; // ignore + else if (c == '-') + isNegative = true; + else if (c == '.') + isFraction = true; + else if (c >= '0' && c <= '9') + { + // is c a digit? + value = value * 10 + c - '0'; + + if (isFraction) + fraction *= 0.1f; + } + + read(); // consume the character we got with peek + c = timedPeek(); + } + while ( (c >= '0' && c <= '9') || c == '.' || c == skipChar ); + + if (isNegative) + value = -value; + + if (isFraction) + return value * fraction; + else + return value; +} + +// read characters from stream into buffer +// terminates if length characters have been read, or timeout (see setTimeout) +// returns the number of characters placed in the buffer +// the buffer is NOT null terminated. +// +size_t Stream::readBytes(char *buffer, size_t length) +{ + if (buffer == nullptr) + return 0; + + size_t count = 0; + + while (count < length) + { + int c = timedRead(); + + if (c < 0) + { + setReadError(); + break; + } + + *buffer++ = (char)c; + count++; + } + + return count; +} + + +// as readBytes with terminator character +// terminates if length characters have been read, timeout, or if the terminator character detected +// returns the number of characters placed in the buffer (0 means no valid data found) + +size_t Stream::readBytesUntil(char terminator, char *buffer, size_t length) +{ + if (buffer == nullptr) + return 0; + + if (length < 1) + return 0; + + length--; + size_t index = 0; + + while (index < length) + { + int c = timedRead(); + + if (c == terminator) + break; + + if (c < 0) + { + setReadError(); + break; + } + + *buffer++ = (char)c; + index++; + } + + *buffer = 0; + return index; // return number of characters, not including null terminator +} + +#if 1 +// From nRF52 + +String Stream::readString(size_t max) +{ + String ret; + int c = timedRead(); + + while (c >= 0) + { + ret += (char)c; + c = timedRead(); + } + + return ret; +} + +char readStringBuffer[2048]; + +char* Stream::readCharsUntil(char terminator, size_t max) +{ + uint16_t offset = 0; + + int c = timedRead(); + + readStringBuffer[offset++] = c; + + while (c >= 0 && c != terminator) + { + c = timedRead(); + + readStringBuffer[offset++] = c; + } + + readStringBuffer[offset] = 0; + + return readStringBuffer; +} + +String Stream::readStringUntil(char terminator, size_t max) +{ + String ret; + uint16_t offset = 0; + + int c = timedRead(); + + readStringBuffer[offset++] = c; + + while (c >= 0 && c != terminator) + { + c = timedRead(); + + readStringBuffer[offset++] = c; + } + + readStringBuffer[offset] = 0; + + ret = String(readStringBuffer); + + return String(readStringBuffer); +} + +#else + +String Stream::readString(size_t max) +{ + String str; + size_t length = 0; + + while (length < max) + { + int c = timedRead(); + + if (c < 0) + { + setReadError(); + break; // timeout + } + + if (c == 0) + break; + + str += (char)c; + length++; + } + + return str; +} + +String Stream::readStringUntil(char terminator, size_t max) +{ + String str; + size_t length = 0; + + while (length < max) + { + int c = timedRead(); + + if (c < 0) + { + setReadError(); + break; // timeout + } + + if (c == 0 || c == terminator) + break; + + str += (char)c; + length++; + } + + return str; +} +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy3/Stream.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy3/Stream.h new file mode 100644 index 0000000..e63330a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy3/Stream.h @@ -0,0 +1,149 @@ +/* + Stream.h - base class for character-based streams. + Copyright (c) 2010 David A. Mellis. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef Stream_h +#define Stream_h + +#include +#include "Print.h" + +class Stream : public Print +{ + public: + constexpr Stream() : _timeout(1000), read_error(0) {} + virtual int available() = 0; + virtual int read() = 0; + virtual int peek() = 0; + + void setTimeout(unsigned long timeout); + bool find(const char *target); + + bool find(const uint8_t *target) + { + return find ((const char *)target); + } + + bool find(const String &target) + { + return find(target.c_str()); + } + + bool find(const char *target, size_t length); + + bool find(const uint8_t *target, size_t length) + { + return find ((const char *)target, length); + } + + bool find(const String &target, size_t length) + { + return find(target.c_str(), length); + } + + bool findUntil(const char *target, const char *terminator); + + bool findUntil(const uint8_t *target, const char *terminator) + { + return findUntil((const char *)target, terminator); + } + + bool findUntil(const String &target, const char *terminator) + { + return findUntil(target.c_str(), terminator); + } + + bool findUntil(const char *target, const String &terminator) + { + return findUntil(target, terminator.c_str()); + } + + bool findUntil(const String &target, const String &terminator) + { + return findUntil(target.c_str(), terminator.c_str()); + } + + bool findUntil(const char *target, size_t targetLen, const char *terminate, size_t termLen); + + bool findUntil(const uint8_t *target, size_t targetLen, const char *terminate, size_t termLen) + { + return findUntil((const char *)target, targetLen, terminate, termLen); + } + + bool findUntil(const String &target, size_t targetLen, const char *terminate, size_t termLen); + bool findUntil(const char *target, size_t targetLen, const String &terminate, size_t termLen); + bool findUntil(const String &target, size_t targetLen, const String &terminate, size_t termLen); + + long parseInt(); + long parseInt(char skipChar); + + float parseFloat(); + float parseFloat(char skipChar); + + size_t readBytes(char *buffer, size_t length); + + size_t readBytes(uint8_t *buffer, size_t length) + { + return readBytes((char *)buffer, length); + } + + size_t readBytesUntil(char terminator, char *buffer, size_t length); + + size_t readBytesUntil(char terminator, uint8_t *buffer, size_t length) + { + return readBytesUntil(terminator, (char *)buffer, length); + } + + //////////////////////////////////////////////////////////// + String readString(size_t max = 512); + String readStringUntil(char terminator, size_t max = 512); + + // KH, to not use String + char* readCharsUntil(char terminator, size_t max = 512); + //////////////////////////////////////////////////////////// + + int getReadError() + { + return read_error; + } + + void clearReadError() + { + setReadError(0); + } + + protected: + void setReadError(int err = 1) + { + read_error = err; + } + + unsigned long _timeout; + + // KH + int timedRead(); + int timedPeek(); + int peekNextDigit(); + ////// + + private: + char read_error; +}; + +#endif + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy4/Stream.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy4/Stream.cpp new file mode 100644 index 0000000..6c78ed5 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy4/Stream.cpp @@ -0,0 +1,446 @@ +/* + Stream.cpp - adds parsing methods to Stream class + Copyright (c) 2008 David A. Mellis. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Created July 2011 + parsing functions based on TextFinder library by Michael Margolis + */ + +#include + +#define PARSE_TIMEOUT 1000 // default number of milli-seconds to wait +#define NO_SKIP_CHAR 1 // a magic char not found in a valid ASCII numeric field + +// private method to read stream with timeout +int Stream::timedRead() +{ + int c; + unsigned long startMillis = millis(); + + do + { + c = read(); + + if (c >= 0) + return c; + + yield(); + } while (millis() - startMillis < _timeout); + + Serial.print(("timedRead timeout = ")); + Serial.println(_timeout); + + return -1; // -1 indicates timeout +} + +// private method to peek stream with timeout +int Stream::timedPeek() +{ + int c; + unsigned long startMillis = millis(); + + do + { + c = peek(); + + if (c >= 0) + return c; + + yield(); + } while (millis() - startMillis < _timeout); + + return -1; // -1 indicates timeout +} + +// returns peek of the next digit in the stream or -1 if timeout +// discards non-numeric characters +int Stream::peekNextDigit() +{ + int c; + + while (1) + { + c = timedPeek(); + + if (c < 0) + return c; // timeout + + if (c == '-') + return c; + + if (c >= '0' && c <= '9') + return c; + + read(); // discard non-numeric + } +} + +// Public Methods +////////////////////////////////////////////////////////////// + +void Stream::setTimeout(unsigned long timeout) // sets the maximum number of milliseconds to wait +{ + _timeout = timeout; +} + +// find returns true if the target string is found +bool Stream::find(const char *target) +{ + return findUntil(target, NULL); +} + +// reads data from the stream until the target string of given length is found +// returns true if target string is found, false if timed out +bool Stream::find(const char *target, size_t length) +{ + return findUntil(target, length, NULL, 0); +} + +// as find but search ends if the terminator string is found +bool Stream::findUntil(const char *target, const char *terminator) +{ + if (target == nullptr) + return true; + + size_t tlen = (terminator == nullptr) ? 0 : strlen(terminator); + + return findUntil(target, strlen(target), terminator, tlen); +} + +// reads data from the stream until the target string of the given length is found +// search terminated if the terminator string is found +// returns true if target string is found, false if terminated or timed out +bool Stream::findUntil(const char *target, size_t targetLen, const char *terminator, size_t termLen) +{ + size_t index = 0; // maximum target string length is 64k bytes! + size_t termIndex = 0; + int c; + + if ( target == nullptr) + return true; + + if ( *target == 0) + return true; // return true if target is a null string + + if (terminator == nullptr) + termLen = 0; + + while ( (c = timedRead()) > 0) + { + if ( c == target[index]) + { + //////Serial.print("found "); Serial.write(c); Serial.print("index now"); Serial.println(index+1); + if (++index >= targetLen) + { + // return true if all chars in the target match + return true; + } + } + else + { + index = 0; // reset index if any char does not match + } + + if (termLen > 0 && c == terminator[termIndex]) + { + if (++termIndex >= termLen) + return false; // return false if terminate string found before target string + } + else + termIndex = 0; + } + + return false; +} + + +// returns the first valid (long) integer value from the current position. +// initial characters that are not digits (or the minus sign) are skipped +// function is terminated by the first character that is not a digit. +long Stream::parseInt() +{ + return parseInt(NO_SKIP_CHAR); // terminate on first non-digit character (or timeout) +} + +// as above but a given skipChar is ignored +// this allows format characters (typically commas) in values to be ignored +long Stream::parseInt(char skipChar) +{ + boolean isNegative = false; + long value = 0; + int c; + + c = peekNextDigit(); + + // ignore non numeric leading characters + if (c < 0) + return 0; // zero returned if timeout + + do + { + if (c == skipChar) + ; // ignore this charactor + else if (c == '-') + isNegative = true; + else if (c >= '0' && c <= '9') // is c a digit? + value = value * 10 + c - '0'; + + read(); // consume the character we got with peek + c = timedPeek(); + } + while ( (c >= '0' && c <= '9') || c == skipChar ); + + if (isNegative) + value = -value; + + return value; +} + + +// as parseInt but returns a floating point value +float Stream::parseFloat() +{ + return parseFloat(NO_SKIP_CHAR); +} + +// as above but the given skipChar is ignored +// this allows format characters (typically commas) in values to be ignored +float Stream::parseFloat(char skipChar) +{ + boolean isNegative = false; + boolean isFraction = false; + long value = 0; + int c; + float fraction = 1.0; + + c = peekNextDigit(); + + // ignore non numeric leading characters + if (c < 0) + return 0; // zero returned if timeout + + do + { + if (c == skipChar) + ; // ignore + else if (c == '-') + isNegative = true; + else if (c == '.') + isFraction = true; + else if (c >= '0' && c <= '9') + { + // is c a digit? + value = value * 10 + c - '0'; + + if (isFraction) + fraction *= 0.1f; + } + + read(); // consume the character we got with peek + c = timedPeek(); + } + while ( (c >= '0' && c <= '9') || c == '.' || c == skipChar ); + + if (isNegative) + value = -value; + + if (isFraction) + return value * fraction; + else + return value; +} + +// read characters from stream into buffer +// terminates if length characters have been read, or timeout (see setTimeout) +// returns the number of characters placed in the buffer +// the buffer is NOT null terminated. +// +size_t Stream::readBytes(char *buffer, size_t length) +{ + if (buffer == nullptr) + return 0; + + size_t count = 0; + + while (count < length) + { + int c = timedRead(); + + if (c < 0) + { + setReadError(); + break; + } + + *buffer++ = (char)c; + count++; + } + + return count; +} + + +// as readBytes with terminator character +// terminates if length characters have been read, timeout, or if the terminator character detected +// returns the number of characters placed in the buffer (0 means no valid data found) + +size_t Stream::readBytesUntil(char terminator, char *buffer, size_t length) +{ + if (buffer == nullptr) + return 0; + + if (length < 1) + return 0; + + length--; + size_t index = 0; + + while (index < length) + { + int c = timedRead(); + + if (c == terminator) + break; + + if (c < 0) + { + setReadError(); + break; + } + + *buffer++ = (char)c; + index++; + } + + *buffer = 0; + return index; // return number of characters, not including null terminator +} + +#if 1 +// From nRF52 + +String Stream::readString(size_t max) +{ + String ret; + int c = timedRead(); + + while (c >= 0) + { + ret += (char)c; + c = timedRead(); + } + + return ret; +} + +char readStringBuffer[2048]; + +char* Stream::readCharsUntil(char terminator, size_t max) +{ + uint16_t offset = 0; + + int c = timedRead(); + + readStringBuffer[offset++] = c; + + while (c >= 0 && c != terminator) + { + c = timedRead(); + + readStringBuffer[offset++] = c; + } + + readStringBuffer[offset] = 0; + + return readStringBuffer; +} + +String Stream::readStringUntil(char terminator, size_t max) +{ + String ret; + uint16_t offset = 0; + + int c = timedRead(); + + readStringBuffer[offset++] = c; + + while (c >= 0 && c != terminator) + { + c = timedRead(); + + readStringBuffer[offset++] = c; + } + + readStringBuffer[offset] = 0; + + ret = String(readStringBuffer); + + return String(readStringBuffer); +} + +#else + +String Stream::readString(size_t max) +{ + String str; + size_t length = 0; + + while (length < max) + { + int c = timedRead(); + + if (c < 0) + { + setReadError(); + break; // timeout + } + + if (c == 0) + break; + + str += (char)c; + length++; + } + + return str; +} + +String Stream::readStringUntil(char terminator, size_t max) +{ + String str; + size_t length = 0; + + while (length < max) + { + int c = timedRead(); + + if (c < 0) + { + setReadError(); + break; // timeout + } + + if (c == 0 || c == terminator) + break; + + str += (char)c; + length++; + } + + return str; +} +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy4/Stream.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy4/Stream.h new file mode 100644 index 0000000..e63330a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/hardware/teensy/avr/cores/teensy4/Stream.h @@ -0,0 +1,149 @@ +/* + Stream.h - base class for character-based streams. + Copyright (c) 2010 David A. Mellis. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef Stream_h +#define Stream_h + +#include +#include "Print.h" + +class Stream : public Print +{ + public: + constexpr Stream() : _timeout(1000), read_error(0) {} + virtual int available() = 0; + virtual int read() = 0; + virtual int peek() = 0; + + void setTimeout(unsigned long timeout); + bool find(const char *target); + + bool find(const uint8_t *target) + { + return find ((const char *)target); + } + + bool find(const String &target) + { + return find(target.c_str()); + } + + bool find(const char *target, size_t length); + + bool find(const uint8_t *target, size_t length) + { + return find ((const char *)target, length); + } + + bool find(const String &target, size_t length) + { + return find(target.c_str(), length); + } + + bool findUntil(const char *target, const char *terminator); + + bool findUntil(const uint8_t *target, const char *terminator) + { + return findUntil((const char *)target, terminator); + } + + bool findUntil(const String &target, const char *terminator) + { + return findUntil(target.c_str(), terminator); + } + + bool findUntil(const char *target, const String &terminator) + { + return findUntil(target, terminator.c_str()); + } + + bool findUntil(const String &target, const String &terminator) + { + return findUntil(target.c_str(), terminator.c_str()); + } + + bool findUntil(const char *target, size_t targetLen, const char *terminate, size_t termLen); + + bool findUntil(const uint8_t *target, size_t targetLen, const char *terminate, size_t termLen) + { + return findUntil((const char *)target, targetLen, terminate, termLen); + } + + bool findUntil(const String &target, size_t targetLen, const char *terminate, size_t termLen); + bool findUntil(const char *target, size_t targetLen, const String &terminate, size_t termLen); + bool findUntil(const String &target, size_t targetLen, const String &terminate, size_t termLen); + + long parseInt(); + long parseInt(char skipChar); + + float parseFloat(); + float parseFloat(char skipChar); + + size_t readBytes(char *buffer, size_t length); + + size_t readBytes(uint8_t *buffer, size_t length) + { + return readBytes((char *)buffer, length); + } + + size_t readBytesUntil(char terminator, char *buffer, size_t length); + + size_t readBytesUntil(char terminator, uint8_t *buffer, size_t length) + { + return readBytesUntil(terminator, (char *)buffer, length); + } + + //////////////////////////////////////////////////////////// + String readString(size_t max = 512); + String readStringUntil(char terminator, size_t max = 512); + + // KH, to not use String + char* readCharsUntil(char terminator, size_t max = 512); + //////////////////////////////////////////////////////////// + + int getReadError() + { + return read_error; + } + + void clearReadError() + { + setReadError(0); + } + + protected: + void setReadError(int err = 1) + { + read_error = err; + } + + unsigned long _timeout; + + // KH + int timedRead(); + int timedPeek(); + int peekNextDigit(); + ////// + + private: + char read_error; +}; + +#endif + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/industrialshields/hardware/avr/1.1.36/cores/industrialshields/Udp.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/industrialshields/hardware/avr/1.1.36/cores/industrialshields/Udp.h new file mode 100644 index 0000000..d052446 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/industrialshields/hardware/avr/1.1.36/cores/industrialshields/Udp.h @@ -0,0 +1,89 @@ +/* + * Udp.cpp: Library to send/receive UDP packets. + * + * NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these) + * 1) UDP does not guarantee the order in which assembled UDP packets are received. This + * might not happen often in practice, but in larger network topologies, a UDP + * packet can be received out of sequence. + * 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being + * aware of it. Again, this may not be a concern in practice on small local networks. + * For more information, see http://www.cafeaulait.org/course/week12/35.html + * + * MIT License: + * Copyright (c) 2008 Bjoern Hartmann + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * bjoern@cs.stanford.edu 12/30/2008 + */ + +#ifndef udp_h +#define udp_h + +#include +#include + +class UDP : public Stream { + +public: + virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure + virtual void stop() =0; // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port) =0; + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char *host, uint16_t port) =0; + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket() =0; + // Write a single byte into the packet + virtual size_t write(uint8_t) =0; + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t *buffer, size_t size) =0; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket() =0; + // Number of bytes remaining in the current packet + virtual int available() =0; + // Read a single byte from the current packet + virtual int read() =0; + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len) =0; + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) =0; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek() =0; + virtual void flush() =0; // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP() =0; + // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort() =0; +protected: + uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; +}; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/industrialshields/hardware/avr/1.1.37/cores/industrialshields/Udp.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/industrialshields/hardware/avr/1.1.37/cores/industrialshields/Udp.h new file mode 100644 index 0000000..d052446 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/industrialshields/hardware/avr/1.1.37/cores/industrialshields/Udp.h @@ -0,0 +1,89 @@ +/* + * Udp.cpp: Library to send/receive UDP packets. + * + * NOTE: UDP is fast, but has some important limitations (thanks to Warren Gray for mentioning these) + * 1) UDP does not guarantee the order in which assembled UDP packets are received. This + * might not happen often in practice, but in larger network topologies, a UDP + * packet can be received out of sequence. + * 2) UDP does not guard against lost packets - so packets *can* disappear without the sender being + * aware of it. Again, this may not be a concern in practice on small local networks. + * For more information, see http://www.cafeaulait.org/course/week12/35.html + * + * MIT License: + * Copyright (c) 2008 Bjoern Hartmann + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * bjoern@cs.stanford.edu 12/30/2008 + */ + +#ifndef udp_h +#define udp_h + +#include +#include + +class UDP : public Stream { + +public: + virtual uint8_t begin(uint16_t) =0; // initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use + virtual uint8_t beginMulticast(IPAddress, uint16_t) { return 0; } // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 on failure + virtual void stop() =0; // Finish with the UDP socket + + // Sending UDP packets + + // Start building up a packet to send to the remote host specific in ip and port + // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port + virtual int beginPacket(IPAddress ip, uint16_t port) =0; + // Start building up a packet to send to the remote host specific in host and port + // Returns 1 if successful, 0 if there was a problem resolving the hostname or port + virtual int beginPacket(const char *host, uint16_t port) =0; + // Finish off this packet and send it + // Returns 1 if the packet was sent successfully, 0 if there was an error + virtual int endPacket() =0; + // Write a single byte into the packet + virtual size_t write(uint8_t) =0; + // Write size bytes from buffer into the packet + virtual size_t write(const uint8_t *buffer, size_t size) =0; + + // Start processing the next available incoming packet + // Returns the size of the packet in bytes, or 0 if no packets are available + virtual int parsePacket() =0; + // Number of bytes remaining in the current packet + virtual int available() =0; + // Read a single byte from the current packet + virtual int read() =0; + // Read up to len bytes from the current packet and place them into buffer + // Returns the number of bytes read, or 0 if none are available + virtual int read(unsigned char* buffer, size_t len) =0; + // Read up to len characters from the current packet and place them into buffer + // Returns the number of characters read, or 0 if none are available + virtual int read(char* buffer, size_t len) =0; + // Return the next byte from the current packet without moving on to the next byte + virtual int peek() =0; + virtual void flush() =0; // Finish reading the current packet + + // Return the IP address of the host who sent the current incoming packet + virtual IPAddress remoteIP() =0; + // Return the port of the host who sent the current incoming packet + virtual uint16_t remotePort() =0; +protected: + uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; +}; + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.0.10/cores/arduino/avr/pgmspace.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.0.10/cores/arduino/avr/pgmspace.h new file mode 100644 index 0000000..bf87a94 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.0.10/cores/arduino/avr/pgmspace.h @@ -0,0 +1,122 @@ +/* + pgmspace.h - Definitions for compatibility with AVR pgmspace macros + + Copyright (c) 2015 Arduino LLC + + Based on work of Paul Stoffregen on Teensy 3 (http://pjrc.com) + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE +*/ + +#ifndef __PGMSPACE_H_ +#define __PGMSPACE_H_ 1 + +#include + +#define PROGMEM +#define PGM_P const char * +#define PSTR(str) (str) + +#define _SFR_BYTE(n) (n) + +typedef void prog_void; +typedef char prog_char; +typedef unsigned char prog_uchar; +typedef int8_t prog_int8_t; +typedef uint8_t prog_uint8_t; +typedef int16_t prog_int16_t; +typedef uint16_t prog_uint16_t; +typedef int32_t prog_int32_t; +typedef uint32_t prog_uint32_t; +typedef int64_t prog_int64_t; +typedef uint64_t prog_uint64_t; + +typedef const void* int_farptr_t; +typedef const void* uint_farptr_t; + +#define memchr_P(s, c, n) memchr((s), (c), (n)) +#define memcmp_P(s1, s2, n) memcmp((s1), (s2), (n)) +#define memccpy_P(dest, src, c, n) memccpy((dest), (src), (c), (n)) +#define memcpy_P(dest, src, n) memcpy((dest), (src), (n)) +#define memmem_P(haystack, haystacklen, needle, needlelen) memmem((haystack), (haystacklen), (needle), (needlelen)) +#define memrchr_P(s, c, n) memrchr((s), (c), (n)) +#define strcat_P(dest, src) strcat((dest), (src)) +#define strchr_P(s, c) strchr((s), (c)) +#define strchrnul_P(s, c) strchrnul((s), (c)) +#define strcmp_P(a, b) strcmp((a), (b)) +#define strcpy_P(dest, src) strcpy((dest), (src)) +#define strcasecmp_P(s1, s2) strcasecmp((s1), (s2)) +#define strcasestr_P(haystack, needle) strcasestr((haystack), (needle)) +#define strcspn_P(s, accept) strcspn((s), (accept)) +#define strlcat_P(s1, s2, n) strlcat((s1), (s2), (n)) +#define strlcpy_P(s1, s2, n) strlcpy((s1), (s2), (n)) +#define strlen_P(a) strlen((a)) +#define strnlen_P(s, n) strnlen((s), (n)) +#define strncmp_P(s1, s2, n) strncmp((s1), (s2), (n)) +#define strncasecmp_P(s1, s2, n) strncasecmp((s1), (s2), (n)) +#define strncat_P(s1, s2, n) strncat((s1), (s2), (n)) +#define strncpy_P(s1, s2, n) strncpy((s1), (s2), (n)) +#define strpbrk_P(s, accept) strpbrk((s), (accept)) +#define strrchr_P(s, c) strrchr((s), (c)) +#define strsep_P(sp, delim) strsep((sp), (delim)) +#define strspn_P(s, accept) strspn((s), (accept)) +#define strstr_P(a, b) strstr((a), (b)) +#define strtok_P(s, delim) strtok((s), (delim)) +#define strtok_rP(s, delim, last) strtok((s), (delim), (last)) + +#define strlen_PF(a) strlen((a)) +#define strnlen_PF(src, len) strnlen((src), (len)) +#define memcpy_PF(dest, src, len) memcpy((dest), (src), (len)) +#define strcpy_PF(dest, src) strcpy((dest), (src)) +#define strncpy_PF(dest, src, len) strncpy((dest), (src), (len)) +#define strcat_PF(dest, src) strcat((dest), (src)) +#define strlcat_PF(dest, src, len) strlcat((dest), (src), (len)) +#define strncat_PF(dest, src, len) strncat((dest), (src), (len)) +#define strcmp_PF(s1, s2) strcmp((s1), (s2)) +#define strncmp_PF(s1, s2, n) strncmp((s1), (s2), (n)) +#define strcasecmp_PF(s1, s2) strcasecmp((s1), (s2)) +#define strncasecmp_PF(s1, s2, n) strncasecmp((s1), (s2), (n)) +#define strstr_PF(s1, s2) strstr((s1), (s2)) +#define strlcpy_PF(dest, src, n) strlcpy((dest), (src), (n)) +#define memcmp_PF(s1, s2, n) memcmp((s1), (s2), (n)) + +#define sprintf_P(s, f, ...) sprintf((s), (f), __VA_ARGS__) +#define snprintf_P(s, f, ...) snprintf((s), (f), __VA_ARGS__) + +#define pgm_read_byte(addr) (*(const unsigned char *)(addr)) +#define pgm_read_word(addr) (*(const unsigned short *)(addr)) +#define pgm_read_dword(addr) (*(const unsigned long *)(addr)) +#define pgm_read_float(addr) (*(const float *)(addr)) +#define pgm_read_ptr(addr) (*(const void **)(addr)) + +#define pgm_read_byte_near(addr) pgm_read_byte(addr) +#define pgm_read_word_near(addr) pgm_read_word(addr) +#define pgm_read_dword_near(addr) pgm_read_dword(addr) +#define pgm_read_float_near(addr) pgm_read_float(addr) +#define pgm_read_ptr_near(addr) pgm_read_ptr(addr) + +#define pgm_read_byte_far(addr) pgm_read_byte(addr) +#define pgm_read_word_far(addr) pgm_read_word(addr) +#define pgm_read_dword_far(addr) pgm_read_dword(addr) +#define pgm_read_float_far(addr) pgm_read_float(addr) +#define pgm_read_ptr_far(addr) pgm_read_ptr(addr) + +#define pgm_get_far_address(addr) (&(addr)) + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.0.8/cores/arduino/avr/pgmspace.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.0.8/cores/arduino/avr/pgmspace.h new file mode 100644 index 0000000..bf87a94 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.0.8/cores/arduino/avr/pgmspace.h @@ -0,0 +1,122 @@ +/* + pgmspace.h - Definitions for compatibility with AVR pgmspace macros + + Copyright (c) 2015 Arduino LLC + + Based on work of Paul Stoffregen on Teensy 3 (http://pjrc.com) + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE +*/ + +#ifndef __PGMSPACE_H_ +#define __PGMSPACE_H_ 1 + +#include + +#define PROGMEM +#define PGM_P const char * +#define PSTR(str) (str) + +#define _SFR_BYTE(n) (n) + +typedef void prog_void; +typedef char prog_char; +typedef unsigned char prog_uchar; +typedef int8_t prog_int8_t; +typedef uint8_t prog_uint8_t; +typedef int16_t prog_int16_t; +typedef uint16_t prog_uint16_t; +typedef int32_t prog_int32_t; +typedef uint32_t prog_uint32_t; +typedef int64_t prog_int64_t; +typedef uint64_t prog_uint64_t; + +typedef const void* int_farptr_t; +typedef const void* uint_farptr_t; + +#define memchr_P(s, c, n) memchr((s), (c), (n)) +#define memcmp_P(s1, s2, n) memcmp((s1), (s2), (n)) +#define memccpy_P(dest, src, c, n) memccpy((dest), (src), (c), (n)) +#define memcpy_P(dest, src, n) memcpy((dest), (src), (n)) +#define memmem_P(haystack, haystacklen, needle, needlelen) memmem((haystack), (haystacklen), (needle), (needlelen)) +#define memrchr_P(s, c, n) memrchr((s), (c), (n)) +#define strcat_P(dest, src) strcat((dest), (src)) +#define strchr_P(s, c) strchr((s), (c)) +#define strchrnul_P(s, c) strchrnul((s), (c)) +#define strcmp_P(a, b) strcmp((a), (b)) +#define strcpy_P(dest, src) strcpy((dest), (src)) +#define strcasecmp_P(s1, s2) strcasecmp((s1), (s2)) +#define strcasestr_P(haystack, needle) strcasestr((haystack), (needle)) +#define strcspn_P(s, accept) strcspn((s), (accept)) +#define strlcat_P(s1, s2, n) strlcat((s1), (s2), (n)) +#define strlcpy_P(s1, s2, n) strlcpy((s1), (s2), (n)) +#define strlen_P(a) strlen((a)) +#define strnlen_P(s, n) strnlen((s), (n)) +#define strncmp_P(s1, s2, n) strncmp((s1), (s2), (n)) +#define strncasecmp_P(s1, s2, n) strncasecmp((s1), (s2), (n)) +#define strncat_P(s1, s2, n) strncat((s1), (s2), (n)) +#define strncpy_P(s1, s2, n) strncpy((s1), (s2), (n)) +#define strpbrk_P(s, accept) strpbrk((s), (accept)) +#define strrchr_P(s, c) strrchr((s), (c)) +#define strsep_P(sp, delim) strsep((sp), (delim)) +#define strspn_P(s, accept) strspn((s), (accept)) +#define strstr_P(a, b) strstr((a), (b)) +#define strtok_P(s, delim) strtok((s), (delim)) +#define strtok_rP(s, delim, last) strtok((s), (delim), (last)) + +#define strlen_PF(a) strlen((a)) +#define strnlen_PF(src, len) strnlen((src), (len)) +#define memcpy_PF(dest, src, len) memcpy((dest), (src), (len)) +#define strcpy_PF(dest, src) strcpy((dest), (src)) +#define strncpy_PF(dest, src, len) strncpy((dest), (src), (len)) +#define strcat_PF(dest, src) strcat((dest), (src)) +#define strlcat_PF(dest, src, len) strlcat((dest), (src), (len)) +#define strncat_PF(dest, src, len) strncat((dest), (src), (len)) +#define strcmp_PF(s1, s2) strcmp((s1), (s2)) +#define strncmp_PF(s1, s2, n) strncmp((s1), (s2), (n)) +#define strcasecmp_PF(s1, s2) strcasecmp((s1), (s2)) +#define strncasecmp_PF(s1, s2, n) strncasecmp((s1), (s2), (n)) +#define strstr_PF(s1, s2) strstr((s1), (s2)) +#define strlcpy_PF(dest, src, n) strlcpy((dest), (src), (n)) +#define memcmp_PF(s1, s2, n) memcmp((s1), (s2), (n)) + +#define sprintf_P(s, f, ...) sprintf((s), (f), __VA_ARGS__) +#define snprintf_P(s, f, ...) snprintf((s), (f), __VA_ARGS__) + +#define pgm_read_byte(addr) (*(const unsigned char *)(addr)) +#define pgm_read_word(addr) (*(const unsigned short *)(addr)) +#define pgm_read_dword(addr) (*(const unsigned long *)(addr)) +#define pgm_read_float(addr) (*(const float *)(addr)) +#define pgm_read_ptr(addr) (*(const void **)(addr)) + +#define pgm_read_byte_near(addr) pgm_read_byte(addr) +#define pgm_read_word_near(addr) pgm_read_word(addr) +#define pgm_read_dword_near(addr) pgm_read_dword(addr) +#define pgm_read_float_near(addr) pgm_read_float(addr) +#define pgm_read_ptr_near(addr) pgm_read_ptr(addr) + +#define pgm_read_byte_far(addr) pgm_read_byte(addr) +#define pgm_read_word_far(addr) pgm_read_word(addr) +#define pgm_read_dword_far(addr) pgm_read_dword(addr) +#define pgm_read_float_far(addr) pgm_read_float(addr) +#define pgm_read_ptr_far(addr) pgm_read_ptr(addr) + +#define pgm_get_far_address(addr) (&(addr)) + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.1.0/cores/arduino/avr/pgmspace.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.1.0/cores/arduino/avr/pgmspace.h new file mode 100644 index 0000000..bf87a94 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.1.0/cores/arduino/avr/pgmspace.h @@ -0,0 +1,122 @@ +/* + pgmspace.h - Definitions for compatibility with AVR pgmspace macros + + Copyright (c) 2015 Arduino LLC + + Based on work of Paul Stoffregen on Teensy 3 (http://pjrc.com) + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE +*/ + +#ifndef __PGMSPACE_H_ +#define __PGMSPACE_H_ 1 + +#include + +#define PROGMEM +#define PGM_P const char * +#define PSTR(str) (str) + +#define _SFR_BYTE(n) (n) + +typedef void prog_void; +typedef char prog_char; +typedef unsigned char prog_uchar; +typedef int8_t prog_int8_t; +typedef uint8_t prog_uint8_t; +typedef int16_t prog_int16_t; +typedef uint16_t prog_uint16_t; +typedef int32_t prog_int32_t; +typedef uint32_t prog_uint32_t; +typedef int64_t prog_int64_t; +typedef uint64_t prog_uint64_t; + +typedef const void* int_farptr_t; +typedef const void* uint_farptr_t; + +#define memchr_P(s, c, n) memchr((s), (c), (n)) +#define memcmp_P(s1, s2, n) memcmp((s1), (s2), (n)) +#define memccpy_P(dest, src, c, n) memccpy((dest), (src), (c), (n)) +#define memcpy_P(dest, src, n) memcpy((dest), (src), (n)) +#define memmem_P(haystack, haystacklen, needle, needlelen) memmem((haystack), (haystacklen), (needle), (needlelen)) +#define memrchr_P(s, c, n) memrchr((s), (c), (n)) +#define strcat_P(dest, src) strcat((dest), (src)) +#define strchr_P(s, c) strchr((s), (c)) +#define strchrnul_P(s, c) strchrnul((s), (c)) +#define strcmp_P(a, b) strcmp((a), (b)) +#define strcpy_P(dest, src) strcpy((dest), (src)) +#define strcasecmp_P(s1, s2) strcasecmp((s1), (s2)) +#define strcasestr_P(haystack, needle) strcasestr((haystack), (needle)) +#define strcspn_P(s, accept) strcspn((s), (accept)) +#define strlcat_P(s1, s2, n) strlcat((s1), (s2), (n)) +#define strlcpy_P(s1, s2, n) strlcpy((s1), (s2), (n)) +#define strlen_P(a) strlen((a)) +#define strnlen_P(s, n) strnlen((s), (n)) +#define strncmp_P(s1, s2, n) strncmp((s1), (s2), (n)) +#define strncasecmp_P(s1, s2, n) strncasecmp((s1), (s2), (n)) +#define strncat_P(s1, s2, n) strncat((s1), (s2), (n)) +#define strncpy_P(s1, s2, n) strncpy((s1), (s2), (n)) +#define strpbrk_P(s, accept) strpbrk((s), (accept)) +#define strrchr_P(s, c) strrchr((s), (c)) +#define strsep_P(sp, delim) strsep((sp), (delim)) +#define strspn_P(s, accept) strspn((s), (accept)) +#define strstr_P(a, b) strstr((a), (b)) +#define strtok_P(s, delim) strtok((s), (delim)) +#define strtok_rP(s, delim, last) strtok((s), (delim), (last)) + +#define strlen_PF(a) strlen((a)) +#define strnlen_PF(src, len) strnlen((src), (len)) +#define memcpy_PF(dest, src, len) memcpy((dest), (src), (len)) +#define strcpy_PF(dest, src) strcpy((dest), (src)) +#define strncpy_PF(dest, src, len) strncpy((dest), (src), (len)) +#define strcat_PF(dest, src) strcat((dest), (src)) +#define strlcat_PF(dest, src, len) strlcat((dest), (src), (len)) +#define strncat_PF(dest, src, len) strncat((dest), (src), (len)) +#define strcmp_PF(s1, s2) strcmp((s1), (s2)) +#define strncmp_PF(s1, s2, n) strncmp((s1), (s2), (n)) +#define strcasecmp_PF(s1, s2) strcasecmp((s1), (s2)) +#define strncasecmp_PF(s1, s2, n) strncasecmp((s1), (s2), (n)) +#define strstr_PF(s1, s2) strstr((s1), (s2)) +#define strlcpy_PF(dest, src, n) strlcpy((dest), (src), (n)) +#define memcmp_PF(s1, s2, n) memcmp((s1), (s2), (n)) + +#define sprintf_P(s, f, ...) sprintf((s), (f), __VA_ARGS__) +#define snprintf_P(s, f, ...) snprintf((s), (f), __VA_ARGS__) + +#define pgm_read_byte(addr) (*(const unsigned char *)(addr)) +#define pgm_read_word(addr) (*(const unsigned short *)(addr)) +#define pgm_read_dword(addr) (*(const unsigned long *)(addr)) +#define pgm_read_float(addr) (*(const float *)(addr)) +#define pgm_read_ptr(addr) (*(const void **)(addr)) + +#define pgm_read_byte_near(addr) pgm_read_byte(addr) +#define pgm_read_word_near(addr) pgm_read_word(addr) +#define pgm_read_dword_near(addr) pgm_read_dword(addr) +#define pgm_read_float_near(addr) pgm_read_float(addr) +#define pgm_read_ptr_near(addr) pgm_read_ptr(addr) + +#define pgm_read_byte_far(addr) pgm_read_byte(addr) +#define pgm_read_word_far(addr) pgm_read_word(addr) +#define pgm_read_dword_far(addr) pgm_read_dword(addr) +#define pgm_read_float_far(addr) pgm_read_float(addr) +#define pgm_read_ptr_far(addr) pgm_read_ptr(addr) + +#define pgm_get_far_address(addr) (&(addr)) + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.1.1/cores/arduino/avr/pgmspace.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.1.1/cores/arduino/avr/pgmspace.h new file mode 100644 index 0000000..bf87a94 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.1.1/cores/arduino/avr/pgmspace.h @@ -0,0 +1,122 @@ +/* + pgmspace.h - Definitions for compatibility with AVR pgmspace macros + + Copyright (c) 2015 Arduino LLC + + Based on work of Paul Stoffregen on Teensy 3 (http://pjrc.com) + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE +*/ + +#ifndef __PGMSPACE_H_ +#define __PGMSPACE_H_ 1 + +#include + +#define PROGMEM +#define PGM_P const char * +#define PSTR(str) (str) + +#define _SFR_BYTE(n) (n) + +typedef void prog_void; +typedef char prog_char; +typedef unsigned char prog_uchar; +typedef int8_t prog_int8_t; +typedef uint8_t prog_uint8_t; +typedef int16_t prog_int16_t; +typedef uint16_t prog_uint16_t; +typedef int32_t prog_int32_t; +typedef uint32_t prog_uint32_t; +typedef int64_t prog_int64_t; +typedef uint64_t prog_uint64_t; + +typedef const void* int_farptr_t; +typedef const void* uint_farptr_t; + +#define memchr_P(s, c, n) memchr((s), (c), (n)) +#define memcmp_P(s1, s2, n) memcmp((s1), (s2), (n)) +#define memccpy_P(dest, src, c, n) memccpy((dest), (src), (c), (n)) +#define memcpy_P(dest, src, n) memcpy((dest), (src), (n)) +#define memmem_P(haystack, haystacklen, needle, needlelen) memmem((haystack), (haystacklen), (needle), (needlelen)) +#define memrchr_P(s, c, n) memrchr((s), (c), (n)) +#define strcat_P(dest, src) strcat((dest), (src)) +#define strchr_P(s, c) strchr((s), (c)) +#define strchrnul_P(s, c) strchrnul((s), (c)) +#define strcmp_P(a, b) strcmp((a), (b)) +#define strcpy_P(dest, src) strcpy((dest), (src)) +#define strcasecmp_P(s1, s2) strcasecmp((s1), (s2)) +#define strcasestr_P(haystack, needle) strcasestr((haystack), (needle)) +#define strcspn_P(s, accept) strcspn((s), (accept)) +#define strlcat_P(s1, s2, n) strlcat((s1), (s2), (n)) +#define strlcpy_P(s1, s2, n) strlcpy((s1), (s2), (n)) +#define strlen_P(a) strlen((a)) +#define strnlen_P(s, n) strnlen((s), (n)) +#define strncmp_P(s1, s2, n) strncmp((s1), (s2), (n)) +#define strncasecmp_P(s1, s2, n) strncasecmp((s1), (s2), (n)) +#define strncat_P(s1, s2, n) strncat((s1), (s2), (n)) +#define strncpy_P(s1, s2, n) strncpy((s1), (s2), (n)) +#define strpbrk_P(s, accept) strpbrk((s), (accept)) +#define strrchr_P(s, c) strrchr((s), (c)) +#define strsep_P(sp, delim) strsep((sp), (delim)) +#define strspn_P(s, accept) strspn((s), (accept)) +#define strstr_P(a, b) strstr((a), (b)) +#define strtok_P(s, delim) strtok((s), (delim)) +#define strtok_rP(s, delim, last) strtok((s), (delim), (last)) + +#define strlen_PF(a) strlen((a)) +#define strnlen_PF(src, len) strnlen((src), (len)) +#define memcpy_PF(dest, src, len) memcpy((dest), (src), (len)) +#define strcpy_PF(dest, src) strcpy((dest), (src)) +#define strncpy_PF(dest, src, len) strncpy((dest), (src), (len)) +#define strcat_PF(dest, src) strcat((dest), (src)) +#define strlcat_PF(dest, src, len) strlcat((dest), (src), (len)) +#define strncat_PF(dest, src, len) strncat((dest), (src), (len)) +#define strcmp_PF(s1, s2) strcmp((s1), (s2)) +#define strncmp_PF(s1, s2, n) strncmp((s1), (s2), (n)) +#define strcasecmp_PF(s1, s2) strcasecmp((s1), (s2)) +#define strncasecmp_PF(s1, s2, n) strncasecmp((s1), (s2), (n)) +#define strstr_PF(s1, s2) strstr((s1), (s2)) +#define strlcpy_PF(dest, src, n) strlcpy((dest), (src), (n)) +#define memcmp_PF(s1, s2, n) memcmp((s1), (s2), (n)) + +#define sprintf_P(s, f, ...) sprintf((s), (f), __VA_ARGS__) +#define snprintf_P(s, f, ...) snprintf((s), (f), __VA_ARGS__) + +#define pgm_read_byte(addr) (*(const unsigned char *)(addr)) +#define pgm_read_word(addr) (*(const unsigned short *)(addr)) +#define pgm_read_dword(addr) (*(const unsigned long *)(addr)) +#define pgm_read_float(addr) (*(const float *)(addr)) +#define pgm_read_ptr(addr) (*(const void **)(addr)) + +#define pgm_read_byte_near(addr) pgm_read_byte(addr) +#define pgm_read_word_near(addr) pgm_read_word(addr) +#define pgm_read_dword_near(addr) pgm_read_dword(addr) +#define pgm_read_float_near(addr) pgm_read_float(addr) +#define pgm_read_ptr_near(addr) pgm_read_ptr(addr) + +#define pgm_read_byte_far(addr) pgm_read_byte(addr) +#define pgm_read_word_far(addr) pgm_read_word(addr) +#define pgm_read_dword_far(addr) pgm_read_dword(addr) +#define pgm_read_float_far(addr) pgm_read_float(addr) +#define pgm_read_ptr_far(addr) pgm_read_ptr(addr) + +#define pgm_get_far_address(addr) (&(addr)) + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.1.2/cores/arduino/avr/pgmspace.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.1.2/cores/arduino/avr/pgmspace.h new file mode 100644 index 0000000..bf87a94 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/realtek/hardware/AmebaD/3.1.2/cores/arduino/avr/pgmspace.h @@ -0,0 +1,122 @@ +/* + pgmspace.h - Definitions for compatibility with AVR pgmspace macros + + Copyright (c) 2015 Arduino LLC + + Based on work of Paul Stoffregen on Teensy 3 (http://pjrc.com) + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE +*/ + +#ifndef __PGMSPACE_H_ +#define __PGMSPACE_H_ 1 + +#include + +#define PROGMEM +#define PGM_P const char * +#define PSTR(str) (str) + +#define _SFR_BYTE(n) (n) + +typedef void prog_void; +typedef char prog_char; +typedef unsigned char prog_uchar; +typedef int8_t prog_int8_t; +typedef uint8_t prog_uint8_t; +typedef int16_t prog_int16_t; +typedef uint16_t prog_uint16_t; +typedef int32_t prog_int32_t; +typedef uint32_t prog_uint32_t; +typedef int64_t prog_int64_t; +typedef uint64_t prog_uint64_t; + +typedef const void* int_farptr_t; +typedef const void* uint_farptr_t; + +#define memchr_P(s, c, n) memchr((s), (c), (n)) +#define memcmp_P(s1, s2, n) memcmp((s1), (s2), (n)) +#define memccpy_P(dest, src, c, n) memccpy((dest), (src), (c), (n)) +#define memcpy_P(dest, src, n) memcpy((dest), (src), (n)) +#define memmem_P(haystack, haystacklen, needle, needlelen) memmem((haystack), (haystacklen), (needle), (needlelen)) +#define memrchr_P(s, c, n) memrchr((s), (c), (n)) +#define strcat_P(dest, src) strcat((dest), (src)) +#define strchr_P(s, c) strchr((s), (c)) +#define strchrnul_P(s, c) strchrnul((s), (c)) +#define strcmp_P(a, b) strcmp((a), (b)) +#define strcpy_P(dest, src) strcpy((dest), (src)) +#define strcasecmp_P(s1, s2) strcasecmp((s1), (s2)) +#define strcasestr_P(haystack, needle) strcasestr((haystack), (needle)) +#define strcspn_P(s, accept) strcspn((s), (accept)) +#define strlcat_P(s1, s2, n) strlcat((s1), (s2), (n)) +#define strlcpy_P(s1, s2, n) strlcpy((s1), (s2), (n)) +#define strlen_P(a) strlen((a)) +#define strnlen_P(s, n) strnlen((s), (n)) +#define strncmp_P(s1, s2, n) strncmp((s1), (s2), (n)) +#define strncasecmp_P(s1, s2, n) strncasecmp((s1), (s2), (n)) +#define strncat_P(s1, s2, n) strncat((s1), (s2), (n)) +#define strncpy_P(s1, s2, n) strncpy((s1), (s2), (n)) +#define strpbrk_P(s, accept) strpbrk((s), (accept)) +#define strrchr_P(s, c) strrchr((s), (c)) +#define strsep_P(sp, delim) strsep((sp), (delim)) +#define strspn_P(s, accept) strspn((s), (accept)) +#define strstr_P(a, b) strstr((a), (b)) +#define strtok_P(s, delim) strtok((s), (delim)) +#define strtok_rP(s, delim, last) strtok((s), (delim), (last)) + +#define strlen_PF(a) strlen((a)) +#define strnlen_PF(src, len) strnlen((src), (len)) +#define memcpy_PF(dest, src, len) memcpy((dest), (src), (len)) +#define strcpy_PF(dest, src) strcpy((dest), (src)) +#define strncpy_PF(dest, src, len) strncpy((dest), (src), (len)) +#define strcat_PF(dest, src) strcat((dest), (src)) +#define strlcat_PF(dest, src, len) strlcat((dest), (src), (len)) +#define strncat_PF(dest, src, len) strncat((dest), (src), (len)) +#define strcmp_PF(s1, s2) strcmp((s1), (s2)) +#define strncmp_PF(s1, s2, n) strncmp((s1), (s2), (n)) +#define strcasecmp_PF(s1, s2) strcasecmp((s1), (s2)) +#define strncasecmp_PF(s1, s2, n) strncasecmp((s1), (s2), (n)) +#define strstr_PF(s1, s2) strstr((s1), (s2)) +#define strlcpy_PF(dest, src, n) strlcpy((dest), (src), (n)) +#define memcmp_PF(s1, s2, n) memcmp((s1), (s2), (n)) + +#define sprintf_P(s, f, ...) sprintf((s), (f), __VA_ARGS__) +#define snprintf_P(s, f, ...) snprintf((s), (f), __VA_ARGS__) + +#define pgm_read_byte(addr) (*(const unsigned char *)(addr)) +#define pgm_read_word(addr) (*(const unsigned short *)(addr)) +#define pgm_read_dword(addr) (*(const unsigned long *)(addr)) +#define pgm_read_float(addr) (*(const float *)(addr)) +#define pgm_read_ptr(addr) (*(const void **)(addr)) + +#define pgm_read_byte_near(addr) pgm_read_byte(addr) +#define pgm_read_word_near(addr) pgm_read_word(addr) +#define pgm_read_dword_near(addr) pgm_read_dword(addr) +#define pgm_read_float_near(addr) pgm_read_float(addr) +#define pgm_read_ptr_near(addr) pgm_read_ptr(addr) + +#define pgm_read_byte_far(addr) pgm_read_byte(addr) +#define pgm_read_word_far(addr) pgm_read_word(addr) +#define pgm_read_dword_far(addr) pgm_read_dword(addr) +#define pgm_read_float_far(addr) pgm_read_float(addr) +#define pgm_read_ptr_far(addr) pgm_read_ptr(addr) + +#define pgm_get_far_address(addr) (&(addr)) + +#endif diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.2.1/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.2.1/platform.txt new file mode 100644 index 0000000..ab6423a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.2.1/platform.txt @@ -0,0 +1,146 @@ +# Copyright (c) 2021 Earle F. Philhower, III +# +# Raspberry Pi RP2040 Core platform file +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Raspberry Pi RP2040 Boards(1.2.1) +version=1.2.1 + + + + + + +compiler.path={runtime.tools.pqt-gcc.path}/bin/ + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra + +compiler.defines={build.led} +compiler.includes="-I{runtime.platform.path}/pico_base/" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_unique_id/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_platform/include/" "-I{runtime.platform.path}/pico-sdk/src/common/pico_base/include/" "-I{runtime.platform.path}/pico-sdk/src/rp2040/hardware_regs/include/" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_timer/include/" "-I{runtime.platform.path}/pico-sdk/src/common/pico_stdlib/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_gpio/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_i2c/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_flash/include" "-I{runtime.platform.path}/pico-sdk/src/common/pico_base/include" "-I{runtime.platform.path}/pico-examples/build/generated/pico_base" "-I{runtime.platform.path}/pico-sdk/src/boards/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_platform/include" "-I{runtime.platform.path}/pico-sdk/src/rp2040/hardware_regs/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_base/include" "-I{runtime.platform.path}/pico-sdk/src/rp2040/hardware_structs/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_claim/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_sync/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_uart/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_divider/include" "-I{runtime.platform.path}/pico-sdk/src/common/pico_time/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_timer/include" "-I{runtime.platform.path}/pico-sdk/src/common/pico_sync/include" "-I{runtime.platform.path}/pico-sdk/src/common/pico_util/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_runtime/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_clocks/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_resets/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_watchdog/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_xosc/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_pll/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_vreg/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_irq/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_printf/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_bootrom/include" "-I{runtime.platform.path}/pico-sdk/src/common/pico_bit_ops/include" "-I{runtime.platform.path}/pico-sdk/src/common/pico_divider/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_double/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_int64_ops/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_float/include" "-I{runtime.platform.path}/pico-sdk/src/common/pico_binary_info/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_pio/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_stdio/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_dma/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_stdio_uart/include" "-I{runtime.platform.path}/pico-sdk/src/rp2040/hardware_regs/include/" "-I{runtime.platform.path}/pico-sdk/lib/tinyusb/src/" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_stdio_usb/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_spi/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_pwm/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/hardware_adc/include" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_multicore/include" "-I{runtime.platform.path}/cores/rp2040/api/deprecated-avr-comp/" "-I{runtime.platform.path}/pico-sdk/src/rp2_common/pico_multicore/include" "-I{runtime.platform.path}/pico-extras/src/rp2_common/pico_audio_i2s/include" "-I{runtime.platform.path}/pico-extras/src/common/pico_audio/include" "-I{runtime.platform.path}/pico-extras/src/common/pico_util_buffer/include" +compiler.flags=-Os -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections +compiler.wrap=-Wl,--wrap=acos -Wl,--wrap=acosf -Wl,--wrap=acosh -Wl,--wrap=acoshf -Wl,--wrap=__aeabi_cdcmpeq -Wl,--wrap=__aeabi_cdcmple -Wl,--wrap=__aeabi_cdrcmple -Wl,--wrap=__aeabi_cfcmpeq -Wl,--wrap=__aeabi_cfcmple -Wl,--wrap=__aeabi_cfrcmple -Wl,--wrap=__aeabi_d2f -Wl,--wrap=__aeabi_d2iz -Wl,--wrap=__aeabi_d2lz -Wl,--wrap=__aeabi_d2uiz -Wl,--wrap=__aeabi_d2ulz -Wl,--wrap=__aeabi_dadd -Wl,--wrap=__aeabi_dcmpeq -Wl,--wrap=__aeabi_dcmpge -Wl,--wrap=__aeabi_dcmpgt -Wl,--wrap=__aeabi_dcmple -Wl,--wrap=__aeabi_dcmplt -Wl,--wrap=__aeabi_dcmpun -Wl,--wrap=__aeabi_ddiv -Wl,--wrap=__aeabi_dmul -Wl,--wrap=__aeabi_drsub -Wl,--wrap=__aeabi_dsub -Wl,--wrap=__aeabi_f2d -Wl,--wrap=__aeabi_f2iz -Wl,--wrap=__aeabi_f2lz -Wl,--wrap=__aeabi_f2uiz -Wl,--wrap=__aeabi_f2ulz -Wl,--wrap=__aeabi_fadd -Wl,--wrap=__aeabi_fcmpeq -Wl,--wrap=__aeabi_fcmpge -Wl,--wrap=__aeabi_fcmpgt -Wl,--wrap=__aeabi_fcmple -Wl,--wrap=__aeabi_fcmplt -Wl,--wrap=__aeabi_fcmpun -Wl,--wrap=__aeabi_fdiv -Wl,--wrap=__aeabi_fmul -Wl,--wrap=__aeabi_frsub -Wl,--wrap=__aeabi_fsub -Wl,--wrap=__aeabi_i2d -Wl,--wrap=__aeabi_i2f -Wl,--wrap=__aeabi_idiv -Wl,--wrap=__aeabi_idivmod -Wl,--wrap=__aeabi_l2d -Wl,--wrap=__aeabi_l2f -Wl,--wrap=__aeabi_ldivmod -Wl,--wrap=__aeabi_lmul -Wl,--wrap=__aeabi_memcpy -Wl,--wrap=__aeabi_memcpy4 -Wl,--wrap=__aeabi_memcpy8 -Wl,--wrap=__aeabi_memset -Wl,--wrap=__aeabi_memset4 -Wl,--wrap=__aeabi_memset8 -Wl,--wrap=__aeabi_ui2d -Wl,--wrap=__aeabi_ui2f -Wl,--wrap=__aeabi_uidiv -Wl,--wrap=__aeabi_uidivmod -Wl,--wrap=__aeabi_ul2d -Wl,--wrap=__aeabi_ul2f -Wl,--wrap=__aeabi_uldivmod -Wl,--wrap=asin -Wl,--wrap=asinf -Wl,--wrap=asinh -Wl,--wrap=asinhf -Wl,--wrap=atan -Wl,--wrap=atan2 -Wl,--wrap=atan2f -Wl,--wrap=atanf -Wl,--wrap=atanh -Wl,--wrap=atanhf -Wl,--wrap=calloc -Wl,--wrap=cbrt -Wl,--wrap=cbrtf -Wl,--wrap=ceil -Wl,--wrap=ceilf -Wl,--wrap=__clz -Wl,--wrap=__clzdi2 -Wl,--wrap=__clzl -Wl,--wrap=__clzll -Wl,--wrap=__clzsi2 -Wl,--wrap=copysign -Wl,--wrap=copysignf -Wl,--wrap=cos -Wl,--wrap=cosf -Wl,--wrap=cosh -Wl,--wrap=coshf -Wl,--wrap=__ctzdi2 -Wl,--wrap=__ctzsi2 -Wl,--wrap=drem -Wl,--wrap=dremf -Wl,--wrap=exp -Wl,--wrap=exp10 -Wl,--wrap=exp10f -Wl,--wrap=exp2 -Wl,--wrap=exp2f -Wl,--wrap=expf -Wl,--wrap=expm1 -Wl,--wrap=expm1f -Wl,--wrap=floor -Wl,--wrap=floorf -Wl,--wrap=fma -Wl,--wrap=fmaf -Wl,--wrap=fmod -Wl,--wrap=fmodf -Wl,--wrap=free -Wl,--wrap=hypot -Wl,--wrap=hypotf -Wl,--wrap=ldexp -Wl,--wrap=ldexpf -Wl,--wrap=log -Wl,--wrap=log10 -Wl,--wrap=log10f -Wl,--wrap=log1p -Wl,--wrap=log1pf -Wl,--wrap=log2 -Wl,--wrap=log2f -Wl,--wrap=logf -Wl,--wrap=malloc -Wl,--wrap=memcpy -Wl,--wrap=memset -Wl,--wrap=__popcountdi2 -Wl,--wrap=__popcountsi2 -Wl,--wrap=pow -Wl,--wrap=powf -Wl,--wrap=powint -Wl,--wrap=powintf -Wl,--wrap=remainder -Wl,--wrap=remainderf -Wl,--wrap=remquo -Wl,--wrap=remquof -Wl,--wrap=round -Wl,--wrap=roundf -Wl,--wrap=sin -Wl,--wrap=sincos -Wl,--wrap=sincosf -Wl,--wrap=sinf -Wl,--wrap=sinh -Wl,--wrap=sinhf -Wl,--wrap=sqrt -Wl,--wrap=sqrtf -Wl,--wrap=tan -Wl,--wrap=tanf -Wl,--wrap=tanh -Wl,--wrap=tanhf -Wl,--wrap=trunc -Wl,--wrap=truncf + +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-c {compiler.defines} {compiler.flags} {compiler.includes} -std=gnu17 -g +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags={compiler.defines} {compiler.flags} -Wl,--gc-sections -u _printf_float -u _scanf_float +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD {compiler.includes} -g +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-c {compiler.defines} {compiler.flags} {compiler.includes} -std=gnu++17 -g + + +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags={compiler.wrap} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +# Board configuration, set in boards.txt. Present here to ensure substitution works +build.flash_length= +build.eeprom_start= +build.fs_start= +build.fs_end= + +build.boot2=boot2_generic_03h_4_padded_checksum + +# Allow Pico boards do be auto-discovered by the IDE +discovery.rp2040.pattern="{runtime.tools.pqt-python3.path}/python3" "{runtime.platform.path}/tools/discovery.py" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.hooks.linking.prelink.1.pattern="{runtime.tools.pqt-python3.path}/python3" "{runtime.platform.path}/tools/simplesub.py" --input "{runtime.platform.path}/lib/memmap_default.ld" --out "{build.path}/memmap_default.ld" --sub __FLASH_LENGTH__ {build.flash_length} --sub __EEPROM_START__ {build.eeprom_start} --sub __FS_START__ {build.fs_start} --sub __FS_END__ {build.fs_end} +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-Wl,--script={build.path}/memmap_default.ld" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nosys.specs -Wl,--start-group {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "{runtime.platform.path}/lib/libpico.a" -lm "-I{runtime.platform.path}/pico-sdk/src/rp2040/hardware_regs/include/" "-I{runtime.platform.path}/pico-sdk/src/common/pico_binary_info/include" "{runtime.platform.path}/assembly/{build.boot2}.S" -lc -lstdc++ -Wl,--end-group + +## Create output (UF2 file) +recipe.objcopy.uf2.pattern="{runtime.tools.pqt-elf2uf2.path}/elf2uf2" "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.uf2" + +build.preferred_out_format=uf2 + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.boot2|\.text|\.rodata|\.ARM\.extab|\.ARM\.exidx)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss|\.ram_vector_table|\.uninitialized_data)\s+([0-9]+).* + +tools.uf2conv.path= +# Because the variable expansion doesn't allow one tool to find another, the following lines +# will point to "{runtime.platform.path}/tools/python3/python3" in GIT and +# "{runtime.tools.pqt-python3.path}/python3" for JSON board manager releases. +tools.uf2conv.cmd={runtime.tools.pqt-python3.path}/python3 + +tools.uf2conv.upload.protocol=uf2 +tools.uf2conv.upload.params.verbose= +tools.uf2conv.upload.params.quiet= +tools.uf2conv.upload.pattern="{cmd}" "{runtime.platform.path}/tools/uf2conv.py" --serial "{serial.port}" --family RP2040 --deploy "{build.path}/{build.project_name}.uf2" + + +tools.picoprobe.cmd={runtime.tools.pqt-openocd.path} + +tools.picoprobe.upload.protocol=picoprobe +tools.picoprobe.upload.params.verbose= +tools.picoprobe.upload.params.quiet= +tools.picoprobe.upload.pattern="{cmd}/bin/openocd" -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -s "{cmd}/share/openocd/scripts" -c "program {build.path}/{build.project_name}.elf verify reset exit" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.2.2/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.2.2/platform.txt new file mode 100644 index 0000000..0327aa0 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.2.2/platform.txt @@ -0,0 +1,145 @@ +# Copyright (c) 2021 Earle F. Philhower, III +# +# Raspberry Pi RP2040 Core platform file +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Raspberry Pi RP2040 Boards(1.2.2) +version=1.2.2 + + + + + + +compiler.path={runtime.tools.pqt-gcc.path}/bin/ + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra + +compiler.defines={build.led} +compiler.includes="-iprefix{runtime.platform.path}/" "@{runtime.platform.path}/lib/platform_inc.txt" +compiler.flags=-Os -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions +compiler.wrap="@{runtime.platform.path}/lib/platform_wrap.txt" + +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-c {compiler.defines} {compiler.flags} {compiler.includes} -std=gnu17 -g +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags={compiler.defines} {compiler.flags} -Wl,--gc-sections -u _printf_float -u _scanf_float +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD {compiler.includes} -g +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-c {compiler.defines} {compiler.flags} {compiler.includes} -fno-rtti -std=gnu++17 -g + +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags={compiler.wrap} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +# Board configuration, set in boards.txt. Present here to ensure substitution works +build.flash_length= +build.eeprom_start= +build.fs_start= +build.fs_end= + +build.boot2=boot2_generic_03h_4_padded_checksum + +# Allow Pico boards do be auto-discovered by the IDE +discovery.rp2040.pattern="{runtime.tools.pqt-python3.path}/python3" "{runtime.platform.path}/tools/discovery.py" + + +# Compile patterns +# ---------------- + +## Compile c files +## KH Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## KH Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## KH Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.hooks.linking.prelink.1.pattern="{runtime.tools.pqt-python3.path}/python3" "{runtime.platform.path}/tools/simplesub.py" --input "{runtime.platform.path}/lib/memmap_default.ld" --out "{build.path}/memmap_default.ld" --sub __FLASH_LENGTH__ {build.flash_length} --sub __EEPROM_START__ {build.eeprom_start} --sub __FS_START__ {build.fs_start} --sub __FS_END__ {build.fs_end} +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-Wl,--script={build.path}/memmap_default.ld" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nosys.specs -Wl,--start-group {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "{runtime.platform.path}/lib/libpico.a" -lm "-I{runtime.platform.path}/pico-sdk/src/rp2040/hardware_regs/include/" "-I{runtime.platform.path}/pico-sdk/src/common/pico_binary_info/include" "{runtime.platform.path}/assembly/{build.boot2}.S" -lc -lstdc++ -Wl,--end-group + +## Create output (UF2 file) +recipe.objcopy.uf2.pattern="{runtime.tools.pqt-elf2uf2.path}/elf2uf2" "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.uf2" + +build.preferred_out_format=uf2 + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.boot2|\.text|\.rodata|\.ARM\.extab|\.ARM\.exidx)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss|\.ram_vector_table|\.uninitialized_data)\s+([0-9]+).* + +tools.uf2conv.path= +# Because the variable expansion doesn't allow one tool to find another, the following lines +# will point to "{runtime.platform.path}/tools/python3/python3" in GIT and +# "{runtime.tools.pqt-python3.path}/python3" for JSON board manager releases. +tools.uf2conv.cmd={runtime.tools.pqt-python3.path}/python3 + +tools.uf2conv.upload.protocol=uf2 +tools.uf2conv.upload.params.verbose= +tools.uf2conv.upload.params.quiet= +tools.uf2conv.upload.pattern="{cmd}" "{runtime.platform.path}/tools/uf2conv.py" --serial "{serial.port}" --family RP2040 --deploy "{build.path}/{build.project_name}.uf2" + + +tools.picoprobe.cmd={runtime.tools.pqt-openocd.path} + +tools.picoprobe.upload.protocol=picoprobe +tools.picoprobe.upload.params.verbose= +tools.picoprobe.upload.params.quiet= +tools.picoprobe.upload.pattern="{cmd}/bin/openocd" -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -s "{cmd}/share/openocd/scripts" -c "program {build.path}/{build.project_name}.elf verify reset exit" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.3.0/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.3.0/platform.txt new file mode 100644 index 0000000..1629e8a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.3.0/platform.txt @@ -0,0 +1,145 @@ +# Copyright (c) 2021 Earle F. Philhower, III +# +# Raspberry Pi RP2040 Core platform file +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Raspberry Pi RP2040 Boards(1.3.0) +version=1.3.0 + + + + + + +compiler.path={runtime.tools.pqt-gcc.path}/bin/ + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra + +compiler.defines={build.led} +compiler.includes="-iprefix{runtime.platform.path}/" "@{runtime.platform.path}/lib/platform_inc.txt" +compiler.flags=-Os -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions +compiler.wrap="@{runtime.platform.path}/lib/platform_wrap.txt" + +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-c {compiler.defines} {compiler.flags} {compiler.includes} -std=gnu17 -g +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags={compiler.defines} {compiler.flags} -Wl,--gc-sections -u _printf_float -u _scanf_float +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD {compiler.includes} -g +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-c {compiler.defines} {compiler.flags} {compiler.includes} -fno-rtti -std=gnu++17 -g + +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags={compiler.wrap} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +# Board configuration, set in boards.txt. Present here to ensure substitution works +build.flash_length= +build.eeprom_start= +build.fs_start= +build.fs_end= + +build.boot2=boot2_generic_03h_4_padded_checksum + +# Allow Pico boards do be auto-discovered by the IDE +discovery.rp2040.pattern="{runtime.tools.pqt-python3.path}/python3" "{runtime.platform.path}/tools/discovery.py" + + +# Compile patterns +# ---------------- + +## Compile c files +## Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.hooks.linking.prelink.1.pattern="{runtime.tools.pqt-python3.path}/python3" "{runtime.platform.path}/tools/simplesub.py" --input "{runtime.platform.path}/lib/memmap_default.ld" --out "{build.path}/memmap_default.ld" --sub __FLASH_LENGTH__ {build.flash_length} --sub __EEPROM_START__ {build.eeprom_start} --sub __FS_START__ {build.fs_start} --sub __FS_END__ {build.fs_end} +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-Wl,--script={build.path}/memmap_default.ld" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nosys.specs -Wl,--start-group {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "{runtime.platform.path}/lib/libpico.a" -lm "-I{runtime.platform.path}/pico-sdk/src/rp2040/hardware_regs/include/" "-I{runtime.platform.path}/pico-sdk/src/common/pico_binary_info/include" "{runtime.platform.path}/assembly/{build.boot2}.S" -lc -lstdc++ -Wl,--end-group + +## Create output (UF2 file) +recipe.objcopy.uf2.pattern="{runtime.tools.pqt-elf2uf2.path}/elf2uf2" "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.uf2" + +build.preferred_out_format=uf2 + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.boot2|\.text|\.rodata|\.ARM\.extab|\.ARM\.exidx)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss|\.ram_vector_table|\.uninitialized_data)\s+([0-9]+).* + +tools.uf2conv.path= +# Because the variable expansion doesn't allow one tool to find another, the following lines +# will point to "{runtime.platform.path}/tools/python3/python3" in GIT and +# "{runtime.tools.pqt-python3.path}/python3" for JSON board manager releases. +tools.uf2conv.cmd={runtime.tools.pqt-python3.path}/python3 + +tools.uf2conv.upload.protocol=uf2 +tools.uf2conv.upload.params.verbose= +tools.uf2conv.upload.params.quiet= +tools.uf2conv.upload.pattern="{cmd}" "{runtime.platform.path}/tools/uf2conv.py" --serial "{serial.port}" --family RP2040 --deploy "{build.path}/{build.project_name}.uf2" + + +tools.picoprobe.cmd={runtime.tools.pqt-openocd.path} + +tools.picoprobe.upload.protocol=picoprobe +tools.picoprobe.upload.params.verbose= +tools.picoprobe.upload.params.quiet= +tools.picoprobe.upload.pattern="{cmd}/bin/openocd" -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -s "{cmd}/share/openocd/scripts" -c "program {build.path}/{build.project_name}.elf verify reset exit" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.3.1/cores/rp2040/Arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.3.1/cores/rp2040/Arduino.h new file mode 100644 index 0000000..99c1eb8 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.3.1/cores/rp2040/Arduino.h @@ -0,0 +1,115 @@ +/* + * Arduino header for the Raspberry Pi Pico RP2040 + * + * Copyright (c) 2021 Earle F. Philhower, III + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef Arduino_h +#define Arduino_h + +#include +#include +#include +// Wacky deprecated AVR compatibilty functions +#include "stdlib_noniso.h" + +#include "api/ArduinoAPI.h" +#include + + +// Required for the port*Register macros +#include "hardware/gpio.h" + +#include "debug_internal.h" + +#ifdef __cplusplus +extern "C"{ +#endif // __cplusplus + +// For compatibility to many platforms and libraries +#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L ) +#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() ) +#define microsecondsToClockCycles(a) ( (a) * clockCyclesPerMicrosecond() ) + +// Disable/reenable all interrupts. Safely handles nested disables +void interrupts(); +void noInterrupts(); + +// GPIO change/value interrupts +void attachInterrupt(pin_size_t pin, voidFuncPtr callback, PinStatus mode); +void detachInterrupt(pin_size_t pin); + +// AVR compatibilty macros...naughty and accesses the HW directly +#define digitalPinToPort(pin) (0) +#define digitalPinToBitMask(pin) (1UL << (pin)) +#define digitalPinToTimer(pin) (0) +#define digitalPinToInterrupt(pin) (pin) +#define NOT_AN_INTERRUPT (-1) +#define portOutputRegister(port) ((volatile uint32_t*) sio_hw->gpio_out) +#define portInputRegister(port) ((volatile uint32_t*) sio_hw->gpio_in) +#define portModeRegister(port) ((volatile uint32_t*) sio_hw->gpio_oe) + +// IO config +void pinMode(pin_size_t pinNumber, PinMode pinMode); + +// SIO (GPIO) +void digitalWrite(pin_size_t pinNumber, PinStatus status); +PinStatus digitalRead(pin_size_t pinNumber); + +// ADC +int analogRead(pin_size_t pinNumber); +float analogReadTemp(); // Returns core temp in Centigrade + +// PWM +void analogWrite(pin_size_t pinNumber, int value); +void analogWriteFreq(uint32_t freq); +void analogWriteRange(uint32_t range); +void analogWriteResolution(int res); + +// Timing +void delay(unsigned long); +void delayMicroseconds(unsigned int us); +unsigned long millis(); + +#ifdef __cplusplus +} // extern "C" +#endif + +// Ancient AVR defines +#define HAVE_HWSERIAL0 +#define HAVE_HWSERIAL1 +#define HAVE_HWSERIAL2 + +#ifdef __cplusplus +#include "SerialUSB.h" +#include "SerialUART.h" +#include "RP2040.h" +#include "Bootsel.h" + +// Template which will evaluate at *compile time* to a single 32b number +// with the specified bits set. +template +constexpr uint32_t __bitset(const int (&a)[N], size_t i = 0U) { + return i < N ? (1L << a[i]) | __bitset(a, i+1) : 0; +} +#endif + + +// ARM toolchain doesn't provide itoa etc, provide them +#include "api/itoa.h" + +#endif // Arduino_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.3.1/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.3.1/platform.txt new file mode 100644 index 0000000..e451260 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.3.1/platform.txt @@ -0,0 +1,145 @@ +# Copyright (c) 2021 Earle F. Philhower, III +# +# Raspberry Pi RP2040 Core platform file +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Raspberry Pi RP2040 Boards(1.3.1) +version=1.3.1 + + + + + + +compiler.path={runtime.tools.pqt-gcc.path}/bin/ + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra + +compiler.defines={build.led} +compiler.includes="-iprefix{runtime.platform.path}/" "@{runtime.platform.path}/lib/platform_inc.txt" +compiler.flags=-Os -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions +compiler.wrap="@{runtime.platform.path}/lib/platform_wrap.txt" + +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-c {compiler.defines} {compiler.flags} {compiler.includes} -std=gnu17 -g +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags={compiler.defines} {compiler.flags} -Wl,--gc-sections -u _printf_float -u _scanf_float +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD {compiler.includes} -g +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-c {compiler.defines} {compiler.flags} {compiler.includes} -fno-rtti -std=gnu++17 -g + +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags={compiler.wrap} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +# Board configuration, set in boards.txt. Present here to ensure substitution works +build.flash_length= +build.eeprom_start= +build.fs_start= +build.fs_end= + +build.boot2=boot2_generic_03h_4_padded_checksum + +# Allow Pico boards do be auto-discovered by the IDE +discovery.rp2040.pattern="{runtime.tools.pqt-python3.path}/python3" "{runtime.platform.path}/tools/discovery.py" + + +# Compile patterns +# ---------------- + +## Compile c files +## Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.hooks.linking.prelink.1.pattern="{runtime.tools.pqt-python3.path}/python3" "{runtime.platform.path}/tools/simplesub.py" --input "{runtime.platform.path}/lib/memmap_default.ld" --out "{build.path}/memmap_default.ld" --sub __FLASH_LENGTH__ {build.flash_length} --sub __EEPROM_START__ {build.eeprom_start} --sub __FS_START__ {build.fs_start} --sub __FS_END__ {build.fs_end} +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-Wl,--script={build.path}/memmap_default.ld" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nosys.specs -Wl,--start-group {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "{runtime.platform.path}/lib/libpico.a" -lm "-I{runtime.platform.path}/pico-sdk/src/rp2040/hardware_regs/include/" "-I{runtime.platform.path}/pico-sdk/src/common/pico_binary_info/include" "{runtime.platform.path}/assembly/{build.boot2}.S" -lc -lstdc++ -Wl,--end-group + +## Create output (UF2 file) +recipe.objcopy.uf2.pattern="{runtime.tools.pqt-elf2uf2.path}/elf2uf2" "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.uf2" + +build.preferred_out_format=uf2 + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.boot2|\.text|\.rodata|\.ARM\.extab|\.ARM\.exidx)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss|\.ram_vector_table|\.uninitialized_data)\s+([0-9]+).* + +tools.uf2conv.path= +# Because the variable expansion doesn't allow one tool to find another, the following lines +# will point to "{runtime.platform.path}/tools/python3/python3" in GIT and +# "{runtime.tools.pqt-python3.path}/python3" for JSON board manager releases. +tools.uf2conv.cmd={runtime.tools.pqt-python3.path}/python3 + +tools.uf2conv.upload.protocol=uf2 +tools.uf2conv.upload.params.verbose= +tools.uf2conv.upload.params.quiet= +tools.uf2conv.upload.pattern="{cmd}" "{runtime.platform.path}/tools/uf2conv.py" --serial "{serial.port}" --family RP2040 --deploy "{build.path}/{build.project_name}.uf2" + + +tools.picoprobe.cmd={runtime.tools.pqt-openocd.path} + +tools.picoprobe.upload.protocol=picoprobe +tools.picoprobe.upload.params.verbose= +tools.picoprobe.upload.params.quiet= +tools.picoprobe.upload.pattern="{cmd}/bin/openocd" -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -s "{cmd}/share/openocd/scripts" -c "program {build.path}/{build.project_name}.elf verify reset exit" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.4.0/cores/rp2040/Arduino.h b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.4.0/cores/rp2040/Arduino.h new file mode 100644 index 0000000..99c1eb8 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.4.0/cores/rp2040/Arduino.h @@ -0,0 +1,115 @@ +/* + * Arduino header for the Raspberry Pi Pico RP2040 + * + * Copyright (c) 2021 Earle F. Philhower, III + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef Arduino_h +#define Arduino_h + +#include +#include +#include +// Wacky deprecated AVR compatibilty functions +#include "stdlib_noniso.h" + +#include "api/ArduinoAPI.h" +#include + + +// Required for the port*Register macros +#include "hardware/gpio.h" + +#include "debug_internal.h" + +#ifdef __cplusplus +extern "C"{ +#endif // __cplusplus + +// For compatibility to many platforms and libraries +#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L ) +#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() ) +#define microsecondsToClockCycles(a) ( (a) * clockCyclesPerMicrosecond() ) + +// Disable/reenable all interrupts. Safely handles nested disables +void interrupts(); +void noInterrupts(); + +// GPIO change/value interrupts +void attachInterrupt(pin_size_t pin, voidFuncPtr callback, PinStatus mode); +void detachInterrupt(pin_size_t pin); + +// AVR compatibilty macros...naughty and accesses the HW directly +#define digitalPinToPort(pin) (0) +#define digitalPinToBitMask(pin) (1UL << (pin)) +#define digitalPinToTimer(pin) (0) +#define digitalPinToInterrupt(pin) (pin) +#define NOT_AN_INTERRUPT (-1) +#define portOutputRegister(port) ((volatile uint32_t*) sio_hw->gpio_out) +#define portInputRegister(port) ((volatile uint32_t*) sio_hw->gpio_in) +#define portModeRegister(port) ((volatile uint32_t*) sio_hw->gpio_oe) + +// IO config +void pinMode(pin_size_t pinNumber, PinMode pinMode); + +// SIO (GPIO) +void digitalWrite(pin_size_t pinNumber, PinStatus status); +PinStatus digitalRead(pin_size_t pinNumber); + +// ADC +int analogRead(pin_size_t pinNumber); +float analogReadTemp(); // Returns core temp in Centigrade + +// PWM +void analogWrite(pin_size_t pinNumber, int value); +void analogWriteFreq(uint32_t freq); +void analogWriteRange(uint32_t range); +void analogWriteResolution(int res); + +// Timing +void delay(unsigned long); +void delayMicroseconds(unsigned int us); +unsigned long millis(); + +#ifdef __cplusplus +} // extern "C" +#endif + +// Ancient AVR defines +#define HAVE_HWSERIAL0 +#define HAVE_HWSERIAL1 +#define HAVE_HWSERIAL2 + +#ifdef __cplusplus +#include "SerialUSB.h" +#include "SerialUART.h" +#include "RP2040.h" +#include "Bootsel.h" + +// Template which will evaluate at *compile time* to a single 32b number +// with the specified bits set. +template +constexpr uint32_t __bitset(const int (&a)[N], size_t i = 0U) { + return i < N ? (1L << a[i]) | __bitset(a, i+1) : 0; +} +#endif + + +// ARM toolchain doesn't provide itoa etc, provide them +#include "api/itoa.h" + +#endif // Arduino_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.4.0/platform.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.4.0/platform.txt new file mode 100644 index 0000000..1ea19c3 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/Packages_Patches/rp2040/hardware/rp2040/1.4.0/platform.txt @@ -0,0 +1,145 @@ +# Copyright (c) 2021 Earle F. Philhower, III +# +# Raspberry Pi RP2040 Core platform file +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# For more info: +# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +name=Raspberry Pi RP2040 Boards(1.4.0) +version=1.4.0 + + + + + + +compiler.path={runtime.tools.pqt-gcc.path}/bin/ + +# Compile variables +# ----------------- + +compiler.warning_flags=-w +compiler.warning_flags.none=-w +compiler.warning_flags.default= +compiler.warning_flags.more=-Wall +compiler.warning_flags.all=-Wall -Wextra + +compiler.defines={build.led} +compiler.includes="-iprefix{runtime.platform.path}/" "@{runtime.platform.path}/lib/platform_inc.txt" +compiler.flags=-Os -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions +compiler.wrap="@{runtime.platform.path}/lib/platform_wrap.txt" + +compiler.c.cmd=arm-none-eabi-gcc +compiler.c.flags=-c {compiler.defines} {compiler.flags} {compiler.includes} -std=gnu17 -g +compiler.c.elf.cmd=arm-none-eabi-g++ +compiler.c.elf.flags={compiler.defines} {compiler.flags} -Wl,--gc-sections -u _printf_float -u _scanf_float +compiler.S.cmd=arm-none-eabi-gcc +compiler.S.flags=-c -g -x assembler-with-cpp -MMD {compiler.includes} -g +compiler.cpp.cmd=arm-none-eabi-g++ +compiler.cpp.flags=-c {compiler.defines} {compiler.flags} {compiler.includes} -fno-rtti -std=gnu++17 -g + +compiler.ar.cmd=arm-none-eabi-ar +compiler.ar.flags=rcs +compiler.objcopy.cmd=arm-none-eabi-objcopy +compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 +compiler.elf2hex.bin.flags=-O binary +compiler.elf2hex.hex.flags=-O ihex -R .eeprom +compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.ldflags={compiler.wrap} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common +compiler.size.cmd=arm-none-eabi-size +compiler.define=-DARDUINO= +compiler.readelf.cmd=arm-none-eabi-readelf + +# this can be overriden in boards.txt +build.extra_flags= + +# These can be overridden in platform.local.txt +compiler.c.extra_flags= +compiler.c.elf.extra_flags= +compiler.cpp.extra_flags= +compiler.S.extra_flags= +compiler.ar.extra_flags= +compiler.elf2hex.extra_flags= + +# Board configuration, set in boards.txt. Present here to ensure substitution works +build.flash_length= +build.eeprom_start= +build.fs_start= +build.fs_end= + +build.boot2=boot2_generic_03h_4_padded_checksum + +# Allow Pico boards do be auto-discovered by the IDE +discovery.rp2040.pattern="{runtime.tools.pqt-python3.path}/python3" "{runtime.platform.path}/tools/discovery.py" + + +# Compile patterns +# ---------------- + +## Compile c files +## Add -DBOARD_NAME="{build.board}" +recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}" + +## Compile c++ files +## Add -DBOARD_NAME="{build.board}" +recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}" + +## Compile S files +## Add -DBOARD_NAME="{build.board}" +recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} {build.usbpid} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}" + +## Create archives +# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value +archive_file_path={build.path}/{archive_file} +recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + +## Combine gc-sections, archives, and objects +recipe.hooks.linking.prelink.1.pattern="{runtime.tools.pqt-python3.path}/python3" "{runtime.platform.path}/tools/simplesub.py" --input "{runtime.platform.path}/lib/memmap_default.ld" --out "{build.path}/memmap_default.ld" --sub __FLASH_LENGTH__ {build.flash_length} --sub __EEPROM_START__ {build.eeprom_start} --sub __FS_START__ {build.fs_start} --sub __FS_END__ {build.fs_end} +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-Wl,--script={build.path}/memmap_default.ld" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nosys.specs -Wl,--as-needed -Wl,--start-group {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" -Wl,--whole-archive "{runtime.platform.path}/lib/libpico.a" -Wl,--no-whole-archive -lm "-I{runtime.platform.path}/pico-sdk/src/rp2040/hardware_regs/include/" "-I{runtime.platform.path}/pico-sdk/src/common/pico_binary_info/include" "{runtime.platform.path}/assembly/{build.boot2}.S" -lc -lstdc++ -Wl,--end-group + +## Create output (UF2 file) +recipe.objcopy.uf2.pattern="{runtime.tools.pqt-elf2uf2.path}/elf2uf2" "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.uf2" + +build.preferred_out_format=uf2 + +## Save hex +recipe.output.tmp_file={build.project_name}.{build.preferred_out_format} +recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format} + +## Compute size +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.boot2|\.text|\.rodata|\.ARM\.extab|\.ARM\.exidx)\s+([0-9]+).* +recipe.size.regex.data=^(?:\.data|\.bss|\.ram_vector_table|\.uninitialized_data)\s+([0-9]+).* + +tools.uf2conv.path= +# Because the variable expansion doesn't allow one tool to find another, the following lines +# will point to "{runtime.platform.path}/tools/python3/python3" in GIT and +# "{runtime.tools.pqt-python3.path}/python3" for JSON board manager releases. +tools.uf2conv.cmd={runtime.tools.pqt-python3.path}/python3 + +tools.uf2conv.upload.protocol=uf2 +tools.uf2conv.upload.params.verbose= +tools.uf2conv.upload.params.quiet= +tools.uf2conv.upload.pattern="{cmd}" "{runtime.platform.path}/tools/uf2conv.py" --serial "{serial.port}" --family RP2040 --deploy "{build.path}/{build.project_name}.uf2" + + +tools.picoprobe.cmd={runtime.tools.pqt-openocd.path} + +tools.picoprobe.upload.protocol=picoprobe +tools.picoprobe.upload.params.verbose= +tools.picoprobe.upload.params.quiet= +tools.picoprobe.upload.pattern="{cmd}/bin/openocd" -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -s "{cmd}/share/openocd/scripts" -c "program {build.path}/{build.project_name}.elf verify reset exit" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/README.md b/libraries/MySQL_MariaDB_Generic-1.7.2/README.md new file mode 100644 index 0000000..2d60f29 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/README.md @@ -0,0 +1,1966 @@ +## MySQL_MariaDB_Generic + +[![arduino-library-badge](https://www.ardu-badge.com/badge/MySQL_MariaDB_Generic.svg?)](https://www.ardu-badge.com/MySQL_MariaDB_Generic) +[![GitHub release](https://img.shields.io/github/release/khoih-prog/MySQL_MariaDB_Generic.svg)](https://github.com/khoih-prog/MySQL_MariaDB_Generic/releases) +[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/khoih-prog/MySQL_MariaDB_Generic/blob/master/LICENSE) +[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing) +[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/MySQL_MariaDB_Generic.svg)](http://github.com/khoih-prog/MySQL_MariaDB_Generic/issues) + +
Donate to my libraries using BuyMeACoffee + + +--- +--- + +## Table of Contents + +* [Important Change from v1.7.0](#Important-Change-from-v170) +* [Why do we need this MySQL_MariaDB_Generic library](#why-do-we-need-this-mysql_mariadb_generic-library) + * [Features](#features) + * [Currently supported Boards](#currently-supported-boards) + * [Currently supported WiFi shields/modules](#currently-supported-wifi-shieldsmodules) + * [Currently supported Ethernet shields/modules](#currently-supported-ethernet-shieldsmodules) +* [Changelog](changelog.md) +* [Prerequisites](#prerequisites) +* [Installation](#installation) + * [Use Arduino Library Manager](#use-arduino-library-manager) + * [Manual Install](#manual-install) + * [VS Code & PlatformIO](#vs-code--platformio) +* [HOWTO Fix `Multiple Definitions` Linker Error](#howto-fix-multiple-definitions-linker-error) +* [Packages' Patches](#packages-patches) + * [1. For Adafruit nRF52840 and nRF52832 boards](#1-for-adafruit-nRF52840-and-nRF52832-boards) + * [2. For Teensy boards](#2-for-teensy-boards) + * [3. For Arduino SAM DUE boards](#3-for-arduino-sam-due-boards) + * [4. For Arduino SAMD boards](#4-for-arduino-samd-boards) + * [For core version v1.8.10+](#for-core-version-v1810) + * [For core version v1.8.9-](#for-core-version-v189-) + * [5. For Adafruit SAMD boards](#5-for-adafruit-samd-boards) + * [6. For Seeeduino SAMD boards](#6-for-seeeduino-samd-boards) + * [7. For STM32 boards](#7-for-stm32-boards) + * [7.1. For STM32 boards to use LAN8720](#71-for-stm32-boards-to-use-lan8720) + * [7.2. For STM32 boards to use Serial1](#72-for-stm32-boards-to-use-serial1) + * [8. For RP2040-based boards using Earle Philhower arduino-pico core](#8-for-rp2040-based-boards-using-earle-philhower-arduino-pico-core) + * [8.1. To use BOARD_NAME](#81-to-use-board_name) + * [8.2. To avoid compile error relating to microsecondsToClockCycles](#82-to-avoid-compile-error-relating-to-microsecondstoclockcycles) + * [9. For Portenta_H7 boards using Arduino IDE in Linux](#9-for-portenta_h7-boards-using-arduino-ide-in-linux) + * [10. For RTL8720DN boards using AmebaD core](#10-for-rtl8720dn-boards-using-amebad-core) + * [11. For SAMD21 and SAMD51 boards using ArduinoCore-fab-sam core](#11-For-SAMD21-and-SAMD51-boards-using-ArduinoCore-fab-sam-core) + * [12. For Seeeduino RP2040 boards](#12-For-Seeeduino-RP2040-boards) +* [Libraries' Patches](#libraries-patches) + * [1. For application requiring 2K+ HTML page](#1-for-application-requiring-2k-html-page) + * [2. For Ethernet library](#2-for-ethernet-library) + * [3. For EthernetLarge library](#3-for-ethernetlarge-library) + * [4. For Etherne2 library](#4-for-ethernet2-library) + * [5. For Ethernet3 library](#5-for-ethernet3-library) + * [6. For UIPEthernet library](#6-for-uipethernet-library) + * [7. For fixing ESP32 compile error](#7-for-fixing-esp32-compile-error) + * [8. For fixing ESP8266 compile error](#8-for-fixing-esp8266-compile-error) +* [HOWTO Use analogRead() with ESP32 running WiFi and/or BlueTooth (BT/BLE)](#howto-use-analogread-with-esp32-running-wifi-andor-bluetooth-btble) + * [1. ESP32 has 2 ADCs, named ADC1 and ADC2](#1--esp32-has-2-adcs-named-adc1-and-adc2) + * [2. ESP32 ADCs functions](#2-esp32-adcs-functions) + * [3. ESP32 WiFi uses ADC2 for WiFi functions](#3-esp32-wifi-uses-adc2-for-wifi-functions) +* [Important Notes](#important-notes) +* [Basic Usage](#basic-usage) + * [ 1. To use Ethernet module/shield](#1-to-use-ethernet-moduleshield) + * [ 2. To use WiFi module/shield](#2-to-use-wifi-moduleshield) + * [ 3. To use WiFiNINA module/shield](#3-to-use-wifinina-moduleshield) +* [Examples](#examples) + * [For Ethernet module/shield](#for-ethernet-moduleshield) + * [For WiFi module/shield](#for-wifi-moduleshield) + * [For WiFiNINA module/shield](#for-wifinina-moduleshield) + * [For WT32_ETH01](#for-wt32_eth01) + * [For Teensy 4.1 NativeEthernet](#for-teensy-41-nativeethernet) + * [For Teensy 4.1 QNEthernet](#for-teensy-41-qnethernet) + * [For Portenta_H7 Ethernet](#For-Portenta_H7-Ethernet) + * [For Portenta_H7 WiFi](#For-Portenta_H7-WiFi) +* [Example Basic_Select](#example-Basic_Select) + * [1. File Basic_Select.ino](#1-file-Basic_Selectino) + * [2. File defines.h](#2-file-definesh) +* [Debug Terminal Output Samples](#debug-terminal-output-samples) + * [ 1. Query_Progmem on NRF52840_FEATHER using W5x00/Ethernet_Generic Library](#1-query_progmem-on-nrf52840_feather-using-w5x00Ethernet_Generic-library) + * [ 2. Complex_Select on NUCLEO_F767ZI using LAN8742A/STM32Ethernet Library](#2-complex_select-on-nucleo_f767zi-using-lan8742astm32ethernet-library) + * [ 3. Query_Results_WiFi on ITSYBITSY_M4](#3-query_results_wifi-on-itsybitsy_m4) + * [ 4. Basic_Select_WiFi on SEEED_XIAO_M0](#4-basic_select_wifi-on-seeed_xiao_m0) + * [ 5. Query_Results_WiFiNINA on SAMD_NANO_33_IOT](#5-query_results_wifinina-on-samd_nano_33_iot) + * [ 6. Connect_By_Hostname on SAM DUE using W5x00/Ethernet_Generic Library](#6-connect_by_hostname-on-sam-due-using-w5x00Ethernet_Generic-library) + * [ 7. Complex_Select on NRF52840_FEATHER using ENC28J60/UIPEthernet Library](#7-complex_select-on-nrf52840_feather-using-enc28j60uipethernet-library) + * [ 8. Complex_Select on NRF52840_FEATHER using ENC28J60/EthernetENC Library](#8-complex_select-on-nrf52840_feather-using-enc28j60ethernetenc-library) + * [ 9. Query_Progmem on NRF52840_FEATHER using ENC28J60/EthernetENC Library](#9-query_progmem-on-nrf52840_feather-using-enc28j60ethernetenc-library) + * [10. Basic_Insert_ESP on ESP8266_NODEMCU_ESP12E](#10-basic_insert_esp-on-esp8266_nodemcu_esp12e) + * [11. Basic_Insert_ESP on ESP32S2_DEV](#11-basic_insert_esp-on-esp32s2_dev) + * [12. Basic_Select_WiFiNINA on MBED NANO_RP2040_CONNECT](#12-basic_select_wifinina-on-mbed-nano_rp2040_connect) + * [13. Complex_Select on MBED RASPBERRY_PI_PICO using W5x00/Ethernet_Generic Library](#13-complex_select-on-mbed-raspberry_pi_pico-using-w5x00Ethernet_Generic-library) + * [14. Complex_Select on RASPBERRY_PI_PICO using W5x00/Ethernet_Generic Library](#14-complex_select-on-raspberry_pi_pico-using-w5x00Ethernet_Generic-library) + * [15. Complex_Select_WT32_ETH01 on WT32-ETH01](#15-complex_select_wt32_eth01-on-wt32-eth01) + * [16. Complex_Select on Teensy 4.1 with NativeEthernet](#16-complex_select-on-teensy-41-with-nativeethernet) + * [17. Complex_Select on Teensy 4.1 with QNEthernet](#17-complex_select-on-teensy-41-with-qnethernet) + * [18. Complex_Insert on PORTENTA_H7_M7 using Portenta_Ethernet](#18-Complex_Insert-on-PORTENTA_H7_M7-using-Portenta_Ethernet) + * [19. Complex_Select_WiFi on PORTENTA_H7_M7](#19-Complex_Select_WiFi-on-PORTENTA_H7_M7) +* [Debug](#debug) +* [Troubleshooting](#troubleshooting) +* [Issues](#issues) +* [TO DO](#to-do) +* [DONE](#done) +* [Contributions and Thanks](#contributions-and-thanks) +* [Contributing](#contributing) +* [License](#license) +* [Copyright](#copyright) + +--- +--- + +### Important Change from v1.7.0 + +Please have a look at [HOWTO Fix `Multiple Definitions` Linker Error](#howto-fix-multiple-definitions-linker-error) + + +--- +--- + +### Why do we need this [MySQL_MariaDB_Generic library](https://github.com/khoih-prog/MySQL_MariaDB_Generic) + +#### Features + +Have you ever wanted to connect your Arduino project to a database to either store the data you've collected or retrieve data saved to trigger events in your sketch? + +Well, now you can connect your Arduino project directly to a **MySQL / MariaDB server** without using an intermediate computer or a web-based or cloud-based service. Having direct access to a **MySQL / MariaDB database server** means you can store data acquired from your project as well as check values stored in tables on the server. + +This also means you can setup your own, local MySQL server to store your data further removing the need for Internet connectivity. If that is not an issue, you can still connect to and store data on a MySQL server via your network, Internet, or even in the cloud! + +This [**MySQL_MariaDB_Generic library**](https://github.com/khoih-prog/MySQL_MariaDB_Generic) will let you to do exactly that and more! + +This [**MySQL_MariaDB_Generic library**](https://github.com/khoih-prog/MySQL_MariaDB_Generic) is based on and modified from [**Dr. Charles Bell's MySQL_Connector_Arduino Library**](https://github.com/ChuckBell/MySQL_Connector_Arduino), to provide support to many more boards and shields, such as **Arduino SAMD21, Adafruit SAMD21/SAMD51, Seeeduino SAMD21/SAMD51, nRF52, STM32F/L/H/G/WB/MP1, Teensy, SAM DUE, AVR Mega, RP2040-based (Nano RP2040 Connect, RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040), Portenta_H7, etc. boards**. Those supported boards can be used with **ESP8266/ESP32’s WiFi, WiFiNINA, W5x00/ENC28J60/LAN8742A Ethernet, ESP8266/ESP32-AT, NativeEthernet/QNEthernet modules/shields, Portenta_H7 WiFi/Ethernet.** + +--- + +#### Currently supported Boards + +This [**MySQL_MariaDB_Generic** library](https://github.com/khoih-prog/MySQL_MariaDB_Generic) currently supports these following boards: + + 1. **nRF52 boards**, such as **AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B302_ublox, NINA_B112_ublox, etc.** + + 2. **SAMD21** + - Arduino SAMD21: ZERO, MKRs, NANO_33_IOT, etc. + - Adafruit SAMD21 (M0): ItsyBitsy M0, Feather M0, Feather M0 Express, Metro M0 Express, Circuit Playground Express, Trinket M0, PIRkey, Hallowing M0, Crickit M0, etc. + - Seeeduino: LoRaWAN, Zero, Femto M0, XIAO M0, Wio GPS Board, etc. + + 3. **SAMD51** + - Adafruit SAMD51 (M4): Metro M4, Grand Central M4, ItsyBitsy M4, Feather M4 Express, Trellis M4, Metro M4 AirLift Lite, MONSTER M4SK Express, Hallowing M4, etc. + - Seeeduino: Wio Terminal, Grove UI Wireless + + 4. **SAM DUE** + 5. **Teensy (4.1, 4.0, 3.6, 3.5, 3,2, 3.1, 3.0)** using either Ethernet, WiFi, or for Teensy 4.1 NativeEthernet/QNEthernet + 6. **STM32F/L/H/G/WB/MP1 boards (with 32+K Flash)** + - Nucleo-144 + - Nucleo-64 + - Discovery + - Generic STM32F0, STM32F1, STM32F2, STM32F3, STM32F4, STM32F7 (with 64+K Flash): x8 and up + - STM32L0, STM32L1, STM32L4, STM32L5 + - STM32G0, STM32G4 + - STM32H7 + - STM32WB + - STM32MP1 + - LoRa boards + - 3-D printer boards + - Generic Flight Controllers + - Midatronics boards + + 7. **ESP32** + 8. **ESP8266** + + 9. RP2040-based boards, such as **Nano_RP2040_Connect**, using [**Arduino mbed OS for Nano boards**](https://github.com/arduino/ArduinoCore-mbed). + +10. RP2040-based boards, such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, using [**Arduino-mbed RP2040** core](https://github.com/arduino/ArduinoCore-mbed) or [**Earle Philhower's arduino-pico** core](https://github.com/earlephilhower/arduino-pico). + +11. RP2040-based boards, such as **Seeed XIAO RP2040**, using **Seeeduino RP2040** core + +12. **WT32_ETH01 (ESP32 + LAN8720A)** + +13. **Portenta_H7** using either `Murata WiFi` or `Vision-shield Ethernet` + +--- + +#### Currently supported WiFi shields/modules + +1. WiFiNINA using [`WiFiNINA_Generic library`](https://github.com/khoih-prog/WiFiNINA_Generic) +2. WiFi101 using [`WiFi101 library`](https://github.com/arduino-libraries/WiFi101) +3. u-blox W101, W102 using [`WiFiNINA_Generic library`](https://github.com/khoih-prog/WiFiNINA_Generic) +4. ESP8266-AT command using [`WiFiEspAT library`](https://github.com/jandrassy/WiFiEspAT) +5. ESP8266/ESP32-AT command using [`ESP_AT_Lib library`](https://github.com/khoih-prog/ESP_AT_Lib) +6. **Portenta_H7 built-in Murata WiFi** + + +--- + +#### Currently supported Ethernet shields/modules + +1. W5x00 using [`Ethernet_Generic`](https://github.com/khoih-prog/Ethernet_Generic) library +2. W5x00 using [`Ethernet`](https://www.arduino.cc/en/Reference/Ethernet), [`EthernetLarge`](https://github.com/OPEnSLab-OSU/EthernetLarge), [`Ethernet2`](https://github.com/adafruit/Ethernet2) or [`Ethernet3`](https://github.com/sstaub/Ethernet3) library +3. ENC28J60 using [`EthernetENC`](https://github.com/jandrassy/EthernetENC) or [`UIPEthernet`](https://github.com/UIPEthernet/UIPEthernet) library +4. Teensy 4.1 built-in Ethernet using [`NativeEthernet`](https://github.com/vjmuzik/NativeEthernet) library +5. Teensy 4.1 built-in Ethernet using [`QNEthernet`](https://github.com/ssilverman/QNEthernet) library +6. Portenta_H7 Ethernet using [`Portenta_Ethernet`](https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/Ethernet) library + +

+ +

+ + +--- +--- + + +## Prerequisites + + 1. [`Arduino IDE 1.8.19+` for Arduino](https://github.com/arduino/Arduino). [![GitHub release](https://img.shields.io/github/release/arduino/Arduino.svg)](https://github.com/arduino/Arduino/releases/latest) + 2. [`ESP32 Core 2.0.2+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [![Latest release](https://img.shields.io/github/release/espressif/arduino-esp32.svg)](https://github.com/espressif/arduino-esp32/releases/latest/) + 3. [`ESP8266 Core 3.0.2+`](https://github.com/esp8266/Arduino) for ESP8266-based boards. [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/). + 4. [`Arduino AVR core 1.8.5+`](https://github.com/arduino/ArduinoCore-avr) for Arduino (Use Arduino Board Manager) for AVR boards. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-avr.svg)](https://github.com/arduino/ArduinoCore-avr/releases/latest) + 5. [`Teensy core v1.56+`](https://www.pjrc.com/teensy/td_download.html) for Teensy (4.1, 4.0, 3.6, 3.5, 3,2, 3.1, 3.0) boards. + 6. [`Arduino SAM DUE core v1.6.12+`](https://github.com/arduino/ArduinoCore-sam) for SAM DUE ARM Cortex-M3 boards. + 7. [`Arduino SAMD core 1.8.13+`](https://github.com/arduino/ArduinoCore-samd) for SAMD ARM Cortex-M0+ boards. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-samd.svg)](https://github.com/arduino/ArduinoCore-samd/releases/latest) + 8. [`Adafruit SAMD core 1.7.10+`](https://github.com/adafruit/ArduinoCore-samd) for SAMD ARM Cortex-M0+ and M4 boards (Nano 33 IoT, etc.). [![GitHub release](https://img.shields.io/github/release/adafruit/ArduinoCore-samd.svg)](https://github.com/adafruit/ArduinoCore-samd/releases/latest) + 9. [`Fab_SAM_Arduino core v1.16.18-alpha2+`](https://github.com/qbolsee/ArduinoCore-fab-sam) for SAMD21/SAMD51 boards. [![GitHub release](https://img.shields.io/github/release/qbolsee/ArduinoCore-fab-sam.svg)](https://github.com/qbolsee/ArduinoCore-fab-sam/releases/latest) +10. [`Seeeduino SAMD core 1.8.2+`](https://github.com/Seeed-Studio/ArduinoCore-samd) for SAMD21/SAMD51 boards (XIAO M0, Wio Terminal, etc.). [![Latest release](https://img.shields.io/github/release/Seeed-Studio/ArduinoCore-samd.svg)](https://github.com/Seeed-Studio/ArduinoCore-samd/releases/latest/) +11. [`Seeeduino RP2040 core 2.7.2+`](https://github.com/Seeed-Studio) for XIAO RP2040 boards. +12. [`Adafruit nRF52 v1.3.0+`](https://github.com/adafruit/Adafruit_nRF52_Arduino) for nRF52 boards such as Adafruit NRF52840_FEATHER, NRF52832_FEATHER, NRF52840_FEATHER_SENSE, NRF52840_ITSYBITSY, NRF52840_CIRCUITPLAY, NRF52840_CLUE, NRF52840_METRO, NRF52840_PCA10056, PARTICLE_XENON, **NINA_B302_ublox**, etc. [![GitHub release](https://img.shields.io/github/release/adafruit/Adafruit_nRF52_Arduino.svg)](https://github.com/adafruit/Adafruit_nRF52_Arduino/releases/latest) +13. [`Arduino Core for STM32 v2.2.0+`](https://github.com/stm32duino/Arduino_Core_STM32) for STM32F/L/H/G/WB/MP1 boards. [![GitHub release](https://img.shields.io/github/release/stm32duino/Arduino_Core_STM32.svg)](https://github.com/stm32duino/Arduino_Core_STM32/releases/latest) +14. [`Earle Philhower's arduino-pico core v1.13.1+`](https://github.com/earlephilhower/arduino-pico) for RP2040-based boards such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest) +15. [`Arduino mbed_rp2040 core 3.0.1+`](https://github.com/arduino/ArduinoCore-mbed) for Arduino (Use Arduino Board Manager) RP2040-based boards, such as RASPBERRY_PI_PICO. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-mbed.svg)](https://github.com/arduino/ArduinoCore-mbed/releases/latest) + + +16. [`WiFiNINA_Generic library v1.8.14-3+`](https://github.com/khoih-prog/WiFiNINA_Generic) for WiFiNINA. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/WiFiNINA_Generic.svg?)](https://www.ardu-badge.com/WiFiNINA_Generic). + +17. Depending on which Ethernet module/shield you're using : + - [`Ethernet_Generic library v2.0.1+`](https://github.com/khoih-prog/Ethernet_Generic) for W5100, W5200 and W5500/WIZ550io/WIZ850io/USR-ES1 with Wiznet W5500 chip. [![GitHub release](https://img.shields.io/github/release/khoih-prog/Ethernet_Generic.svg)](https://github.com/khoih-prog/Ethernet_Generic/releases/latest) + - [`EthernetENC library v2.0.2+`](https://github.com/jandrassy/EthernetENC) for ENC28J60. [![GitHub release](https://img.shields.io/github/release/jandrassy/EthernetENC.svg)](https://github.com/jandrassy/EthernetENC/releases/latest). **New and Better** + - [`UIPEthernet library v2.0.11+`](https://github.com/UIPEthernet/UIPEthernet) for ENC28J60. [![GitHub release](https://img.shields.io/github/release/UIPEthernet/UIPEthernet.svg)](https://github.com/UIPEthernet/UIPEthernet/releases/latest) + - [`STM32Ethernet library v1.2.0+`](https://github.com/stm32duino/STM32Ethernet) for built-in LAN8742A Ethernet on (Nucleo-144, Discovery). [![GitHub release](https://img.shields.io/github/release/stm32duino/STM32Ethernet.svg)](https://github.com/stm32duino/STM32Ethernet/releases/latest). To be used with [`LwIP library v2.1.2+`](https://github.com/stm32duino/LwIP). [![GitHub release](https://img.shields.io/github/release/stm32duino/LwIP.svg)](https://github.com/stm32duino/LwIP/releases/latest) + - [`NativeEthernetLarge library stable111+`](https://github.com/vjmuzik/NativeEthernet) for Teensy 4.1 built-in Ethernet. + - [`QNEthernet Library version v0.14.0+`](https://github.com/ssilverman/QNEthernet) for Teensy 4.1 built-in Ethernet. **New** + +18. [`WiFiEspAT library v1.3.2+`](https://github.com/jandrassy/WiFiEspAT) if necessary to use ESP8288/ESP32-AT shields. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/WiFiEspAT.svg?)](https://www.ardu-badge.com/WiFiEspAT). +19. [`ESP8266_AT_WebServer library v1.5.3+`](https://github.com/khoih-prog/ESP8266_AT_WebServer) if necessary to use ESP8288/ESP32-AT shields. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP8266_AT_WebServer.svg?)](https://www.ardu-badge.com/ESP8266_AT_WebServer). +20. [`ESP_AT_Lib library v1.4.1+`](https://github.com/khoih-prog/ESP_AT_Lib) if necessary to use ESP8288/ESP32-AT shields. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_AT_Lib.svg?)](https://www.ardu-badge.com/ESP_AT_Lib). +21. [`WebServer_WT32_ETH01 library v1.4.1+`](https://github.com/khoih-prog/WebServer_WT32_ETH01) to use WT32_ETH01 (ESP32 + LAN8720). To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/WebServer_WT32_ETH01.svg?)](https://www.ardu-badge.com/WebServer_WT32_ETH01). + +--- +--- + +## Installation + +### Use Arduino Library Manager +The best and easiest way is to use `Arduino Library Manager`. Search for `MySQL_MariaDB_Generic`, then select / install the latest version. +You can also use this link [![arduino-library-badge](https://www.ardu-badge.com/badge/MySQL_MariaDB_Generic.svg?)](https://www.ardu-badge.com/MySQL_MariaDB_Generic) for more detailed instructions. + +### Manual Install + +Another way to install is to: + +1. Navigate to [**MySQL_MariaDB_Generic**](https://github.com/khoih-prog/MySQL_MariaDB_Generic) page. +2. Download the latest release `MySQL_MariaDB_Generic-master.zip`. +3. Extract the zip file to `MySQL_MariaDB_Generic-master` directory +4. Copy whole `MySQL_MariaDB_Generic-master` folder to Arduino libraries' directory such as `~/Arduino/libraries/`. + +### VS Code & PlatformIO: + +1. Install [VS Code](https://code.visualstudio.com/) +2. Install [PlatformIO](https://platformio.org/platformio-ide) +3. Install [**MySQL_MariaDB_Generic** library](https://registry.platformio.org/libraries/khoih-prog/MySQL_MariaDB_Generic) by using [Library Manager](https://registry.platformio.org/libraries/khoih-prog/MySQL_MariaDB_Generic/installation). Search for **MySQL_MariaDB_Generic** in [Platform.io Author's Libraries](https://platformio.org/lib/search?query=author:%22Khoi%20Hoang%22) +4. Use included [platformio.ini](platformio/platformio.ini) file from examples to ensure that all dependent libraries will installed automatically. Please visit documentation for the other options and examples at [Project Configuration File](https://docs.platformio.org/page/projectconf.html) + + +--- +--- + +### HOWTO Fix `Multiple Definitions` Linker Error + +The current library implementation, using `xyz-Impl.h` instead of standard `xyz.cpp`, possibly creates certain `Multiple Definitions` Linker error in certain use cases. + +You can include this `.hpp` file + +``` +// Can be included as many times as necessary, without `Multiple Definitions` Linker Error +#include "MySQL_Generic.hpp" //https://github.com/khoih-prog/MySQL_Generic +``` + +in many files. But be sure to use the following `.h` file **in just 1 `.h`, `.cpp` or `.ino` file**, which must **not be included in any other file**, to avoid `Multiple Definitions` Linker Error + +``` +// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error +#include "MySQL_Generic.h" //https://github.com/khoih-prog/MySQL_Generic +``` + +Check the new [**multiFileProject_Ethernet** example](examples/Ethernet/multiFileProject_Ethernet) for a `HOWTO` demo. + +Have a look at the discussion in [Different behaviour using the src_cpp or src_h lib #80](https://github.com/khoih-prog/ESPAsync_WiFiManager/discussions/80) + + + +--- +--- + +### Packages' Patches + +#### 1. For Adafruit nRF52840 and nRF52832 boards + +**To be able to compile, run and automatically detect and display BOARD_NAME on nRF52840/nRF52832 boards**, you have to copy the whole [nRF52 Packages_Patches](Packages_Patches/adafruit/hardware/nrf52/1.3.0) directory into Adafruit nRF52 directory (~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0). + +Supposing the Adafruit nRF52 version is 1.3.0. These files must be copied into the directory: +- `~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/platform.txt` +- `~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/boards.txt` +- `~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Udp.h` +- `~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Print.h` +- `~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Print.cpp` +- `~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/variant.h` +- `~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/variant.cpp` +- `~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/variant.h` +- `~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/variant.cpp` +- **`~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Udp.h`** + +Whenever a new version is installed, remember to copy these files into the new version directory. For example, new version is x.yy.z +These files must be copied into the directory: + +- `~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/platform.txt` +- `~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/boards.txt` +- `~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/cores/nRF5/Udp.h` +- `~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/cores/nRF5/Print.h` +- `~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/cores/nRF5/Print.cpp` +- `~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/variants/NINA_B302_ublox/variant.h` +- `~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/variants/NINA_B302_ublox/variant.cpp` +- `~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/variants/NINA_B112_ublox/variant.h` +- `~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/variants/NINA_B112_ublox/variant.cpp` +- **`~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/cores/nRF5/Udp.h`** + +#### 2. For Teensy boards + + **To be able to compile and run on Teensy boards**, you have to copy the files in [**Packages_Patches for Teensy directory**](Packages_Patches/hardware/teensy/avr) into Teensy hardware directory (./arduino-1.8.19/hardware/teensy/avr/boards.txt). + +Supposing the Arduino version is 1.8.19. These files must be copied into the directory: + +- `./arduino-1.8.19/hardware/teensy/avr/boards.txt` +- `./arduino-1.8.19/hardware/teensy/avr/cores/teensy/Stream.h` +- `./arduino-1.8.19/hardware/teensy/avr/cores/teensy3/Stream.h` +- `./arduino-1.8.19/hardware/teensy/avr/cores/teensy4/Stream.h` + +Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz +These files must be copied into the directory: + +- `./arduino-x.yy.zz/hardware/teensy/avr/boards.txt` +- `./arduino-x.yy.zz/hardware/teensy/avr/cores/teensy/Stream.h` +- `./arduino-x.yy.zz/hardware/teensy/avr/cores/teensy3/Stream.h` +- `./arduino-x.yy.zz/hardware/teensy/avr/cores/teensy4/Stream.h` + +#### 3. For Arduino SAM DUE boards + + **To be able to compile and run on SAM DUE boards**, you have to copy the whole [SAM DUE](Packages_Patches/arduino/hardware/sam/1.6.12) directory into Arduino sam directory (~/.arduino15/packages/arduino/hardware/sam/1.6.12). + +Supposing the Arduino SAM core version is 1.6.12. This file must be copied into the directory: + +- `~/.arduino15/packages/arduino/hardware/sam/1.6.12/platform.txt` + +Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz +This file must be copied into the directory: + +- `~/.arduino15/packages/arduino/hardware/sam/x.yy.zz/platform.txt` + +#### 4. For Arduino SAMD boards + + ***To be able to compile, run and automatically detect and display BOARD_NAME on Arduino SAMD (Nano-33-IoT, etc) boards***, you have to copy the whole [Arduino SAMD Packages_Patches](Packages_Patches/arduino/hardware/samd/1.8.13) directory into Arduino SAMD directory (~/.arduino15/packages/arduino/hardware/samd/1.8.13). + +#### For core version v1.8.10+ + +Supposing the Arduino SAMD version is 1.8.13. Now only one file must be copied into the directory: + +- `~/.arduino15/packages/arduino/hardware/samd/1.8.13/platform.txt` + +Whenever a new version is installed, remember to copy this files into the new version directory. For example, new version is x.yy.zz + +This file must be copied into the directory: + +- `~/.arduino15/packages/arduino/hardware/samd/x.yy.zz/platform.txt` + +#### For core version v1.8.9- + +Supposing the Arduino SAMD version is 1.8.9. These files must be copied into the directory: + +- `~/.arduino15/packages/arduino/hardware/samd/1.8.9/platform.txt` +- ***`~/.arduino15/packages/arduino/hardware/samd/1.8.9/cores/arduino/Arduino.h`*** + +Whenever a new version is installed, remember to copy these files into the new version directory. For example, new version is x.yy.z + +These files must be copied into the directory: + +- `~/.arduino15/packages/arduino/hardware/samd/x.yy.z/platform.txt` +- ***`~/.arduino15/packages/arduino/hardware/samd/x.yy.z/cores/arduino/Arduino.h`*** + + This is mandatory to fix the ***notorious Arduino SAMD compiler error***. See [Improve Arduino compatibility with the STL (min and max macro)](https://github.com/arduino/ArduinoCore-samd/pull/399) + +``` + ...\arm-none-eabi\include\c++\7.2.1\bits\stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2 + min(const _Tp& __a, const _Tp& __b, _Compare __comp) +``` + +Whenever the above-mentioned compiler error issue is fixed with the new Arduino SAMD release, you don't need to copy the `Arduino.h` file anymore. + +#### 5. For Adafruit SAMD boards + + ***To be able to compile, run and automatically detect and display BOARD_NAME on Adafruit SAMD (Itsy-Bitsy M4, etc) boards***, you have to copy the whole [Adafruit SAMD Packages_Patches](Packages_Patches/adafruit/hardware/samd/1.7.9) directory into Adafruit samd directory (~/.arduino15/packages/adafruit/hardware/samd/1.7.9). + +Supposing the Adafruit SAMD core version is 1.7.9. This file must be copied into the directory: + +- `~/.arduino15/packages/adafruit/hardware/samd/1.7.9/platform.txt` +- `~/.arduino15/packages/adafruit/hardware/samd/1.7.9/cores/arduino/Print.h` +- `~/.arduino15/packages/adafruit/hardware/samd/1.7.9/cores/arduino/Print.cpp` + +Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz +This file must be copied into the directory: + +- `~/.arduino15/packages/adafruit/hardware/samd/x.yy.zz/platform.txt` +- `~/.arduino15/packages/adafruit/hardware/samd/x.yy.zz/cores/arduino/Print.h` +- `~/.arduino15/packages/adafruit/hardware/samd/x.yy.zz/cores/arduino/Print.cpp` + +#### 6. For Seeeduino SAMD boards + + ***To be able to compile, run and automatically detect and display BOARD_NAME on Seeeduino SAMD (XIAO M0, Wio Terminal, etc) boards***, you have to copy the whole [Seeeduino SAMD Packages_Patches](Packages_Patches/Seeeduino/hardware/samd/1.8.2) directory into Seeeduino samd directory (~/.arduino15/packages/Seeeduino/hardware/samd/1.8.2). + +Supposing the Seeeduino SAMD core version is 1.8.2. This file must be copied into the directory: + +- `~/.arduino15/packages/Seeeduino/hardware/samd/1.8.2/platform.txt` +- `~/.arduino15/packages/Seeeduino/hardware/samd/1.8.2/cores/arduino/Arduino.h` +- `~/.arduino15/packages/Seeeduino/hardware/samd/1.8.2/cores/arduino/Print.h` +- `~/.arduino15/packages/Seeeduino/hardware/samd/1.8.2/cores/arduino/Print.cpp` + +Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz +This file must be copied into the directory: + +- `~/.arduino15/packages/Seeeduino/hardware/samd/x.yy.zz/platform.txt` +- `~/.arduino15/packages/Seeeduino/hardware/samd/x.yy.zz/cores/arduino/Arduino.h` +- `~/.arduino15/packages/Seeeduino/hardware/samd/x.yy.zz/cores/arduino/Print.h` +- `~/.arduino15/packages/Seeeduino/hardware/samd/x.yy.zz/cores/arduino/Print.cpp` + +#### 7. For STM32 boards + +#### 7.1 For STM32 boards to use LAN8720 + +To use LAN8720 on some STM32 boards + +- **Nucleo-144 (F429ZI, NUCLEO_F746NG, NUCLEO_F746ZG, NUCLEO_F756ZG)** +- **Discovery (DISCO_F746NG)** +- **STM32F4 boards (BLACK_F407VE, BLACK_F407VG, BLACK_F407ZE, BLACK_F407ZG, BLACK_F407VE_Mini, DIYMORE_F407VGT, FK407M1)** + +you have to copy the files [stm32f4xx_hal_conf_default.h](Packages_Patches/STM32/hardware/stm32/2.2.0/system/STM32F4xx) and [stm32f7xx_hal_conf_default.h](Packages_Patches/STM32/hardware/stm32/2.2.0/system/STM32F7xx) into STM32 stm32 directory (~/.arduino15/packages/STM32/hardware/stm32/2.2.0/system) to overwrite the old files. + +Supposing the STM32 stm32 core version is 2.2.0. These files must be copied into the directory: + +- `~/.arduino15/packages/STM32/hardware/stm32/2.2.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h` for STM32F4. +- `~/.arduino15/packages/STM32/hardware/stm32/2.2.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h` for Nucleo-144 STM32F7. + +Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz, +theses files must be copied into the corresponding directory: + +- `~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/system/STM32F4xx/stm32f4xx_hal_conf_default.h` +- `~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/system/STM32F7xx/stm32f7xx_hal_conf_default.h + + +#### 7.2 For STM32 boards to use Serial1 + +**To use Serial1 on some STM32 boards without Serial1 definition (Nucleo-144 NUCLEO_F767ZI, Nucleo-64 NUCLEO_L053R8, etc.) boards**, you have to copy the files [STM32 variant.h](Packages_Patches/STM32/hardware/stm32/2.2.0) into STM32 stm32 directory (~/.arduino15/packages/STM32/hardware/stm32/2.2.0). You have to modify the files corresponding to your boards, this is just an illustration how to do. + +Supposing the STM32 stm32 core version is 2.2.0. These files must be copied into the directory: + +- `~/.arduino15/packages/STM32/hardware/stm32/2.2.0/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/NUCLEO_F767ZI/variant.h` for Nucleo-144 NUCLEO_F767ZI. +- `~/.arduino15/packages/STM32/hardware/stm32/2.2.0/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/NUCLEO_L053R8/variant.h` for Nucleo-64 NUCLEO_L053R8. + +Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz, +theses files must be copied into the corresponding directory: + +- `~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/NUCLEO_F767ZI/variant.h` +- `~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/NUCLEO_L053R8/variant.h` + +#### 8. For RP2040-based boards using [Earle Philhower arduino-pico core](https://github.com/earlephilhower/arduino-pico) + +#### 8.1 To use BOARD_NAME + + **To be able to automatically detect and display BOARD_NAME on RP2040-based boards (RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040, GENERIC_RP2040, etc) boards**, you have to copy the file [RP2040 platform.txt](Packages_Patches/rp2040/hardware/rp2040/1.4.0) into rp2040 directory (~/.arduino15/packages/rp2040/hardware/rp2040/1.4.0). + +Supposing the rp2040 core version is 1.4.0. This file must be copied into the directory: + +- `~/.arduino15/packages/rp2040/hardware/rp2040/1.4.0/platform.txt` + +Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz +This file must be copied into the directory: + +- `~/.arduino15/packages/rp2040/hardware/rp2040/x.yy.zz/platform.txt` + +With core after v1.5.0, this step is not necessary anymore thanks to the PR [Add -DBOARD_NAME="{build.board}" #136](https://github.com/earlephilhower/arduino-pico/pull/136). + +#### 8.2 To avoid compile error relating to microsecondsToClockCycles + +Some libraries, such as [Adafruit DHT-sensor-library](https://github.com/adafruit/DHT-sensor-library), require the definition of microsecondsToClockCycles(). **To be able to compile and run on RP2040-based boards**, you have to copy the files in [**RP2040 Arduino.h**](Packages_Patches/rp2040/hardware/rp2040/1.4.0/cores/rp2040/Arduino.h) into rp2040 directory (~/.arduino15/packages/rp2040/hardware/rp2040/1.4.0). + +Supposing the rp2040 core version is 1.4.0. This file must be copied to replace: + +- `~/.arduino15/packages/rp2040/hardware/rp2040/1.4.0/cores/rp2040/Arduino.h` + +Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz +This file must be copied to replace: + +- `~/.arduino15/packages/rp2040/hardware/rp2040/x.yy.zz/cores/rp2040/Arduino.h` + +With core after v1.5.0, this step is not necessary anymore thanks to the PR [Add defs for compatibility #142](https://github.com/earlephilhower/arduino-pico/pull/142). + + +#### 9. For Portenta_H7 boards using Arduino IDE in Linux + + **To be able to upload firmware to Portenta_H7 using Arduino IDE in Linux (Ubuntu, etc.)**, you have to copy the file [portenta_post_install.sh](Packages_Patches/arduino/hardware/mbed_portenta/3.0.0/portenta_post_install.sh) into mbed_portenta directory (~/.arduino15/packages/arduino/hardware/mbed_portenta/3.0.0/portenta_post_install.sh). + + Then run the following command using `sudo` + +``` +$ cd ~/.arduino15/packages/arduino/hardware/mbed_portenta/3.0.0 +$ chmod 755 portenta_post_install.sh +$ sudo ./portenta_post_install.sh +``` + +This will create the file `/etc/udev/rules.d/49-portenta_h7.rules` as follows: + +``` +# Portenta H7 bootloader mode UDEV rules + +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="035b", GROUP="plugdev", MODE="0666" +``` + +Supposing the ArduinoCore-mbed core version is 3.0.0. Now only one file must be copied into the directory: + +- `~/.arduino15/packages/arduino/hardware/mbed_portenta/3.0.0/portenta_post_install.sh` + +Whenever a new version is installed, remember to copy this files into the new version directory. For example, new version is x.yy.zz + +This file must be copied into the directory: + +- `~/.arduino15/packages/arduino/hardware/mbed_portenta/x.yy.zz/portenta_post_install.sh` + + +#### 10. For RTL8720DN boards using AmebaD core + + To avoid compile error relating to PROGMEM, you have to copy the file [Realtek AmebaD core pgmspace.h](Packages_Patches/realtek/hardware/AmebaD/3.1.2/cores/arduino/avr/pgmspace.h) into Realtek AmebaD directory (~/.arduino15/packages/realtek/hardware/AmebaD/3.1.2/cores/arduino/avr/pgmspace.h). + +Supposing the Realtek AmebaD core version is 3.1.2. This file must be copied into the directory: + +- `~/.arduino15/packages/realtek/hardware/AmebaD/3.1.2/cores/arduino/avr/pgmspace.h` + +Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz +This file must be copied into the directory: + +- `~/.arduino15/packages/realtek/hardware/AmebaD/x.yy.zz/cores/arduino/avr/pgmspace.h` + + +#### 11. For SAMD21 and SAMD51 boards using ArduinoCore-fab-sam core + + To avoid compile error relating to SAMD21/SAMD51, you have to copy the file [ArduinoCore-fab-sam core pgmspace.h](Packages_Patches/Fab_SAM_Arduino/hardware/samd/1.6.18-alpha2/boards.txt) into `ArduinoCore-fab-sam` samd directory (~/.arduino15/packages/Fab_SAM_Arduino/hardware/samd/1.6.18-alpha2/boards.txt). + +Supposing the `ArduinoCore-fab-sam` samd core version is 1.6.18-alpha2. This file must be copied into the directory: + +- `~/.arduino15/packages/Fab_SAM_Arduino/hardware/samd/1.6.18-alpha2/boards.txt` + +Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz +This file must be copied into the directory: + +- `~/.arduino15/packages/Fab_SAM_Arduino/hardware/samd/x.yy.zz/boards.txt` + + +#### 12. For Seeeduino RP2040 boards + + ***To be able to compile, run and automatically detect and display BOARD_NAME on Seeeduino RP2040 (XIAO RP2040, Wio RP2040 Mini) boards***, you have to copy the whole [Seeeduino RP2040 Packages_Patches](Packages_Patches/Seeeduino/hardware/rp2040/2.7.2) directory into Seeeduino samd directory (~/.arduino15/packages/Seeeduino/hardware/rp2040/2.7.2). + +Supposing the Seeeduino SAMD core version is 2.7.2. This file must be copied into the directory: + +- `~/.arduino15/packages/Seeeduino/hardware/rp2040/2.7.2/boards.txt` +- `~/.arduino15/packages/Seeeduino/hardware/rp2040/2.7.2/variants/Seeed_XIAO_RP2040/pins_arduino.h` + +Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz +This file must be copied into the directory: + +- `~/.arduino15/packages/Seeeduino/hardware/samd/x.yy.zz/boards.txt` +- `~/.arduino15/packages/Seeeduino/hardware/samd/x.yy.zz/variants/Seeed_XIAO_RP2040/pins_arduino.h` + + +--- +--- + +### Libraries' Patches + +#### 1. For application requiring 2K+ HTML page + +If your application requires 2K+ HTML page, the current [`Ethernet library`](https://www.arduino.cc/en/Reference/Ethernet) must be modified if you are using W5200/W5500 Ethernet shields. W5100 is not supported for 2K+ buffer. If you use boards requiring different CS/SS pin for W5x00 Ethernet shield, for example ESP32, ESP8266, nRF52, etc., you also have to modify the following libraries to be able to specify the CS/SS pin correctly. + +#### 2. For Ethernet library + +To fix [`Ethernet library`](https://www.arduino.cc/en/Reference/Ethernet), just copy these following files into the [`Ethernet library`](https://www.arduino.cc/en/Reference/Ethernet) directory to overwrite the old files: +- [Ethernet.h](LibraryPatches/Ethernet/src/Ethernet.h) +- [Ethernet.cpp](LibraryPatches/Ethernet/src/Ethernet.cpp) +- [EthernetServer.cpp](LibraryPatches/Ethernet/src/EthernetServer.cpp) +- [w5100.h](LibraryPatches/Ethernet/src/utility/w5100.h) +- [w5100.cpp](LibraryPatches/Ethernet/src/utility/w5100.cpp) + +#### 3. For EthernetLarge library + +To fix [`EthernetLarge library`](https://github.com/OPEnSLab-OSU/EthernetLarge), just copy these following files into the [`EthernetLarge library`](https://github.com/OPEnSLab-OSU/EthernetLarge) directory to overwrite the old files: +- [EthernetLarge.h](LibraryPatches/EthernetLarge/src/EthernetLarge.h) +- [EthernetLarge.cpp](LibraryPatches/EthernetLarge/src/EthernetLarge.cpp) +- [EthernetServer.cpp](LibraryPatches/EthernetLarge/src/EthernetServer.cpp) +- [w5100.h](LibraryPatches/EthernetLarge/src/utility/w5100.h) +- [w5100.cpp](LibraryPatches/EthernetLarge/src/utility/w5100.cpp) + + +#### 4. For Ethernet2 library + +To fix [`Ethernet2 library`](https://github.com/khoih-prog/Ethernet2), just copy these following files into the [`Ethernet2 library`](https://github.com/khoih-prog/Ethernet2) directory to overwrite the old files: + +- [Ethernet2.h](LibraryPatches/Ethernet2/src/Ethernet2.h) +- [Ethernet2.cpp](LibraryPatches/Ethernet2/src/Ethernet2.cpp) + +To add UDP Multicast support, necessary for the [**UPnP_Generic library**](https://github.com/khoih-prog/UPnP_Generic): + +- [EthernetUdp2.h](LibraryPatches/Ethernet2/src/EthernetUdp2.h) +- [EthernetUdp2.cpp](LibraryPatches/Ethernet2/src/EthernetUdp2.cpp) + +#### 5. For Ethernet3 library + +5. To fix [`Ethernet3 library`](https://github.com/sstaub/Ethernet3), just copy these following files into the [`Ethernet3 library`](https://github.com/sstaub/Ethernet3) directory to overwrite the old files: +- [Ethernet3.h](LibraryPatches/Ethernet3/src/Ethernet3.h) +- [Ethernet3.cpp](LibraryPatches/Ethernet3/src/Ethernet3.cpp) + +#### 6. For UIPEthernet library + +***To be able to compile and run on nRF52 boards with ENC28J60 using UIPEthernet library***, you have to copy these following files into the UIPEthernet `utility` directory to overwrite the old files: + +- [UIPEthernet.h](LibraryPatches/UIPEthernet/UIPEthernet.h) +- [UIPEthernet.cpp](LibraryPatches/UIPEthernet/UIPEthernet.cpp) +- [Enc28J60Network.h](LibraryPatches/UIPEthernet/utility/Enc28J60Network.h) +- [Enc28J60Network.cpp](LibraryPatches/UIPEthernet/utility/Enc28J60Network.cpp) + +#### 7. For fixing ESP32 compile error + +To fix [`ESP32 compile error`](https://github.com/espressif/arduino-esp32), just copy the following file into the [`ESP32`](https://github.com/espressif/arduino-esp32) cores/esp32 directory (e.g. ./arduino-1.8.12/hardware/espressif/cores/esp32) to overwrite the old file: +- [Server.h](LibraryPatches/esp32/cores/esp32/Server.h) + +#### 8. For fixing ESP8266 compile error + +To fix `ESP8266 compile error` such as + +``` +error: 'class EthernetClass' has no member named 'init' +Ethernet.init (USE_THIS_SS_PIN); +``` + +just rename the following file in ./arduino-1.8.13/hardware/esp8266com/esp8266/libraries/Ethernet directory + +- From `Ethernet.h` to `Ethernet_ESP8266.h` + +--- +--- + + +### HOWTO Use analogRead() with ESP32 running WiFi and/or BlueTooth (BT/BLE) + +Please have a look at [**ESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example**](https://github.com/khoih-prog/ESP_WiFiManager/issues/39) to have more detailed description and solution of the issue. + +#### 1. ESP32 has 2 ADCs, named ADC1 and ADC2 + +#### 2. ESP32 ADCs functions + +- ADC1 controls ADC function for pins **GPIO32-GPIO39** +- ADC2 controls ADC function for pins **GPIO0, 2, 4, 12-15, 25-27** + +#### 3.. ESP32 WiFi uses ADC2 for WiFi functions + +Look in file [**adc_common.c**](https://github.com/espressif/esp-idf/blob/master/components/driver/adc_common.c#L61) + +> In ADC2, there're two locks used for different cases: +> 1. lock shared with app and Wi-Fi: +> ESP32: +> When Wi-Fi using the ADC2, we assume it will never stop, so app checks the lock and returns immediately if failed. +> ESP32S2: +> The controller's control over the ADC is determined by the arbiter. There is no need to control by lock. +> +> 2. lock shared between tasks: +> when several tasks sharing the ADC2, we want to guarantee +> all the requests will be handled. +> Since conversions are short (about 31us), app returns the lock very soon, +> we use a spinlock to stand there waiting to do conversions one by one. +> +> adc2_spinlock should be acquired first, then adc2_wifi_lock or rtc_spinlock. + + +- In order to use ADC2 for other functions, we have to **acquire complicated firmware locks and very difficult to do** +- So, it's not advisable to use ADC2 with WiFi/BlueTooth (BT/BLE). +- Use ADC1, and pins GPIO32-GPIO39 +- If somehow it's a must to use those pins serviced by ADC2 (**GPIO0, 2, 4, 12, 13, 14, 15, 25, 26 and 27**), use the **fix mentioned at the end** of [**ESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example**](https://github.com/khoih-prog/ESP_WiFiManager/issues/39) to work with ESP32 WiFi/BlueTooth (BT/BLE). + + +--- +--- + +### Important Notes + +1. From v1.0.0, code is restructured to provide flexibility to make it easy to support many more **WiFi/Ethernet** modules/shields in the future. Please delete the *.cpp files, replaced by *.hpp files, in the src directory, if *.cpp files still exist after installing new version. + +2. For **Adafruit nRF52**, use the SPI's pins as follows: + + - SS/CS = 10 + - SPI_MOSI = MO(SI) + - SPI_MISO = MI(SO) + - SPI_SCK = SCK + +3. For **Adafruit SAMD21/SAMD51**, use the SPI's CS/SS pin as follows: + + - Itsy-Bitsy M0/M4, Feather M0 (Express), Hallowing M0 Express, Zero, Metro M0 => use CS = 16 = pin A2 + - Feather M4 (SAMD51) => use SS/CS = 9 + - Grand Central M4 => use SS/CS = 53 + - Hallowing M4 => use SS/CS = 10 + - Metro M4 AirLift => use SS/CS = 36 + +To know the default CS/SS pins of not listed boards, check the related `variant.h` files in + +`~/.arduino15/packages/adafruit/hardware/samd/x.y.zz/variants/board_name/variant.h` + +4. For **Arduino SAM DUE**, use the SPI's pins as follows: + + - SS/CS = 10 + - SPI_MOSI = 75 ( pin 4 @ [ICSP connector](pics/ICSP_connector.jpg) ) + - SPI_MISO = 74 ( pin 1 @ [ICSP connector](pics/ICSP_connector.jpg) ) + - SPI_SCK = 76 ( pin 3 @ [ICSP connector](pics/ICSP_connector.jpg) ) + +

+ +

+ +5. For **RP2040**, use the SPI's pins as follows: + + - SS/CS = GP17 default or GP5 by modifying `defines.h` + - MOSI = GP19 + - MISO = GP16 + - SCK = GP18 + +

+ +

+ + +--- +--- + +## Basic Usage + +Please see [Dr. Charles Bell's wiki documentation](https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki), especially [Examples section](https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki/Examples) for the best and detailed explanation. + +There are many modifications to facilitate the usage of [**MySQL_MariaDB_Generic Library**](https://github.com/khoih-prog/MySQL_MariaDB_Generic). Please have a look at the examples to see the differences. + +--- + +### 1. To use Ethernet module/shield + +#### Just select an Ethernet module/shield and the corresponding library to use in defines.h: + +```c++ +// 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 +``` + +#### In the sketch: + +```c++ +#include "defines.h" + +#include + +... + +MySQL_Connection conn((Client *)&client); +MySQL_Query sql_query = MySQL_Query(&conn); +``` + +--- + +### 2. To use WiFi module/shield + +#### For ESP8266 or ESP32, don't need to select any WiFi module/shield in defines.h. + +#### For remaining boards, just select a WiFi module/shield and the corresponding library to use in defines.h: + +```c++ +// Select only one of these libraries, only for boards other than ESP8266/ESP32 +#define USING_WIFI_ESP_AT false // Using ESP8266_AT_WebServer lib (https://github.com/khoih-prog/ESP8266_AT_WebServer) +#define USING_WIFININA_GENERIC false // Using WiFiNINA_Generic library (https://github.com/khoih-prog/WiFiNINA_Generic) +#define USING_WIFININA false // Using WiFiNINA library +#define USING_WIFIESPAT_LIB true // Using WiFiEspAT library (https://github.com/jandrassy/WiFiEspAT) +#define USING_WIFI_CUSTOM false +``` + +#### In the sketch: + +```c++ +#include "defines.h" +#include "Credentials.h" + +#include + +... + +MySQL_Connection conn((Client *)&client); +MySQL_Query sql_query = MySQL_Query(&conn); +``` + +--- + +### 3. To use WiFiNINA module/shield + +#### Can't use WiFiNINA for ESP8266 or ESP32. + +#### For remaining boards, just select a library to use in defines.h: + +```c++ +// Select only one of these libraries, only for boards other than ESP8266/ESP32 +#define USING_WIFININA_GENERIC true +#define USING_WIFININA false +``` + +#### In the sketch: + +```c++ +#include "defines.h" +#include "Credentials.h" + +#include + +... + +MySQL_Connection conn((Client *)&client); +MySQL_Query sql_query = MySQL_Query(&conn); +``` + +--- +--- + +### Examples + +#### For Ethernet module/shield + + 1. [Basic_Insert](examples/Ethernet/Basic_Insert) + 2. [Basic_Select](examples/Ethernet/Basic_Select) + 3. [Complex_Insert](examples/Ethernet/Complex_Insert) + 4. [Complex_Select](examples/Ethernet/Complex_Select) + 5. [Connect](examples/Ethernet/Connect) + 6. [Connect_By_Hostname](examples/Ethernet/Connect_By_Hostname) + 7. [Connect_Default_Database](examples/Ethernet/Connect_Default_Database) + 8. [Connect_Disconnect](examples/Ethernet/Connect_Disconnect) + 9. [Query_Progmem](examples/Ethernet/Query_Progmem) +10. [Query_Results](examples/Ethernet/Query_Results) +11. [multiFileProject_Ethernet](examples/Ethernet/multiFileProject_Ethernet) **New** + +#### For WiFi module/shield + + 1. [Basic_Insert_ESP](examples/WiFi/Basic_Insert_ESP) + 2. [Basic_Insert_WiFi](examples/WiFi/Basic_Insert_WiFi) + 3. [Basic_Select_WiFi](examples/WiFi/Basic_Select_WiFi) + 4. [Complex_Insert_WiFi](examples/WiFi/Complex_Insert_WiFi) + 5. [Complex_Select_WiFi](examples/WiFi/Complex_Select_WiFi) + 6. [Connect_WiFi](examples/WiFi/Connect_WiFi) + 7. [Connect_Default_Database_WiFi](examples/WiFi/Connect_Default_Database_WiFi) + 8. [Connect_Disconnect_WiFi](examples/WiFi/Connect_Disconnect_WiFi) + 9. [Query_Progmem_WiFi](examples/WiFi/Query_Progmem_WiFi) +10. [Query_Results_WiFi](examples/WiFi/Query_Results_WiFi) +11. [Reboot_WiFi](examples/WiFi/Reboot_WiFi) +12. [multiFileProject_WiFi](examples/WiFi/multiFileProject_WiFi) **New** + +#### For WiFiNINA module/shield + + 1. [Basic_Insert_WiFiNINA](examples/WiFiNINA/Basic_Insert_WiFiNINA) + 2. [Basic_Select_WiFiNINA](examples/WiFiNINA/Basic_Select_WiFiNINA) + 3. [Complex_Insert_WiFiNINA](examples/WiFiNINA/Complex_Insert_WiFiNINA) + 4. [Complex_Select_WiFiNINA](examples/WiFiNINA/Complex_Select_WiFiNINA) + 5. [Connect_WiFiNINA](examples/WiFiNINA/Connect_WiFiNINA) + 6. [Connect_Default_Database_WiFiNINA](examples/WiFiNINA/Connect_Default_Database_WiFiNINA) + 7. [Connect_Disconnect_WiFiNINA](examples/WiFiNINA/Connect_Disconnect_WiFiNINA) + 8. [Query_Progmem_WiFiNINA](examples/WiFiNINA/Query_Progmem_WiFiNINA) + 9. [Query_Results_WiFiNINA](examples/WiFiNINA/Query_Results_WiFiNINA) +10. [Reboot_WiFiNINA](examples/WiFiNINA/Reboot_WiFiNINA) +11. [multiFileProject_WiFiNINA](examples/WiFiNINA/multiFileProject_WiFiNINA) **New** + +#### For WT32_ETH01 + + 1. [Basic_Insert_WT32_ETH01](examples/WT32_ETH01/Basic_Insert_WT32_ETH01) + 2. [Basic_Select_WT32_ETH01](examples/WT32_ETH01/Basic_Select_WT32_ETH01) + 3. [Complex_Insert_WT32_ETH01](examples/WT32_ETH01/Complex_Insert_WT32_ETH01) + 4. [Complex_Select_WT32_ETH01](examples/WT32_ETH01/Complex_Select_WT32_ETH01) + 5. [Connect_WT32_ETH01](examples/WT32_ETH01/Connect_WT32_ETH01) + 6. [Connect_Default_Database_WT32_ETH01](examples/WT32_ETH01/Connect_Default_Database_WT32_ETH01) + 7. [Connect_Disconnect_WT32_ETH01](examples/WT32_ETH01/Connect_Disconnect_WT32_ETH01) + 8. [Query_Progmem_WT32_ETH01](examples/WT32_ETH01/Query_Progmem_WT32_ETH01) + 9. [Query_Results_WT32_ETH01](examples/WT32_ETH01/Query_Results_WT32_ETH01) +10. [Reboot_WT32_ETH01](examples/WT32_ETH01/Reboot_WT32_ETH01) +11. [multiFileProject_WT32_ETH01](examples/WT32_ETH01/multiFileProject_WT32_ETH01) **New** + +#### For Teensy 4.1 NativeEthernet + + 1. [Basic_Insert](examples/NativeEthernet/Basic_Insert) + 2. [Basic_Select](examples/NativeEthernet/Basic_Select) + 3. [Complex_Insert](examples/NativeEthernet/Complex_Insert) + 4. [Complex_Select](examples/NativeEthernet/Complex_Select) + 5. [Connect](examples/NativeEthernet/Connect) + 6. [Connect_By_Hostname](examples/NativeEthernet/Connect_By_Hostname) + 7. [Connect_Default_Database](examples/NativeEthernet/Connect_Default_Database) + 8. [Connect_Disconnect](examples/NativeEthernet/Connect_Disconnect) + 9. [Query_Progmem](examples/NativeEthernet/Query_Progmem) +10. [Query_Results](examples/NativeEthernet/Query_Results) +11. [multiFileProject_NativeEthernet](examples/NativeEthernet/multiFileProject_NativeEthernet) **New** + +#### For Teensy 4.1 QNEthernet + + 1. [Basic_Insert](examples/QNEthernet/Basic_Insert) + 2. [Basic_Select](examples/QNEthernet/Basic_Select) + 3. [Complex_Insert](examples/QNEthernet/Complex_Insert) + 4. [Complex_Select](examples/QNEthernet/Complex_Select) + 5. [Connect](examples/QNEthernet/Connect) + 6. [Connect_By_Hostname](examples/QNEthernet/Connect_By_Hostname) + 7. [Connect_Default_Database](examples/QNEthernet/Connect_Default_Database) + 8. [Connect_Disconnect](examples/QNEthernet/Connect_Disconnect) + 9. [Query_Progmem](examples/QNEthernet/Query_Progmem) +10. [Query_Results](examples/QNEthernet/Query_Results) +11. [multiFileProject_QNEthernet](examples/QNEthernet/multiFileProject_QNEthernet) **New** + +#### For Portenta_H7 Ethernet + + 1. [Basic_Insert](examples/Portenta_H7/Ethernet/Basic_Insert) + 2. [Basic_Select](examples/Portenta_H7/Ethernet/Basic_Select) + 3. [Complex_Insert](examples/Portenta_H7/Ethernet/Complex_Insert) + 4. [Connect](examples/Portenta_H7/Ethernet/Connect) + 5. [Connect_By_Hostname](examples/Portenta_H7/Ethernet/Connect_By_Hostname) + 6. [Connect_Default_Database](examples/Portenta_H7/Ethernet/Connect_Default_Database) + 7. [multiFileProject_Portenta_H7_Ethernet](examples/Portenta_H7/Ethernet/multiFileProject_Portenta_H7_Ethernet) **New** + + +#### For Portenta_H7 WiFi + + 1. [Basic_Insert_WiFi](examples/Portenta_H7/WiFi/Basic_Insert_WiFi) + 2. [Basic_Select_WiFi](examples/Portenta_H7/WiFi/Basic_Select_WiFi) + 3. [Complex_Insert_WiFi](examples/Portenta_H7/WiFi/Complex_Insert_WiFi) + 4. [Complex_Select_WiFi](examples/Portenta_H7/WiFi/Complex_Select_WiFi) + 5. [Connect_WiFi](examples/Portenta_H7/WiFi/Connect_WiFi) + 6. [Connect_Default_Database_WiFi](examples/Portenta_H7/WiFi/Connect_Default_Database_WiFi) + 7. [Connect_Disconnect_WiFi](examples/Portenta_H7/WiFi/Connect_Disconnect_WiFi) + 8. [Reboot_WiFi](examples/Portenta_H7/WiFi/Reboot_WiFi) + 9. [multiFileProject_Portenta_H7_WiFi](examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi) **New** + + + +--- +--- + +### Example [Basic_Select](examples/Ethernet/Basic_Select) + +Please take a look at other examples, as well. + +#### 1. File [Basic_Select.ino](examples/Ethernet/Basic_Select/Basic_Select.ino) + +https://github.com/khoih-prog/MySQL_MariaDB_Generic/blob/78ff2dbda8caaa10266eb93acd286641aba7dd27/examples/Ethernet/Basic_Select/Basic_Select.ino#L50-L326 + + + +#### 2. File [defines.h](examples/Ethernet/Basic_Select/defines.h) + +https://github.com/khoih-prog/MySQL_MariaDB_Generic/blob/78ff2dbda8caaa10266eb93acd286641aba7dd27/examples/Ethernet/Basic_Select/defines.h#L16-L463 + + +--- +--- + +### Debug Terminal Output Samples + +#### 1. Query_Progmem on NRF52840_FEATHER using W5x00/Ethernet_Generic Library + +This is terminal debug output when running [Query_Progmem](examples/Ethernet/Query_Progmem) on nRF52 **Adafruit NRF52840_FEATHER using W5500 Ethernet module and Ethernet_Generic library** connecting to MariaDB Server. + +``` +Starting Query_Progmem on NRF52840_FEATHER using W5x00/Ethernet_Generic Library +MySQL_MariaDB_Generic v1.7.2 +Ethernet_Generic W5500 init, using SPI_CS = 10, number of sockets = 4 +Using mac index = 10 +Connected! IP address: 192.168.2.145 +Connecting to SQL Server @ your_account.ddns.net, Port = 5698 +User = invited-guest, PW = the-invited-guest +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.34-MariaDB-0+deb10u1 + +Running SELECT from PROGMEM and printing results + +SELECT * FROM world.city LIMIT 12 +ID,Name,CountryCode,District,Population +1,Kabul,AFG,Kabol,1780000 +2,Qandahar,AFG,Qandahar,237500 +3,Herat,AFG,Herat,186800 +4,Mazar-e-Sharif,AFG,Balkh,127800 +5,Amsterdam,NLD,Noord-Holland,731200 +6,Rotterdam,NLD,Zuid-Holland,593321 +7,Haag,NLD,Zuid-Holland,440900 +8,Utrecht,NLD,Utrecht,234323 +9,Eindhoven,NLD,Noord-Brabant,201843 +10,Tilburg,NLD,Noord-Brabant,193238 +11,Groningen,NLD,Groningen,172701 +12,Breda,NLD,Noord-Brabant,160398 +12 rows in result. +``` + +--- + +#### 2. Complex_Select on NUCLEO_F767ZI using LAN8742A/STM32Ethernet Library + +This is terminal debug output when running [Complex_Select](examples/Ethernet/Complex_Select) on STM32F7 **Nucleo-144 NUCLEO_F767ZI using LAN8742A built-in Ethernet and STM32Ethernet library** connecting to MariaDB Server. + +``` +Starting Complex_Select on NUCLEO_F767ZI using LAN8742A/STM32Ethernet Library +MySQL_MariaDB_Generic v1.7.2 +Using mac index = 0 +Connected! IP address: 192.168.2.165 +Connecting to SQL Server @ your_account.ddns.net, Port = 5698 +User = invited-guest, PW = the-invited-guest, DB = world +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.34-MariaDB-0+deb10u1 +==================================================== +> Running SELECT with dynamically supplied parameter +SELECT name, population FROM world.city WHERE population < 857880 ORDER BY population DESC LIMIT 12; +name,population +Naucalpan de Ju⸮rez,857511 +Pikine,855287 +Lubumbashi,851381 +Monrovia,850000 +Freetown,850000 +Zaporizzja,848000 +Handan,840000 +S⸮o Lu⸮s,837588 +Wuxi,830000 +Ouagadougou,824000 +Ciudad de Guatemala,823301 +Coimbatore,816321 +[SQL] Disconnected + +Sleeping... +================================================ +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.34-MariaDB-0+deb10u1 +==================================================== +> Running SELECT with dynamically supplied parameter +SELECT name, population FROM world.city WHERE population < 972170 ORDER BY population DESC LIMIT 12; +name,population +Mekka,965700 +K⸮ln,962507 +Managua,959000 +Detroit,951270 +Shenzhen,950500 +Haora (Howrah),950435 +Campinas,950043 +Brazzaville,950000 +Khartum,947483 +Karaj,940968 +Taichung,940589 +Santa Cruz de la Sierra,935361 +[SQL] Disconnected + +Sleeping... +================================================ + +``` + +--- + +#### 3. Query_Results_WiFi on ITSYBITSY_M4 + +This is terminal debug output when running [Query_Results_WiFi](examples/WiFi/Query_Results_WiFi) on SAMD51 **Adafruit ITSYBITSY_M4 using ESP8266-AT WiFi shield and WiFiEspAT library** connecting to MySQL Server. + +``` +Starting Query_Results_WiFi on ITSYBITSY_M4 +MySQL_MariaDB_Generic v1.7.2 +Using WiFiEspAT Library +WiFi shield init done +Connecting to HueNet1 +Connected to network. My IP address is: 192.168.2.32 +Connecting to SQL Server @ your_account.ddns.net, Port = 5698 +User = invited-guest, PW = the-invited-guest +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.34-MariaDB-0+deb10u1 + +Running SELECT and printing results + +SELECT * FROM world.city LIMIT 6 +ID, Name, CountryCode, District, Population +1, Kabul, AFG, Kabol, 1780000 +2, Qandahar, AFG, Qandahar, 237500 +3, Herat, AFG, Herat, 186800 +4, Mazar-e-Sharif, AFG, Balkh, 127800 +5, Amsterdam, NLD, Noord-Holland, 731200 +6, Rotterdam, NLD, Zuid-Holland, 593321 +[SQL] Disconnected + +Sleeping... +================================================ +``` + +--- + +#### 4. Basic_Select_WiFi on SEEED_XIAO_M0 + +This is terminal debug output when running [Basic_Select_WiFi](examples/WiFi/Basic_Select_WiFi) on SAMD21 **Seeeduino SEEED_XIAO_M0 using ESP8266-AT WiFi shield and WiFiEspAT library** connecting to MariaDB Server. + + +``` +Starting Basic_Select_WiFi on SEEED_XIAO_M0 +MySQL_MariaDB_Generic v1.7.2 +Using WiFiEspAT Library +WiFi shield init done +Connecting to HueNet1 +Connected to network. My IP address is: 192.168.2.32 +Connecting to SQL Server @ your_account.ddns.net, Port = 5698 +User = invited-guest, PW = the-invited-guest, DB = world +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.34-MariaDB-0+deb10u1 +1) Demonstrating using a dynamically allocated query. +SELECT population FROM world.city WHERE name = 'Toronto' + Toronto pop = 688275 +2) Demonstrating using a local, global query. +SELECT population FROM world.city WHERE name = 'Toronto' + Toronto pop = 688275 + Toronto pop increased by 11725 = 700000 +[SQL] Disconnected + +Sleeping... +================================================ + +``` + +--- + +#### 5. Query_Results_WiFiNINA on SAMD_NANO_33_IOT + +This is terminal debug output when running [Query_Results_WiFiNINA](examples/WiFiNINA/Query_Results_WiFiNINA) on SAMD21 **Arduino SAMD_NANO_33_IOT using built-in WiFiNINA and WiFiNINA_Generic library** connecting to MariaDB Server. + + +``` +Starting Query_Results_WiFiNINA on SAMD_NANO_33_IOT +MySQL_MariaDB_Generic v1.7.2 +Attempting to connect to SSID: HueNet1 +SSID: HueNet1 +IP Address: 192.168.2.118 +signal strength (RSSI):-40 dBm +Connecting to SQL Server @ your_account.ddns.net, Port = 5698 +User = invited-guest, PW = the-invited-guest +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.34-MariaDB-0+deb10u1 + +Running SELECT and printing results + +SELECT * FROM world.city LIMIT 12 +ID, Name, CountryCode, District, Population +1, Kabul, AFG, Kabol, 1780000 +2, Qandahar, AFG, Qandahar, 237500 +3, Herat, AFG, Herat, 186800 +4, Mazar-e-Sharif, AFG, Balkh, 127800 +5, Amsterdam, NLD, Noord-Holland, 731200 +6, Rotterdam, NLD, Zuid-Holland, 593321 +7, Haag, NLD, Zuid-Holland, 440900 +8, Utrecht, NLD, Utrecht, 234323 +9, Eindhoven, NLD, Noord-Brabant, 201843 +10, Tilburg, NLD, Noord-Brabant, 193238 +11, Groningen, NLD, Groningen, 172701 +12, Breda, NLD, Noord-Brabant, 160398 +[SQL] Disconnected + +Sleeping... +================================================ + +``` + +--- + +#### 6. Connect_By_Hostname on SAM DUE using W5x00/Ethernet_Generic Library + +This is terminal debug output when running [Connect_By_Hostname](examples/Ethernet/Connect_By_Hostname) on **Arduino SAM DUE using W5100 Ethernet shield and Ethernet_Generic library** connecting to MariaDB Server. + + +``` +Starting Connect_By_Hostname on SAM DUE using W5x00/Ethernet_Generic Library +MySQL_MariaDB_Generic v1.7.2 +_pinCS = 0 +W5100 init, using SS_PIN_DEFAULT = 10, new ss_pin = 10, W5100Class::ss_pin = 10 +W5100::init: W5100, SSIZE =4096 +Using mac index = 2 +Connected! IP address: 192.168.2.177 +Connecting to SQL Server @ your_account.ddns.net, Port = 5698 +User = invited-guest, PW = the-invited-guest +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.34-MariaDB-0+deb10u1 +[SQL] Disconnected +``` + +--- + +#### 7. Complex_Select on NRF52840_FEATHER using ENC28J60/UIPEthernet Library + +This is terminal debug output when running [Complex_Select](examples/Ethernet/Complex_Select) on **NRF52840_FEATHER using ENC28J60 Ethernet shield and UIPEthernet library** connecting to MariaDB Server. + + +``` +Starting Complex_Select on NRF52840_FEATHER using ENC28J60/UIPEthernet Library +MySQL_MariaDB_Generic v1.7.2 +ENC28J60_CONTROL_CS =10 +SS =5 +SPI_MOSI =25 +SPI_MISO =24 +SPI_SCK =26 +Using mac index = 5 +Connected! IP address: 192.168.2.161 +Connecting to SQL Server @ your_account.ddns.net, Port = 5698 +User = invited-guest, PW = the-invited-guest, DB = world +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.34-MariaDB-0+deb10u1 +==================================================== +> Running SELECT with dynamically supplied parameter +SELECT name, population FROM world.city WHERE population < 885240 ORDER BY population DESC LIMIT 12; +name,population +Port-au-Prince,884472 +Mosul,879000 +Barquisimeto,877239 +Krasnojarsk,875500 +Saratov,874000 +Shubra al-Khayma,870716 +S⸮o Gon⸮alo,869254 +Songnam,869094 +Chiba,863930 +Nova Igua⸮u,862225 +Naucalpan de Ju⸮rez,857511 +Pikine,855287 +[SQL] Disconnected + +Sleeping... +================================================ +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.34-MariaDB-0+deb10u1 +==================================================== +> Running SELECT with dynamically supplied parameter +SELECT name, population FROM world.city WHERE population < 1015280 ORDER BY population DESC LIMIT 12; +name,population +Kalyan,1014557 +Birmingham,1013000 +Rostov-na-Donu,1012700 +Odesa,1011000 +Perm,1009700 +Napoli,1002619 +Zapopan,1002239 +Amman,1000000 +Mogadishu,997000 +Volgograd,993400 +Sendai,989975 +Peshawar,988005 +[SQL] Disconnected + +Sleeping... +================================================ +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.34-MariaDB-0+deb10u1 +==================================================== +> Running SELECT with dynamically supplied parameter +SELECT name, population FROM world.city WHERE population < 1193330 ORDER BY population DESC LIMIT 12; +name,population +Tabriz,1191043 +Dallas,1188580 +Bel⸮m,1186926 +Multan,1182441 +Praha,1181126 +Kalookan,1177604 +Nanning,1161800 +C⸮rdoba,1157507 +Samara,1156100 +Hyderabad,1151274 +Omsk,1148900 +Davao,1147116 +[SQL] Disconnected + +Sleeping... +================================================ + +``` + +--- + +#### 8. Complex_Select on NRF52840_FEATHER using ENC28J60/EthernetENC Library + +This is terminal debug output when running [Complex_Select](examples/Ethernet/Complex_Select) on **NRF52840_FEATHER using ENC28J60 Ethernet shield and EthernetENC library** connecting to MariaDB Server. + +``` +Starting Complex_Select on NRF52840_FEATHER, with ENC28J60 using EthernetENC Library +MySQL_MariaDB_Generic v1.7.2 +[SQL] ========================================= +[SQL] Default SPI pinout: +[SQL] MOSI: 25 +[SQL] MISO: 24 +[SQL] SCK: 26 +[SQL] SS: 5 +[SQL] ========================================= +[SQL] Board : NRF52840_FEATHER , setCsPin: 10 +[SQL] ========================================= +[SQL] Currently Used SPI pinout: +[SQL] MOSI: 25 +[SQL] MISO: 24 +[SQL] SCK: 26 +[SQL] SS: 5 +[SQL] ========================================= +Using mac index = 15 +Connected! IP address: 192.168.2.98 +Connecting to SQL Server @ your_account.ddns.net, Port = 5698 +User = invited-guest, PW = the-invited-guest, DB = world +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.34-MariaDB-0+deb10u1 +==================================================== +> Running SELECT with dynamically supplied parameter +SELECT name, population FROM world.city WHERE population < 831690 ORDER BY population DESC LIMIT 12; +name,population +Wuxi,830000 +Ouagadougou,824000 +Ciudad de Guatemala,823301 +Coimbatore,816321 +Tegucigalpa,813900 +Xuzhou,810000 +Bamako,809552 +Mbuji-Mayi,806475 +Cartagena,805757 +Ahvaz,804980 +Bengasi,804000 +Thane (Thana),803389 +[SQL] Disconnected + +Sleeping... +================================================ +``` + +--- + +#### 9. Query_Progmem on NRF52840_FEATHER using ENC28J60/EthernetENC Library + +This is terminal debug output when running [Query_Progmem](examples/Ethernet/Query_Progmem) on **NRF52840_FEATHER using ENC28J60 Ethernet shield and EthernetENC library** connecting to MariaDB Server. + + +``` +Starting Query_Progmem on NRF52840_FEATHER, with ENC28J60 using EthernetENC Library +MySQL_MariaDB_Generic v1.7.2 +[SQL] ========================================= +[SQL] Default SPI pinout: +[SQL] MOSI: 25 +[SQL] MISO: 24 +[SQL] SCK: 26 +[SQL] SS: 5 +[SQL] ========================================= +[SQL] Board : NRF52840_FEATHER , setCsPin: 10 +[SQL] ========================================= +[SQL] Currently Used SPI pinout: +[SQL] MOSI: 25 +[SQL] MISO: 24 +[SQL] SCK: 26 +[SQL] SS: 5 +[SQL] ========================================= +Using mac index = 13 +Connected! IP address: 192.168.2.106 +Connecting to SQL Server @ your_account.ddns.net, Port = 5698 +User = invited-guest, PW = the-invited-guest +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.34-MariaDB-0+deb10u1 + +Running SELECT from PROGMEM and printing results + +SELECT * FROM test_arduino.hello_arduino LIMIT 6 +num,message,recorded +351,Hello, Arduino!,2020-08-18 13:52:35 +352,Hello, Arduino!,2020-08-18 13:53:42 +353,Hello, Arduino!,2020-08-18 13:54:57 +354,Hello, Arduino!,2020-08-18 13:56:03 +355,Hello, Arduino!,2020-08-18 22:37:21 +356,Hello, Arduino!,2020-08-18 22:38:28 +6 rows in result. +[SQL] Disconnected + +Sleeping... +================================================ +``` + +--- + +#### 10. Basic_Insert_ESP on ESP8266_NODEMCU_ESP12E + +This is terminal debug output when running [Basic_Insert_ESP](examples/WiFi/Basic_Insert_ESP) on **ESP8266_NODEMCU_ESP12E using ESP8266 core v3.0.0** connecting to MariaDB Server. + + +``` +Starting Basic_Insert_ESP on ESP8266_NODEMCU_ESP12E +MySQL_MariaDB_Generic v1.7.2 +Connecting to HueNet1 +...........Connected to network. My IP address is: 192.168.2.135 +Connecting to SQL Server @ your_account.ddns.net , Port = 5698 +User = invited-guest , PW = the-invited-guest , DB = test_arduino +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.27-MariaDB-0+deb10u1 +INSERT INTO test_arduino.hello_arduino (message) VALUES ('Hello, Arduino!') +Data Inserted. +[SQL] Disconnected + +Sleeping... +================================================ +``` + +--- + +#### 11. Basic_Insert_ESP on ESP32S2_DEV + +This is terminal debug output when running [Basic_Insert_ESP](examples/WiFi/Basic_Insert_ESP) on **ESP32S2_DEV using ESP32 core v1.0.6** connecting to MariaDB Server. + + +``` +Starting Basic_Insert_ESP on ESP32S2_DEV +MySQL_MariaDB_Generic v1.7.2 +Connecting to HueNet1 +.......Connected to network. My IP address is: 192.168.2.190 +Connecting to SQL Server @ your_account.ddns.net , Port = 5698 +User = invited-guest , PW = the-invited-guest , DB = test_arduino +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.27-MariaDB-0+deb10u1 +INSERT INTO test_arduino.hello_arduino (message) VALUES ('Hello, Arduino!') +Data Inserted. +[SQL] Disconnected + +Sleeping... +================================================ +``` + +--- + +#### 12. Basic_Select_WiFiNINA on MBED NANO_RP2040_CONNECT + +This is terminal debug output when running [Basic_Select_WiFiNINA](examples/WiFiNINA/Basic_Select_WiFiNINA) on **MBED NANO_RP2040_CONNECT** connecting to MariaDB Server. + + +``` +Starting Basic_Select_WiFiNINA on MBED NANO_RP2040_CONNECT +MySQL_MariaDB_Generic v1.7.2 +Attempting to connect to SSID: HueNet1 +SSID: HueNet1 +IP Address: 192.168.2.153 +signal strength (RSSI):-44 dBm +Connecting to SQL Server @ your_account.ddns.net, Port = 5698 +User = invited-guest, PW = the-invited-guest, DB = world +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.27-MariaDB-0+deb10u1 +1) Demonstrating using a dynamically allocated query. +SELECT population FROM world.city WHERE name = 'Toronto' + Toronto pop = 688275 +2) Demonstrating using a local, global query. +SELECT population FROM world.city WHERE name = 'Toronto' + Toronto pop = 688275 + Toronto pop increased by 11725 = 700000 +[SQL] Disconnected + +Sleeping... +================================================ +``` + +--- + +#### 13. Complex_Select on MBED RASPBERRY_PI_PICO using W5x00/Ethernet_Generic Library + +This is terminal debug output when running [Complex_Select](examples/Ethernet/Complex_Select) on **MBED RASPBERRY_PI_PICO, with W5x00 using Ethernet_Generic Library** connecting to MariaDB Server, using [ArduinoCore-mbed mbed_rp2040 core](https://github.com/arduino/ArduinoCore-mbed) + + +``` +Starting Complex_Select on MBED RASPBERRY_PI_PICO , with W5x00 using Ethernet_Generic Library on SPI0/SPI +MySQL_MariaDB_Generic v1.7.2 +[SQL] ========================================= +[SQL] Default SPI pinout: +[SQL] MOSI: 19 +[SQL] MISO: 16 +[SQL] SCK: 18 +[SQL] SS: 17 +[SQL] ========================================= +[SQL] RPIPICO setCsPin: 17 +[SQL] Currently Used SPI pinout: +[SQL] MOSI: 19 +[SQL] MISO: 16 +[SQL] SCK: 18 +[SQL] SS: 17 +[SQL] ========================= +Using mac index = 2 +Connected! IP address: 192.168.2.92 +Connecting to SQL Server @ 192.168.2.112 , Port = 5698 +User = invited-guest , PW = the-invited-guest , DB = world +Connecting... +[SQL] Connecting to Server: 192.168.2.112 , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.34-MariaDB-0+deb10u1 +==================================================== +> Running SELECT with dynamically supplied parameter +SELECT name, population FROM world.city WHERE population < 827440 ORDER BY population DESC LIMIT 12; +name,population +Ouagadougou,824000 +Ciudad de Guatemala,823301 +Coimbatore,816321 +Tegucigalpa,813900 +Xuzhou,810000 +Bamako,809552 +Mbuji-Mayi,806475 +Cartagena,805757 +Ahvaz,804980 +Bengasi,804000 +Thane (Thana),803389 +L⸮dz,800110 +[SQL] Disconnected + +Sleeping... +================================================ +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.27-MariaDB-0+deb10u1 +==================================================== +> Running SELECT with dynamically supplied parameter +SELECT name, population FROM world.city WHERE population < 934480 ORDER BY population DESC LIMIT 12; +name,population +Varanasi (Benares),929270 +Patna,917243 +Hohhot,916700 +Rosario,907718 +Voronez,907700 +Soweto,904165 +Torino,903705 +San Jose,894943 +Srinagar,892506 +Agra,891790 +Kampala,890800 +Mandalay,885300 +[SQL] Disconnected + +Sleeping... +================================================ +``` + +--- + +#### 14. Complex_Select on RASPBERRY_PI_PICO using W5x00/Ethernet_Generic Library + +This is terminal debug output when running [Complex_Select](examples/Ethernet/Complex_Select) on **RASPBERRY_PI_PICO, with W5x00 using Ethernet_Generic Library** connecting to MariaDB Server, using [arduino-pico rp2040 core](https://github.com/earlephilhower/arduino-pico) + + +``` +Starting Complex_Select on RASPBERRY_PI_PICO , with W5x00 using Ethernet_Generic Library on SPI1 +MySQL_MariaDB_Generic v1.7.2 +[SQL] ========================================= +[SQL] Default SPI pinout: +[SQL] MOSI: 19 +[SQL] MISO: 16 +[SQL] SCK: 18 +[SQL] SS: 17 +[SQL] ========================================= +[SQL] RPIPICO setCsPin: 13 +[SQL] Currently Used SPI pinout: +[SQL] MOSI: 15 +[SQL] MISO: 12 +[SQL] SCK: 14 +[SQL] SS: 13 +[SQL] ========================= +Using mac index = 0 +Connected! IP address: 192.168.2.172 +Connecting to SQL Server @ 192.168.2.112 , Port = 5698 +User = invited-guest , PW = the-invited-guest , DB = world +Connecting... +[SQL] Connecting to Server: 192.168.2.112 , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.34-MariaDB-0+deb10u1 +==================================================== +> Running SELECT with dynamically supplied parameter +SELECT name, population FROM world.city WHERE population < 900290 ORDER BY population DESC LIMIT 12; +name,population +San Jose,894943 +Srinagar,892506 +Agra,891790 +Kampala,890800 +Mandalay,885300 +Port-au-Prince,884472 +Mosul,879000 +Barquisimeto,877239 +Krasnojarsk,875500 +Saratov,874000 +Shubra al-Khayma,870716 +S⸮o Gon⸮alo,869254 +[SQL] Disconnected + +Sleeping... +================================================ +``` + +--- + +#### 15. Complex_Select_WT32_ETH01 on WT32-ETH01 + +This is terminal debug output when running [Complex_Select_WT32_ETH01](examples/WT32_ETH01/Complex_Select_WT32_ETH01) on **WT32_ETH01** connecting to MariaDB Server. + +``` +Starting Complex_Select_WT32_ETH01 on WT32-ETH01 +WebServer_WT32_ETH01 v1.4.1 +MySQL_MariaDB_Generic v1.7.2 +ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232 +FULL_DUPLEX, 100Mbps +Connected to network. My IP address is: 192.168.2.232 +Connecting to SQL Server @ your_account.ddns.net , Port = 5698 +User = invited-guest , PW = the-invited-guest , DB = world +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.27-MariaDB-0+deb10u1 +==================================================== +> Running SELECT with dynamically supplied parameter +SELECT name, population FROM world.city WHERE population < 848510 ORDER BY population DESC LIMIT 6; +name,population +Zaporizzja,848000 +Handan,840000 +S⸮o Lu⸮s,837588 +Wuxi,830000 +Ouagadougou,824000 +Ciudad de Guatemala,823301 +[SQL] Disconnected + +Sleeping... +================================================ +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.27-MariaDB-0+deb10u1 +==================================================== +> Running SELECT with dynamically supplied parameter +SELECT name, population FROM world.city WHERE population < 962720 ORDER BY population DESC LIMIT 6; +name,population +K⸮ln,962507 +Managua,959000 +Detroit,951270 +Shenzhen,950500 +Haora (Howrah),950435 +Campinas,950043 +[SQL] Disconnected + +Sleeping... +================================================ +``` + +--- + + +#### 16. Complex_Select on Teensy 4.1 with NativeEthernet + +This is terminal debug output when running [Complex_Select](examples/NativeEthernet/Complex_Select) on **Teensy 4.1 with NativeEthernet** connecting to MariaDB Server. + +``` +Starting Complex_Select on Teensy 4.1 , with NativeEthernet +MySQL_MariaDB_Generic v1.7.2 +Using mac index = 2 +Connected! IP address: 192.168.2.86 +Connecting to SQL Server @ your_account.ddns.net , Port = 5698 +User = invited-guest , PW = the-invited-guest , DB = world +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.29-MariaDB-0+deb10u1 +==================================================== +> Running SELECT with dynamically supplied parameter +SELECT name, population FROM world.city WHERE population < 940450 ORDER BY population DESC LIMIT 12; +name,population +Santa Cruz de la Sierra,935361 +Varanasi (Benares),929270 +Patna,917243 +Hohhot,916700 +Rosario,907718 +Voronez,907700 +Soweto,904165 +Torino,903705 +San Jose,894943 +Srinagar,892506 +Agra,891790 +Kampala,890800 +[SQL] Disconnected + +Sleeping... +================================================ +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.29-MariaDB-0+deb10u1 +==================================================== +> Running SELECT with dynamically supplied parameter +SELECT name, population FROM world.city WHERE population < 1054490 ORDER BY population DESC LIMIT 12; +name,population +Shiraz,1053025 +Donetsk,1050000 +Ludhiana,1042740 +Jilin,1040000 +Tangshan,1040000 +Vadodara (Baroda),1031346 +Maputo,1018938 +Montr�al,1016376 +Kitakyushu,1016264 +Kalyan,1014557 +Birmingham,1013000 +Rostov-na-Donu,1012700 +[SQL] Disconnected + +Sleeping... +``` + +--- + + +#### 17. Complex_Select on Teensy 4.1 with QNEthernet + +This is terminal debug output when running [Complex_Select](examples/NativeEthernet/Complex_Select) on **Teensy 4.1 using QNEthernet** connecting to MariaDB Server. + +``` +Starting Complex_Select on TEENSY 4.1 using QNEthernet +MySQL_MariaDB_Generic v1.7.2 +=========== USE_QN_ETHERNET =========== +Initialize Ethernet using static IP => Connected! IP address: 192.168.2.222 +Connecting to SQL Server @ your_account.ddns.net , Port = 5698 +User = invited-guest , PW = the-invited-guest , DB = world +Connecting... +[SQL] Connecting to Server: your_account.ddns.net , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.29-MariaDB-0+deb10u1 +==================================================== +> Running SELECT with dynamically supplied parameter +SELECT name, population FROM world.city WHERE population < 837930 ORDER BY population DESC LIMIT 12; +name,population +S�o Lu�s,837588 +Wuxi,830000 +Ouagadougou,824000 +Ciudad de Guatemala,823301 +Coimbatore,816321 +Tegucigalpa,813900 +Xuzhou,810000 +Bamako,809552 +Mbuji-Mayi,806475 +Cartagena,805757 +Ahvaz,804980 +Bengasi,804000 +[SQL] Disconnected + +Sleeping... +================================================ +``` + +--- + + +#### 18. Complex_Insert on PORTENTA_H7_M7 using Portenta_Ethernet + +This is terminal debug output when running [Complex_Insert](examples/Portenta_H7/Ethernet/Complex_Insert) on **PORTENTA_H7_M7 using Portenta_Ethernet** connecting to MariaDB Server. + +``` +Starting Complex_Insert on PORTENTA_H7_M7 , with Ethernet using Portenta_Ethernet Library +MySQL_MariaDB_Generic v1.7.2 +Using mac index = 14 +Connected! IP address: 192.168.2.132 +Connecting to SQL Server @ 192.168.2.112 , Port = 5698 +User = invited-guest , PW = the-invited-guest +DB = test_arduino , Table = hello_sensor +Connecting... +[SQL] Connecting to Server: 192.168.2.112 , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.29-MariaDB-0+deb10u1 +INSERT INTO test_arduino.hello_sensor (message, sensor_num, value) VALUES ('test sensor',24,50.1) +Complex Data Inserted. +[SQL] Disconnected + +Sleeping... +================================================ +``` + +--- + + +#### 19. Complex_Select_WiFi on PORTENTA_H7_M7 + +This is terminal debug output when running [Complex_Insert_WiFi](examples/Portenta_H7/WiFi/Complex_Insert_WiFi) on **TPORTENTA_H7_M7 using Murata WiFi** connecting to MariaDB Server. + +``` +Starting Complex_Select_WiFi on PORTENTA_H7_M7 +MySQL_MariaDB_Generic v1.7.2 +Connecting to HueNet1 +Connected to network. My IP address is: 192.168.2.130 +Connecting to SQL Server @ 192.168.2.112 , Port = 5698 +User = invited-guest , PW = the-invited-guest , DB = world +Connecting... +[SQL] Connecting to Server: 192.168.2.112 , Port = 5698 +[SQL] Connected. Server Version = 5.5.5-10.3.29-MariaDB-0+deb10u1 +==================================================== +> Running SELECT with dynamically supplied parameter +SELECT name, population FROM world.city WHERE population < 928790 ORDER BY population DESC LIMIT 6; +name,population +Patna,917243 +Hohhot,916700 +Rosario,907718 +Voronez,907700 +Soweto,904165 +Torino,903705 +[SQL] Disconnected + +Sleeping... +================================================ +``` + + +--- +--- + +### Debug + +Debug is enabled by default on Serial. Debug Level from 0 to 4. To disable, change the _MYSQL_LOGLEVEL_ to 0 + +```cpp +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 +``` + +--- + +### Troubleshooting + +If you get compilation errors, more often than not, you may need to install a newer version of the core for Arduino boards. + +Sometimes, the library will only work if you update the board core to the latest version because I am using newly added functions. + + +--- +--- + + +### Issues ### + +Submit issues to: [MySQL_MariaDB_Generic issues](https://github.com/khoih-prog/MySQL_MariaDB_Generic/issues) + +--- +--- + +### TO DO + + 1. Support more boards + 2. Support more non-compatible Ethernet Libraries such as Ethernet_Shield_W5200, EtherCard, EtherSia + 3. Bug fixing. + +--- + +### DONE + + 1. Add support to **Arduino SAMD21 (ZERO, MKR, NANO_33_IOT, etc.)** + 2. Add support to **Adafruit SAMD21 (Itsy-Bitsy M0, Metro M0, Feather M0 Express, etc.)**. + 3. Add support to **Adafruit SAMD51 (Itsy-Bitsy M4, Metro M4, Grand Central M4, Feather M4 Express, etc.)**. + 4. Add support to **Seeeduino SAMD21/SAMD51: LoRaWAN, Zero, Femto M0, XIAO M0, Wio GPS Board, Wio Terminal, Grove UI Wireless, etc.** + 5. Add support to **Adafruit nRF52 ( Feather nRF52832, nRF52840 Express, BlueFruit Sense, Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B302_ublox, NINA_B112_ublox, etc.**. + 6. Add support to **STM32F/L/H/G/WB/MP1.** + 7. Add support to SAM DUE and AVR Mega. + 8. Add support to ESP32/ESP8266. + 9. Add support to **WiFiNINA** using [`WiFiNINA_Generic library`](https://github.com/khoih-prog/WiFiNINA_Generic) and WiFiNINA library. +10. Add support to **Ethernet W5x00**, using either [`Ethernet`](https://www.arduino.cc/en/Reference/Ethernet), [`Ethernet2`](https://github.com/khoih-prog/Ethernet2), [`Ethernet3`](https://github.com/khoih-prog/Ethernet3) or [`EthernetLarge`](https://github.com/OPEnSLab-OSU/EthernetLarge) library +11. Add support to **ESP8266/ESP32-AT**, using either [`ESP8266_AT_WebServer library`](https://github.com/khoih-prog/ESP8266_AT_WebServer) or [`WiFiEspAT library`](https://github.com/jandrassy/WiFiEspAT) library +12. Add support to **Ethernet LAN8742A**, using [`STM32Ethernet library`](https://github.com/stm32duino/STM32Ethernet) and [`STM32duino_LwIP library`](https://github.com/stm32duino/LwIP). +13. Split each example into several manageable files. +14. Support ENC28J60 using [`UIPEthernet library`](https://github.com/UIPEthernet/UIPEthernet). +15. Support ENC28J60 using [`EthernetENC library`](https://github.com/jandrassy/EthernetENC). +16. Add Table of Contents and Version String +17. Add support to **ESP32-S2 (ESP32-S2 Saola, AI-Thinker ESP-12K, etc.)** +18. Add support to RP2040-based boards, such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, using [**Earle Philhower's arduino-pico core**](https://github.com/earlephilhower/arduino-pico) to use LittleFS with or without Blynk/WiFiManager features. +19. Add support to RP2040-based boards, such as **Nano_RP2040_Connect, RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, using [**Arduino-mbed RP2040** core](https://github.com/arduino/ArduinoCore-mbed) to use LittleFS with or without Blynk/WiFiManager features. +20. Add support to WT32_ETH01 (ESP32 + LAN8720A) +21. Add support to Teensy 4.1 built-in Ethernet using [`NativeEthernet`](https://github.com/vjmuzik/NativeEthernet) library +22. Add support to Teensy 4.1 built-in Ethernet using [`QNEthernet`](https://github.com/ssilverman/QNEthernet) library +23. Add new feature to permit using either server's hostname, such as `your_account.duckdns.org`, or server's IPAddress, such as IPAddress(192,168,2,112) +24. Add support to **Portenta_H7**, using either `Murata WiFi` or `Vision-shield Ethernet` +25. Optimize library code by using `reference-passing` instead of `value-passing` +26. Fix memory leak and memory management bugs. +27. Add support to SAMD21/SAMD51 boards using [Fab_SAM_Arduino core](https://github.com/qbolsee/ArduinoCore-fab-sam) +28. Add support to RP2040 boards using `Seeed RP2040 core` +29 Convert to `h-only` style +30. Add `multiFileProject` examples to demo for multiple-file projects +31. Use new [**Ethernet_Generic** library](https://github.com/khoih-prog/Ethernet_Generic) as default for W5x00. +32. Support **SPI2 for ESP32** +33. Add support to SPI1 for RP2040 using [arduino-pico core](https://github.com/earlephilhower/arduino-pico) +34. Use new function `waitForLink()` for Teensy 4.1 `QNEthernet library v0.14.0+` + +--- +--- + +### Contributions and Thanks + +1. Based on and modified from [Dr. Charles Bell's MySQL_Connector_Arduino Library](https://github.com/ChuckBell/MySQL_Connector_Arduino) +2. Thanks to good work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip) for initiating, inspriring, working with, developing, debugging and testing. +3. Thanks to [graham999au](https://github.com/graham999au) for the enhanement request [**NativeEthernet support for Teensy 4.1** #8](https://github.com/khoih-prog/MySQL_MariaDB_Generic/issues/8), and help testing, leading to new version v1.3.0 +4. Thanks to [Pablo Martikian](https://github.com/pabloandresm) to report issues and create bug-fixing PR: + + - [memory leak on 'server_version' #17](https://github.com/khoih-prog/MySQL_MariaDB_Generic/issues/17) + - [memory leak on MySQL_Connection.MySQL_Packet.buffer #18](https://github.com/khoih-prog/MySQL_MariaDB_Generic/issues/18) + - [corrupt heap at MySQL_Connection destructor #19](https://github.com/khoih-prog/MySQL_MariaDB_Generic/issues/19) + - [malloc server_version result not correctly handled may lead to memory corruption #20](https://github.com/khoih-prog/MySQL_MariaDB_Generic/issues/20) + - [fix server_version memory management #21](https://github.com/khoih-prog/MySQL_MariaDB_Generic/pull/21) + - [suggest replacing all files xxxx_Impl.h by xxxx.cpp #22](https://github.com/khoih-prog/MySQL_MariaDB_Generic/issues/22) + +leading to version v1.6.0, v1.6.1 and v1.7.0 to fix memory leak / management bugs / `Multiple Definitions` Linker Error. + + + + + + + + +
ChuckBell
⭐️ ChuckBell

tcpipchip
Miguel Wisintainer

graham999au
graham999au

pabloandresm
⭐️ Pablo Martikian

+ +--- + +### Contributing + +If you want to contribute to this project: +- Report bugs and errors +- Ask for enhancements +- Create issues and pull requests +- Tell other people about this library + +--- + +### License + +- Most of the credits go to original author [Dr. Charles Bell](https://github.com/ChuckBell) + +- The library is licensed under [MIT](https://github.com/khoih-prog/WebSockets2_Generic/blob/master/LICENSE) + +--- + +## Copyright + +1. Copyright (c) 2012- Oracle +2. Copyright (c) 2012- Dr. Charles Bell +3. Copyright (c) 2020- Khoi Hoang + + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/changelog.md b/libraries/MySQL_MariaDB_Generic-1.7.2/changelog.md new file mode 100644 index 0000000..6003c23 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/changelog.md @@ -0,0 +1,155 @@ +## MySQL_MariaDB_Generic + +[![arduino-library-badge](https://www.ardu-badge.com/badge/MySQL_MariaDB_Generic.svg?)](https://www.ardu-badge.com/MySQL_MariaDB_Generic) +[![GitHub release](https://img.shields.io/github/release/khoih-prog/MySQL_MariaDB_Generic.svg)](https://github.com/khoih-prog/MySQL_MariaDB_Generic/releases) +[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/khoih-prog/MySQL_MariaDB_Generic/blob/master/LICENSE) +[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing) +[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/MySQL_MariaDB_Generic.svg)](http://github.com/khoih-prog/MySQL_MariaDB_Generic/issues) + +--- +--- + +## Table of Contents + +* [Changelog](#changelog) + * [Release v1.7.2](#release-v172) + * [Release v1.7.1](#release-v171) + * [Release v1.7.0](#release-v170) + * [Release v1.6.1](#release-v161) + * [Release v1.6.0](#release-v160) + * [Release v1.5.2](#release-v152) + * [Release v1.5.1](#release-v151) + * [Major Release v1.5.0](#major-release-v150) + * [Major Release v1.4.0](#major-release-v140) + * [Release v1.3.1](#release-v131) + * [Release v1.3.0](#release-v130) + * [Release v1.2.0](#release-v120) + * [Major Release v1.1.0](#major-release-v110) + * [Release v1.0.3](#release-v103) + * [Release v1.0.2](#release-v102) + * [Release v1.0.1](#release-v101) + * [Release v1.0.0](#release-v100) + +--- +--- + +## Changelog + +### Release v1.7.2 + +1. Fix missing paragraph in `library.properties` resulting in Arduino IDE's invalid library complaint + +### Release v1.7.1 + +1. Use new [Ethernet_Generic library](https://github.com/khoih-prog/Ethernet_Generic) as default for W5x00. +2. Support SPI2 for ESP32 +3. Add support to SPI1 for RP2040 using [arduino-pico core](https://github.com/earlephilhower/arduino-pico) +4. Use new function `waitForLink()` for Teensy 4.1 QNEthernet library v0.14.0+ +5. Rewrite all the examples to support those new features +6. Update `Packages' Patches` + +### Release v1.7.0 + +1. Convert to `h-only` style +2. Add `multiFileProject` examples to demo for multiple-file projects + +### Release v1.6.1 + +1. Fix memory management bugs. Check [corrupt heap at MySQL_Connection destructor #19](https://github.com/khoih-prog/MySQL_MariaDB_Generic/issues/19) and [malloc server_version result not correctly handled may lead to memory corruption #20](https://github.com/khoih-prog/MySQL_MariaDB_Generic/issues/20) +2. Add support to SAMD21/SAMD51 boards using [Fab_SAM_Arduino core](https://github.com/qbolsee/ArduinoCore-fab-sam) +3. Add support to RP2040 boards using `Seeed RP2040 core` +4. Add `Packages' Patches` for [Fab_SAM_Arduino core](https://github.com/qbolsee/ArduinoCore-fab-sam) + +### Release v1.6.0 + +1. Fix memory leak bugs. Check [memory leak on 'server_version' #17](https://github.com/khoih-prog/MySQL_MariaDB_Generic/issues/17) and [memory leak on MySQL_Connection.MySQL_Packet.buffer #18](https://github.com/khoih-prog/MySQL_MariaDB_Generic/issues/18) +2. Optimize library code by using `reference-passing` instead of `value-passing` +3. Update RP2040 Ethernet-related examples to use the same SS/CS pin GP17 for [ArduinoCore-mbed mbed_rp2040 core](https://github.com/arduino/ArduinoCore-mbed) as [arduino-pico rp2040 core](https://github.com/earlephilhower/arduino-pico) +4. Update `Packages' Patches` + +### Release v1.5.2 + +1. Auto detect ESP32 core version. +2. Fix bug in examples for WT32_ETH01 +3. Update `Packages' Patches` + +### Release v1.5.1 + +1. Update `platform.ini` and `library.json` to use original `khoih-prog` instead of `khoih.prog` after PIO fix +2. Update `Packages' Patches` + +### Major Release v1.5.0 + +1. Add support to **Portenta_H7**, using either WiFi or Vision-shield Ethernet +2. Add examples with new features + +### Major Release v1.4.0 + +1. Add support to [QNEthernet Library](https://github.com/ssilverman/QNEthernet) for Teensy 4.1 built-in Ethernet +2. Fix bug in non-blocking connection +3. Add new feature to permit using either server's hostname, such as `your_account.duckdns.org`, or server's IPAddress, such as IPAddress(192,168,2,112) +4. Update examples with new features, bug-fixes, etc. + +### Release v1.3.1 + +1. Remove unnecessary SPI-bus code in NativeEthernet examples + +### Release v1.3.0 + +1. Add support to **Teensy 4.1 using NativeEthernet** + +### Release v1.2.0 + +1. Add support to WT32_ETH01 (ESP32 + LAN8720A) + +### Major Release v1.1.0 + +1. Add support to RP2040-based boards, such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, using [**Earle Philhower's arduino-pico** v1.8.0+ core](https://github.com/earlephilhower/arduino-pico). +2. Add support to RP2040-based boards, such as **Nano_RP2040_Connect, RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, using [**Arduino-mbed RP2040** v2.1.0+ core](https://github.com/arduino/ArduinoCore-mbed). +3. Add support to new **ESP32-S2** boards (**Arduino ESP32C3_DEV**). Check [HOWTO Install esp32 core for ESP32-S2 (Saola, AI-Thinker ESP-12K) and ESP32-C3 boards into Arduino IDE](#howto-install-esp32-core-for-esp32-s2-saola-ai-thinker-esp-12k-and-esp32-c3-boards-into-arduino-ide). +4. Verify working with new ESP8266 core v3.0.0 and new ESP32 core v1.0.6 +5. Suppress all warnings possible. +6. Add Table of Contents and Version String + +### Release v1.0.3 + + 1. Add support to ENC28J60 Ethernet module/shield using new **EthernetENC** library. + 2. Update Platform.ini to support PlatformIO 5.x owner-based dependency declaration. + 3. Enhance examples + +#### Release v1.0.2 + + 1. Fix crashing bug when Client timeout. + 2. Make code more error-proof. + 3. Drop support to ESP8266_AT_Webserver. + 4. Enhance examples + +#### Release v1.0.1 + + 1. Add support to ENC28J60 Ethernet module/shield using **UIPEthernet** library. + 2. Fix bugs + 3. Optimize code + 4. Enhance examples + 5. Add UIPEthernet Library Patches for SAMD21/SAMD51 + +#### Release v1.0.0 + + 1. Add support to **nRF52** boards, such as **AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B302_ublox, NINA_B112_ublox, etc.** + 2. Add support to **Adafruit SAMD51 (Itsy-Bitsy M4, Metro M4, Grand Central M4, Feather M4 Express, etc.)** + 3. Add support to **Adafruit SAMD21 Itsy-Bitsy M0, Feathr M0, Metro M0, AdaFruit CIRCUITPLAYGROUND_EXPRESS, etc.)** + 4. Add support to **Arduino SAMD21 (ZERO, MKR, NANO_33_IOT, etc.)** + 5. Add support to all **STM32F/L/H/G/WB/MP1 (Nucleo-144 NUCLEO_F767ZI, Nucleo-64 NUCLEO_L053R8, etc.)** + 6. Add support to **Seeeduino SAMD21/SAMD51 boards (SEEED_WIO_TERMINAL, SEEED_FEMTO_M0, SEEED_XIAO_M0, Wio_Lite_MG126, WIO_GPS_BOARD, SEEEDUINO_ZERO, SEEEDUINO_LORAWAN, SEEED_GROVE_UI_WIRELESS, etc.)** + 7. Add support to **SAM DUE and AVR Mega** boards. + 8. Add support to **ESP32/ESP8266** boards. + 9. Add connectNonBlocking() function to use in loop() to avoid being blocked running other tasks. +10. Add support to WiFiNINA using [**WiFiNINA_Generic library**](https://github.com/khoih-prog/WiFiNINA_Generic) or WiFiNINA library. +11. Add support to W5x00 Ethernet module/shield using Ethernet, EthernetLarge, Ethernet2 or Ethernet3 library. +12. Add support to LAN8742A Ethernet module/shield using STM32Ethernet library. +13. Add support to ESP8266/ESP32-AT-command module/shield using [`WiFiEspAT library`](https://github.com/jandrassy/WiFiEspAT) or [`ESP8266_AT_WebServer library`](https://github.com/khoih-prog/ESP8266_AT_WebServer). +14. Add Packages' Patches. +15. Add sample Packages_Patches for **STM32F/L/H/G/WB/MP1** (Nucleo-144 NUCLEO_F767ZI, Nucleo-64 NUCLEO_L053R8) +16. Add Ethernet Library Patches +17. Add many examples + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Basic_Insert/Basic_Insert.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Basic_Insert/Basic_Insert.ino new file mode 100644 index 0000000..d01b60f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Basic_Insert/Basic_Insert.ino @@ -0,0 +1,292 @@ +/********************************************************************************************************************************* + Basic_Insert.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : basic insert + + This example demonstrates how to issue an INSERT query to store data in a + table. For this, we will create a special database and table for testing. + The following are the SQL commands you will need to run in order to setup + your database for running this sketch. + + CREATE DATABASE test_arduino; + CREATE TABLE test_arduino.hello_arduino ( + num integer primary key auto_increment, + message char(40), + recorded timestamp + ); + + Here we see one database and a table with three fields; a primary key that + is an auto_increment, a string, and a timestamp. This will demonstrate how + to save a date and time of when the row was inserted, which can help you + determine when data was recorded or updated. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Create the database and table as shown above. + 2) Change the address of the server to the IP address of the MySQL server + 3) Change the user and password to a valid MySQL user and password + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + 8) After the sketch has run for some time, open a mysql client and issue + the command: "SELECT * FROM test_arduino.hello_arduino" to see the data + recorded. Note the field values and how the database handles both the + auto_increment and timestamp fields for us. You can clear the data with + "DELETE FROM test_arduino.hello_arduino". + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "test_arduino"; //"test_arduino"; +char default_table[] = "hello_arduino"; //"test_arduino"; + +String default_value = "Hello, Arduino!"; + +// Sample query +String INSERT_SQL = String("INSERT INTO ") + default_database + "." + default_table + + " (message) VALUES ('" + default_value + "')"; + +MySQL_Connection conn((Client *)&client); + +void initEthernet() +{ +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Default SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#if defined(ESP8266) + // For ESP8266, change for other boards if necessary + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN D2 // For ESP8266 + #endif + + MYSQL_LOGERROR1(F("ESP8266 setCsPin:"), USE_THIS_SS_PIN); + + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // For ESP8266 + // Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8 + // Ethernet 0 X X X X 0 + // Ethernet2 X X X X X 0 + // Ethernet3 X X X X X 0 + // EthernetLarge X X X X X 0 + // Ethernet_ESP8266 0 0 0 0 0 0 + // D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs + // Must use library patch for Ethernet, EthernetLarge libraries + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif defined(ESP32) + + // You can use Ethernet.init(pin) to configure the CS pin + //Ethernet.init(10); // Most Arduino shields + //Ethernet.init(5); // MKR ETH shield + //Ethernet.init(0); // Teensy 2.0 + //Ethernet.init(20); // Teensy++ 2.0 + //Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet + //Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet + + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 22 // For ESP32 + #endif + + MYSQL_LOGERROR1(F("ESP32 setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // ESP32 => GPIO2,4,5,13,15,21,22 OK with Ethernet, Ethernet2, EthernetLarge + // ESP32 => GPIO2,4,5,15,21,22 OK with Ethernet3 + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif ETHERNET_USE_RPIPICO + + pinMode(USE_THIS_SS_PIN, OUTPUT); + digitalWrite(USE_THIS_SS_PIN, HIGH); + + // ETHERNET_USE_RPIPICO, use default SS = 5 or 17 + #ifndef USE_THIS_SS_PIN + #if defined(ARDUINO_ARCH_MBED) + #define USE_THIS_SS_PIN 17 // For Arduino Mbed core + #else + #define USE_THIS_SS_PIN 17 // For E.Philhower core + #endif + #endif + + MYSQL_LOGERROR1(F("RPIPICO setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + // Default pin 5/17 to SS/CS + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_LARGE ) + +#else //defined(ESP8266) + // unknown board, do nothing, use default SS = 10 + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 10 // For other boards + #endif + + MYSQL_LOGERROR3(F("Board :"), BOARD_NAME, F(", setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, Ethernet2, EthernetLarge libraries + + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#endif //defined(ESP8266) + +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + // Just info to know how to connect correctly + #if defined(CUR_PIN_MISO) + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), CUR_PIN_MOSI); + MYSQL_LOGERROR1(F("MISO:"), CUR_PIN_MISO); + MYSQL_LOGERROR1(F("SCK:"), CUR_PIN_SCK); + MYSQL_LOGERROR1(F("SS:"), CUR_PIN_SS); + #else + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + #endif + + MYSQL_LOGERROR(F("=========================")); +#endif + +#endif // #if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Basic_Insert on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + MYSQL_DISPLAY(INSERT_SQL); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(INSERT_SQL.c_str()) ) + { + MYSQL_DISPLAY("Insert error"); + } + else + { + MYSQL_DISPLAY("Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Basic_Insert/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Basic_Insert/defines.h new file mode 100644 index 0000000..c6efb3d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Basic_Insert/defines.h @@ -0,0 +1,463 @@ +/********************************************************************************************************************************* + 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_ 2 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #if defined(ARDUINO_TEENSY41) + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET true + #elif defined(ARDUINO_TEENSY40) + #define BOARD_TYPE "TEENSY 4.0" + #else + #define + #endif + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 17 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + // For RPI Pico using E. Philhower RP2040 core + #if (USING_SPI2) + // SCK: GPIO14, MOSI: GPIO15, MISO: GPIO12, SS/CS: GPIO13 for SPI1 + #define USE_THIS_SS_PIN 13 + #else + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 for SPI0 + #define USE_THIS_SS_PIN 17 + #endif + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// 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 +////// + +#if USE_CUSTOM_ETHERNET + // You have to include an Ethernet library in your program + //#include "Ethernet_XYZ.h" + #include "EthernetLarge.h" + + #define SHIELD_TYPE "Custom Ethernet using EthernetLarge Library" +#endif + +#if (_MYSQL_LOGLEVEL_ > 1) + #if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #elif USE_QN_ETHERNET + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_NATIVE_ETHERNET + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_ETHERNET_GENERIC + #warning Using Ethernet_Generic lib + #elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #elif USE_CUSTOM_ETHERNET + #warning Using Custom Ethernet library + #else + #define USE_ETHERNET_GENERIC true + + #warning Using Ethernet_Generic lib + #endif +#endif + +#if !( USE_ETHERNET_ENC || USE_ETHERNET_ESP8266 || USE_UIP_ETHERNET || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720 || USE_NATIVE_ETHERNET || \ + USE_QN_ETHERNET || USE_CUSTOM_ETHERNET || USE_ETHERNET_PORTENTA_H7 || USE_CUSTOM_ETHERNET ) + #define USE_ETHERNET_GENERIC true +#endif + +#if USE_ETHERNET_GENERIC + #define ETHERNET_LARGE_BUFFERS + + #define _ETG_LOGLEVEL_ 1 +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Basic_Select/Basic_Select.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Basic_Select/Basic_Select.ino new file mode 100644 index 0000000..3f6583f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Basic_Select/Basic_Select.ino @@ -0,0 +1,326 @@ +/********************************************************************************************************************************* + Basic_Select.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : basic select + + This example demonstrates how to issue a SELECT query with no parameters + and use the data returned. For this, we use the Cursor class to execute + the query and get the results. + + It demonstrates who methods for running queries. The first allows you to + allocate memory for the cursor and later reclaim it, the second shows how + to use a single instance of the cursor use throughout a sketch. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + CAUTION: Don't mix and match the examples. Use one or the other in your + own sketch -- you'll get compilation errors at the least. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "world"; //"test_arduino"; +char default_table[] = "city"; //"test_arduino"; + +String default_column = "population"; +String default_value = "Toronto"; + +String query = String("SELECT ") + default_column + " FROM " + default_database + "." + default_table + + " WHERE name = '" + default_value + "'"; + +MySQL_Connection conn((Client *)&client); +// Create an instance of the cursor passing in the connection +MySQL_Query sql_query = MySQL_Query(&conn); + +void initEthernet() +{ +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Default SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#if defined(ESP8266) + // For ESP8266, change for other boards if necessary + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN D2 // For ESP8266 + #endif + + MYSQL_LOGERROR1(F("ESP8266 setCsPin:"), USE_THIS_SS_PIN); + + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // For ESP8266 + // Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8 + // Ethernet 0 X X X X 0 + // Ethernet2 X X X X X 0 + // Ethernet3 X X X X X 0 + // EthernetLarge X X X X X 0 + // Ethernet_ESP8266 0 0 0 0 0 0 + // D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs + // Must use library patch for Ethernet, EthernetLarge libraries + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif defined(ESP32) + + // You can use Ethernet.init(pin) to configure the CS pin + //Ethernet.init(10); // Most Arduino shields + //Ethernet.init(5); // MKR ETH shield + //Ethernet.init(0); // Teensy 2.0 + //Ethernet.init(20); // Teensy++ 2.0 + //Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet + //Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet + + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 22 // For ESP32 + #endif + + MYSQL_LOGERROR1(F("ESP32 setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // ESP32 => GPIO2,4,5,13,15,21,22 OK with Ethernet, Ethernet2, EthernetLarge + // ESP32 => GPIO2,4,5,15,21,22 OK with Ethernet3 + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif ETHERNET_USE_RPIPICO + + pinMode(USE_THIS_SS_PIN, OUTPUT); + digitalWrite(USE_THIS_SS_PIN, HIGH); + + // ETHERNET_USE_RPIPICO, use default SS = 5 or 17 + #ifndef USE_THIS_SS_PIN + #if defined(ARDUINO_ARCH_MBED) + #define USE_THIS_SS_PIN 17 // For Arduino Mbed core + #else + #define USE_THIS_SS_PIN 17 // For E.Philhower core + #endif + #endif + + MYSQL_LOGERROR1(F("RPIPICO setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + // Default pin 5/17 to SS/CS + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_LARGE ) + +#else //defined(ESP8266) + // unknown board, do nothing, use default SS = 10 + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 10 // For other boards + #endif + + MYSQL_LOGERROR3(F("Board :"), BOARD_NAME, F(", setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, Ethernet2, EthernetLarge libraries + + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#endif //defined(ESP8266) + +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + // Just info to know how to connect correctly + #if defined(CUR_PIN_MISO) + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), CUR_PIN_MOSI); + MYSQL_LOGERROR1(F("MISO:"), CUR_PIN_MISO); + MYSQL_LOGERROR1(F("SCK:"), CUR_PIN_SCK); + MYSQL_LOGERROR1(F("SS:"), CUR_PIN_SS); + #else + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + #endif + + MYSQL_LOGERROR(F("=========================")); +#endif + +#endif // #if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Basic_Select on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runQuery() +{ + row_values *row = NULL; + long head_count = 0; + + MYSQL_DISPLAY("1) Demonstrating using a dynamically allocated query."); + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + MYSQL_DISPLAY(query); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(query.c_str()) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Fetch the columns (required) but we don't use them. + //column_names *columns = query_mem.get_columns(); + query_mem.get_columns(); + + // Read the row (we are only expecting the one) + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + head_count = atol(row->values[0]); + } + } while (row != NULL); + + // Show the result + MYSQL_DISPLAY1(" Toronto pop =", head_count); + + delay(500); + + MYSQL_DISPLAY("2) Demonstrating using a local, global query."); + + // Execute the query + MYSQL_DISPLAY(query); + sql_query.execute(query.c_str()); + + // Fetch the columns (required) but we don't use them. + sql_query.get_columns(); + + // Read the row (we are only expecting the one) + do + { + row = sql_query.get_next_row(); + if (row != NULL) + { + head_count = atol(row->values[0]); + } + } while (row != NULL); + + // Now we close the cursor to free any memory + sql_query.close(); + + // Show the result but this time do some math on it + MYSQL_DISPLAY1(" Toronto pop =", head_count); + MYSQL_DISPLAY1(" Toronto pop increased by 11725 =", head_count + 11725); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Basic_Select/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Basic_Select/defines.h new file mode 100644 index 0000000..c6efb3d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Basic_Select/defines.h @@ -0,0 +1,463 @@ +/********************************************************************************************************************************* + 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_ 2 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #if defined(ARDUINO_TEENSY41) + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET true + #elif defined(ARDUINO_TEENSY40) + #define BOARD_TYPE "TEENSY 4.0" + #else + #define + #endif + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 17 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + // For RPI Pico using E. Philhower RP2040 core + #if (USING_SPI2) + // SCK: GPIO14, MOSI: GPIO15, MISO: GPIO12, SS/CS: GPIO13 for SPI1 + #define USE_THIS_SS_PIN 13 + #else + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 for SPI0 + #define USE_THIS_SS_PIN 17 + #endif + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// 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 +////// + +#if USE_CUSTOM_ETHERNET + // You have to include an Ethernet library in your program + //#include "Ethernet_XYZ.h" + #include "EthernetLarge.h" + + #define SHIELD_TYPE "Custom Ethernet using EthernetLarge Library" +#endif + +#if (_MYSQL_LOGLEVEL_ > 1) + #if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #elif USE_QN_ETHERNET + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_NATIVE_ETHERNET + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_ETHERNET_GENERIC + #warning Using Ethernet_Generic lib + #elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #elif USE_CUSTOM_ETHERNET + #warning Using Custom Ethernet library + #else + #define USE_ETHERNET_GENERIC true + + #warning Using Ethernet_Generic lib + #endif +#endif + +#if !( USE_ETHERNET_ENC || USE_ETHERNET_ESP8266 || USE_UIP_ETHERNET || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720 || USE_NATIVE_ETHERNET || \ + USE_QN_ETHERNET || USE_CUSTOM_ETHERNET || USE_ETHERNET_PORTENTA_H7 || USE_CUSTOM_ETHERNET ) + #define USE_ETHERNET_GENERIC true +#endif + +#if USE_ETHERNET_GENERIC + #define ETHERNET_LARGE_BUFFERS + + #define _ETG_LOGLEVEL_ 1 +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Complex_Insert/Complex_Insert.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Complex_Insert/Complex_Insert.ino new file mode 100644 index 0000000..49ad166 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Complex_Insert/Complex_Insert.ino @@ -0,0 +1,317 @@ +/********************************************************************************************************************************* + Complex_Insert.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : complex insert + + This example demonstrates how to issue an INSERT query to store data in a + table using data from variables in our sketch. In this case, we supply the + values dynamically. + + This sketch simulates storing data from a sensor in a table. + + For this, we will create a special database and table for testing. + The following are the SQL commands you will need to run in order to setup + your database for running this sketch. + + CREATE DATABASE test_arduino; + CREATE TABLE test_arduino.hello_sensor ( + num integer primary key auto_increment, + message char(40), + sensor_num integer, + value float, + recorded timestamp + ); + + Here we have a table that contains an auto_increment primary key, a text + field, a field to identify the sensor, the value read, and timestamp of + the recorded data. + + Note: Since this sketch uses test data, we place the INSERT in the setup() + method so that it runs only once. Typically, you would have the + INSERT in the loop() method after your code to read from the sensor. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Create the database and table as shown above. + 2) Change the address of the server to the IP address of the MySQL server + 3) Change the user and password to a valid MySQL user and password + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + 8) After the sketch has run for some time, open a mysql client and issue + the command: "SELECT * FROM test_arduino.hello_sensor" to see the data + recorded. Note the field values and how the database handles both the + auto_increment and timestamp fields for us. You can clear the data with + "DELETE FROM test_arduino.hello_sensor". + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "test_arduino"; //"test_arduino"; +char default_table[] = "hello_sensor"; //"test_arduino"; + +// Sample query +char INSERT_DATA[] = "INSERT INTO %s.%s (message, sensor_num, value) VALUES ('%s',%d,%s)"; + +char query[128]; +char temperature[10]; + +MySQL_Connection conn((Client *)&client); + +#if !( ESP32 || ESP8266 || defined(CORE_TEENSY) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || ( defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_MBED) ) ) + +char *dtostrf(double val, signed char width, unsigned char prec, char *sout) +{ + char fmt[20]; + sprintf(fmt, "%%%d.%df", width, prec); + sprintf(sout, fmt, val); + return sout; +} +#endif + +void initEthernet() +{ +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Default SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#if defined(ESP8266) + // For ESP8266, change for other boards if necessary + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN D2 // For ESP8266 + #endif + + MYSQL_LOGERROR1(F("ESP8266 setCsPin:"), USE_THIS_SS_PIN); + + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // For ESP8266 + // Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8 + // Ethernet 0 X X X X 0 + // Ethernet2 X X X X X 0 + // Ethernet3 X X X X X 0 + // EthernetLarge X X X X X 0 + // Ethernet_ESP8266 0 0 0 0 0 0 + // D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs + // Must use library patch for Ethernet, EthernetLarge libraries + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif defined(ESP32) + + // You can use Ethernet.init(pin) to configure the CS pin + //Ethernet.init(10); // Most Arduino shields + //Ethernet.init(5); // MKR ETH shield + //Ethernet.init(0); // Teensy 2.0 + //Ethernet.init(20); // Teensy++ 2.0 + //Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet + //Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet + + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 22 // For ESP32 + #endif + + MYSQL_LOGERROR1(F("ESP32 setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // ESP32 => GPIO2,4,5,13,15,21,22 OK with Ethernet, Ethernet2, EthernetLarge + // ESP32 => GPIO2,4,5,15,21,22 OK with Ethernet3 + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif ETHERNET_USE_RPIPICO + + pinMode(USE_THIS_SS_PIN, OUTPUT); + digitalWrite(USE_THIS_SS_PIN, HIGH); + + // ETHERNET_USE_RPIPICO, use default SS = 5 or 17 + #ifndef USE_THIS_SS_PIN + #if defined(ARDUINO_ARCH_MBED) + #define USE_THIS_SS_PIN 17 // For Arduino Mbed core + #else + #define USE_THIS_SS_PIN 17 // For E.Philhower core + #endif + #endif + + MYSQL_LOGERROR1(F("RPIPICO setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + // Default pin 5/17 to SS/CS + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_LARGE ) + +#else //defined(ESP8266) + // unknown board, do nothing, use default SS = 10 + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 10 // For other boards + #endif + + MYSQL_LOGERROR3(F("Board :"), BOARD_NAME, F(", setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, Ethernet2, EthernetLarge libraries + + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#endif //defined(ESP8266) + +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + // Just info to know how to connect correctly + #if defined(CUR_PIN_MISO) + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), CUR_PIN_MOSI); + MYSQL_LOGERROR1(F("MISO:"), CUR_PIN_MISO); + MYSQL_LOGERROR1(F("SCK:"), CUR_PIN_SCK); + MYSQL_LOGERROR1(F("SS:"), CUR_PIN_SS); + #else + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + #endif + + MYSQL_LOGERROR(F("=========================")); +#endif + +#endif // #if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Complex_Insert on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); + MYSQL_DISPLAY3("DB =", default_database, ", Table =", default_table); +} + +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + // Save + dtostrf(50.125, 1, 1, temperature); + sprintf(query, INSERT_DATA, default_database, default_table, "test sensor", 24, temperature); + + // Execute the query + MYSQL_DISPLAY(query); + + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Complex Insert error"); + } + else + { + MYSQL_DISPLAY("Complex Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Complex_Insert/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Complex_Insert/defines.h new file mode 100644 index 0000000..c6efb3d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Complex_Insert/defines.h @@ -0,0 +1,463 @@ +/********************************************************************************************************************************* + 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_ 2 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #if defined(ARDUINO_TEENSY41) + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET true + #elif defined(ARDUINO_TEENSY40) + #define BOARD_TYPE "TEENSY 4.0" + #else + #define + #endif + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 17 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + // For RPI Pico using E. Philhower RP2040 core + #if (USING_SPI2) + // SCK: GPIO14, MOSI: GPIO15, MISO: GPIO12, SS/CS: GPIO13 for SPI1 + #define USE_THIS_SS_PIN 13 + #else + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 for SPI0 + #define USE_THIS_SS_PIN 17 + #endif + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// 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 +////// + +#if USE_CUSTOM_ETHERNET + // You have to include an Ethernet library in your program + //#include "Ethernet_XYZ.h" + #include "EthernetLarge.h" + + #define SHIELD_TYPE "Custom Ethernet using EthernetLarge Library" +#endif + +#if (_MYSQL_LOGLEVEL_ > 1) + #if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #elif USE_QN_ETHERNET + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_NATIVE_ETHERNET + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_ETHERNET_GENERIC + #warning Using Ethernet_Generic lib + #elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #elif USE_CUSTOM_ETHERNET + #warning Using Custom Ethernet library + #else + #define USE_ETHERNET_GENERIC true + + #warning Using Ethernet_Generic lib + #endif +#endif + +#if !( USE_ETHERNET_ENC || USE_ETHERNET_ESP8266 || USE_UIP_ETHERNET || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720 || USE_NATIVE_ETHERNET || \ + USE_QN_ETHERNET || USE_CUSTOM_ETHERNET || USE_ETHERNET_PORTENTA_H7 || USE_CUSTOM_ETHERNET ) + #define USE_ETHERNET_GENERIC true +#endif + +#if USE_ETHERNET_GENERIC + #define ETHERNET_LARGE_BUFFERS + + #define _ETG_LOGLEVEL_ 1 +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Complex_Select/Complex_Select.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Complex_Select/Complex_Select.ino new file mode 100644 index 0000000..9529de8 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Complex_Select/Complex_Select.ino @@ -0,0 +1,323 @@ +/********************************************************************************************************************************* + Complex_Select.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : complex select + + This example demonstrates how to issue a SELECT query with parameters that + we provide from code. Thus, it demonstrates how to build query parameters + dynamically. + + Notice also the sketch demonstrates how to read columns and rows from + the result set. Study this example until you are familiar with how to + do this before writing your own sketch to read and consume query results. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "world"; //"test_arduino"; +char default_table[] = "city"; //"test_arduino"; + +// Sample query +// +// Notice the "%lu" - that's a placeholder for the parameter we will +// supply. See sprintf() documentation for more formatting specifier +// options +unsigned long QUERY_POPULATION = 800000; + +const char QUERY_POP[] = "SELECT name, population FROM world.city WHERE population < %lu ORDER BY population DESC LIMIT 12;"; + +char query[128]; + +MySQL_Connection conn((Client *)&client); + +void initEthernet() +{ +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Default SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#if defined(ESP8266) + // For ESP8266, change for other boards if necessary + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN D2 // For ESP8266 + #endif + + MYSQL_LOGERROR1(F("ESP8266 setCsPin:"), USE_THIS_SS_PIN); + + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // For ESP8266 + // Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8 + // Ethernet 0 X X X X 0 + // Ethernet2 X X X X X 0 + // Ethernet3 X X X X X 0 + // EthernetLarge X X X X X 0 + // Ethernet_ESP8266 0 0 0 0 0 0 + // D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs + // Must use library patch for Ethernet, EthernetLarge libraries + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif defined(ESP32) + + // You can use Ethernet.init(pin) to configure the CS pin + //Ethernet.init(10); // Most Arduino shields + //Ethernet.init(5); // MKR ETH shield + //Ethernet.init(0); // Teensy 2.0 + //Ethernet.init(20); // Teensy++ 2.0 + //Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet + //Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet + + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 22 // For ESP32 + #endif + + MYSQL_LOGERROR1(F("ESP32 setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // ESP32 => GPIO2,4,5,13,15,21,22 OK with Ethernet, Ethernet2, EthernetLarge + // ESP32 => GPIO2,4,5,15,21,22 OK with Ethernet3 + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif ETHERNET_USE_RPIPICO + + pinMode(USE_THIS_SS_PIN, OUTPUT); + digitalWrite(USE_THIS_SS_PIN, HIGH); + + // ETHERNET_USE_RPIPICO, use default SS = 5 or 17 + #ifndef USE_THIS_SS_PIN + #if defined(ARDUINO_ARCH_MBED) + #define USE_THIS_SS_PIN 17 // For Arduino Mbed core + #else + #define USE_THIS_SS_PIN 17 // For E.Philhower core + #endif + #endif + + MYSQL_LOGERROR1(F("RPIPICO setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + // Default pin 5/17 to SS/CS + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_LARGE ) + +#else //defined(ESP8266) + // unknown board, do nothing, use default SS = 10 + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 10 // For other boards + #endif + + MYSQL_LOGERROR3(F("Board :"), BOARD_NAME, F(", setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, Ethernet2, EthernetLarge libraries + + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#endif //defined(ESP8266) + +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + // Just info to know how to connect correctly + #if defined(CUR_PIN_MISO) + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), CUR_PIN_MOSI); + MYSQL_LOGERROR1(F("MISO:"), CUR_PIN_MISO); + MYSQL_LOGERROR1(F("SCK:"), CUR_PIN_SCK); + MYSQL_LOGERROR1(F("SS:"), CUR_PIN_SS); + #else + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + #endif + + MYSQL_LOGERROR(F("=========================")); +#endif + +#endif // #if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Complex_Select on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runQuery() +{ + MYSQL_DISPLAY("===================================================="); + MYSQL_DISPLAY("> Running SELECT with dynamically supplied parameter"); + + // Supply the parameter for the query + // Here we use the QUERY_POP as the format string and query as the + // destination. This uses twice the memory so another option would be + // to allocate one buffer for all formatted queries or allocate the + // memory as needed (just make sure you allocate enough memory and + // free it when you're done!). + sprintf(query, QUERY_POP, QUERY_POPULATION + (( millis() % 100000 ) * 10) ); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Fetch the columns and print them + column_names *cols = query_mem.get_columns(); + + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(cols->fields[f]->name); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(","); + } + } + + MYSQL_DISPLAY(); + + // Read the rows and print them + row_values *row = NULL; + + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(row->values[f]); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(","); + } + } + + MYSQL_DISPLAY(); + } + } while (row != NULL); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(10000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Complex_Select/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Complex_Select/defines.h new file mode 100644 index 0000000..6129def --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Complex_Select/defines.h @@ -0,0 +1,467 @@ +/********************************************************************************************************************************* + 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_ 2 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #if defined(ARDUINO_TEENSY41) + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_QN_ETHERNET false + #define USE_NATIVE_ETHERNET false + #elif defined(ARDUINO_TEENSY40) + #define BOARD_TYPE "TEENSY 4.0" + #else + #define + #endif + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 17 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + + //#define USING_SPI2 true + + // For RPI Pico using E. Philhower RP2040 core + #if (USING_SPI2) + // SCK: GPIO14, MOSI: GPIO15, MISO: GPIO12, SS/CS: GPIO13 for SPI1 + #define USE_THIS_SS_PIN 13 + #else + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 for SPI0 + #define USE_THIS_SS_PIN 17 + #endif + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// 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 +////// + +#if USE_CUSTOM_ETHERNET + // You have to include an Ethernet library in your program + //#include "Ethernet_XYZ.h" + #include "EthernetLarge.h" + + #define SHIELD_TYPE "Custom Ethernet using EthernetLarge Library" +#endif + +#if (_MYSQL_LOGLEVEL_ > 1) + #if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #elif USE_QN_ETHERNET + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_NATIVE_ETHERNET + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_ETHERNET_GENERIC + #warning Using Ethernet_Generic lib + #elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #elif USE_CUSTOM_ETHERNET + #warning Using Custom Ethernet library + #else + #define USE_ETHERNET_GENERIC true + + #warning Using Ethernet_Generic lib + #endif +#endif + +#if !( USE_ETHERNET_ENC || USE_ETHERNET_ESP8266 || USE_UIP_ETHERNET || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720 || USE_NATIVE_ETHERNET || \ + USE_QN_ETHERNET || USE_CUSTOM_ETHERNET || USE_ETHERNET_PORTENTA_H7 || USE_CUSTOM_ETHERNET ) + #define USE_ETHERNET_GENERIC true +#endif + +#if USE_ETHERNET_GENERIC + #define ETHERNET_LARGE_BUFFERS + + #define _ETG_LOGLEVEL_ 1 +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect/Connect.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect/Connect.ino new file mode 100644 index 0000000..ee5bc08 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect/Connect.ino @@ -0,0 +1,244 @@ +/********************************************************************************************************************************* + Connect.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : connect + + This example demonstrates how to connect to a MySQL server from an + Arduino using an Arduino-compatible Ethernet shield. Note that "compatible" + means it must conform to the Ethernet class library or be a derivative + with the same classes and methods. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "world"; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +MySQL_Connection conn((Client *)&client); + +void initEthernet() +{ +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Default SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#if defined(ESP8266) + // For ESP8266, change for other boards if necessary + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN D2 // For ESP8266 + #endif + + MYSQL_LOGERROR1(F("ESP8266 setCsPin:"), USE_THIS_SS_PIN); + + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // For ESP8266 + // Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8 + // Ethernet 0 X X X X 0 + // Ethernet2 X X X X X 0 + // Ethernet3 X X X X X 0 + // EthernetLarge X X X X X 0 + // Ethernet_ESP8266 0 0 0 0 0 0 + // D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs + // Must use library patch for Ethernet, EthernetLarge libraries + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif defined(ESP32) + + // You can use Ethernet.init(pin) to configure the CS pin + //Ethernet.init(10); // Most Arduino shields + //Ethernet.init(5); // MKR ETH shield + //Ethernet.init(0); // Teensy 2.0 + //Ethernet.init(20); // Teensy++ 2.0 + //Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet + //Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet + + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 22 // For ESP32 + #endif + + MYSQL_LOGERROR1(F("ESP32 setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // ESP32 => GPIO2,4,5,13,15,21,22 OK with Ethernet, Ethernet2, EthernetLarge + // ESP32 => GPIO2,4,5,15,21,22 OK with Ethernet3 + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif ETHERNET_USE_RPIPICO + + pinMode(USE_THIS_SS_PIN, OUTPUT); + digitalWrite(USE_THIS_SS_PIN, HIGH); + + // ETHERNET_USE_RPIPICO, use default SS = 5 or 17 + #ifndef USE_THIS_SS_PIN + #if defined(ARDUINO_ARCH_MBED) + #define USE_THIS_SS_PIN 17 // For Arduino Mbed core + #else + #define USE_THIS_SS_PIN 17 // For E.Philhower core + #endif + #endif + + MYSQL_LOGERROR1(F("RPIPICO setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + // Default pin 5/17 to SS/CS + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_LARGE ) + +#else //defined(ESP8266) + // unknown board, do nothing, use default SS = 10 + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 10 // For other boards + #endif + + MYSQL_LOGERROR3(F("Board :"), BOARD_NAME, F(", setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, Ethernet2, EthernetLarge libraries + + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#endif //defined(ESP8266) + +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + // Just info to know how to connect correctly + #if defined(CUR_PIN_MISO) + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), CUR_PIN_MOSI); + MYSQL_LOGERROR1(F("MISO:"), CUR_PIN_MISO); + MYSQL_LOGERROR1(F("SCK:"), CUR_PIN_SCK); + MYSQL_LOGERROR1(F("SS:"), CUR_PIN_SS); + #else + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + #endif + + MYSQL_LOGERROR(F("=========================")); +#endif + +#endif // #if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Connect on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password, default_database)) + if (conn.connectNonBlocking(server, server_port, user, password, default_database) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect/defines.h new file mode 100644 index 0000000..c6efb3d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect/defines.h @@ -0,0 +1,463 @@ +/********************************************************************************************************************************* + 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_ 2 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #if defined(ARDUINO_TEENSY41) + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET true + #elif defined(ARDUINO_TEENSY40) + #define BOARD_TYPE "TEENSY 4.0" + #else + #define + #endif + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 17 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + // For RPI Pico using E. Philhower RP2040 core + #if (USING_SPI2) + // SCK: GPIO14, MOSI: GPIO15, MISO: GPIO12, SS/CS: GPIO13 for SPI1 + #define USE_THIS_SS_PIN 13 + #else + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 for SPI0 + #define USE_THIS_SS_PIN 17 + #endif + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// 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 +////// + +#if USE_CUSTOM_ETHERNET + // You have to include an Ethernet library in your program + //#include "Ethernet_XYZ.h" + #include "EthernetLarge.h" + + #define SHIELD_TYPE "Custom Ethernet using EthernetLarge Library" +#endif + +#if (_MYSQL_LOGLEVEL_ > 1) + #if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #elif USE_QN_ETHERNET + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_NATIVE_ETHERNET + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_ETHERNET_GENERIC + #warning Using Ethernet_Generic lib + #elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #elif USE_CUSTOM_ETHERNET + #warning Using Custom Ethernet library + #else + #define USE_ETHERNET_GENERIC true + + #warning Using Ethernet_Generic lib + #endif +#endif + +#if !( USE_ETHERNET_ENC || USE_ETHERNET_ESP8266 || USE_UIP_ETHERNET || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720 || USE_NATIVE_ETHERNET || \ + USE_QN_ETHERNET || USE_CUSTOM_ETHERNET || USE_ETHERNET_PORTENTA_H7 || USE_CUSTOM_ETHERNET ) + #define USE_ETHERNET_GENERIC true +#endif + +#if USE_ETHERNET_GENERIC + #define ETHERNET_LARGE_BUFFERS + + #define _ETG_LOGLEVEL_ 1 +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_By_Hostname/Connect_By_Hostname.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_By_Hostname/Connect_By_Hostname.ino new file mode 100644 index 0000000..a25ac19 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_By_Hostname/Connect_By_Hostname.ino @@ -0,0 +1,243 @@ +/********************************************************************************************************************************* + Connect_By_Hostname.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect by hostname + + This example demonstrates how to connect to a MySQL server resolving the + hostname for cases when you do not know the IP address of the server or + it changes because it is in the cloud. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the hostname variable to the hostname of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ +#include "defines.h" + +#include + +#if !(USE_ETHERNET_PORTENTA_H7) + #include +#endif + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +MySQL_Connection conn((Client *)&client); + +void initEthernet() +{ +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Default SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#if defined(ESP8266) + // For ESP8266, change for other boards if necessary + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN D2 // For ESP8266 + #endif + + MYSQL_LOGERROR1(F("ESP8266 setCsPin:"), USE_THIS_SS_PIN); + + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // For ESP8266 + // Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8 + // Ethernet 0 X X X X 0 + // Ethernet2 X X X X X 0 + // Ethernet3 X X X X X 0 + // EthernetLarge X X X X X 0 + // Ethernet_ESP8266 0 0 0 0 0 0 + // D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs + // Must use library patch for Ethernet, EthernetLarge libraries + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif defined(ESP32) + + // You can use Ethernet.init(pin) to configure the CS pin + //Ethernet.init(10); // Most Arduino shields + //Ethernet.init(5); // MKR ETH shield + //Ethernet.init(0); // Teensy 2.0 + //Ethernet.init(20); // Teensy++ 2.0 + //Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet + //Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet + + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 22 // For ESP32 + #endif + + MYSQL_LOGERROR1(F("ESP32 setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // ESP32 => GPIO2,4,5,13,15,21,22 OK with Ethernet, Ethernet2, EthernetLarge + // ESP32 => GPIO2,4,5,15,21,22 OK with Ethernet3 + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif ETHERNET_USE_RPIPICO + + pinMode(USE_THIS_SS_PIN, OUTPUT); + digitalWrite(USE_THIS_SS_PIN, HIGH); + + // ETHERNET_USE_RPIPICO, use default SS = 5 or 17 + #ifndef USE_THIS_SS_PIN + #if defined(ARDUINO_ARCH_MBED) + #define USE_THIS_SS_PIN 17 // For Arduino Mbed core + #else + #define USE_THIS_SS_PIN 17 // For E.Philhower core + #endif + #endif + + MYSQL_LOGERROR1(F("RPIPICO setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + // Default pin 5/17 to SS/CS + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_LARGE ) + +#else //defined(ESP8266) + // unknown board, do nothing, use default SS = 10 + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 10 // For other boards + #endif + + MYSQL_LOGERROR3(F("Board :"), BOARD_NAME, F(", setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, Ethernet2, EthernetLarge libraries + + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#endif //defined(ESP8266) + +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + // Just info to know how to connect correctly + #if defined(CUR_PIN_MISO) + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), CUR_PIN_MOSI); + MYSQL_LOGERROR1(F("MISO:"), CUR_PIN_MISO); + MYSQL_LOGERROR1(F("SCK:"), CUR_PIN_SCK); + MYSQL_LOGERROR1(F("SS:"), CUR_PIN_SS); + #else + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + #endif + + MYSQL_LOGERROR(F("=========================")); +#endif + +#endif // #if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Connect_By_Hostname on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_By_Hostname/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_By_Hostname/defines.h new file mode 100644 index 0000000..c6efb3d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_By_Hostname/defines.h @@ -0,0 +1,463 @@ +/********************************************************************************************************************************* + 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_ 2 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #if defined(ARDUINO_TEENSY41) + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET true + #elif defined(ARDUINO_TEENSY40) + #define BOARD_TYPE "TEENSY 4.0" + #else + #define + #endif + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 17 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + // For RPI Pico using E. Philhower RP2040 core + #if (USING_SPI2) + // SCK: GPIO14, MOSI: GPIO15, MISO: GPIO12, SS/CS: GPIO13 for SPI1 + #define USE_THIS_SS_PIN 13 + #else + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 for SPI0 + #define USE_THIS_SS_PIN 17 + #endif + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// 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 +////// + +#if USE_CUSTOM_ETHERNET + // You have to include an Ethernet library in your program + //#include "Ethernet_XYZ.h" + #include "EthernetLarge.h" + + #define SHIELD_TYPE "Custom Ethernet using EthernetLarge Library" +#endif + +#if (_MYSQL_LOGLEVEL_ > 1) + #if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #elif USE_QN_ETHERNET + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_NATIVE_ETHERNET + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_ETHERNET_GENERIC + #warning Using Ethernet_Generic lib + #elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #elif USE_CUSTOM_ETHERNET + #warning Using Custom Ethernet library + #else + #define USE_ETHERNET_GENERIC true + + #warning Using Ethernet_Generic lib + #endif +#endif + +#if !( USE_ETHERNET_ENC || USE_ETHERNET_ESP8266 || USE_UIP_ETHERNET || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720 || USE_NATIVE_ETHERNET || \ + USE_QN_ETHERNET || USE_CUSTOM_ETHERNET || USE_ETHERNET_PORTENTA_H7 || USE_CUSTOM_ETHERNET ) + #define USE_ETHERNET_GENERIC true +#endif + +#if USE_ETHERNET_GENERIC + #define ETHERNET_LARGE_BUFFERS + + #define _ETG_LOGLEVEL_ 1 +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_Default_Database/Connect_Default_Database.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_Default_Database/Connect_Default_Database.ino new file mode 100644 index 0000000..7fe490b --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_Default_Database/Connect_Default_Database.ino @@ -0,0 +1,241 @@ +/********************************************************************************************************************************* + Connect_Default_Database.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect with default database + + This example demonstrates how to connect to a MySQL server and specifying + the default database when connecting. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "world"; + +MySQL_Connection conn((Client *)&client); + +void initEthernet() +{ +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Default SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#if defined(ESP8266) + // For ESP8266, change for other boards if necessary + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN D2 // For ESP8266 + #endif + + MYSQL_LOGERROR1(F("ESP8266 setCsPin:"), USE_THIS_SS_PIN); + + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // For ESP8266 + // Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8 + // Ethernet 0 X X X X 0 + // Ethernet2 X X X X X 0 + // Ethernet3 X X X X X 0 + // EthernetLarge X X X X X 0 + // Ethernet_ESP8266 0 0 0 0 0 0 + // D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs + // Must use library patch for Ethernet, EthernetLarge libraries + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif defined(ESP32) + + // You can use Ethernet.init(pin) to configure the CS pin + //Ethernet.init(10); // Most Arduino shields + //Ethernet.init(5); // MKR ETH shield + //Ethernet.init(0); // Teensy 2.0 + //Ethernet.init(20); // Teensy++ 2.0 + //Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet + //Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet + + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 22 // For ESP32 + #endif + + MYSQL_LOGERROR1(F("ESP32 setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // ESP32 => GPIO2,4,5,13,15,21,22 OK with Ethernet, Ethernet2, EthernetLarge + // ESP32 => GPIO2,4,5,15,21,22 OK with Ethernet3 + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif ETHERNET_USE_RPIPICO + + pinMode(USE_THIS_SS_PIN, OUTPUT); + digitalWrite(USE_THIS_SS_PIN, HIGH); + + // ETHERNET_USE_RPIPICO, use default SS = 5 or 17 + #ifndef USE_THIS_SS_PIN + #if defined(ARDUINO_ARCH_MBED) + #define USE_THIS_SS_PIN 17 // For Arduino Mbed core + #else + #define USE_THIS_SS_PIN 17 // For E.Philhower core + #endif + #endif + + MYSQL_LOGERROR1(F("RPIPICO setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + // Default pin 5/17 to SS/CS + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_LARGE ) + +#else //defined(ESP8266) + // unknown board, do nothing, use default SS = 10 + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 10 // For other boards + #endif + + MYSQL_LOGERROR3(F("Board :"), BOARD_NAME, F(", setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, Ethernet2, EthernetLarge libraries + + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#endif //defined(ESP8266) + +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + // Just info to know how to connect correctly + #if defined(CUR_PIN_MISO) + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), CUR_PIN_MOSI); + MYSQL_LOGERROR1(F("MISO:"), CUR_PIN_MISO); + MYSQL_LOGERROR1(F("SCK:"), CUR_PIN_SCK); + MYSQL_LOGERROR1(F("SS:"), CUR_PIN_SS); + #else + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + #endif + + MYSQL_LOGERROR(F("=========================")); +#endif + +#endif // #if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Connect_Default_Database on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_Default_Database/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_Default_Database/defines.h new file mode 100644 index 0000000..c6efb3d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_Default_Database/defines.h @@ -0,0 +1,463 @@ +/********************************************************************************************************************************* + 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_ 2 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #if defined(ARDUINO_TEENSY41) + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET true + #elif defined(ARDUINO_TEENSY40) + #define BOARD_TYPE "TEENSY 4.0" + #else + #define + #endif + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 17 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + // For RPI Pico using E. Philhower RP2040 core + #if (USING_SPI2) + // SCK: GPIO14, MOSI: GPIO15, MISO: GPIO12, SS/CS: GPIO13 for SPI1 + #define USE_THIS_SS_PIN 13 + #else + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 for SPI0 + #define USE_THIS_SS_PIN 17 + #endif + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// 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 +////// + +#if USE_CUSTOM_ETHERNET + // You have to include an Ethernet library in your program + //#include "Ethernet_XYZ.h" + #include "EthernetLarge.h" + + #define SHIELD_TYPE "Custom Ethernet using EthernetLarge Library" +#endif + +#if (_MYSQL_LOGLEVEL_ > 1) + #if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #elif USE_QN_ETHERNET + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_NATIVE_ETHERNET + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_ETHERNET_GENERIC + #warning Using Ethernet_Generic lib + #elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #elif USE_CUSTOM_ETHERNET + #warning Using Custom Ethernet library + #else + #define USE_ETHERNET_GENERIC true + + #warning Using Ethernet_Generic lib + #endif +#endif + +#if !( USE_ETHERNET_ENC || USE_ETHERNET_ESP8266 || USE_UIP_ETHERNET || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720 || USE_NATIVE_ETHERNET || \ + USE_QN_ETHERNET || USE_CUSTOM_ETHERNET || USE_ETHERNET_PORTENTA_H7 || USE_CUSTOM_ETHERNET ) + #define USE_ETHERNET_GENERIC true +#endif + +#if USE_ETHERNET_GENERIC + #define ETHERNET_LARGE_BUFFERS + + #define _ETG_LOGLEVEL_ 1 +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_Disconnect/Connect_Disconnect.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_Disconnect/Connect_Disconnect.ino new file mode 100644 index 0000000..a992b06 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_Disconnect/Connect_Disconnect.ino @@ -0,0 +1,256 @@ +/********************************************************************************************************************************* + Connect_Disconnect.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : connect and disconnect (close) + + This example demonstrates how to use the connection to open at the start + of a loop, perform some query, then close the connection. Use this technique + for solutions that must sleep for a long period or otherwise require + additional processing or delays. The connect/close pair allow you to + control how long the connection is open and thus reduce the amount of + time a connection is held open. It also helps for lossy connections. + + This example demonstrates how to connect to a MySQL server and specifying + the default database when connecting. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +MySQL_Connection conn((Client *)&client); +MySQL_Query query = MySQL_Query(&conn); + +void initEthernet() +{ +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Default SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#if defined(ESP8266) + // For ESP8266, change for other boards if necessary + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN D2 // For ESP8266 + #endif + + MYSQL_LOGERROR1(F("ESP8266 setCsPin:"), USE_THIS_SS_PIN); + + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // For ESP8266 + // Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8 + // Ethernet 0 X X X X 0 + // Ethernet2 X X X X X 0 + // Ethernet3 X X X X X 0 + // EthernetLarge X X X X X 0 + // Ethernet_ESP8266 0 0 0 0 0 0 + // D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs + // Must use library patch for Ethernet, EthernetLarge libraries + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif defined(ESP32) + + // You can use Ethernet.init(pin) to configure the CS pin + //Ethernet.init(10); // Most Arduino shields + //Ethernet.init(5); // MKR ETH shield + //Ethernet.init(0); // Teensy 2.0 + //Ethernet.init(20); // Teensy++ 2.0 + //Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet + //Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet + + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 22 // For ESP32 + #endif + + MYSQL_LOGERROR1(F("ESP32 setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // ESP32 => GPIO2,4,5,13,15,21,22 OK with Ethernet, Ethernet2, EthernetLarge + // ESP32 => GPIO2,4,5,15,21,22 OK with Ethernet3 + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif ETHERNET_USE_RPIPICO + + pinMode(USE_THIS_SS_PIN, OUTPUT); + digitalWrite(USE_THIS_SS_PIN, HIGH); + + // ETHERNET_USE_RPIPICO, use default SS = 5 or 17 + #ifndef USE_THIS_SS_PIN + #if defined(ARDUINO_ARCH_MBED) + #define USE_THIS_SS_PIN 17 // For Arduino Mbed core + #else + #define USE_THIS_SS_PIN 17 // For E.Philhower core + #endif + #endif + + MYSQL_LOGERROR1(F("RPIPICO setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + // Default pin 5/17 to SS/CS + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_LARGE ) + +#else //defined(ESP8266) + // unknown board, do nothing, use default SS = 10 + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 10 // For other boards + #endif + + MYSQL_LOGERROR3(F("Board :"), BOARD_NAME, F(", setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, Ethernet2, EthernetLarge libraries + + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#endif //defined(ESP8266) + +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + // Just info to know how to connect correctly + #if defined(CUR_PIN_MISO) + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), CUR_PIN_MOSI); + MYSQL_LOGERROR1(F("MISO:"), CUR_PIN_MISO); + MYSQL_LOGERROR1(F("SCK:"), CUR_PIN_SCK); + MYSQL_LOGERROR1(F("SS:"), CUR_PIN_SS); + #else + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + #endif + + MYSQL_LOGERROR(F("=========================")); +#endif + +#endif // #if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Connect_Disconnect on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); +} + +void runQuery() +{ + MYSQL_DISPLAY("Running a query: SELECT * FROM test_arduino.hello_arduino LIMIT 6;"); + + // Execute the query + // KH, check if valid before fetching + if ( !query.execute("SELECT * FROM test_arduino.hello_arduino LIMIT 6;") ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + query.show_results(); // show the results + query.close(); // close the query +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_Disconnect/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_Disconnect/defines.h new file mode 100644 index 0000000..c6efb3d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Connect_Disconnect/defines.h @@ -0,0 +1,463 @@ +/********************************************************************************************************************************* + 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_ 2 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #if defined(ARDUINO_TEENSY41) + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET true + #elif defined(ARDUINO_TEENSY40) + #define BOARD_TYPE "TEENSY 4.0" + #else + #define + #endif + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 17 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + // For RPI Pico using E. Philhower RP2040 core + #if (USING_SPI2) + // SCK: GPIO14, MOSI: GPIO15, MISO: GPIO12, SS/CS: GPIO13 for SPI1 + #define USE_THIS_SS_PIN 13 + #else + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 for SPI0 + #define USE_THIS_SS_PIN 17 + #endif + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// 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 +////// + +#if USE_CUSTOM_ETHERNET + // You have to include an Ethernet library in your program + //#include "Ethernet_XYZ.h" + #include "EthernetLarge.h" + + #define SHIELD_TYPE "Custom Ethernet using EthernetLarge Library" +#endif + +#if (_MYSQL_LOGLEVEL_ > 1) + #if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #elif USE_QN_ETHERNET + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_NATIVE_ETHERNET + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_ETHERNET_GENERIC + #warning Using Ethernet_Generic lib + #elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #elif USE_CUSTOM_ETHERNET + #warning Using Custom Ethernet library + #else + #define USE_ETHERNET_GENERIC true + + #warning Using Ethernet_Generic lib + #endif +#endif + +#if !( USE_ETHERNET_ENC || USE_ETHERNET_ESP8266 || USE_UIP_ETHERNET || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720 || USE_NATIVE_ETHERNET || \ + USE_QN_ETHERNET || USE_CUSTOM_ETHERNET || USE_ETHERNET_PORTENTA_H7 || USE_CUSTOM_ETHERNET ) + #define USE_ETHERNET_GENERIC true +#endif + +#if USE_ETHERNET_GENERIC + #define ETHERNET_LARGE_BUFFERS + + #define _ETG_LOGLEVEL_ 1 +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Query_Progmem/Query_Progmem.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Query_Progmem/Query_Progmem.ino new file mode 100644 index 0000000..0916deb --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Query_Progmem/Query_Progmem.ino @@ -0,0 +1,270 @@ +/********************************************************************************************************************************* + Query_Progmem.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : query with PROGMEM strings + + This example demonstrates how to issue queries using strings stored in + PROGMEM. As you will see, you need only add a parameter to the execute() + method in the cursor class, const and PROGMEM to the string declaration + and add the #include directive. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +#if !(ESP32 || ESP8266) + #include +#endif + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +// Sample query +const char PROGMEM query[] = "SELECT * FROM test_arduino.hello_arduino LIMIT 6"; + +MySQL_Connection conn((Client *)&client); + +void initEthernet() +{ +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Default SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#if defined(ESP8266) + // For ESP8266, change for other boards if necessary + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN D2 // For ESP8266 + #endif + + MYSQL_LOGERROR1(F("ESP8266 setCsPin:"), USE_THIS_SS_PIN); + + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // For ESP8266 + // Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8 + // Ethernet 0 X X X X 0 + // Ethernet2 X X X X X 0 + // Ethernet3 X X X X X 0 + // EthernetLarge X X X X X 0 + // Ethernet_ESP8266 0 0 0 0 0 0 + // D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs + // Must use library patch for Ethernet, EthernetLarge libraries + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif defined(ESP32) + + // You can use Ethernet.init(pin) to configure the CS pin + //Ethernet.init(10); // Most Arduino shields + //Ethernet.init(5); // MKR ETH shield + //Ethernet.init(0); // Teensy 2.0 + //Ethernet.init(20); // Teensy++ 2.0 + //Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet + //Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet + + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 22 // For ESP32 + #endif + + MYSQL_LOGERROR1(F("ESP32 setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // ESP32 => GPIO2,4,5,13,15,21,22 OK with Ethernet, Ethernet2, EthernetLarge + // ESP32 => GPIO2,4,5,15,21,22 OK with Ethernet3 + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif ETHERNET_USE_RPIPICO + + pinMode(USE_THIS_SS_PIN, OUTPUT); + digitalWrite(USE_THIS_SS_PIN, HIGH); + + // ETHERNET_USE_RPIPICO, use default SS = 5 or 17 + #ifndef USE_THIS_SS_PIN + #if defined(ARDUINO_ARCH_MBED) + #define USE_THIS_SS_PIN 17 // For Arduino Mbed core + #else + #define USE_THIS_SS_PIN 17 // For E.Philhower core + #endif + #endif + + MYSQL_LOGERROR1(F("RPIPICO setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + // Default pin 5/17 to SS/CS + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_LARGE ) + +#else //defined(ESP8266) + // unknown board, do nothing, use default SS = 10 + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 10 // For other boards + #endif + + MYSQL_LOGERROR3(F("Board :"), BOARD_NAME, F(", setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, Ethernet2, EthernetLarge libraries + + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#endif //defined(ESP8266) + +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + // Just info to know how to connect correctly + #if defined(CUR_PIN_MISO) + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), CUR_PIN_MOSI); + MYSQL_LOGERROR1(F("MISO:"), CUR_PIN_MISO); + MYSQL_LOGERROR1(F("SCK:"), CUR_PIN_SCK); + MYSQL_LOGERROR1(F("SS:"), CUR_PIN_SS); + #else + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + #endif + + MYSQL_LOGERROR(F("=========================")); +#endif + +#endif // #if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Query_Progmem on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void runQuery() +{ + MYSQL_DISPLAY("\nRunning SELECT from PROGMEM and printing results\n"); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query with the PROGMEM option + // KH, check if valid before fetching + if ( !query_mem.execute(query, true) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Show the results + query_mem.show_results(); + // close the query + query_mem.close(); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(10000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Query_Progmem/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Query_Progmem/defines.h new file mode 100644 index 0000000..c6efb3d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Query_Progmem/defines.h @@ -0,0 +1,463 @@ +/********************************************************************************************************************************* + 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_ 2 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #if defined(ARDUINO_TEENSY41) + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET true + #elif defined(ARDUINO_TEENSY40) + #define BOARD_TYPE "TEENSY 4.0" + #else + #define + #endif + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 17 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + // For RPI Pico using E. Philhower RP2040 core + #if (USING_SPI2) + // SCK: GPIO14, MOSI: GPIO15, MISO: GPIO12, SS/CS: GPIO13 for SPI1 + #define USE_THIS_SS_PIN 13 + #else + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 for SPI0 + #define USE_THIS_SS_PIN 17 + #endif + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// 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 +////// + +#if USE_CUSTOM_ETHERNET + // You have to include an Ethernet library in your program + //#include "Ethernet_XYZ.h" + #include "EthernetLarge.h" + + #define SHIELD_TYPE "Custom Ethernet using EthernetLarge Library" +#endif + +#if (_MYSQL_LOGLEVEL_ > 1) + #if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #elif USE_QN_ETHERNET + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_NATIVE_ETHERNET + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_ETHERNET_GENERIC + #warning Using Ethernet_Generic lib + #elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #elif USE_CUSTOM_ETHERNET + #warning Using Custom Ethernet library + #else + #define USE_ETHERNET_GENERIC true + + #warning Using Ethernet_Generic lib + #endif +#endif + +#if !( USE_ETHERNET_ENC || USE_ETHERNET_ESP8266 || USE_UIP_ETHERNET || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720 || USE_NATIVE_ETHERNET || \ + USE_QN_ETHERNET || USE_CUSTOM_ETHERNET || USE_ETHERNET_PORTENTA_H7 || USE_CUSTOM_ETHERNET ) + #define USE_ETHERNET_GENERIC true +#endif + +#if USE_ETHERNET_GENERIC + #define ETHERNET_LARGE_BUFFERS + + #define _ETG_LOGLEVEL_ 1 +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Query_Results/Query_Results.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Query_Results/Query_Results.ino new file mode 100644 index 0000000..dd6c8f4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Query_Results/Query_Results.ino @@ -0,0 +1,300 @@ +/********************************************************************************************************************************* + Query_Results.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : query results + + This example demonstrates how to issue a SELECT query and how to read columns + and rows from the result set. Study this example until you are familiar with how to + do this before writing your own sketch to read and consume query results. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +// Sample query +char query[] = "SELECT * FROM test_arduino.hello_arduino LIMIT 6"; + +MySQL_Connection conn((Client *)&client); + +void initEthernet() +{ +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Default SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#if defined(ESP8266) + // For ESP8266, change for other boards if necessary + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN D2 // For ESP8266 + #endif + + MYSQL_LOGERROR1(F("ESP8266 setCsPin:"), USE_THIS_SS_PIN); + + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // For ESP8266 + // Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8 + // Ethernet 0 X X X X 0 + // Ethernet2 X X X X X 0 + // Ethernet3 X X X X X 0 + // EthernetLarge X X X X X 0 + // Ethernet_ESP8266 0 0 0 0 0 0 + // D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs + // Must use library patch for Ethernet, EthernetLarge libraries + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif defined(ESP32) + + // You can use Ethernet.init(pin) to configure the CS pin + //Ethernet.init(10); // Most Arduino shields + //Ethernet.init(5); // MKR ETH shield + //Ethernet.init(0); // Teensy 2.0 + //Ethernet.init(20); // Teensy++ 2.0 + //Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet + //Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet + + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 22 // For ESP32 + #endif + + MYSQL_LOGERROR1(F("ESP32 setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // ESP32 => GPIO2,4,5,13,15,21,22 OK with Ethernet, Ethernet2, EthernetLarge + // ESP32 => GPIO2,4,5,15,21,22 OK with Ethernet3 + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif ETHERNET_USE_RPIPICO + + pinMode(USE_THIS_SS_PIN, OUTPUT); + digitalWrite(USE_THIS_SS_PIN, HIGH); + + // ETHERNET_USE_RPIPICO, use default SS = 5 or 17 + #ifndef USE_THIS_SS_PIN + #if defined(ARDUINO_ARCH_MBED) + #define USE_THIS_SS_PIN 17 // For Arduino Mbed core + #else + #define USE_THIS_SS_PIN 17 // For E.Philhower core + #endif + #endif + + MYSQL_LOGERROR1(F("RPIPICO setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + // Default pin 5/17 to SS/CS + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_LARGE ) + +#else //defined(ESP8266) + // unknown board, do nothing, use default SS = 10 + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 10 // For other boards + #endif + + MYSQL_LOGERROR3(F("Board :"), BOARD_NAME, F(", setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, Ethernet2, EthernetLarge libraries + + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#endif //defined(ESP8266) + +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + // Just info to know how to connect correctly + #if defined(CUR_PIN_MISO) + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), CUR_PIN_MOSI); + MYSQL_LOGERROR1(F("MISO:"), CUR_PIN_MISO); + MYSQL_LOGERROR1(F("SCK:"), CUR_PIN_SCK); + MYSQL_LOGERROR1(F("SS:"), CUR_PIN_SS); + #else + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + #endif + + MYSQL_LOGERROR(F("=========================")); +#endif + +#endif // #if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Query_Results on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void runQuery() +{ + MYSQL_DISPLAY("\nRunning SELECT and printing results"); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + ////// + + // Fetch the columns and print them + column_names *cols = query_mem.get_columns(); + + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(cols->fields[f]->name); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(", "); + } + } + + MYSQL_DISPLAY(); + + // Read the rows and print them + row_values *row = NULL; + + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(row->values[f]); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(", "); + } + } + + MYSQL_DISPLAY(); + } + } while (row != NULL); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(10000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Query_Results/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Query_Results/defines.h new file mode 100644 index 0000000..c6efb3d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/Query_Results/defines.h @@ -0,0 +1,463 @@ +/********************************************************************************************************************************* + 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_ 2 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #if defined(ARDUINO_TEENSY41) + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET true + #elif defined(ARDUINO_TEENSY40) + #define BOARD_TYPE "TEENSY 4.0" + #else + #define + #endif + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 17 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + // For RPI Pico using E. Philhower RP2040 core + #if (USING_SPI2) + // SCK: GPIO14, MOSI: GPIO15, MISO: GPIO12, SS/CS: GPIO13 for SPI1 + #define USE_THIS_SS_PIN 13 + #else + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 for SPI0 + #define USE_THIS_SS_PIN 17 + #endif + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// 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 +////// + +#if USE_CUSTOM_ETHERNET + // You have to include an Ethernet library in your program + //#include "Ethernet_XYZ.h" + #include "EthernetLarge.h" + + #define SHIELD_TYPE "Custom Ethernet using EthernetLarge Library" +#endif + +#if (_MYSQL_LOGLEVEL_ > 1) + #if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #elif USE_QN_ETHERNET + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_NATIVE_ETHERNET + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_ETHERNET_GENERIC + #warning Using Ethernet_Generic lib + #elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #elif USE_CUSTOM_ETHERNET + #warning Using Custom Ethernet library + #else + #define USE_ETHERNET_GENERIC true + + #warning Using Ethernet_Generic lib + #endif +#endif + +#if !( USE_ETHERNET_ENC || USE_ETHERNET_ESP8266 || USE_UIP_ETHERNET || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720 || USE_NATIVE_ETHERNET || \ + USE_QN_ETHERNET || USE_CUSTOM_ETHERNET || USE_ETHERNET_PORTENTA_H7 || USE_CUSTOM_ETHERNET ) + #define USE_ETHERNET_GENERIC true +#endif + +#if USE_ETHERNET_GENERIC + #define ETHERNET_LARGE_BUFFERS + + #define _ETG_LOGLEVEL_ 1 +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/multiFileProject_Ethernet/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/multiFileProject_Ethernet/defines.h new file mode 100644 index 0000000..c6efb3d --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/multiFileProject_Ethernet/defines.h @@ -0,0 +1,463 @@ +/********************************************************************************************************************************* + 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_ 2 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #if defined(ARDUINO_TEENSY41) + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET true + #elif defined(ARDUINO_TEENSY40) + #define BOARD_TYPE "TEENSY 4.0" + #else + #define + #endif + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 17 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + // For RPI Pico using E. Philhower RP2040 core + #if (USING_SPI2) + // SCK: GPIO14, MOSI: GPIO15, MISO: GPIO12, SS/CS: GPIO13 for SPI1 + #define USE_THIS_SS_PIN 13 + #else + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 for SPI0 + #define USE_THIS_SS_PIN 17 + #endif + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// 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 +////// + +#if USE_CUSTOM_ETHERNET + // You have to include an Ethernet library in your program + //#include "Ethernet_XYZ.h" + #include "EthernetLarge.h" + + #define SHIELD_TYPE "Custom Ethernet using EthernetLarge Library" +#endif + +#if (_MYSQL_LOGLEVEL_ > 1) + #if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #elif USE_QN_ETHERNET + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_NATIVE_ETHERNET + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #elif USE_ETHERNET_GENERIC + #warning Using Ethernet_Generic lib + #elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #elif USE_CUSTOM_ETHERNET + #warning Using Custom Ethernet library + #else + #define USE_ETHERNET_GENERIC true + + #warning Using Ethernet_Generic lib + #endif +#endif + +#if !( USE_ETHERNET_ENC || USE_ETHERNET_ESP8266 || USE_UIP_ETHERNET || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720 || USE_NATIVE_ETHERNET || \ + USE_QN_ETHERNET || USE_CUSTOM_ETHERNET || USE_ETHERNET_PORTENTA_H7 || USE_CUSTOM_ETHERNET ) + #define USE_ETHERNET_GENERIC true +#endif + +#if USE_ETHERNET_GENERIC + #define ETHERNET_LARGE_BUFFERS + + #define _ETG_LOGLEVEL_ 1 +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/multiFileProject_Ethernet/multiFileProject.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/multiFileProject_Ethernet/multiFileProject.cpp new file mode 100644 index 0000000..e1f0fe7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/multiFileProject_Ethernet/multiFileProject.cpp @@ -0,0 +1,17 @@ +/**************************************************************************************************************************** + multiFileProject.cpp + 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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#include "multiFileProject.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/multiFileProject_Ethernet/multiFileProject.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/multiFileProject_Ethernet/multiFileProject.h new file mode 100644 index 0000000..5811a68 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/multiFileProject_Ethernet/multiFileProject.h @@ -0,0 +1,20 @@ +/**************************************************************************************************************************** + multiFileProject.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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#pragma once + +// Can be included as many times as necessary, without `Multiple Definitions` Linker Error +#include "MySQL_Generic.hpp" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/multiFileProject_Ethernet/multiFileProject_Ethernet.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/multiFileProject_Ethernet/multiFileProject_Ethernet.ino new file mode 100644 index 0000000..7282564 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Ethernet/multiFileProject_Ethernet/multiFileProject_Ethernet.ino @@ -0,0 +1,188 @@ +/**************************************************************************************************************************** + multiFileProject.ino + 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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#include "defines.h" + +#define MYSQL_MARIADB_GENERIC_VERSION_MIN_TARGET "MySQL_MariaDB_Generic v1.7.0" +#define MYSQL_MARIADB_GENERIC_VERSION_MIN 1007000 + +#include "multiFileProject.h" + +// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error +#include "MySQL_Generic.h" + +void initEthernet() +{ +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Default SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#if defined(ESP8266) + // For ESP8266, change for other boards if necessary + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN D2 // For ESP8266 + #endif + + MYSQL_LOGERROR1(F("ESP8266 setCsPin:"), USE_THIS_SS_PIN); + + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // For ESP8266 + // Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8 + // Ethernet 0 X X X X 0 + // Ethernet2 X X X X X 0 + // Ethernet3 X X X X X 0 + // EthernetLarge X X X X X 0 + // Ethernet_ESP8266 0 0 0 0 0 0 + // D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs + // Must use library patch for Ethernet, EthernetLarge libraries + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif defined(ESP32) + + // You can use Ethernet.init(pin) to configure the CS pin + //Ethernet.init(10); // Most Arduino shields + //Ethernet.init(5); // MKR ETH shield + //Ethernet.init(0); // Teensy 2.0 + //Ethernet.init(20); // Teensy++ 2.0 + //Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet + //Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet + + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 22 // For ESP32 + #endif + + MYSQL_LOGERROR1(F("ESP32 setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // ESP32 => GPIO2,4,5,13,15,21,22 OK with Ethernet, Ethernet2, EthernetLarge + // ESP32 => GPIO2,4,5,15,21,22 OK with Ethernet3 + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#elif ETHERNET_USE_RPIPICO + + pinMode(USE_THIS_SS_PIN, OUTPUT); + digitalWrite(USE_THIS_SS_PIN, HIGH); + + // ETHERNET_USE_RPIPICO, use default SS = 5 or 17 + #ifndef USE_THIS_SS_PIN + #if defined(ARDUINO_ARCH_MBED) + #define USE_THIS_SS_PIN 17 // For Arduino Mbed core + #else + #define USE_THIS_SS_PIN 17 // For E.Philhower core + #endif + #endif + + MYSQL_LOGERROR1(F("RPIPICO setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + // Default pin 5/17 to SS/CS + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_LARGE ) + +#else //defined(ESP8266) + // unknown board, do nothing, use default SS = 10 + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 10 // For other boards + #endif + + MYSQL_LOGERROR3(F("Board :"), BOARD_NAME, F(", setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, Ethernet2, EthernetLarge libraries + + Ethernet.init (USE_THIS_SS_PIN); + + #endif //( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC ) + +#endif //defined(ESP8266) + +#if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + // Just info to know how to connect correctly + #if defined(CUR_PIN_MISO) + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), CUR_PIN_MOSI); + MYSQL_LOGERROR1(F("MISO:"), CUR_PIN_MISO); + MYSQL_LOGERROR1(F("SCK:"), CUR_PIN_SCK); + MYSQL_LOGERROR1(F("SS:"), CUR_PIN_SS); + #else + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + #endif + + MYSQL_LOGERROR(F("=========================")); +#endif + +#endif // #if !(USE_ETHERNET_PORTENTA_H7 || USE_ETHERNET_LAN8742A || USE_ETHERNET_LAN8720) + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + Serial.println("\nStart multiFileProject"); + Serial.println(MYSQL_MARIADB_GENERIC_VERSION); + +#if defined(MYSQL_MARIADB_GENERIC_VERSION_MIN) + if (MYSQL_MARIADB_GENERIC_VERSION_INT < MYSQL_MARIADB_GENERIC_VERSION_MIN) + { + Serial.print("Warning. Must use this example on Version equal or later than : "); + Serial.println(MYSQL_MARIADB_GENERIC_VERSION_MIN_TARGET); + } +#endif +} + +void loop() +{ + // put your main code here, to run repeatedly: +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Basic_Insert/Basic_Insert.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Basic_Insert/Basic_Insert.ino new file mode 100644 index 0000000..f775320 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Basic_Insert/Basic_Insert.ino @@ -0,0 +1,159 @@ +/********************************************************************************************************************************* + Basic_Insert.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : basic insert + + This example demonstrates how to issue an INSERT query to store data in a + table. For this, we will create a special database and table for testing. + The following are the SQL commands you will need to run in order to setup + your database for running this sketch. + + CREATE DATABASE test_arduino; + CREATE TABLE test_arduino.hello_arduino ( + num integer primary key auto_increment, + message char(40), + recorded timestamp + ); + + Here we see one database and a table with three fields; a primary key that + is an auto_increment, a string, and a timestamp. This will demonstrate how + to save a date and time of when the row was inserted, which can help you + determine when data was recorded or updated. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Create the database and table as shown above. + 2) Change the address of the server to the IP address of the MySQL server + 3) Change the user and password to a valid MySQL user and password + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + 8) After the sketch has run for some time, open a mysql client and issue + the command: "SELECT * FROM test_arduino.hello_arduino" to see the data + recorded. Note the field values and how the database handles both the + auto_increment and timestamp fields for us. You can clear the data with + "DELETE FROM test_arduino.hello_arduino". + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "test_arduino"; //"test_arduino"; +char default_table[] = "hello_arduino"; //"test_arduino"; + +String default_value = "Hello, Arduino!"; + +// Sample query +String INSERT_SQL = String("INSERT INTO ") + default_database + "." + default_table + + " (message) VALUES ('" + default_value + "')"; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Basic_Insert on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + MYSQL_DISPLAY(INSERT_SQL); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(INSERT_SQL.c_str()) ) + { + MYSQL_DISPLAY("Insert error"); + } + else + { + MYSQL_DISPLAY("Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Basic_Insert/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Basic_Insert/defines.h new file mode 100644 index 0000000..2640e25 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Basic_Insert/defines.h @@ -0,0 +1,84 @@ +/********************************************************************************************************************************* + 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Basic_Select/Basic_Select.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Basic_Select/Basic_Select.ino new file mode 100644 index 0000000..c75680c --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Basic_Select/Basic_Select.ino @@ -0,0 +1,193 @@ +/********************************************************************************************************************************* + Basic_Select.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : basic select + + This example demonstrates how to issue a SELECT query with no parameters + and use the data returned. For this, we use the Cursor class to execute + the query and get the results. + + It demonstrates who methods for running queries. The first allows you to + allocate memory for the cursor and later reclaim it, the second shows how + to use a single instance of the cursor use throughout a sketch. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + CAUTION: Don't mix and match the examples. Use one or the other in your + own sketch -- you'll get compilation errors at the least. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "world"; //"test_arduino"; +char default_table[] = "city"; //"test_arduino"; + +String default_column = "population"; +String default_value = "Toronto"; + +String query = String("SELECT ") + default_column + " FROM " + default_database + "." + default_table + + " WHERE name = '" + default_value + "'"; + +MySQL_Connection conn((Client *)&client); +// Create an instance of the cursor passing in the connection +MySQL_Query sql_query = MySQL_Query(&conn); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Basic_Select on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runQuery() +{ + row_values *row = NULL; + long head_count = 0; + + MYSQL_DISPLAY("1) Demonstrating using a dynamically allocated query."); + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + MYSQL_DISPLAY(query); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(query.c_str()) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Fetch the columns (required) but we don't use them. + //column_names *columns = query_mem.get_columns(); + query_mem.get_columns(); + + // Read the row (we are only expecting the one) + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + head_count = atol(row->values[0]); + } + } while (row != NULL); + + // Show the result + MYSQL_DISPLAY1(" Toronto pop =", head_count); + + delay(500); + + MYSQL_DISPLAY("2) Demonstrating using a local, global query."); + + // Execute the query + MYSQL_DISPLAY(query); + sql_query.execute(query.c_str()); + + // Fetch the columns (required) but we don't use them. + sql_query.get_columns(); + + // Read the row (we are only expecting the one) + do + { + row = sql_query.get_next_row(); + if (row != NULL) + { + head_count = atol(row->values[0]); + } + } while (row != NULL); + + // Now we close the cursor to free any memory + sql_query.close(); + + // Show the result but this time do some math on it + MYSQL_DISPLAY1(" Toronto pop =", head_count); + MYSQL_DISPLAY1(" Toronto pop increased by 11725 =", head_count + 11725); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Basic_Select/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Basic_Select/defines.h new file mode 100644 index 0000000..2640e25 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Basic_Select/defines.h @@ -0,0 +1,84 @@ +/********************************************************************************************************************************* + 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Complex_Insert/Complex_Insert.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Complex_Insert/Complex_Insert.ino new file mode 100644 index 0000000..5ddc718 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Complex_Insert/Complex_Insert.ino @@ -0,0 +1,184 @@ +/********************************************************************************************************************************* + Complex_Insert.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : complex insert + + This example demonstrates how to issue an INSERT query to store data in a + table using data from variables in our sketch. In this case, we supply the + values dynamically. + + This sketch simulates storing data from a sensor in a table. + + For this, we will create a special database and table for testing. + The following are the SQL commands you will need to run in order to setup + your database for running this sketch. + + CREATE DATABASE test_arduino; + CREATE TABLE test_arduino.hello_sensor ( + num integer primary key auto_increment, + message char(40), + sensor_num integer, + value float, + recorded timestamp + ); + + Here we have a table that contains an auto_increment primary key, a text + field, a field to identify the sensor, the value read, and timestamp of + the recorded data. + + Note: Since this sketch uses test data, we place the INSERT in the setup() + method so that it runs only once. Typically, you would have the + INSERT in the loop() method after your code to read from the sensor. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Create the database and table as shown above. + 2) Change the address of the server to the IP address of the MySQL server + 3) Change the user and password to a valid MySQL user and password + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + 8) After the sketch has run for some time, open a mysql client and issue + the command: "SELECT * FROM test_arduino.hello_sensor" to see the data + recorded. Note the field values and how the database handles both the + auto_increment and timestamp fields for us. You can clear the data with + "DELETE FROM test_arduino.hello_sensor". + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "test_arduino"; //"test_arduino"; +char default_table[] = "hello_sensor"; //"test_arduino"; + +// Sample query +char INSERT_DATA[] = "INSERT INTO %s.%s (message, sensor_num, value) VALUES ('%s',%d,%s)"; + +char query[128]; +char temperature[10]; + +MySQL_Connection conn((Client *)&client); + +#if !( ESP32 || ESP8266 || defined(CORE_TEENSY) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || ( defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_MBED) ) ) + +char *dtostrf(double val, signed char width, unsigned char prec, char *sout) +{ + char fmt[20]; + sprintf(fmt, "%%%d.%df", width, prec); + sprintf(sout, fmt, val); + return sout; +} +#endif + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Complex_Insert on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); + MYSQL_DISPLAY3("DB =", default_database, ", Table =", default_table); +} + +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + // Save + dtostrf(50.125, 1, 1, temperature); + sprintf(query, INSERT_DATA, default_database, default_table, "test sensor", 24, temperature); + + // Execute the query + MYSQL_DISPLAY(query); + + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Complex Insert error"); + } + else + { + MYSQL_DISPLAY("Complex Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Complex_Insert/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Complex_Insert/defines.h new file mode 100644 index 0000000..2640e25 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Complex_Insert/defines.h @@ -0,0 +1,84 @@ +/********************************************************************************************************************************* + 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Complex_Select/Complex_Select.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Complex_Select/Complex_Select.ino new file mode 100644 index 0000000..d46f0e1 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Complex_Select/Complex_Select.ino @@ -0,0 +1,190 @@ +/********************************************************************************************************************************* + Complex_Select.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : complex select + + This example demonstrates how to issue a SELECT query with parameters that + we provide from code. Thus, it demonstrates how to build query parameters + dynamically. + + Notice also the sketch demonstrates how to read columns and rows from + the result set. Study this example until you are familiar with how to + do this before writing your own sketch to read and consume query results. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "world"; //"test_arduino"; +char default_table[] = "city"; //"test_arduino"; + +// Sample query +// +// Notice the "%lu" - that's a placeholder for the parameter we will +// supply. See sprintf() documentation for more formatting specifier +// options +unsigned long QUERY_POPULATION = 800000; + +const char QUERY_POP[] = "SELECT name, population FROM world.city WHERE population < %lu ORDER BY population DESC LIMIT 12;"; + +char query[128]; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Complex_Select on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runQuery() +{ + MYSQL_DISPLAY("===================================================="); + MYSQL_DISPLAY("> Running SELECT with dynamically supplied parameter"); + + // Supply the parameter for the query + // Here we use the QUERY_POP as the format string and query as the + // destination. This uses twice the memory so another option would be + // to allocate one buffer for all formatted queries or allocate the + // memory as needed (just make sure you allocate enough memory and + // free it when you're done!). + sprintf(query, QUERY_POP, QUERY_POPULATION + (( millis() % 100000 ) * 10) ); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Fetch the columns and print them + column_names *cols = query_mem.get_columns(); + + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(cols->fields[f]->name); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(","); + } + } + + MYSQL_DISPLAY(); + + // Read the rows and print them + row_values *row = NULL; + + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(row->values[f]); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(","); + } + } + + MYSQL_DISPLAY(); + } + } while (row != NULL); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(10000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Complex_Select/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Complex_Select/defines.h new file mode 100644 index 0000000..2640e25 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Complex_Select/defines.h @@ -0,0 +1,84 @@ +/********************************************************************************************************************************* + 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect/Connect.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect/Connect.ino new file mode 100644 index 0000000..f68e67b --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect/Connect.ino @@ -0,0 +1,111 @@ +/********************************************************************************************************************************* + Connect.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : connect + + This example demonstrates how to connect to a MySQL server from an + Arduino using an Arduino-compatible Ethernet shield. Note that "compatible" + means it must conform to the Ethernet class library or be a derivative + with the same classes and methods. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "world"; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Connect on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password, default_database)) + if (conn.connectNonBlocking(server, server_port, user, password, default_database) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect/defines.h new file mode 100644 index 0000000..2640e25 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect/defines.h @@ -0,0 +1,84 @@ +/********************************************************************************************************************************* + 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_By_Hostname/Connect_By_Hostname.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_By_Hostname/Connect_By_Hostname.ino new file mode 100644 index 0000000..6ffb14c --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_By_Hostname/Connect_By_Hostname.ino @@ -0,0 +1,109 @@ +/********************************************************************************************************************************* + Connect_By_Hostname.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect by hostname + + This example demonstrates how to connect to a MySQL server resolving the + hostname for cases when you do not know the IP address of the server or + it changes because it is in the cloud. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the hostname variable to the hostname of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ +#include "defines.h" + +#include +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +MySQL_Connection conn((Client *)&client); +DNSClient dns_client; // DNS instance + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Connect_By_Hostname on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_By_Hostname/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_By_Hostname/defines.h new file mode 100644 index 0000000..2640e25 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_By_Hostname/defines.h @@ -0,0 +1,84 @@ +/********************************************************************************************************************************* + 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_Default_Database/Connect_Default_Database.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_Default_Database/Connect_Default_Database.ino new file mode 100644 index 0000000..18c986a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_Default_Database/Connect_Default_Database.ino @@ -0,0 +1,107 @@ +/********************************************************************************************************************************* + Connect_Default_Database.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect with default database + + This example demonstrates how to connect to a MySQL server and specifying + the default database when connecting. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "world"; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Connect_Default_Database on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_Default_Database/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_Default_Database/defines.h new file mode 100644 index 0000000..2640e25 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_Default_Database/defines.h @@ -0,0 +1,84 @@ +/********************************************************************************************************************************* + 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_Disconnect/Connect_Disconnect.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_Disconnect/Connect_Disconnect.ino new file mode 100644 index 0000000..024460e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_Disconnect/Connect_Disconnect.ino @@ -0,0 +1,123 @@ +/********************************************************************************************************************************* + Connect_Disconnect.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : connect and disconnect (close) + + This example demonstrates how to use the connection to open at the start + of a loop, perform some query, then close the connection. Use this technique + for solutions that must sleep for a long period or otherwise require + additional processing or delays. The connect/close pair allow you to + control how long the connection is open and thus reduce the amount of + time a connection is held open. It also helps for lossy connections. + + This example demonstrates how to connect to a MySQL server and specifying + the default database when connecting. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +MySQL_Connection conn((Client *)&client); +MySQL_Query query = MySQL_Query(&conn); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Connect_Disconnect on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); +} + +void runQuery() +{ + MYSQL_DISPLAY("Running a query: SELECT * FROM test_arduino.hello_arduino LIMIT 6;"); + + // Execute the query + // KH, check if valid before fetching + if ( !query.execute("SELECT * FROM test_arduino.hello_arduino LIMIT 6;") ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + query.show_results(); // show the results + query.close(); // close the query +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_Disconnect/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_Disconnect/defines.h new file mode 100644 index 0000000..2640e25 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Connect_Disconnect/defines.h @@ -0,0 +1,84 @@ +/********************************************************************************************************************************* + 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Query_Progmem/Query_Progmem.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Query_Progmem/Query_Progmem.ino new file mode 100644 index 0000000..de85d1a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Query_Progmem/Query_Progmem.ino @@ -0,0 +1,134 @@ +/********************************************************************************************************************************* + Query_Progmem.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : query with PROGMEM strings + + This example demonstrates how to issue queries using strings stored in + PROGMEM. As you will see, you need only add a parameter to the execute() + method in the cursor class, const and PROGMEM to the string declaration + and add the #include directive. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +// Sample query +const char PROGMEM query[] = "SELECT * FROM test_arduino.hello_arduino LIMIT 6"; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Query_Progmem on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void runQuery() +{ + MYSQL_DISPLAY("\nRunning SELECT from PROGMEM and printing results\n"); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query with the PROGMEM option + // KH, check if valid before fetching + if ( !query_mem.execute(query, true) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Show the results + query_mem.show_results(); + // close the query + query_mem.close(); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(10000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Query_Progmem/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Query_Progmem/defines.h new file mode 100644 index 0000000..2640e25 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Query_Progmem/defines.h @@ -0,0 +1,84 @@ +/********************************************************************************************************************************* + 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Query_Results/Query_Results.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Query_Results/Query_Results.ino new file mode 100644 index 0000000..adc2f74 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Query_Results/Query_Results.ino @@ -0,0 +1,167 @@ +/********************************************************************************************************************************* + Query_Results.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : query results + + This example demonstrates how to issue a SELECT query and how to read columns + and rows from the result set. Study this example until you are familiar with how to + do this before writing your own sketch to read and consume query results. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +// Sample query +char query[] = "SELECT * FROM test_arduino.hello_arduino LIMIT 6"; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Query_Results on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void runQuery() +{ + MYSQL_DISPLAY("\nRunning SELECT and printing results"); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + ////// + + // Fetch the columns and print them + column_names *cols = query_mem.get_columns(); + + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(cols->fields[f]->name); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(", "); + } + } + + MYSQL_DISPLAY(); + + // Read the rows and print them + row_values *row = NULL; + + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(row->values[f]); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(", "); + } + } + + MYSQL_DISPLAY(); + } + } while (row != NULL); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(10000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Query_Results/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Query_Results/defines.h new file mode 100644 index 0000000..2640e25 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/Query_Results/defines.h @@ -0,0 +1,84 @@ +/********************************************************************************************************************************* + 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/multiFileProject_NativeEthernet/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/multiFileProject_NativeEthernet/defines.h new file mode 100644 index 0000000..2640e25 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/multiFileProject_NativeEthernet/defines.h @@ -0,0 +1,84 @@ +/********************************************************************************************************************************* + 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/multiFileProject_NativeEthernet/multiFileProject.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/multiFileProject_NativeEthernet/multiFileProject.cpp new file mode 100644 index 0000000..e1f0fe7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/multiFileProject_NativeEthernet/multiFileProject.cpp @@ -0,0 +1,17 @@ +/**************************************************************************************************************************** + multiFileProject.cpp + 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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#include "multiFileProject.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/multiFileProject_NativeEthernet/multiFileProject.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/multiFileProject_NativeEthernet/multiFileProject.h new file mode 100644 index 0000000..5811a68 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/multiFileProject_NativeEthernet/multiFileProject.h @@ -0,0 +1,20 @@ +/**************************************************************************************************************************** + multiFileProject.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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#pragma once + +// Can be included as many times as necessary, without `Multiple Definitions` Linker Error +#include "MySQL_Generic.hpp" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/multiFileProject_NativeEthernet/multiFileProject_NativeEthernet.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/multiFileProject_NativeEthernet/multiFileProject_NativeEthernet.ino new file mode 100644 index 0000000..ebb9431 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/NativeEthernet/multiFileProject_NativeEthernet/multiFileProject_NativeEthernet.ino @@ -0,0 +1,47 @@ +/**************************************************************************************************************************** + multiFileProject_NativeEthernet.ino + 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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#include "defines.h" + +#define MYSQL_MARIADB_GENERIC_VERSION_MIN_TARGET "MySQL_MariaDB_Generic v1.7.0" +#define MYSQL_MARIADB_GENERIC_VERSION_MIN 1007000 + +#include "multiFileProject.h" + +// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error +#include "MySQL_Generic.h" + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + Serial.println("\nStart multiFileProject_NativeEthernet"); + Serial.println(MYSQL_MARIADB_GENERIC_VERSION); + +#if defined(MYSQL_MARIADB_GENERIC_VERSION_MIN) + if (MYSQL_MARIADB_GENERIC_VERSION_INT < MYSQL_MARIADB_GENERIC_VERSION_MIN) + { + Serial.print("Warning. Must use this example on Version equal or later than : "); + Serial.println(MYSQL_MARIADB_GENERIC_VERSION_MIN_TARGET); + } +#endif +} + +void loop() +{ + // put your main code here, to run repeatedly: +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Basic_Insert/Basic_Insert.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Basic_Insert/Basic_Insert.ino new file mode 100644 index 0000000..4548c3a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Basic_Insert/Basic_Insert.ino @@ -0,0 +1,313 @@ +/********************************************************************************************************************************* + Basic_Insert.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : basic insert + + This example demonstrates how to issue an INSERT query to store data in a + table. For this, we will create a special database and table for testing. + The following are the SQL commands you will need to run in order to setup + your database for running this sketch. + + CREATE DATABASE test_arduino; + CREATE TABLE test_arduino.hello_arduino ( + num integer primary key auto_increment, + message char(40), + recorded timestamp + ); + + Here we see one database and a table with three fields; a primary key that + is an auto_increment, a string, and a timestamp. This will demonstrate how + to save a date and time of when the row was inserted, which can help you + determine when data was recorded or updated. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Create the database and table as shown above. + 2) Change the address of the server to the IP address of the MySQL server + 3) Change the user and password to a valid MySQL user and password + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + 8) After the sketch has run for some time, open a mysql client and issue + the command: "SELECT * FROM test_arduino.hello_arduino" to see the data + recorded. Note the field values and how the database handles both the + auto_increment and timestamp fields for us. You can clear the data with + "DELETE FROM test_arduino.hello_arduino". + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "test_arduino"; //"test_arduino"; +char default_table[] = "hello_arduino"; //"test_arduino"; + +String default_value = "Hello, Arduino!"; + +// Sample query +String INSERT_SQL = String("INSERT INTO ") + default_database + "." + default_table + + " (message) VALUES ('" + default_value + "')"; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Basic_Insert on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + +#if !(USE_ETHERNET_PORTENTA_H7) + + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Default SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#if defined(ESP8266) + // For ESP8266, change for other boards if necessary + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN D2 // For ESP8266 + #endif + + MYSQL_LOGERROR1(F("ESP8266 setCsPin:"), USE_THIS_SS_PIN); + + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // For ESP8266 + // Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8 + // Ethernet 0 X X X X 0 + // Ethernet2 X X X X X 0 + // Ethernet3 X X X X X 0 + // EthernetLarge X X X X X 0 + // Ethernet_ESP8266 0 0 0 0 0 0 + // D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs + // Must use library patch for Ethernet, EthernetLarge libraries + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#elif defined(ESP32) + + // You can use Ethernet.init(pin) to configure the CS pin + //Ethernet.init(10); // Most Arduino shields + //Ethernet.init(5); // MKR ETH shield + //Ethernet.init(0); // Teensy 2.0 + //Ethernet.init(20); // Teensy++ 2.0 + //Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet + //Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet + + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 22 // For ESP32 + #endif + + MYSQL_LOGERROR1(F("ESP32 setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // ESP32 => GPIO2,4,5,13,15,21,22 OK with Ethernet, Ethernet2, EthernetLarge + // ESP32 => GPIO2,4,5,15,21,22 OK with Ethernet3 + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#elif ETHERNET_USE_RPIPICO + + pinMode(USE_THIS_SS_PIN, OUTPUT); + digitalWrite(USE_THIS_SS_PIN, HIGH); + + // ETHERNET_USE_RPIPICO, use default SS = 5 or 17 + #ifndef USE_THIS_SS_PIN + #if defined(ARDUINO_ARCH_MBED) + #define USE_THIS_SS_PIN 5 // For Arduino Mbed core + #else + #define USE_THIS_SS_PIN 17 // For E.Philhower core + #endif + #endif + + MYSQL_LOGERROR1(F("RPIPICO setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + // Default pin 5/17 to SS/CS + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET3 || USE_ETHERNET_LARGE ) + +#else //defined(ESP8266) + // unknown board, do nothing, use default SS = 10 + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 10 // For other boards + #endif + + MYSQL_LOGERROR3(F("Board :"), BOARD_NAME, F(", setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, Ethernet2, EthernetLarge libraries + + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#endif //defined(ESP8266) + + // Just info to know how to connect correctly + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#endif // #if !(USE_ETHERNET_PORTENTA_H7) + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + MYSQL_DISPLAY(INSERT_SQL); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(INSERT_SQL.c_str()) ) + { + MYSQL_DISPLAY("Insert error"); + } + else + { + MYSQL_DISPLAY("Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Basic_Insert/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Basic_Insert/defines.h new file mode 100644 index 0000000..1d00cfa --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Basic_Insert/defines.h @@ -0,0 +1,443 @@ +/********************************************************************************************************************************* + 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(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + + #define USE_ETHERNET_WRAPPER false + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 5 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + #define USE_THIS_SS_PIN 17 + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// Only one of the following to be true. +#define USE_ETHERNET false +#define USE_ETHERNET_LARGE false +#define USE_ETHERNET2 false +#define USE_ETHERNET3 false +#define USE_ETHERNET_ESP8266 false +#define USE_ETHERNET_ENC false +#define USE_ETHERNET_LAN8742A false + +// KH, from v1.0.1 +#define USE_UIP_ETHERNET false +////// + +#if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #define SHIELD_TYPE "Ethernet using Portenta_Ethernet Library" +#elif USE_ETHERNET + #warning Use Ethernet lib + #define SHIELD_TYPE "W5x00 using Ethernet Library" +#elif USE_ETHERNET_LARGE + #warning Use EthernetLarge lib + #define SHIELD_TYPE "W5x00 using EthernetLarge Library" +#elif USE_ETHERNET2 + #warning Use Ethernet2 lib + #define SHIELD_TYPE "W5x00 using Ethernet2 Library" +#elif USE_ETHERNET3 + #warning Use Ethernet3 lib + #define SHIELD_TYPE "W5x00 using Ethernet3 Library" +#elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #define SHIELD_TYPE "W5x00 using Ethernet_ESP8266 Library" +#elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #define SHIELD_TYPE "ENC28J60 using EthernetENC Library" +#elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #define SHIELD_TYPE "LAN8742A Ethernet & STM32Ethernet Library" +#else + #define USE_ETHERNET true + #include "Ethernet.h" + #warning Use Ethernet lib + #define SHIELD_TYPE "W5x00 using Ethernet Library" +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Basic_Select/Basic_Select.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Basic_Select/Basic_Select.ino new file mode 100644 index 0000000..b2a4da3 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Basic_Select/Basic_Select.ino @@ -0,0 +1,347 @@ +/********************************************************************************************************************************* + Basic_Select.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : basic select + + This example demonstrates how to issue a SELECT query with no parameters + and use the data returned. For this, we use the Cursor class to execute + the query and get the results. + + It demonstrates who methods for running queries. The first allows you to + allocate memory for the cursor and later reclaim it, the second shows how + to use a single instance of the cursor use throughout a sketch. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + CAUTION: Don't mix and match the examples. Use one or the other in your + own sketch -- you'll get compilation errors at the least. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "world"; //"test_arduino"; +char default_table[] = "city"; //"test_arduino"; + +String default_column = "population"; +String default_value = "Toronto"; + +String query = String("SELECT ") + default_column + " FROM " + default_database + "." + default_table + + " WHERE name = '" + default_value + "'"; + +MySQL_Connection conn((Client *)&client); +// Create an instance of the cursor passing in the connection +MySQL_Query sql_query = MySQL_Query(&conn); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Basic_Select on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + +#if !(USE_ETHERNET_PORTENTA_H7) + + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Default SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#if defined(ESP8266) + // For ESP8266, change for other boards if necessary + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN D2 // For ESP8266 + #endif + + MYSQL_LOGERROR1(F("ESP8266 setCsPin:"), USE_THIS_SS_PIN); + + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // For ESP8266 + // Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8 + // Ethernet 0 X X X X 0 + // Ethernet2 X X X X X 0 + // Ethernet3 X X X X X 0 + // EthernetLarge X X X X X 0 + // Ethernet_ESP8266 0 0 0 0 0 0 + // D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs + // Must use library patch for Ethernet, EthernetLarge libraries + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#elif defined(ESP32) + + // You can use Ethernet.init(pin) to configure the CS pin + //Ethernet.init(10); // Most Arduino shields + //Ethernet.init(5); // MKR ETH shield + //Ethernet.init(0); // Teensy 2.0 + //Ethernet.init(20); // Teensy++ 2.0 + //Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet + //Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet + + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 22 // For ESP32 + #endif + + MYSQL_LOGERROR1(F("ESP32 setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // ESP32 => GPIO2,4,5,13,15,21,22 OK with Ethernet, Ethernet2, EthernetLarge + // ESP32 => GPIO2,4,5,15,21,22 OK with Ethernet3 + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#elif ETHERNET_USE_RPIPICO + + pinMode(USE_THIS_SS_PIN, OUTPUT); + digitalWrite(USE_THIS_SS_PIN, HIGH); + + // ETHERNET_USE_RPIPICO, use default SS = 5 or 17 + #ifndef USE_THIS_SS_PIN + #if defined(ARDUINO_ARCH_MBED) + #define USE_THIS_SS_PIN 5 // For Arduino Mbed core + #else + #define USE_THIS_SS_PIN 17 // For E.Philhower core + #endif + #endif + + MYSQL_LOGERROR1(F("RPIPICO setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + // Default pin 5/17 to SS/CS + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET3 || USE_ETHERNET_LARGE ) + +#else //defined(ESP8266) + // unknown board, do nothing, use default SS = 10 + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 10 // For other boards + #endif + + MYSQL_LOGERROR3(F("Board :"), BOARD_NAME, F(", setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, Ethernet2, EthernetLarge libraries + + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#endif //defined(ESP8266) + + // Just info to know how to connect correctly + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#endif // #if !(USE_ETHERNET_PORTENTA_H7) + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runQuery() +{ + row_values *row = NULL; + long head_count = 0; + + MYSQL_DISPLAY("1) Demonstrating using a dynamically allocated query."); + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + MYSQL_DISPLAY(query); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(query.c_str()) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Fetch the columns (required) but we don't use them. + //column_names *columns = query_mem.get_columns(); + query_mem.get_columns(); + + // Read the row (we are only expecting the one) + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + head_count = atol(row->values[0]); + } + } while (row != NULL); + + // Show the result + MYSQL_DISPLAY1(" Toronto pop =", head_count); + + delay(500); + + MYSQL_DISPLAY("2) Demonstrating using a local, global query."); + + // Execute the query + MYSQL_DISPLAY(query); + sql_query.execute(query.c_str()); + + // Fetch the columns (required) but we don't use them. + sql_query.get_columns(); + + // Read the row (we are only expecting the one) + do + { + row = sql_query.get_next_row(); + if (row != NULL) + { + head_count = atol(row->values[0]); + } + } while (row != NULL); + + // Now we close the cursor to free any memory + sql_query.close(); + + // Show the result but this time do some math on it + MYSQL_DISPLAY1(" Toronto pop =", head_count); + MYSQL_DISPLAY1(" Toronto pop increased by 11725 =", head_count + 11725); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Basic_Select/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Basic_Select/defines.h new file mode 100644 index 0000000..1d00cfa --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Basic_Select/defines.h @@ -0,0 +1,443 @@ +/********************************************************************************************************************************* + 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(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + + #define USE_ETHERNET_WRAPPER false + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 5 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + #define USE_THIS_SS_PIN 17 + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// Only one of the following to be true. +#define USE_ETHERNET false +#define USE_ETHERNET_LARGE false +#define USE_ETHERNET2 false +#define USE_ETHERNET3 false +#define USE_ETHERNET_ESP8266 false +#define USE_ETHERNET_ENC false +#define USE_ETHERNET_LAN8742A false + +// KH, from v1.0.1 +#define USE_UIP_ETHERNET false +////// + +#if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #define SHIELD_TYPE "Ethernet using Portenta_Ethernet Library" +#elif USE_ETHERNET + #warning Use Ethernet lib + #define SHIELD_TYPE "W5x00 using Ethernet Library" +#elif USE_ETHERNET_LARGE + #warning Use EthernetLarge lib + #define SHIELD_TYPE "W5x00 using EthernetLarge Library" +#elif USE_ETHERNET2 + #warning Use Ethernet2 lib + #define SHIELD_TYPE "W5x00 using Ethernet2 Library" +#elif USE_ETHERNET3 + #warning Use Ethernet3 lib + #define SHIELD_TYPE "W5x00 using Ethernet3 Library" +#elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #define SHIELD_TYPE "W5x00 using Ethernet_ESP8266 Library" +#elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #define SHIELD_TYPE "ENC28J60 using EthernetENC Library" +#elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #define SHIELD_TYPE "LAN8742A Ethernet & STM32Ethernet Library" +#else + #define USE_ETHERNET true + #include "Ethernet.h" + #warning Use Ethernet lib + #define SHIELD_TYPE "W5x00 using Ethernet Library" +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Complex_Insert/Complex_Insert.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Complex_Insert/Complex_Insert.ino new file mode 100644 index 0000000..c857877 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Complex_Insert/Complex_Insert.ino @@ -0,0 +1,338 @@ +/********************************************************************************************************************************* + Complex_Insert.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : complex insert + + This example demonstrates how to issue an INSERT query to store data in a + table using data from variables in our sketch. In this case, we supply the + values dynamically. + + This sketch simulates storing data from a sensor in a table. + + For this, we will create a special database and table for testing. + The following are the SQL commands you will need to run in order to setup + your database for running this sketch. + + CREATE DATABASE test_arduino; + CREATE TABLE test_arduino.hello_sensor ( + num integer primary key auto_increment, + message char(40), + sensor_num integer, + value float, + recorded timestamp + ); + + Here we have a table that contains an auto_increment primary key, a text + field, a field to identify the sensor, the value read, and timestamp of + the recorded data. + + Note: Since this sketch uses test data, we place the INSERT in the setup() + method so that it runs only once. Typically, you would have the + INSERT in the loop() method after your code to read from the sensor. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Create the database and table as shown above. + 2) Change the address of the server to the IP address of the MySQL server + 3) Change the user and password to a valid MySQL user and password + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + 8) After the sketch has run for some time, open a mysql client and issue + the command: "SELECT * FROM test_arduino.hello_sensor" to see the data + recorded. Note the field values and how the database handles both the + auto_increment and timestamp fields for us. You can clear the data with + "DELETE FROM test_arduino.hello_sensor". + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "test_arduino"; //"test_arduino"; +char default_table[] = "hello_sensor"; //"test_arduino"; + +// Sample query +char INSERT_DATA[] = "INSERT INTO %s.%s (message, sensor_num, value) VALUES ('%s',%d,%s)"; + +char query[128]; +char temperature[10]; + +MySQL_Connection conn((Client *)&client); + +#if !( ESP32 || ESP8266 || defined(CORE_TEENSY) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || ( defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_MBED) ) ) + +char *dtostrf(double val, signed char width, unsigned char prec, char *sout) +{ + char fmt[20]; + sprintf(fmt, "%%%d.%df", width, prec); + sprintf(sout, fmt, val); + return sout; +} +#endif + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Complex_Insert on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + +#if !(USE_ETHERNET_PORTENTA_H7) + + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Default SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#if defined(ESP8266) + // For ESP8266, change for other boards if necessary + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN D2 // For ESP8266 + #endif + + MYSQL_LOGERROR1(F("ESP8266 setCsPin:"), USE_THIS_SS_PIN); + + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // For ESP8266 + // Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8 + // Ethernet 0 X X X X 0 + // Ethernet2 X X X X X 0 + // Ethernet3 X X X X X 0 + // EthernetLarge X X X X X 0 + // Ethernet_ESP8266 0 0 0 0 0 0 + // D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs + // Must use library patch for Ethernet, EthernetLarge libraries + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#elif defined(ESP32) + + // You can use Ethernet.init(pin) to configure the CS pin + //Ethernet.init(10); // Most Arduino shields + //Ethernet.init(5); // MKR ETH shield + //Ethernet.init(0); // Teensy 2.0 + //Ethernet.init(20); // Teensy++ 2.0 + //Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet + //Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet + + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 22 // For ESP32 + #endif + + MYSQL_LOGERROR1(F("ESP32 setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // ESP32 => GPIO2,4,5,13,15,21,22 OK with Ethernet, Ethernet2, EthernetLarge + // ESP32 => GPIO2,4,5,15,21,22 OK with Ethernet3 + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#elif ETHERNET_USE_RPIPICO + + pinMode(USE_THIS_SS_PIN, OUTPUT); + digitalWrite(USE_THIS_SS_PIN, HIGH); + + // ETHERNET_USE_RPIPICO, use default SS = 5 or 17 + #ifndef USE_THIS_SS_PIN + #if defined(ARDUINO_ARCH_MBED) + #define USE_THIS_SS_PIN 5 // For Arduino Mbed core + #else + #define USE_THIS_SS_PIN 17 // For E.Philhower core + #endif + #endif + + MYSQL_LOGERROR1(F("RPIPICO setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + // Default pin 5/17 to SS/CS + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET3 || USE_ETHERNET_LARGE ) + +#else //defined(ESP8266) + // unknown board, do nothing, use default SS = 10 + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 10 // For other boards + #endif + + MYSQL_LOGERROR3(F("Board :"), BOARD_NAME, F(", setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, Ethernet2, EthernetLarge libraries + + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#endif //defined(ESP8266) + + // Just info to know how to connect correctly + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#endif // #if !(USE_ETHERNET_PORTENTA_H7) + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); + MYSQL_DISPLAY3("DB =", default_database, ", Table =", default_table); +} + +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + // Save + dtostrf(50.125, 1, 1, temperature); + sprintf(query, INSERT_DATA, default_database, default_table, "test sensor", 24, temperature); + + // Execute the query + MYSQL_DISPLAY(query); + + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Complex Insert error"); + } + else + { + MYSQL_DISPLAY("Complex Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Complex_Insert/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Complex_Insert/defines.h new file mode 100644 index 0000000..1d00cfa --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Complex_Insert/defines.h @@ -0,0 +1,443 @@ +/********************************************************************************************************************************* + 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(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + + #define USE_ETHERNET_WRAPPER false + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 5 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + #define USE_THIS_SS_PIN 17 + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// Only one of the following to be true. +#define USE_ETHERNET false +#define USE_ETHERNET_LARGE false +#define USE_ETHERNET2 false +#define USE_ETHERNET3 false +#define USE_ETHERNET_ESP8266 false +#define USE_ETHERNET_ENC false +#define USE_ETHERNET_LAN8742A false + +// KH, from v1.0.1 +#define USE_UIP_ETHERNET false +////// + +#if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #define SHIELD_TYPE "Ethernet using Portenta_Ethernet Library" +#elif USE_ETHERNET + #warning Use Ethernet lib + #define SHIELD_TYPE "W5x00 using Ethernet Library" +#elif USE_ETHERNET_LARGE + #warning Use EthernetLarge lib + #define SHIELD_TYPE "W5x00 using EthernetLarge Library" +#elif USE_ETHERNET2 + #warning Use Ethernet2 lib + #define SHIELD_TYPE "W5x00 using Ethernet2 Library" +#elif USE_ETHERNET3 + #warning Use Ethernet3 lib + #define SHIELD_TYPE "W5x00 using Ethernet3 Library" +#elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #define SHIELD_TYPE "W5x00 using Ethernet_ESP8266 Library" +#elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #define SHIELD_TYPE "ENC28J60 using EthernetENC Library" +#elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #define SHIELD_TYPE "LAN8742A Ethernet & STM32Ethernet Library" +#else + #define USE_ETHERNET true + #include "Ethernet.h" + #warning Use Ethernet lib + #define SHIELD_TYPE "W5x00 using Ethernet Library" +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect/Connect.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect/Connect.ino new file mode 100644 index 0000000..18fa11f --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect/Connect.ino @@ -0,0 +1,265 @@ +/********************************************************************************************************************************* + Connect.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : connect + + This example demonstrates how to connect to a MySQL server from an + Arduino using an Arduino-compatible Ethernet shield. Note that "compatible" + means it must conform to the Ethernet class library or be a derivative + with the same classes and methods. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "world"; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Connect on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + +#if !(USE_ETHERNET_PORTENTA_H7) + + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Default SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#if defined(ESP8266) + // For ESP8266, change for other boards if necessary + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN D2 // For ESP8266 + #endif + + MYSQL_LOGERROR1(F("ESP8266 setCsPin:"), USE_THIS_SS_PIN); + + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // For ESP8266 + // Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8 + // Ethernet 0 X X X X 0 + // Ethernet2 X X X X X 0 + // Ethernet3 X X X X X 0 + // EthernetLarge X X X X X 0 + // Ethernet_ESP8266 0 0 0 0 0 0 + // D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs + // Must use library patch for Ethernet, EthernetLarge libraries + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#elif defined(ESP32) + + // You can use Ethernet.init(pin) to configure the CS pin + //Ethernet.init(10); // Most Arduino shields + //Ethernet.init(5); // MKR ETH shield + //Ethernet.init(0); // Teensy 2.0 + //Ethernet.init(20); // Teensy++ 2.0 + //Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet + //Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet + + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 22 // For ESP32 + #endif + + MYSQL_LOGERROR1(F("ESP32 setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // ESP32 => GPIO2,4,5,13,15,21,22 OK with Ethernet, Ethernet2, EthernetLarge + // ESP32 => GPIO2,4,5,15,21,22 OK with Ethernet3 + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#elif ETHERNET_USE_RPIPICO + + pinMode(USE_THIS_SS_PIN, OUTPUT); + digitalWrite(USE_THIS_SS_PIN, HIGH); + + // ETHERNET_USE_RPIPICO, use default SS = 5 or 17 + #ifndef USE_THIS_SS_PIN + #if defined(ARDUINO_ARCH_MBED) + #define USE_THIS_SS_PIN 5 // For Arduino Mbed core + #else + #define USE_THIS_SS_PIN 17 // For E.Philhower core + #endif + #endif + + MYSQL_LOGERROR1(F("RPIPICO setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + // Default pin 5/17 to SS/CS + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET3 || USE_ETHERNET_LARGE ) + +#else //defined(ESP8266) + // unknown board, do nothing, use default SS = 10 + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 10 // For other boards + #endif + + MYSQL_LOGERROR3(F("Board :"), BOARD_NAME, F(", setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, Ethernet2, EthernetLarge libraries + + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#endif //defined(ESP8266) + + // Just info to know how to connect correctly + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#endif // #if !(USE_ETHERNET_PORTENTA_H7) + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password, default_database)) + if (conn.connectNonBlocking(server, server_port, user, password, default_database) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect/defines.h new file mode 100644 index 0000000..1d00cfa --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect/defines.h @@ -0,0 +1,443 @@ +/********************************************************************************************************************************* + 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(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + + #define USE_ETHERNET_WRAPPER false + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 5 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + #define USE_THIS_SS_PIN 17 + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// Only one of the following to be true. +#define USE_ETHERNET false +#define USE_ETHERNET_LARGE false +#define USE_ETHERNET2 false +#define USE_ETHERNET3 false +#define USE_ETHERNET_ESP8266 false +#define USE_ETHERNET_ENC false +#define USE_ETHERNET_LAN8742A false + +// KH, from v1.0.1 +#define USE_UIP_ETHERNET false +////// + +#if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #define SHIELD_TYPE "Ethernet using Portenta_Ethernet Library" +#elif USE_ETHERNET + #warning Use Ethernet lib + #define SHIELD_TYPE "W5x00 using Ethernet Library" +#elif USE_ETHERNET_LARGE + #warning Use EthernetLarge lib + #define SHIELD_TYPE "W5x00 using EthernetLarge Library" +#elif USE_ETHERNET2 + #warning Use Ethernet2 lib + #define SHIELD_TYPE "W5x00 using Ethernet2 Library" +#elif USE_ETHERNET3 + #warning Use Ethernet3 lib + #define SHIELD_TYPE "W5x00 using Ethernet3 Library" +#elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #define SHIELD_TYPE "W5x00 using Ethernet_ESP8266 Library" +#elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #define SHIELD_TYPE "ENC28J60 using EthernetENC Library" +#elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #define SHIELD_TYPE "LAN8742A Ethernet & STM32Ethernet Library" +#else + #define USE_ETHERNET true + #include "Ethernet.h" + #warning Use Ethernet lib + #define SHIELD_TYPE "W5x00 using Ethernet Library" +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect_By_Hostname/Connect_By_Hostname.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect_By_Hostname/Connect_By_Hostname.ino new file mode 100644 index 0000000..9aa5101 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect_By_Hostname/Connect_By_Hostname.ino @@ -0,0 +1,264 @@ +/********************************************************************************************************************************* + Connect_By_Hostname.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect by hostname + + This example demonstrates how to connect to a MySQL server resolving the + hostname for cases when you do not know the IP address of the server or + it changes because it is in the cloud. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the hostname variable to the hostname of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ +#include "defines.h" + +#include + +#if !(USE_ETHERNET_PORTENTA_H7) + #include +#endif + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Connect_By_Hostname on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + +#if !(USE_ETHERNET_PORTENTA_H7) + + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Default SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#if defined(ESP8266) + // For ESP8266, change for other boards if necessary + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN D2 // For ESP8266 + #endif + + MYSQL_LOGERROR1(F("ESP8266 setCsPin:"), USE_THIS_SS_PIN); + + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // For ESP8266 + // Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8 + // Ethernet 0 X X X X 0 + // Ethernet2 X X X X X 0 + // Ethernet3 X X X X X 0 + // EthernetLarge X X X X X 0 + // Ethernet_ESP8266 0 0 0 0 0 0 + // D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs + // Must use library patch for Ethernet, EthernetLarge libraries + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#elif defined(ESP32) + + // You can use Ethernet.init(pin) to configure the CS pin + //Ethernet.init(10); // Most Arduino shields + //Ethernet.init(5); // MKR ETH shield + //Ethernet.init(0); // Teensy 2.0 + //Ethernet.init(20); // Teensy++ 2.0 + //Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet + //Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet + + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 22 // For ESP32 + #endif + + MYSQL_LOGERROR1(F("ESP32 setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // ESP32 => GPIO2,4,5,13,15,21,22 OK with Ethernet, Ethernet2, EthernetLarge + // ESP32 => GPIO2,4,5,15,21,22 OK with Ethernet3 + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#elif ETHERNET_USE_RPIPICO + + pinMode(USE_THIS_SS_PIN, OUTPUT); + digitalWrite(USE_THIS_SS_PIN, HIGH); + + // ETHERNET_USE_RPIPICO, use default SS = 5 or 17 + #ifndef USE_THIS_SS_PIN + #if defined(ARDUINO_ARCH_MBED) + #define USE_THIS_SS_PIN 5 // For Arduino Mbed core + #else + #define USE_THIS_SS_PIN 17 // For E.Philhower core + #endif + #endif + + MYSQL_LOGERROR1(F("RPIPICO setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + // Default pin 5/17 to SS/CS + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET3 || USE_ETHERNET_LARGE ) + +#else //defined(ESP8266) + // unknown board, do nothing, use default SS = 10 + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 10 // For other boards + #endif + + MYSQL_LOGERROR3(F("Board :"), BOARD_NAME, F(", setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, Ethernet2, EthernetLarge libraries + + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#endif //defined(ESP8266) + + // Just info to know how to connect correctly + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#endif // #if !(USE_ETHERNET_PORTENTA_H7) + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect_By_Hostname/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect_By_Hostname/defines.h new file mode 100644 index 0000000..1d00cfa --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect_By_Hostname/defines.h @@ -0,0 +1,443 @@ +/********************************************************************************************************************************* + 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(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + + #define USE_ETHERNET_WRAPPER false + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 5 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + #define USE_THIS_SS_PIN 17 + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// Only one of the following to be true. +#define USE_ETHERNET false +#define USE_ETHERNET_LARGE false +#define USE_ETHERNET2 false +#define USE_ETHERNET3 false +#define USE_ETHERNET_ESP8266 false +#define USE_ETHERNET_ENC false +#define USE_ETHERNET_LAN8742A false + +// KH, from v1.0.1 +#define USE_UIP_ETHERNET false +////// + +#if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #define SHIELD_TYPE "Ethernet using Portenta_Ethernet Library" +#elif USE_ETHERNET + #warning Use Ethernet lib + #define SHIELD_TYPE "W5x00 using Ethernet Library" +#elif USE_ETHERNET_LARGE + #warning Use EthernetLarge lib + #define SHIELD_TYPE "W5x00 using EthernetLarge Library" +#elif USE_ETHERNET2 + #warning Use Ethernet2 lib + #define SHIELD_TYPE "W5x00 using Ethernet2 Library" +#elif USE_ETHERNET3 + #warning Use Ethernet3 lib + #define SHIELD_TYPE "W5x00 using Ethernet3 Library" +#elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #define SHIELD_TYPE "W5x00 using Ethernet_ESP8266 Library" +#elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #define SHIELD_TYPE "ENC28J60 using EthernetENC Library" +#elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #define SHIELD_TYPE "LAN8742A Ethernet & STM32Ethernet Library" +#else + #define USE_ETHERNET true + #include "Ethernet.h" + #warning Use Ethernet lib + #define SHIELD_TYPE "W5x00 using Ethernet Library" +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect_Default_Database/Connect_Default_Database.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect_Default_Database/Connect_Default_Database.ino new file mode 100644 index 0000000..fddd1e0 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect_Default_Database/Connect_Default_Database.ino @@ -0,0 +1,262 @@ +/********************************************************************************************************************************* + Connect_Default_Database.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect with default database + + This example demonstrates how to connect to a MySQL server and specifying + the default database when connecting. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +// Select the static Local IP address according to your local network +IPAddress ip(192, 168, 2, 222); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "world"; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY3("\nStarting Connect_Default_Database on", BOARD_NAME, ", with", SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + +#if !(USE_ETHERNET_PORTENTA_H7) + + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Default SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#if defined(ESP8266) + // For ESP8266, change for other boards if necessary + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN D2 // For ESP8266 + #endif + + MYSQL_LOGERROR1(F("ESP8266 setCsPin:"), USE_THIS_SS_PIN); + + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // For ESP8266 + // Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8 + // Ethernet 0 X X X X 0 + // Ethernet2 X X X X X 0 + // Ethernet3 X X X X X 0 + // EthernetLarge X X X X X 0 + // Ethernet_ESP8266 0 0 0 0 0 0 + // D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs + // Must use library patch for Ethernet, EthernetLarge libraries + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#elif defined(ESP32) + + // You can use Ethernet.init(pin) to configure the CS pin + //Ethernet.init(10); // Most Arduino shields + //Ethernet.init(5); // MKR ETH shield + //Ethernet.init(0); // Teensy 2.0 + //Ethernet.init(20); // Teensy++ 2.0 + //Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet + //Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet + + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 22 // For ESP32 + #endif + + MYSQL_LOGERROR1(F("ESP32 setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // ESP32 => GPIO2,4,5,13,15,21,22 OK with Ethernet, Ethernet2, EthernetLarge + // ESP32 => GPIO2,4,5,15,21,22 OK with Ethernet3 + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#elif ETHERNET_USE_RPIPICO + + pinMode(USE_THIS_SS_PIN, OUTPUT); + digitalWrite(USE_THIS_SS_PIN, HIGH); + + // ETHERNET_USE_RPIPICO, use default SS = 5 or 17 + #ifndef USE_THIS_SS_PIN + #if defined(ARDUINO_ARCH_MBED) + #define USE_THIS_SS_PIN 5 // For Arduino Mbed core + #else + #define USE_THIS_SS_PIN 17 // For E.Philhower core + #endif + #endif + + MYSQL_LOGERROR1(F("RPIPICO setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, EthernetLarge libraries + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + // Default pin 5/17 to SS/CS + + //Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET3 || USE_ETHERNET_LARGE ) + +#else //defined(ESP8266) + // unknown board, do nothing, use default SS = 10 + #ifndef USE_THIS_SS_PIN + #define USE_THIS_SS_PIN 10 // For other boards + #endif + + MYSQL_LOGERROR3(F("Board :"), BOARD_NAME, F(", setCsPin:"), USE_THIS_SS_PIN); + + // For other boards, to change if necessary + #if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET_ENC ) + // Must use library patch for Ethernet, Ethernet2, EthernetLarge libraries + + Ethernet.init (USE_THIS_SS_PIN); + + #elif USE_ETHERNET3 + // Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer + #ifndef ETHERNET3_MAX_SOCK_NUM + #define ETHERNET3_MAX_SOCK_NUM 4 + #endif + + Ethernet.setCsPin (USE_THIS_SS_PIN); + Ethernet.init (ETHERNET3_MAX_SOCK_NUM); + + #endif //( USE_ETHERNET || USE_ETHERNET2 || USE_ETHERNET_LARGE || USE_ETHERNET_ENC ) + +#endif //defined(ESP8266) + + // Just info to know how to connect correctly + MYSQL_LOGERROR(F("=========================================")); + MYSQL_LOGERROR(F("Currently Used SPI pinout:")); + MYSQL_LOGERROR1(F("MOSI:"), MOSI); + MYSQL_LOGERROR1(F("MISO:"), MISO); + MYSQL_LOGERROR1(F("SCK:"), SCK); + MYSQL_LOGERROR1(F("SS:"), SS); + MYSQL_LOGERROR(F("=========================================")); + +#endif // #if !(USE_ETHERNET_PORTENTA_H7) + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect_Default_Database/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect_Default_Database/defines.h new file mode 100644 index 0000000..1d00cfa --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/Connect_Default_Database/defines.h @@ -0,0 +1,443 @@ +/********************************************************************************************************************************* + 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(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + + #define USE_ETHERNET_WRAPPER false + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 5 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + #define USE_THIS_SS_PIN 17 + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// Only one of the following to be true. +#define USE_ETHERNET false +#define USE_ETHERNET_LARGE false +#define USE_ETHERNET2 false +#define USE_ETHERNET3 false +#define USE_ETHERNET_ESP8266 false +#define USE_ETHERNET_ENC false +#define USE_ETHERNET_LAN8742A false + +// KH, from v1.0.1 +#define USE_UIP_ETHERNET false +////// + +#if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #define SHIELD_TYPE "Ethernet using Portenta_Ethernet Library" +#elif USE_ETHERNET + #warning Use Ethernet lib + #define SHIELD_TYPE "W5x00 using Ethernet Library" +#elif USE_ETHERNET_LARGE + #warning Use EthernetLarge lib + #define SHIELD_TYPE "W5x00 using EthernetLarge Library" +#elif USE_ETHERNET2 + #warning Use Ethernet2 lib + #define SHIELD_TYPE "W5x00 using Ethernet2 Library" +#elif USE_ETHERNET3 + #warning Use Ethernet3 lib + #define SHIELD_TYPE "W5x00 using Ethernet3 Library" +#elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #define SHIELD_TYPE "W5x00 using Ethernet_ESP8266 Library" +#elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #define SHIELD_TYPE "ENC28J60 using EthernetENC Library" +#elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #define SHIELD_TYPE "LAN8742A Ethernet & STM32Ethernet Library" +#else + #define USE_ETHERNET true + #include "Ethernet.h" + #warning Use Ethernet lib + #define SHIELD_TYPE "W5x00 using Ethernet Library" +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/multiFileProject_Portenta_H7_Ethernet/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/multiFileProject_Portenta_H7_Ethernet/defines.h new file mode 100644 index 0000000..1d00cfa --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/multiFileProject_Portenta_H7_Ethernet/defines.h @@ -0,0 +1,443 @@ +/********************************************************************************************************************************* + 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(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define ETHERNET_USE_PORTENTA_H7 true + #define USE_ETHERNET_PORTENTA_H7 true + + #define USE_ETHERNET_WRAPPER false + +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(ETHERNET_USE_SAMD) + #undef ETHERNET_USE_SAMD + #endif + #define ETHERNET_USE_SAMD true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(ETHERNET_USE_NRF528XX) + #undef ETHERNET_USE_NRF528XX + #endif + #define ETHERNET_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(ETHERNET_USE_SAM_DUE) + #undef ETHERNET_USE_SAM_DUE + #endif + #define ETHERNET_USE_SAM_DUE true +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(ETHERNET_USE_STM32) + #undef ETHERNET_USE_STM32 + #endif + #define ETHERNET_USE_STM32 true +#endif + +#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) ) + #if defined(ETHERNET_USE_RPIPICO) + #undef ETHERNET_USE_RPIPICO + #endif + #define ETHERNET_USE_RPIPICO true +#endif + +#if defined(ETHERNET_USE_SAMD) + // For SAMD + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if ( defined(ARDUINO_SAMD_ZERO) && !defined(SEEED_XIAO_M0) ) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #ifdef USE_THIS_SS_PIN + #undef USE_THIS_SS_PIN + #endif + #define USE_THIS_SS_PIN A1 + #warning define SEEED_XIAO_M0 USE_THIS_SS_PIN == A1 + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif (ETHERNET_USE_SAM_DUE) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "SAM DUE" + +#elif (ETHERNET_USE_NRF528XX) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUITPLAY" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NRF52840_PCA10056" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif ( defined(CORE_TEENSY) ) + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#elif (ETHERNET_USE_STM32) + + #if defined(STM32F0) + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #define BOARD_TYPE "STM32MP1" + #else + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif ( defined(ESP8266) ) + // For ESP8266 + #warning Use ESP8266 architecture + #include + #define ETHERNET_USE_ESP8266 + #define BOARD_TYPE "ESP8266" + +#elif ( defined(ESP32) ) + // For ESP32 + #warning Use ESP32 architecture + #define ETHERNET_USE_ESP32 + #define BOARD_TYPE "ESP32" + + #define W5500_RST_PORT 21 + +#elif ETHERNET_USE_RPIPICO + + // Default pin 5 (in Mbed) or 17 to SS/CS + #if defined(ARDUINO_ARCH_MBED) + // For RPI Pico using Arduino Mbed RP2040 core + // SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5 + + #define USE_THIS_SS_PIN 5 + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_TYPE "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_TYPE "MBED DAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_TYPE "MBED GENERIC_RP2040" + #else + #define BOARD_TYPE "MBED Unknown RP2040" + #endif + + #else + // For RPI Pico using E. Philhower RP2040 core + // SCK: GPIO18, MOSI: GPIO19, MISO: GPIO16, SS/CS: GPIO17 + #define USE_THIS_SS_PIN 17 + + #endif + + #define SS_PIN_DEFAULT USE_THIS_SS_PIN + + // For RPI Pico + #warning Use RPI-Pico RP2040 architecture + +#else + // For Mega + // Default pin 10 to SS/CS + #define USE_THIS_SS_PIN 10 + + #define BOARD_TYPE "AVR Mega" +#endif + + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#include + +// Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported + +// To override the default CS/SS pin. Don't use unless you know exactly which pin to use +// You can define here or customize for each board at same place with BOARD_TYPE +// Check @ defined(SEEED_XIAO_M0) +//#define USE_THIS_SS_PIN 22 //21 //5 //4 //2 //15 + +// Only one of the following to be true. +#define USE_ETHERNET false +#define USE_ETHERNET_LARGE false +#define USE_ETHERNET2 false +#define USE_ETHERNET3 false +#define USE_ETHERNET_ESP8266 false +#define USE_ETHERNET_ENC false +#define USE_ETHERNET_LAN8742A false + +// KH, from v1.0.1 +#define USE_UIP_ETHERNET false +////// + +#if USE_ETHERNET_PORTENTA_H7 + #warning Use Portenta Ethernet lib + #define SHIELD_TYPE "Ethernet using Portenta_Ethernet Library" +#elif USE_ETHERNET + #warning Use Ethernet lib + #define SHIELD_TYPE "W5x00 using Ethernet Library" +#elif USE_ETHERNET_LARGE + #warning Use EthernetLarge lib + #define SHIELD_TYPE "W5x00 using EthernetLarge Library" +#elif USE_ETHERNET2 + #warning Use Ethernet2 lib + #define SHIELD_TYPE "W5x00 using Ethernet2 Library" +#elif USE_ETHERNET3 + #warning Use Ethernet3 lib + #define SHIELD_TYPE "W5x00 using Ethernet3 Library" +#elif USE_ETHERNET_ESP8266 + #warning Using Ethernet_ESP8266 lib + #define SHIELD_TYPE "W5x00 using Ethernet_ESP8266 Library" +#elif USE_ETHERNET_ENC + #warning Using EthernetENC lib + #define SHIELD_TYPE "ENC28J60 using EthernetENC Library" +#elif USE_ETHERNET_LAN8742A + #warning Using LAN8742A Ethernet & STM32Ethernet lib + #define SHIELD_TYPE "LAN8742A Ethernet & STM32Ethernet Library" +#else + #define USE_ETHERNET true + #include "Ethernet.h" + #warning Use Ethernet lib + #define SHIELD_TYPE "W5x00 using Ethernet Library" +#endif + +// 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 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/multiFileProject_Portenta_H7_Ethernet/multiFileProject.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/multiFileProject_Portenta_H7_Ethernet/multiFileProject.cpp new file mode 100644 index 0000000..e1f0fe7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/multiFileProject_Portenta_H7_Ethernet/multiFileProject.cpp @@ -0,0 +1,17 @@ +/**************************************************************************************************************************** + multiFileProject.cpp + 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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#include "multiFileProject.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/multiFileProject_Portenta_H7_Ethernet/multiFileProject.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/multiFileProject_Portenta_H7_Ethernet/multiFileProject.h new file mode 100644 index 0000000..5811a68 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/multiFileProject_Portenta_H7_Ethernet/multiFileProject.h @@ -0,0 +1,20 @@ +/**************************************************************************************************************************** + multiFileProject.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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#pragma once + +// Can be included as many times as necessary, without `Multiple Definitions` Linker Error +#include "MySQL_Generic.hpp" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/multiFileProject_Portenta_H7_Ethernet/multiFileProject_Portenta_H7_Ethernet.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/multiFileProject_Portenta_H7_Ethernet/multiFileProject_Portenta_H7_Ethernet.ino new file mode 100644 index 0000000..88f0871 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/Ethernet/multiFileProject_Portenta_H7_Ethernet/multiFileProject_Portenta_H7_Ethernet.ino @@ -0,0 +1,47 @@ +/**************************************************************************************************************************** + multiFileProject_Portenta_H7_Ethernet.ino + 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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#include "defines.h" + +#define MYSQL_MARIADB_GENERIC_VERSION_MIN_TARGET "MySQL_MariaDB_Generic v1.7.0" +#define MYSQL_MARIADB_GENERIC_VERSION_MIN 1007000 + +#include "multiFileProject.h" + +// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error +#include "MySQL_Generic.h" + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + Serial.println("\nStart multiFileProject_Portenta_H7_Ethernet"); + Serial.println(MYSQL_MARIADB_GENERIC_VERSION); + +#if defined(MYSQL_MARIADB_GENERIC_VERSION_MIN) + if (MYSQL_MARIADB_GENERIC_VERSION_INT < MYSQL_MARIADB_GENERIC_VERSION_MIN) + { + Serial.print("Warning. Must use this example on Version equal or later than : "); + Serial.println(MYSQL_MARIADB_GENERIC_VERSION_MIN_TARGET); + } +#endif +} + +void loop() +{ + // put your main code here, to run repeatedly: +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Insert_WiFi/Basic_Insert_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Insert_WiFi/Basic_Insert_WiFi.ino new file mode 100644 index 0000000..a3c5bd8 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Insert_WiFi/Basic_Insert_WiFi.ino @@ -0,0 +1,159 @@ +/********************************************************************************************************************************* + Basic_Insert_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : basic insert + + This example demonstrates how to issue an INSERT query to store data in a + table. For this, we will create a special database and table for testing. + The following are the SQL commands you will need to run in order to setup + your database for running this sketch. + + CREATE DATABASE test_arduino; + CREATE TABLE test_arduino.hello_arduino ( + num integer primary key auto_increment, + message char(40), + recorded timestamp + ); + + Here we see one database and a table with three fields; a primary key that + is an auto_increment, a string, and a timestamp. This will demonstrate how + to save a date and time of when the row was inserted, which can help you + determine when data was recorded or updated. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Create the database and table as shown above. + 2) Change the address of the server to the IP address of the MySQL server + 3) Change the user and password to a valid MySQL user and password + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + 8) After the sketch has run for some time, open a mysql client and issue + the command: "SELECT * FROM test_arduino.hello_arduino" to see the data + recorded. Note the field values and how the database handles both the + auto_increment and timestamp fields for us. You can clear the data with + "DELETE FROM test_arduino.hello_arduino". + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "test_arduino"; //"test_arduino"; +char default_table[] = "hello_arduino"; //"test_arduino"; + +String default_value = "Hello, Arduino!"; + +// Sample query +String INSERT_SQL = String("INSERT INTO ") + default_database + "." + default_table + + " (message) VALUES ('" + default_value + "')"; + +MySQL_Connection conn((Client *)&client); + +MySQL_Query *query_mem; + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Basic_Insert_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + MYSQL_DISPLAY(INSERT_SQL); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(INSERT_SQL.c_str()) ) + { + MYSQL_DISPLAY("Insert error"); + } + else + { + MYSQL_DISPLAY("Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Insert_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Insert_WiFi/Credentials.h new file mode 100644 index 0000000..96e7c00 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Insert_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "your_ssid"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Insert_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Insert_WiFi/defines.h new file mode 100644 index 0000000..962d826 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Insert_WiFi/defines.h @@ -0,0 +1,52 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define USE_WIFI_PORTENTA_H7 true + + #define USE_WIFI_NINA false + + // To use the default WiFi library here + #define USE_WIFI_CUSTOM false + +#else + #error This code is intended to run on the Portenta_H7 platform! Please check your Tools->Board setting. +#endif + +#define SHIELD_TYPE "Portenta_H7 WiFi" + +#warning Using Portenta H7 WiFi + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Select_WiFi/Basic_Select_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Select_WiFi/Basic_Select_WiFi.ino new file mode 100644 index 0000000..a500007 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Select_WiFi/Basic_Select_WiFi.ino @@ -0,0 +1,192 @@ +/********************************************************************************************************************************* + Basic_Select_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : basic select + + This example demonstrates how to issue a SELECT query with no parameters + and use the data returned. For this, we use the Cursor class to execute + the query and get the results. + + It demonstrates who methods for running queries. The first allows you to + allocate memory for the cursor and later reclaim it, the second shows how + to use a single instance of the cursor use throughout a sketch. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + CAUTION: Don't mix and match the examples. Use one or the other in your + own sketch -- you'll get compilation errors at the least. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "world"; //"test_arduino"; +char default_table[] = "city"; //"test_arduino"; + +String default_column = "population"; +String default_value = "Toronto"; + +String query = String("SELECT ") + default_column + " FROM " + default_database + "." + default_table + + " WHERE name = '" + default_value + "'"; + +MySQL_Connection conn((Client *)&client); + +// Create an instance of the cursor passing in the connection +MySQL_Query sql_query = MySQL_Query(&conn); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Basic_Select_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runQuery() +{ + row_values *row = NULL; + long head_count = 0; + + MYSQL_DISPLAY("1) Demonstrating using a dynamically allocated query."); + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + MYSQL_DISPLAY(query); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(query.c_str()) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Fetch the columns (required) but we don't use them. + //column_names *columns = query_mem.get_columns(); + query_mem.get_columns(); + + // Read the row (we are only expecting the one) + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + head_count = atol(row->values[0]); + } + } while (row != NULL); + + // Show the result + MYSQL_DISPLAY1(" Toronto pop =", head_count); + + delay(500); + + MYSQL_DISPLAY("2) Demonstrating using a local, global query."); + + // Execute the query + MYSQL_DISPLAY(query); + sql_query.execute(query.c_str()); + + // Fetch the columns (required) but we don't use them. + sql_query.get_columns(); + + // Read the row (we are only expecting the one) + do + { + row = sql_query.get_next_row(); + if (row != NULL) + { + head_count = atol(row->values[0]); + } + } while (row != NULL); + + // Now we close the cursor to free any memory + sql_query.close(); + + // Show the result but this time do some math on it + MYSQL_DISPLAY1(" Toronto pop =", head_count); + MYSQL_DISPLAY1(" Toronto pop increased by 11725 =", head_count + 11725); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Select_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Select_WiFi/Credentials.h new file mode 100644 index 0000000..96e7c00 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Select_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "your_ssid"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Select_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Select_WiFi/defines.h new file mode 100644 index 0000000..962d826 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Basic_Select_WiFi/defines.h @@ -0,0 +1,52 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define USE_WIFI_PORTENTA_H7 true + + #define USE_WIFI_NINA false + + // To use the default WiFi library here + #define USE_WIFI_CUSTOM false + +#else + #error This code is intended to run on the Portenta_H7 platform! Please check your Tools->Board setting. +#endif + +#define SHIELD_TYPE "Portenta_H7 WiFi" + +#warning Using Portenta H7 WiFi + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Insert_WiFi/Complex_Insert_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Insert_WiFi/Complex_Insert_WiFi.ino new file mode 100644 index 0000000..c5c51a4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Insert_WiFi/Complex_Insert_WiFi.ino @@ -0,0 +1,182 @@ +/********************************************************************************************************************************* + Complex_Insert_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : complex insert + + This example demonstrates how to issue an INSERT query to store data in a + table using data from variables in our sketch. In this case, we supply the + values dynamically. + + This sketch simulates storing data from a sensor in a table. + + For this, we will create a special database and table for testing. + The following are the SQL commands you will need to run in order to setup + your database for running this sketch. + + CREATE DATABASE test_arduino; + CREATE TABLE test_arduino.hello_sensor ( + num integer primary key auto_increment, + message char(40), + sensor_num integer, + value float, + recorded timestamp + ); + + Here we have a table that contains an auto_increment primary key, a text + field, a field to identify the sensor, the value read, and timestamp of + the recorded data. + + Note: Since this sketch uses test data, we place the INSERT in the setup() + method so that it runs only once. Typically, you would have the + INSERT in the loop() method after your code to read from the sensor. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Create the database and table as shown above. + 2) Change the address of the server to the IP address of the MySQL server + 3) Change the user and password to a valid MySQL user and password + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + 8) After the sketch has run for some time, open a mysql client and issue + the command: "SELECT * FROM test_arduino.hello_sensor" to see the data + recorded. Note the field values and how the database handles both the + auto_increment and timestamp fields for us. You can clear the data with + "DELETE FROM test_arduino.hello_sensor". + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "test_arduino"; //"test_arduino"; +char default_table[] = "hello_sensor"; //"test_arduino"; + +// Sample query +char INSERT_DATA[] = "INSERT INTO %s.%s (message, sensor_num, value) VALUES ('%s',%d,%s)"; + +char query[128]; +char temperature[10]; + +MySQL_Connection conn((Client *)&client); + +#if !( ESP32 || ESP8266 || defined(CORE_TEENSY) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || ( defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_MBED) ) ) + +char *dtostrf(double val, signed char width, unsigned char prec, char *sout) +{ + char fmt[20]; + sprintf(fmt, "%%%d.%df", width, prec); + sprintf(sout, fmt, val); + return sout; +} +#endif + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Complex_Insert_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + // Save + dtostrf(50.125, 1, 1, temperature); + sprintf(query, INSERT_DATA, default_database, default_table, "test sensor", 24, temperature); + + // Execute the query + MYSQL_DISPLAY(query); + + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Complex Insert error"); + } + else + { + MYSQL_DISPLAY("Complex Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Insert_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Insert_WiFi/Credentials.h new file mode 100644 index 0000000..96e7c00 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Insert_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "your_ssid"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Insert_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Insert_WiFi/defines.h new file mode 100644 index 0000000..962d826 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Insert_WiFi/defines.h @@ -0,0 +1,52 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define USE_WIFI_PORTENTA_H7 true + + #define USE_WIFI_NINA false + + // To use the default WiFi library here + #define USE_WIFI_CUSTOM false + +#else + #error This code is intended to run on the Portenta_H7 platform! Please check your Tools->Board setting. +#endif + +#define SHIELD_TYPE "Portenta_H7 WiFi" + +#warning Using Portenta H7 WiFi + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Select_WiFi/Complex_Select_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Select_WiFi/Complex_Select_WiFi.ino new file mode 100644 index 0000000..08050c5 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Select_WiFi/Complex_Select_WiFi.ino @@ -0,0 +1,190 @@ +/********************************************************************************************************************************* + Complex_Select_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : complex select + + This example demonstrates how to issue a SELECT query with parameters that + we provide from code. Thus, it demonstrates how to build query parameters + dynamically. + + Notice also the sketch demonstrates how to read columns and rows from + the result set. Study this example until you are familiar with how to + do this before writing your own sketch to read and consume query results. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "world"; //"test_arduino"; +char default_table[] = "city"; //"test_arduino"; + +// Sample query +// +// Notice the "%lu" - that's a placeholder for the parameter we will +// supply. See sprintf() documentation for more formatting specifier +// options + +unsigned long QUERY_POPULATION = 800000; + +const char QUERY_POP[] = "SELECT name, population FROM world.city WHERE population < %lu ORDER BY population DESC LIMIT 6;"; + +char query[128]; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Complex_Select_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runQuery() +{ + MYSQL_DISPLAY("===================================================="); + MYSQL_DISPLAY("> Running SELECT with dynamically supplied parameter"); + + // Supply the parameter for the query + // Here we use the QUERY_POP as the format string and query as the + // destination. This uses twice the memory so another option would be + // to allocate one buffer for all formatted queries or allocate the + // memory as needed (just make sure you allocate enough memory and + // free it when you're done!). + sprintf(query, QUERY_POP, QUERY_POPULATION + (( millis() % 100000 ) * 10) ); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Fetch the columns and print them + column_names *cols = query_mem.get_columns(); + + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(cols->fields[f]->name); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(","); + } + } + + MYSQL_DISPLAY(); + + // Read the rows and print them + row_values *row = NULL; + + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(row->values[f]); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(","); + } + } + + MYSQL_DISPLAY(); + } + } while (row != NULL); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(10000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Select_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Select_WiFi/Credentials.h new file mode 100644 index 0000000..96e7c00 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Select_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "your_ssid"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Select_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Select_WiFi/defines.h new file mode 100644 index 0000000..962d826 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Complex_Select_WiFi/defines.h @@ -0,0 +1,52 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define USE_WIFI_PORTENTA_H7 true + + #define USE_WIFI_NINA false + + // To use the default WiFi library here + #define USE_WIFI_CUSTOM false + +#else + #error This code is intended to run on the Portenta_H7 platform! Please check your Tools->Board setting. +#endif + +#define SHIELD_TYPE "Portenta_H7 WiFi" + +#warning Using Portenta H7 WiFi + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Default_Database_WiFi/Connect_Default_Database_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Default_Database_WiFi/Connect_Default_Database_WiFi.ino new file mode 100644 index 0000000..59a631e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Default_Database_WiFi/Connect_Default_Database_WiFi.ino @@ -0,0 +1,108 @@ +/********************************************************************************************************************************* + Connect_Default_Database_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* +/* + MySQL Connector/Arduino Example : connect with default database + + This example demonstrates how to connect to a MySQL server and specifying + the default database when connecting. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "world"; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Connect_Default_Database_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password, default_database)) + if (conn.connectNonBlocking(server, server_port, user, password, default_database) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Default_Database_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Default_Database_WiFi/Credentials.h new file mode 100644 index 0000000..96e7c00 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Default_Database_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "your_ssid"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Default_Database_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Default_Database_WiFi/defines.h new file mode 100644 index 0000000..962d826 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Default_Database_WiFi/defines.h @@ -0,0 +1,52 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define USE_WIFI_PORTENTA_H7 true + + #define USE_WIFI_NINA false + + // To use the default WiFi library here + #define USE_WIFI_CUSTOM false + +#else + #error This code is intended to run on the Portenta_H7 platform! Please check your Tools->Board setting. +#endif + +#define SHIELD_TYPE "Portenta_H7 WiFi" + +#warning Using Portenta H7 WiFi + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Disconnect_WiFi/Connect_Disconnect_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Disconnect_WiFi/Connect_Disconnect_WiFi.ino new file mode 100644 index 0000000..2c819c2 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Disconnect_WiFi/Connect_Disconnect_WiFi.ino @@ -0,0 +1,122 @@ +/********************************************************************************************************************************* + Connect_Disconnect_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect and disconnect (close) + + This example demonstrates how to use the connection to open at the start + of a loop, perform some query, then close the connection. Use this technique + for solutions that must sleep for a long period or otherwise require + additional processing or delays. The connect/close pair allow you to + control how long the connection is open and thus reduce the amount of + time a connection is held open. It also helps for lossy connections. + + This example demonstrates how to connect to a MySQL server and specifying + the default database when connecting. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +MySQL_Connection conn((Client *)&client); +MySQL_Query query = MySQL_Query(&conn); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Connect_Disconnect_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); +} + +void runQuery() +{ + MYSQL_DISPLAY("Running a query: SELECT * FROM test_arduino.hello_arduino LIMIT 6;"); + + // Execute the query + // KH, check if valid before fetching + if ( !query.execute("SELECT * FROM test_arduino.hello_arduino LIMIT 6;") ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + query.show_results(); // show the results + query.close(); // close the query +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Disconnect_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Disconnect_WiFi/Credentials.h new file mode 100644 index 0000000..96e7c00 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Disconnect_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "your_ssid"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Disconnect_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Disconnect_WiFi/defines.h new file mode 100644 index 0000000..962d826 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_Disconnect_WiFi/defines.h @@ -0,0 +1,52 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define USE_WIFI_PORTENTA_H7 true + + #define USE_WIFI_NINA false + + // To use the default WiFi library here + #define USE_WIFI_CUSTOM false + +#else + #error This code is intended to run on the Portenta_H7 platform! Please check your Tools->Board setting. +#endif + +#define SHIELD_TYPE "Portenta_H7 WiFi" + +#warning Using Portenta H7 WiFi + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_WiFi/Connect_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_WiFi/Connect_WiFi.ino new file mode 100644 index 0000000..ab27884 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_WiFi/Connect_WiFi.ino @@ -0,0 +1,108 @@ +/********************************************************************************************************************************* + Connect_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect + + This example demonstrates how to connect to a MySQL server from an + Arduino using an Arduino-compatible Ethernet shield. Note that "compatible" + means it must conform to the Ethernet class library or be a derivative + with the same classes and methods. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Connect_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_WiFi/Credentials.h new file mode 100644 index 0000000..96e7c00 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "your_ssid"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_WiFi/defines.h new file mode 100644 index 0000000..962d826 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Connect_WiFi/defines.h @@ -0,0 +1,52 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define USE_WIFI_PORTENTA_H7 true + + #define USE_WIFI_NINA false + + // To use the default WiFi library here + #define USE_WIFI_CUSTOM false + +#else + #error This code is intended to run on the Portenta_H7 platform! Please check your Tools->Board setting. +#endif + +#define SHIELD_TYPE "Portenta_H7 WiFi" + +#warning Using Portenta H7 WiFi + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Reboot_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Reboot_WiFi/Credentials.h new file mode 100644 index 0000000..96e7c00 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Reboot_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "your_ssid"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Reboot_WiFi/Reboot_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Reboot_WiFi/Reboot_WiFi.ino new file mode 100644 index 0000000..1e6ecc9 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Reboot_WiFi/Reboot_WiFi.ino @@ -0,0 +1,193 @@ +/********************************************************************************************************************************* + Reboot_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : reboot if connection lost + + This example demonstrates how to reboot an Arduino if connection to the + server is lost for a period of time. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + To test the reboot, unplug your Ethernet cable once you see "disconnected" + then wait for the timeout. Once the Arduino reboots, plug the cable in again + and you should see the query processing resume. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +MySQL_Connection conn((Client *)&client); +MySQL_Query query = MySQL_Query(&conn); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Reboot_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); +} + +// Begin reboot code +int num_fails; // variable for number of failure attempts +#define MAX_FAILED_CONNECTS 5 // maximum number of failed connects to MySQL + +void soft_reset() +{ +#if WIFI_USE_SAMD + #if ( defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) || defined(__SAMD51G19A__) ) + // For SAMD51 + // see Table 17-5 Timeout Period (valid values 0-11) + WDT->CONFIG.reg = 5; + WDT->CTRLA.reg = WDT_CTRLA_ENABLE; + // To check if OK or bit.ENABLE/CLEAR + while (WDT->SYNCBUSY.bit.WEN == 1); + + // use the WDT watchdog timer to force a system reset. + WDT->CLEAR.reg = 0x00; + // To check if OK or bit.ENABLE/CLEAR + while (WDT->SYNCBUSY.bit.WEN == 1); + #else + // For SAMD21, etc + // see Table 17-5 Timeout Period (valid values 0-11) + WDT->CONFIG.reg = 5; + WDT->CTRL.reg = WDT_CTRL_ENABLE; + while (WDT->STATUS.bit.SYNCBUSY == 1); + + // use the WDT watchdog timer to force a system reset. + WDT->CLEAR.reg = 0x00; + while (WDT->STATUS.bit.SYNCBUSY == 1); + #endif +#elif ( WIFI_USE_NRF528XX || USE_WIFI_PORTENTA_H7 ) + //delay(1000); + // Restart for nRF52 + NVIC_SystemReset(); +#elif WIFI_USE_SAMDUE + void(*resetFunc)() = 0; + resetFunc(); +#elif WIFI_USE_STM32 + void(*resetFunc)() = 0; + resetFunc(); + +#elif WIFI_USE_TEENSY + #if defined(__IMXRT1062__) + // Teensy 4.1/4.0 + SCB_AIRCR = 0x05FA0004; //write value for restart for Teensy + #else + void(*resetFunc)() = 0; + resetFunc(); + #endif + +#elif ( defined(WIFI_USE_RP2040) && defined(ARDUINO_ARCH_MBED) ) + + NVIC_SystemReset(); + +#endif +} + +// End reboot code + +void loop() +{ + if (conn.connected()) + { + MYSQL_DISPLAY("Running a query: SHOW DATABASES"); + + // Execute the query + + // KH, check if valid before fetching + if ( !query.execute("SHOW DATABASES") ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + ////// + + query.show_results(); // show the results + query.close(); // close the cursor + conn.close(); // close the connection + num_fails = 0; // reset failures + + delay(10000); + } + else + { + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + } + else + { + num_fails++; + MYSQL_DISPLAY("Connect failed!"); + + if (num_fails == MAX_FAILED_CONNECTS) + { + MYSQL_DISPLAY("Ok, that's it. I'm outta here. Rebooting..."); + delay(2000); + // Here we tell the Arduino to reboot by redirecting the instruction + // pointer to the "top" or position 0. This is a soft reset and may + // not solve all hardware-related lockups. + soft_reset(); + } + } + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("=========================================="); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Reboot_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Reboot_WiFi/defines.h new file mode 100644 index 0000000..962d826 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/Reboot_WiFi/defines.h @@ -0,0 +1,52 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define USE_WIFI_PORTENTA_H7 true + + #define USE_WIFI_NINA false + + // To use the default WiFi library here + #define USE_WIFI_CUSTOM false + +#else + #error This code is intended to run on the Portenta_H7 platform! Please check your Tools->Board setting. +#endif + +#define SHIELD_TYPE "Portenta_H7 WiFi" + +#warning Using Portenta H7 WiFi + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/Credentials.h new file mode 100644 index 0000000..96e7c00 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "your_ssid"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/defines.h new file mode 100644 index 0000000..962d826 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/defines.h @@ -0,0 +1,52 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) ) + + #if defined(BOARD_NAME) + #undef BOARD_NAME + #endif + + #if defined(CORE_CM7) + #warning Using Portenta H7 M7 core + #define BOARD_NAME "PORTENTA_H7_M7" + #else + #warning Using Portenta H7 M4 core + #define BOARD_NAME "PORTENTA_H7_M4" + #endif + + #define USE_WIFI_PORTENTA_H7 true + + #define USE_WIFI_NINA false + + // To use the default WiFi library here + #define USE_WIFI_CUSTOM false + +#else + #error This code is intended to run on the Portenta_H7 platform! Please check your Tools->Board setting. +#endif + +#define SHIELD_TYPE "Portenta_H7 WiFi" + +#warning Using Portenta H7 WiFi + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/multiFileProject.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/multiFileProject.cpp new file mode 100644 index 0000000..e1f0fe7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/multiFileProject.cpp @@ -0,0 +1,17 @@ +/**************************************************************************************************************************** + multiFileProject.cpp + 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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#include "multiFileProject.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/multiFileProject.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/multiFileProject.h new file mode 100644 index 0000000..5811a68 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/multiFileProject.h @@ -0,0 +1,20 @@ +/**************************************************************************************************************************** + multiFileProject.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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#pragma once + +// Can be included as many times as necessary, without `Multiple Definitions` Linker Error +#include "MySQL_Generic.hpp" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/multiFileProject_Portenta_H7_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/multiFileProject_Portenta_H7_WiFi.ino new file mode 100644 index 0000000..8c8e966 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/Portenta_H7/WiFi/multiFileProject_Portenta_H7_WiFi/multiFileProject_Portenta_H7_WiFi.ino @@ -0,0 +1,48 @@ +/**************************************************************************************************************************** + multiFileProject_Portenta_H7_WiFi.ino + 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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#include "defines.h" +#include "Credentials.h" + +#define MYSQL_MARIADB_GENERIC_VERSION_MIN_TARGET "MySQL_MariaDB_Generic v1.7.0" +#define MYSQL_MARIADB_GENERIC_VERSION_MIN 1007000 + +#include "multiFileProject.h" + +// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error +#include "MySQL_Generic.h" + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + Serial.println("\nStart multiFileProject_Portenta_H7_WiFi"); + Serial.println(MYSQL_MARIADB_GENERIC_VERSION); + +#if defined(MYSQL_MARIADB_GENERIC_VERSION_MIN) + if (MYSQL_MARIADB_GENERIC_VERSION_INT < MYSQL_MARIADB_GENERIC_VERSION_MIN) + { + Serial.print("Warning. Must use this example on Version equal or later than : "); + Serial.println(MYSQL_MARIADB_GENERIC_VERSION_MIN_TARGET); + } +#endif +} + +void loop() +{ + // put your main code here, to run repeatedly: +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Basic_Insert/Basic_Insert.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Basic_Insert/Basic_Insert.ino new file mode 100644 index 0000000..2178931 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Basic_Insert/Basic_Insert.ino @@ -0,0 +1,215 @@ +/********************************************************************************************************************************* + Basic_Insert.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : basic insert + + This example demonstrates how to issue an INSERT query to store data in a + table. For this, we will create a special database and table for testing. + The following are the SQL commands you will need to run in order to setup + your database for running this sketch. + + CREATE DATABASE test_arduino; + CREATE TABLE test_arduino.hello_arduino ( + num integer primary key auto_increment, + message char(40), + recorded timestamp + ); + + Here we see one database and a table with three fields; a primary key that + is an auto_increment, a string, and a timestamp. This will demonstrate how + to save a date and time of when the row was inserted, which can help you + determine when data was recorded or updated. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Create the database and table as shown above. + 2) Change the address of the server to the IP address of the MySQL server + 3) Change the user and password to a valid MySQL user and password + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + 8) After the sketch has run for some time, open a mysql client and issue + the command: "SELECT * FROM test_arduino.hello_arduino" to see the data + recorded. Note the field values and how the database handles both the + auto_increment and timestamp fields for us. You can clear the data with + "DELETE FROM test_arduino.hello_arduino". + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "test_arduino"; //"test_arduino"; +char default_table[] = "hello_arduino"; //"test_arduino"; + +String default_value = "Hello, Arduino!"; + +// Sample query +String INSERT_SQL = String("INSERT INTO ") + default_database + "." + default_table + + " (message) VALUES ('" + default_value + "')"; + +MySQL_Connection conn((Client *)&client); + +void initEthernet() +{ +#if USE_NATIVE_ETHERNET + MYSQL_DISPLAY(F("======== USE_NATIVE_ETHERNET ========")); +#elif USE_QN_ETHERNET + MYSQL_DISPLAY(F("=========== USE_QN_ETHERNET ===========")); +#endif + +#if USE_NATIVE_ETHERNET + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY(F("=========================")); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + // give the Ethernet shield 2 seconds to initialize: + delay(2000); + +#else + + #if USING_DHCP + // Start the Ethernet connection, using DHCP + Serial.print("Initialize Ethernet using DHCP => "); + Ethernet.begin(); + #else + // Start the Ethernet connection, using static IP + Serial.print("Initialize Ethernet using static IP => "); + Ethernet.begin(myIP, myNetmask, myGW); + Ethernet.setDNSServerIP(mydnsServer); + #endif + + if (!Ethernet.waitForLocalIP(5000)) + { + Serial.println("Failed to configure Ethernet"); + + if (!Ethernet.linkStatus()) + { + Serial.println("Ethernet cable is not connected."); + } + + // Stay here forever + while (true) + { + delay(1); + } + } + + if (!Ethernet.waitForLink(5000)) + { + Serial.println(F("Failed to wait for Link")); + } + else + { + Serial.print("IP Address = "); + Serial.println(Ethernet.localIP()); + } + +#endif +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY2("\nStarting Basic_Insert on", BOARD_NAME, SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + MYSQL_DISPLAY(INSERT_SQL); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(INSERT_SQL.c_str()) ) + { + MYSQL_DISPLAY("Insert error"); + } + else + { + MYSQL_DISPLAY("Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Basic_Insert/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Basic_Insert/defines.h new file mode 100644 index 0000000..d422085 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Basic_Insert/defines.h @@ -0,0 +1,103 @@ +/********************************************************************************************************************************* + 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(__IMXRT1062__) && defined(ARDUINO_TEENSY41) ) + // For Teensy 4.1 + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET false + #define USE_QN_ETHERNET true +#else + #error Only Teensy 4.1 supported +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#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 + +#if USE_NATIVE_ETHERNET + #include "NativeEthernet.h" + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using NativeEthernet" +#elif USE_QN_ETHERNET + #include "QNEthernet.h" // https://github.com/ssilverman/QNEthernet + using namespace qindesign::network; + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using QNEthernet" +#endif + +#if USE_NATIVE_ETHERNET + // 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 }, + }; + +#else + + #define USING_DHCP false //true + + #if !USING_DHCP + // Set the static IP address to use if the DHCP fails to assign + IPAddress myIP(192, 168, 2, 222); + IPAddress myNetmask(255, 255, 255, 0); + IPAddress myGW(192, 168, 2, 1); + //IPAddress mydnsServer(192, 168, 2, 1); + IPAddress mydnsServer(8, 8, 8, 8); + #endif + +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Basic_Select/Basic_Select.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Basic_Select/Basic_Select.ino new file mode 100644 index 0000000..3091c68 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Basic_Select/Basic_Select.ino @@ -0,0 +1,249 @@ +/********************************************************************************************************************************* + Basic_Select.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : basic select + + This example demonstrates how to issue a SELECT query with no parameters + and use the data returned. For this, we use the Cursor class to execute + the query and get the results. + + It demonstrates who methods for running queries. The first allows you to + allocate memory for the cursor and later reclaim it, the second shows how + to use a single instance of the cursor use throughout a sketch. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + CAUTION: Don't mix and match the examples. Use one or the other in your + own sketch -- you'll get compilation errors at the least. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "world"; //"test_arduino"; +char default_table[] = "city"; //"test_arduino"; + +String default_column = "population"; +String default_value = "Toronto"; + +String query = String("SELECT ") + default_column + " FROM " + default_database + "." + default_table + + " WHERE name = '" + default_value + "'"; + +MySQL_Connection conn((Client *)&client); +// Create an instance of the cursor passing in the connection +MySQL_Query sql_query = MySQL_Query(&conn); + +void initEthernet() +{ +#if USE_NATIVE_ETHERNET + MYSQL_DISPLAY(F("======== USE_NATIVE_ETHERNET ========")); +#elif USE_QN_ETHERNET + MYSQL_DISPLAY(F("=========== USE_QN_ETHERNET ===========")); +#endif + +#if USE_NATIVE_ETHERNET + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY(F("=========================")); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + // give the Ethernet shield 2 seconds to initialize: + delay(2000); + +#else + + #if USING_DHCP + // Start the Ethernet connection, using DHCP + Serial.print("Initialize Ethernet using DHCP => "); + Ethernet.begin(); + #else + // Start the Ethernet connection, using static IP + Serial.print("Initialize Ethernet using static IP => "); + Ethernet.begin(myIP, myNetmask, myGW); + Ethernet.setDNSServerIP(mydnsServer); + #endif + + if (!Ethernet.waitForLocalIP(5000)) + { + Serial.println("Failed to configure Ethernet"); + + if (!Ethernet.linkStatus()) + { + Serial.println("Ethernet cable is not connected."); + } + + // Stay here forever + while (true) + { + delay(1); + } + } + + if (!Ethernet.waitForLink(5000)) + { + Serial.println(F("Failed to wait for Link")); + } + else + { + Serial.print("IP Address = "); + Serial.println(Ethernet.localIP()); + } + +#endif +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY2("\nStarting Basic_Select on", BOARD_NAME, SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runQuery() +{ + row_values *row = NULL; + long head_count = 0; + + MYSQL_DISPLAY("1) Demonstrating using a dynamically allocated query."); + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + MYSQL_DISPLAY(query); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(query.c_str()) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Fetch the columns (required) but we don't use them. + //column_names *columns = query_mem.get_columns(); + query_mem.get_columns(); + + // Read the row (we are only expecting the one) + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + head_count = atol(row->values[0]); + } + } while (row != NULL); + + // Show the result + MYSQL_DISPLAY1(" Toronto pop =", head_count); + + delay(500); + + MYSQL_DISPLAY("2) Demonstrating using a local, global query."); + + // Execute the query + MYSQL_DISPLAY(query); + sql_query.execute(query.c_str()); + + // Fetch the columns (required) but we don't use them. + sql_query.get_columns(); + + // Read the row (we are only expecting the one) + do + { + row = sql_query.get_next_row(); + if (row != NULL) + { + head_count = atol(row->values[0]); + } + } while (row != NULL); + + // Now we close the cursor to free any memory + sql_query.close(); + + // Show the result but this time do some math on it + MYSQL_DISPLAY1(" Toronto pop =", head_count); + MYSQL_DISPLAY1(" Toronto pop increased by 11725 =", head_count + 11725); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Basic_Select/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Basic_Select/defines.h new file mode 100644 index 0000000..d422085 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Basic_Select/defines.h @@ -0,0 +1,103 @@ +/********************************************************************************************************************************* + 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(__IMXRT1062__) && defined(ARDUINO_TEENSY41) ) + // For Teensy 4.1 + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET false + #define USE_QN_ETHERNET true +#else + #error Only Teensy 4.1 supported +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#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 + +#if USE_NATIVE_ETHERNET + #include "NativeEthernet.h" + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using NativeEthernet" +#elif USE_QN_ETHERNET + #include "QNEthernet.h" // https://github.com/ssilverman/QNEthernet + using namespace qindesign::network; + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using QNEthernet" +#endif + +#if USE_NATIVE_ETHERNET + // 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 }, + }; + +#else + + #define USING_DHCP false //true + + #if !USING_DHCP + // Set the static IP address to use if the DHCP fails to assign + IPAddress myIP(192, 168, 2, 222); + IPAddress myNetmask(255, 255, 255, 0); + IPAddress myGW(192, 168, 2, 1); + //IPAddress mydnsServer(192, 168, 2, 1); + IPAddress mydnsServer(8, 8, 8, 8); + #endif + +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Complex_Insert/Complex_Insert.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Complex_Insert/Complex_Insert.ino new file mode 100644 index 0000000..7282f5a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Complex_Insert/Complex_Insert.ino @@ -0,0 +1,240 @@ +/********************************************************************************************************************************* + Complex_Insert.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : complex insert + + This example demonstrates how to issue an INSERT query to store data in a + table using data from variables in our sketch. In this case, we supply the + values dynamically. + + This sketch simulates storing data from a sensor in a table. + + For this, we will create a special database and table for testing. + The following are the SQL commands you will need to run in order to setup + your database for running this sketch. + + CREATE DATABASE test_arduino; + CREATE TABLE test_arduino.hello_sensor ( + num integer primary key auto_increment, + message char(40), + sensor_num integer, + value float, + recorded timestamp + ); + + Here we have a table that contains an auto_increment primary key, a text + field, a field to identify the sensor, the value read, and timestamp of + the recorded data. + + Note: Since this sketch uses test data, we place the INSERT in the setup() + method so that it runs only once. Typically, you would have the + INSERT in the loop() method after your code to read from the sensor. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Create the database and table as shown above. + 2) Change the address of the server to the IP address of the MySQL server + 3) Change the user and password to a valid MySQL user and password + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + 8) After the sketch has run for some time, open a mysql client and issue + the command: "SELECT * FROM test_arduino.hello_sensor" to see the data + recorded. Note the field values and how the database handles both the + auto_increment and timestamp fields for us. You can clear the data with + "DELETE FROM test_arduino.hello_sensor". + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "test_arduino"; //"test_arduino"; +char default_table[] = "hello_sensor"; //"test_arduino"; + +// Sample query +char INSERT_DATA[] = "INSERT INTO %s.%s (message, sensor_num, value) VALUES ('%s',%d,%s)"; + +char query[128]; +char temperature[10]; + +MySQL_Connection conn((Client *)&client); + +#if !( ESP32 || ESP8266 || defined(CORE_TEENSY) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || ( defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_MBED) ) ) + +char *dtostrf(double val, signed char width, unsigned char prec, char *sout) +{ + char fmt[20]; + sprintf(fmt, "%%%d.%df", width, prec); + sprintf(sout, fmt, val); + return sout; +} +#endif + +void initEthernet() +{ +#if USE_NATIVE_ETHERNET + MYSQL_DISPLAY(F("======== USE_NATIVE_ETHERNET ========")); +#elif USE_QN_ETHERNET + MYSQL_DISPLAY(F("=========== USE_QN_ETHERNET ===========")); +#endif + +#if USE_NATIVE_ETHERNET + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY(F("=========================")); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + // give the Ethernet shield 2 seconds to initialize: + delay(2000); + +#else + + #if USING_DHCP + // Start the Ethernet connection, using DHCP + Serial.print("Initialize Ethernet using DHCP => "); + Ethernet.begin(); + #else + // Start the Ethernet connection, using static IP + Serial.print("Initialize Ethernet using static IP => "); + Ethernet.begin(myIP, myNetmask, myGW); + Ethernet.setDNSServerIP(mydnsServer); + #endif + + if (!Ethernet.waitForLocalIP(5000)) + { + Serial.println("Failed to configure Ethernet"); + + if (!Ethernet.linkStatus()) + { + Serial.println("Ethernet cable is not connected."); + } + + // Stay here forever + while (true) + { + delay(1); + } + } + + if (!Ethernet.waitForLink(5000)) + { + Serial.println(F("Failed to wait for Link")); + } + else + { + Serial.print("IP Address = "); + Serial.println(Ethernet.localIP()); + } + +#endif +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY2("\nStarting Complex_Insert on", BOARD_NAME, SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); + MYSQL_DISPLAY3("DB =", default_database, ", Table =", default_table); +} + +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + // Save + dtostrf(50.125, 1, 1, temperature); + sprintf(query, INSERT_DATA, default_database, default_table, "test sensor", 24, temperature); + + // Execute the query + MYSQL_DISPLAY(query); + + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Complex Insert error"); + } + else + { + MYSQL_DISPLAY("Complex Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Complex_Insert/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Complex_Insert/defines.h new file mode 100644 index 0000000..d422085 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Complex_Insert/defines.h @@ -0,0 +1,103 @@ +/********************************************************************************************************************************* + 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(__IMXRT1062__) && defined(ARDUINO_TEENSY41) ) + // For Teensy 4.1 + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET false + #define USE_QN_ETHERNET true +#else + #error Only Teensy 4.1 supported +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#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 + +#if USE_NATIVE_ETHERNET + #include "NativeEthernet.h" + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using NativeEthernet" +#elif USE_QN_ETHERNET + #include "QNEthernet.h" // https://github.com/ssilverman/QNEthernet + using namespace qindesign::network; + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using QNEthernet" +#endif + +#if USE_NATIVE_ETHERNET + // 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 }, + }; + +#else + + #define USING_DHCP false //true + + #if !USING_DHCP + // Set the static IP address to use if the DHCP fails to assign + IPAddress myIP(192, 168, 2, 222); + IPAddress myNetmask(255, 255, 255, 0); + IPAddress myGW(192, 168, 2, 1); + //IPAddress mydnsServer(192, 168, 2, 1); + IPAddress mydnsServer(8, 8, 8, 8); + #endif + +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Complex_Select/Complex_Select.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Complex_Select/Complex_Select.ino new file mode 100644 index 0000000..7b6c516 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Complex_Select/Complex_Select.ino @@ -0,0 +1,246 @@ +/********************************************************************************************************************************* + Complex_Select.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : complex select + + This example demonstrates how to issue a SELECT query with parameters that + we provide from code. Thus, it demonstrates how to build query parameters + dynamically. + + Notice also the sketch demonstrates how to read columns and rows from + the result set. Study this example until you are familiar with how to + do this before writing your own sketch to read and consume query results. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "world"; //"test_arduino"; +char default_table[] = "city"; //"test_arduino"; + +// Sample query +// +// Notice the "%lu" - that's a placeholder for the parameter we will +// supply. See sprintf() documentation for more formatting specifier +// options +unsigned long QUERY_POPULATION = 800000; + +const char QUERY_POP[] = "SELECT name, population FROM world.city WHERE population < %lu ORDER BY population DESC LIMIT 12;"; + +char query[128]; + +MySQL_Connection conn((Client *)&client); + +void initEthernet() +{ +#if USE_NATIVE_ETHERNET + MYSQL_DISPLAY(F("======== USE_NATIVE_ETHERNET ========")); +#elif USE_QN_ETHERNET + MYSQL_DISPLAY(F("=========== USE_QN_ETHERNET ===========")); +#endif + +#if USE_NATIVE_ETHERNET + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY(F("=========================")); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + // give the Ethernet shield 2 seconds to initialize: + delay(2000); + +#else + + #if USING_DHCP + // Start the Ethernet connection, using DHCP + Serial.print("Initialize Ethernet using DHCP => "); + Ethernet.begin(); + #else + // Start the Ethernet connection, using static IP + Serial.print("Initialize Ethernet using static IP => "); + Ethernet.begin(myIP, myNetmask, myGW); + Ethernet.setDNSServerIP(mydnsServer); + #endif + + if (!Ethernet.waitForLocalIP(5000)) + { + Serial.println("Failed to configure Ethernet"); + + if (!Ethernet.linkStatus()) + { + Serial.println("Ethernet cable is not connected."); + } + + // Stay here forever + while (true) + { + delay(1); + } + } + + if (!Ethernet.waitForLink(5000)) + { + Serial.println(F("Failed to wait for Link")); + } + else + { + Serial.print("IP Address = "); + Serial.println(Ethernet.localIP()); + } + +#endif +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY2("\nStarting Complex_Select on", BOARD_NAME, SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runQuery() +{ + MYSQL_DISPLAY("===================================================="); + MYSQL_DISPLAY("> Running SELECT with dynamically supplied parameter"); + + // Supply the parameter for the query + // Here we use the QUERY_POP as the format string and query as the + // destination. This uses twice the memory so another option would be + // to allocate one buffer for all formatted queries or allocate the + // memory as needed (just make sure you allocate enough memory and + // free it when you're done!). + sprintf(query, QUERY_POP, QUERY_POPULATION + (( millis() % 100000 ) * 10) ); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Fetch the columns and print them + column_names *cols = query_mem.get_columns(); + + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(cols->fields[f]->name); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(","); + } + } + + MYSQL_DISPLAY(); + + // Read the rows and print them + row_values *row = NULL; + + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(row->values[f]); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(","); + } + } + + MYSQL_DISPLAY(); + } + } while (row != NULL); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(10000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Complex_Select/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Complex_Select/defines.h new file mode 100644 index 0000000..d422085 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Complex_Select/defines.h @@ -0,0 +1,103 @@ +/********************************************************************************************************************************* + 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(__IMXRT1062__) && defined(ARDUINO_TEENSY41) ) + // For Teensy 4.1 + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET false + #define USE_QN_ETHERNET true +#else + #error Only Teensy 4.1 supported +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#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 + +#if USE_NATIVE_ETHERNET + #include "NativeEthernet.h" + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using NativeEthernet" +#elif USE_QN_ETHERNET + #include "QNEthernet.h" // https://github.com/ssilverman/QNEthernet + using namespace qindesign::network; + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using QNEthernet" +#endif + +#if USE_NATIVE_ETHERNET + // 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 }, + }; + +#else + + #define USING_DHCP false //true + + #if !USING_DHCP + // Set the static IP address to use if the DHCP fails to assign + IPAddress myIP(192, 168, 2, 222); + IPAddress myNetmask(255, 255, 255, 0); + IPAddress myGW(192, 168, 2, 1); + //IPAddress mydnsServer(192, 168, 2, 1); + IPAddress mydnsServer(8, 8, 8, 8); + #endif + +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect/Connect.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect/Connect.ino new file mode 100644 index 0000000..6b4bee0 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect/Connect.ino @@ -0,0 +1,167 @@ +/********************************************************************************************************************************* + Connect.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : connect + + This example demonstrates how to connect to a MySQL server from an + Arduino using an Arduino-compatible Ethernet shield. Note that "compatible" + means it must conform to the Ethernet class library or be a derivative + with the same classes and methods. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "world"; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +MySQL_Connection conn((Client *)&client); + +void initEthernet() +{ +#if USE_NATIVE_ETHERNET + MYSQL_DISPLAY(F("======== USE_NATIVE_ETHERNET ========")); +#elif USE_QN_ETHERNET + MYSQL_DISPLAY(F("=========== USE_QN_ETHERNET ===========")); +#endif + +#if USE_NATIVE_ETHERNET + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY(F("=========================")); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + // give the Ethernet shield 2 seconds to initialize: + delay(2000); + +#else + + #if USING_DHCP + // Start the Ethernet connection, using DHCP + Serial.print("Initialize Ethernet using DHCP => "); + Ethernet.begin(); + #else + // Start the Ethernet connection, using static IP + Serial.print("Initialize Ethernet using static IP => "); + Ethernet.begin(myIP, myNetmask, myGW); + Ethernet.setDNSServerIP(mydnsServer); + #endif + + if (!Ethernet.waitForLocalIP(5000)) + { + Serial.println("Failed to configure Ethernet"); + + if (!Ethernet.linkStatus()) + { + Serial.println("Ethernet cable is not connected."); + } + + // Stay here forever + while (true) + { + delay(1); + } + } + + if (!Ethernet.waitForLink(5000)) + { + Serial.println(F("Failed to wait for Link")); + } + else + { + Serial.print("IP Address = "); + Serial.println(Ethernet.localIP()); + } + +#endif +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY2("\nStarting Connect on", BOARD_NAME, SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password, default_database)) + if (conn.connectNonBlocking(server, server_port, user, password, default_database) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect/defines.h new file mode 100644 index 0000000..d422085 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect/defines.h @@ -0,0 +1,103 @@ +/********************************************************************************************************************************* + 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(__IMXRT1062__) && defined(ARDUINO_TEENSY41) ) + // For Teensy 4.1 + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET false + #define USE_QN_ETHERNET true +#else + #error Only Teensy 4.1 supported +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#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 + +#if USE_NATIVE_ETHERNET + #include "NativeEthernet.h" + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using NativeEthernet" +#elif USE_QN_ETHERNET + #include "QNEthernet.h" // https://github.com/ssilverman/QNEthernet + using namespace qindesign::network; + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using QNEthernet" +#endif + +#if USE_NATIVE_ETHERNET + // 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 }, + }; + +#else + + #define USING_DHCP false //true + + #if !USING_DHCP + // Set the static IP address to use if the DHCP fails to assign + IPAddress myIP(192, 168, 2, 222); + IPAddress myNetmask(255, 255, 255, 0); + IPAddress myGW(192, 168, 2, 1); + //IPAddress mydnsServer(192, 168, 2, 1); + IPAddress mydnsServer(8, 8, 8, 8); + #endif + +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_By_Hostname/Connect_By_Hostname.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_By_Hostname/Connect_By_Hostname.ino new file mode 100644 index 0000000..6e59bf3 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_By_Hostname/Connect_By_Hostname.ino @@ -0,0 +1,172 @@ +/********************************************************************************************************************************* + Connect_By_Hostname.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect by hostname + + This example demonstrates how to connect to a MySQL server resolving the + hostname for cases when you do not know the IP address of the server or + it changes because it is in the cloud. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the hostname variable to the hostname of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ +#include "defines.h" + +#include + +#if USE_NATIVE_ETHERNET + #include + DNSClient dns_client; // DNS instance +#elif USE_QN_ETHERNET + +#endif + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +IPAddress server_addr; + +MySQL_Connection conn((Client *)&client); + + +void initEthernet() +{ +#if USE_NATIVE_ETHERNET + MYSQL_DISPLAY(F("======== USE_NATIVE_ETHERNET ========")); +#elif USE_QN_ETHERNET + MYSQL_DISPLAY(F("=========== USE_QN_ETHERNET ===========")); +#endif + +#if USE_NATIVE_ETHERNET + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY(F("=========================")); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + // give the Ethernet shield 2 seconds to initialize: + delay(2000); + +#else + + #if USING_DHCP + // Start the Ethernet connection, using DHCP + Serial.print("Initialize Ethernet using DHCP => "); + Ethernet.begin(); + #else + // Start the Ethernet connection, using static IP + Serial.print("Initialize Ethernet using static IP => "); + Ethernet.begin(myIP, myNetmask, myGW); + Ethernet.setDNSServerIP(mydnsServer); + #endif + + if (!Ethernet.waitForLocalIP(5000)) + { + Serial.println("Failed to configure Ethernet"); + + if (!Ethernet.linkStatus()) + { + Serial.println("Ethernet cable is not connected."); + } + + // Stay here forever + while (true) + { + delay(1); + } + } + + if (!Ethernet.waitForLink(5000)) + { + Serial.println(F("Failed to wait for Link")); + } + else + { + Serial.print("IP Address = "); + Serial.println(Ethernet.localIP()); + } + +#endif +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY2("\nStarting Connect_By_Hostname on", BOARD_NAME, SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port) + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_By_Hostname/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_By_Hostname/defines.h new file mode 100644 index 0000000..d422085 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_By_Hostname/defines.h @@ -0,0 +1,103 @@ +/********************************************************************************************************************************* + 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(__IMXRT1062__) && defined(ARDUINO_TEENSY41) ) + // For Teensy 4.1 + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET false + #define USE_QN_ETHERNET true +#else + #error Only Teensy 4.1 supported +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#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 + +#if USE_NATIVE_ETHERNET + #include "NativeEthernet.h" + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using NativeEthernet" +#elif USE_QN_ETHERNET + #include "QNEthernet.h" // https://github.com/ssilverman/QNEthernet + using namespace qindesign::network; + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using QNEthernet" +#endif + +#if USE_NATIVE_ETHERNET + // 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 }, + }; + +#else + + #define USING_DHCP false //true + + #if !USING_DHCP + // Set the static IP address to use if the DHCP fails to assign + IPAddress myIP(192, 168, 2, 222); + IPAddress myNetmask(255, 255, 255, 0); + IPAddress myGW(192, 168, 2, 1); + //IPAddress mydnsServer(192, 168, 2, 1); + IPAddress mydnsServer(8, 8, 8, 8); + #endif + +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_Default_Database/Connect_Default_Database.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_Default_Database/Connect_Default_Database.ino new file mode 100644 index 0000000..4cc0c89 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_Default_Database/Connect_Default_Database.ino @@ -0,0 +1,164 @@ +/********************************************************************************************************************************* + Connect_Default_Database.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect with default database + + This example demonstrates how to connect to a MySQL server and specifying + the default database when connecting. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "world"; + +MySQL_Connection conn((Client *)&client); + +void initEthernet() +{ +#if USE_NATIVE_ETHERNET + MYSQL_DISPLAY(F("======== USE_NATIVE_ETHERNET ========")); +#elif USE_QN_ETHERNET + MYSQL_DISPLAY(F("=========== USE_QN_ETHERNET ===========")); +#endif + +#if USE_NATIVE_ETHERNET + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY(F("=========================")); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + // give the Ethernet shield 2 seconds to initialize: + delay(2000); + +#else + + #if USING_DHCP + // Start the Ethernet connection, using DHCP + Serial.print("Initialize Ethernet using DHCP => "); + Ethernet.begin(); + #else + // Start the Ethernet connection, using static IP + Serial.print("Initialize Ethernet using static IP => "); + Ethernet.begin(myIP, myNetmask, myGW); + Ethernet.setDNSServerIP(mydnsServer); + #endif + + if (!Ethernet.waitForLocalIP(5000)) + { + Serial.println("Failed to configure Ethernet"); + + if (!Ethernet.linkStatus()) + { + Serial.println("Ethernet cable is not connected."); + } + + // Stay here forever + while (true) + { + delay(1); + } + } + + if (!Ethernet.waitForLink(5000)) + { + Serial.println(F("Failed to wait for Link")); + } + else + { + Serial.print("IP Address = "); + Serial.println(Ethernet.localIP()); + } + +#endif +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY2("\nStarting Connect_Default_Database on", BOARD_NAME, SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_Default_Database/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_Default_Database/defines.h new file mode 100644 index 0000000..d422085 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_Default_Database/defines.h @@ -0,0 +1,103 @@ +/********************************************************************************************************************************* + 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(__IMXRT1062__) && defined(ARDUINO_TEENSY41) ) + // For Teensy 4.1 + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET false + #define USE_QN_ETHERNET true +#else + #error Only Teensy 4.1 supported +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#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 + +#if USE_NATIVE_ETHERNET + #include "NativeEthernet.h" + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using NativeEthernet" +#elif USE_QN_ETHERNET + #include "QNEthernet.h" // https://github.com/ssilverman/QNEthernet + using namespace qindesign::network; + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using QNEthernet" +#endif + +#if USE_NATIVE_ETHERNET + // 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 }, + }; + +#else + + #define USING_DHCP false //true + + #if !USING_DHCP + // Set the static IP address to use if the DHCP fails to assign + IPAddress myIP(192, 168, 2, 222); + IPAddress myNetmask(255, 255, 255, 0); + IPAddress myGW(192, 168, 2, 1); + //IPAddress mydnsServer(192, 168, 2, 1); + IPAddress mydnsServer(8, 8, 8, 8); + #endif + +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_Disconnect/Connect_Disconnect.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_Disconnect/Connect_Disconnect.ino new file mode 100644 index 0000000..212c703 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_Disconnect/Connect_Disconnect.ino @@ -0,0 +1,179 @@ +/********************************************************************************************************************************* + Connect_Disconnect.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : connect and disconnect (close) + + This example demonstrates how to use the connection to open at the start + of a loop, perform some query, then close the connection. Use this technique + for solutions that must sleep for a long period or otherwise require + additional processing or delays. The connect/close pair allow you to + control how long the connection is open and thus reduce the amount of + time a connection is held open. It also helps for lossy connections. + + This example demonstrates how to connect to a MySQL server and specifying + the default database when connecting. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +MySQL_Connection conn((Client *)&client); +MySQL_Query query = MySQL_Query(&conn); + +void initEthernet() +{ +#if USE_NATIVE_ETHERNET + MYSQL_DISPLAY(F("======== USE_NATIVE_ETHERNET ========")); +#elif USE_QN_ETHERNET + MYSQL_DISPLAY(F("=========== USE_QN_ETHERNET ===========")); +#endif + +#if USE_NATIVE_ETHERNET + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY(F("=========================")); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + // give the Ethernet shield 2 seconds to initialize: + delay(2000); + +#else + + #if USING_DHCP + // Start the Ethernet connection, using DHCP + Serial.print("Initialize Ethernet using DHCP => "); + Ethernet.begin(); + #else + // Start the Ethernet connection, using static IP + Serial.print("Initialize Ethernet using static IP => "); + Ethernet.begin(myIP, myNetmask, myGW); + Ethernet.setDNSServerIP(mydnsServer); + #endif + + if (!Ethernet.waitForLocalIP(5000)) + { + Serial.println("Failed to configure Ethernet"); + + if (!Ethernet.linkStatus()) + { + Serial.println("Ethernet cable is not connected."); + } + + // Stay here forever + while (true) + { + delay(1); + } + } + + if (!Ethernet.waitForLink(5000)) + { + Serial.println(F("Failed to wait for Link")); + } + else + { + Serial.print("IP Address = "); + Serial.println(Ethernet.localIP()); + } + +#endif +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY2("\nStarting Connect_Disconnect on", BOARD_NAME, SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); +} + +void runQuery() +{ + MYSQL_DISPLAY("Running a query: SELECT * FROM test_arduino.hello_arduino LIMIT 6;"); + + // Execute the query + // KH, check if valid before fetching + if ( !query.execute("SELECT * FROM test_arduino.hello_arduino LIMIT 6;") ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + query.show_results(); // show the results + query.close(); // close the query +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_Disconnect/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_Disconnect/defines.h new file mode 100644 index 0000000..d422085 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Connect_Disconnect/defines.h @@ -0,0 +1,103 @@ +/********************************************************************************************************************************* + 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(__IMXRT1062__) && defined(ARDUINO_TEENSY41) ) + // For Teensy 4.1 + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET false + #define USE_QN_ETHERNET true +#else + #error Only Teensy 4.1 supported +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#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 + +#if USE_NATIVE_ETHERNET + #include "NativeEthernet.h" + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using NativeEthernet" +#elif USE_QN_ETHERNET + #include "QNEthernet.h" // https://github.com/ssilverman/QNEthernet + using namespace qindesign::network; + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using QNEthernet" +#endif + +#if USE_NATIVE_ETHERNET + // 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 }, + }; + +#else + + #define USING_DHCP false //true + + #if !USING_DHCP + // Set the static IP address to use if the DHCP fails to assign + IPAddress myIP(192, 168, 2, 222); + IPAddress myNetmask(255, 255, 255, 0); + IPAddress myGW(192, 168, 2, 1); + //IPAddress mydnsServer(192, 168, 2, 1); + IPAddress mydnsServer(8, 8, 8, 8); + #endif + +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Query_Progmem/Query_Progmem.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Query_Progmem/Query_Progmem.ino new file mode 100644 index 0000000..bb5d1b7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Query_Progmem/Query_Progmem.ino @@ -0,0 +1,190 @@ +/********************************************************************************************************************************* + Query_Progmem.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : query with PROGMEM strings + + This example demonstrates how to issue queries using strings stored in + PROGMEM. As you will see, you need only add a parameter to the execute() + method in the cursor class, const and PROGMEM to the string declaration + and add the #include directive. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +// Sample query +const char PROGMEM query[] = "SELECT * FROM test_arduino.hello_arduino LIMIT 6"; + +MySQL_Connection conn((Client *)&client); + +void initEthernet() +{ +#if USE_NATIVE_ETHERNET + MYSQL_DISPLAY(F("======== USE_NATIVE_ETHERNET ========")); +#elif USE_QN_ETHERNET + MYSQL_DISPLAY(F("=========== USE_QN_ETHERNET ===========")); +#endif + +#if USE_NATIVE_ETHERNET + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY(F("=========================")); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + // give the Ethernet shield 2 seconds to initialize: + delay(2000); + +#else + + #if USING_DHCP + // Start the Ethernet connection, using DHCP + Serial.print("Initialize Ethernet using DHCP => "); + Ethernet.begin(); + #else + // Start the Ethernet connection, using static IP + Serial.print("Initialize Ethernet using static IP => "); + Ethernet.begin(myIP, myNetmask, myGW); + Ethernet.setDNSServerIP(mydnsServer); + #endif + + if (!Ethernet.waitForLocalIP(5000)) + { + Serial.println("Failed to configure Ethernet"); + + if (!Ethernet.linkStatus()) + { + Serial.println("Ethernet cable is not connected."); + } + + // Stay here forever + while (true) + { + delay(1); + } + } + + if (!Ethernet.waitForLink(5000)) + { + Serial.println(F("Failed to wait for Link")); + } + else + { + Serial.print("IP Address = "); + Serial.println(Ethernet.localIP()); + } + +#endif +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY2("\nStarting Query_Progmem on", BOARD_NAME, SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void runQuery() +{ + MYSQL_DISPLAY("\nRunning SELECT from PROGMEM and printing results\n"); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query with the PROGMEM option + // KH, check if valid before fetching + if ( !query_mem.execute(query, true) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Show the results + query_mem.show_results(); + // close the query + query_mem.close(); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(10000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Query_Progmem/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Query_Progmem/defines.h new file mode 100644 index 0000000..d422085 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Query_Progmem/defines.h @@ -0,0 +1,103 @@ +/********************************************************************************************************************************* + 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(__IMXRT1062__) && defined(ARDUINO_TEENSY41) ) + // For Teensy 4.1 + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET false + #define USE_QN_ETHERNET true +#else + #error Only Teensy 4.1 supported +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#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 + +#if USE_NATIVE_ETHERNET + #include "NativeEthernet.h" + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using NativeEthernet" +#elif USE_QN_ETHERNET + #include "QNEthernet.h" // https://github.com/ssilverman/QNEthernet + using namespace qindesign::network; + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using QNEthernet" +#endif + +#if USE_NATIVE_ETHERNET + // 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 }, + }; + +#else + + #define USING_DHCP false //true + + #if !USING_DHCP + // Set the static IP address to use if the DHCP fails to assign + IPAddress myIP(192, 168, 2, 222); + IPAddress myNetmask(255, 255, 255, 0); + IPAddress myGW(192, 168, 2, 1); + //IPAddress mydnsServer(192, 168, 2, 1); + IPAddress mydnsServer(8, 8, 8, 8); + #endif + +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Query_Results/Query_Results.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Query_Results/Query_Results.ino new file mode 100644 index 0000000..39d037b --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Query_Results/Query_Results.ino @@ -0,0 +1,224 @@ +/********************************************************************************************************************************* + Query_Results.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : query results + + This example demonstrates how to issue a SELECT query and how to read columns + and rows from the result set. Study this example until you are familiar with how to + do this before writing your own sketch to read and consume query results. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + //char server[] = "your_account.ddns.net"; // change to your server's hostname/URL + char server[] = "khoih.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +// Sample query +char query[] = "SELECT * FROM test_arduino.hello_arduino LIMIT 6"; + +MySQL_Connection conn((Client *)&client); + +void initEthernet() +{ +#if USE_NATIVE_ETHERNET + MYSQL_DISPLAY(F("======== USE_NATIVE_ETHERNET ========")); +#elif USE_QN_ETHERNET + MYSQL_DISPLAY(F("=========== USE_QN_ETHERNET ===========")); +#endif + +#if USE_NATIVE_ETHERNET + + // start the ethernet connection and the server: + // Use DHCP dynamic IP and random mac + uint16_t index = millis() % NUMBER_OF_MAC; + // Use Static IP + //Ethernet.begin(mac[index], ip); + Ethernet.begin(mac[index]); + + MYSQL_DISPLAY(F("=========================")); + + MYSQL_DISPLAY1("Using mac index =", index); + MYSQL_DISPLAY1("Connected! IP address:", Ethernet.localIP()); + + // give the Ethernet shield 2 seconds to initialize: + delay(2000); + +#else + + #if USING_DHCP + // Start the Ethernet connection, using DHCP + Serial.print("Initialize Ethernet using DHCP => "); + Ethernet.begin(); + #else + // Start the Ethernet connection, using static IP + Serial.print("Initialize Ethernet using static IP => "); + Ethernet.begin(myIP, myNetmask, myGW); + Ethernet.setDNSServerIP(mydnsServer); + #endif + + if (!Ethernet.waitForLocalIP(5000)) + { + Serial.println("Failed to configure Ethernet"); + + if (!Ethernet.linkStatus()) + { + Serial.println("Ethernet cable is not connected."); + } + + // Stay here forever + while (true) + { + delay(1); + } + } + + if (!Ethernet.waitForLink(5000)) + { + Serial.println(F("Failed to wait for Link")); + } + else + { + Serial.print("IP Address = "); + Serial.println(Ethernet.localIP()); + } + +#endif +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY2("\nStarting Query_Results on", BOARD_NAME, SHIELD_TYPE); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + initEthernet(); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void runQuery() +{ + MYSQL_DISPLAY("\nRunning SELECT and printing results"); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + ////// + + // Fetch the columns and print them + column_names *cols = query_mem.get_columns(); + + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(cols->fields[f]->name); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(", "); + } + } + + MYSQL_DISPLAY(); + + // Read the rows and print them + row_values *row = NULL; + + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(row->values[f]); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(", "); + } + } + + MYSQL_DISPLAY(); + } + } while (row != NULL); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(10000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Query_Results/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Query_Results/defines.h new file mode 100644 index 0000000..d422085 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/Query_Results/defines.h @@ -0,0 +1,103 @@ +/********************************************************************************************************************************* + 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(__IMXRT1062__) && defined(ARDUINO_TEENSY41) ) + // For Teensy 4.1 + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET false + #define USE_QN_ETHERNET true +#else + #error Only Teensy 4.1 supported +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#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 + +#if USE_NATIVE_ETHERNET + #include "NativeEthernet.h" + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using NativeEthernet" +#elif USE_QN_ETHERNET + #include "QNEthernet.h" // https://github.com/ssilverman/QNEthernet + using namespace qindesign::network; + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using QNEthernet" +#endif + +#if USE_NATIVE_ETHERNET + // 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 }, + }; + +#else + + #define USING_DHCP false //true + + #if !USING_DHCP + // Set the static IP address to use if the DHCP fails to assign + IPAddress myIP(192, 168, 2, 222); + IPAddress myNetmask(255, 255, 255, 0); + IPAddress myGW(192, 168, 2, 1); + //IPAddress mydnsServer(192, 168, 2, 1); + IPAddress mydnsServer(8, 8, 8, 8); + #endif + +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/multiFileProject_QNEthernet/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/multiFileProject_QNEthernet/defines.h new file mode 100644 index 0000000..d422085 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/multiFileProject_QNEthernet/defines.h @@ -0,0 +1,103 @@ +/********************************************************************************************************************************* + 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(__IMXRT1062__) && defined(ARDUINO_TEENSY41) ) + // For Teensy 4.1 + #define BOARD_TYPE "TEENSY 4.1" + // Use true for NativeEthernet Library, false if using other Ethernet libraries + #define USE_NATIVE_ETHERNET false + #define USE_QN_ETHERNET true +#else + #error Only Teensy 4.1 supported +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#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 + +#if USE_NATIVE_ETHERNET + #include "NativeEthernet.h" + #warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using NativeEthernet" +#elif USE_QN_ETHERNET + #include "QNEthernet.h" // https://github.com/ssilverman/QNEthernet + using namespace qindesign::network; + #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error + #define SHIELD_TYPE "using QNEthernet" +#endif + +#if USE_NATIVE_ETHERNET + // 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 }, + }; + +#else + + #define USING_DHCP false //true + + #if !USING_DHCP + // Set the static IP address to use if the DHCP fails to assign + IPAddress myIP(192, 168, 2, 222); + IPAddress myNetmask(255, 255, 255, 0); + IPAddress myGW(192, 168, 2, 1); + //IPAddress mydnsServer(192, 168, 2, 1); + IPAddress mydnsServer(8, 8, 8, 8); + #endif + +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/multiFileProject_QNEthernet/multiFileProject.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/multiFileProject_QNEthernet/multiFileProject.cpp new file mode 100644 index 0000000..e1f0fe7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/multiFileProject_QNEthernet/multiFileProject.cpp @@ -0,0 +1,17 @@ +/**************************************************************************************************************************** + multiFileProject.cpp + 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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#include "multiFileProject.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/multiFileProject_QNEthernet/multiFileProject.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/multiFileProject_QNEthernet/multiFileProject.h new file mode 100644 index 0000000..5811a68 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/multiFileProject_QNEthernet/multiFileProject.h @@ -0,0 +1,20 @@ +/**************************************************************************************************************************** + multiFileProject.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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#pragma once + +// Can be included as many times as necessary, without `Multiple Definitions` Linker Error +#include "MySQL_Generic.hpp" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/multiFileProject_QNEthernet/multiFileProject_QNEthernet.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/multiFileProject_QNEthernet/multiFileProject_QNEthernet.ino new file mode 100644 index 0000000..e549038 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/QNEthernet/multiFileProject_QNEthernet/multiFileProject_QNEthernet.ino @@ -0,0 +1,47 @@ +/**************************************************************************************************************************** + multiFileProject_QNEthernet.ino + 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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#include "defines.h" + +#define MYSQL_MARIADB_GENERIC_VERSION_MIN_TARGET "MySQL_MariaDB_Generic v1.7.0" +#define MYSQL_MARIADB_GENERIC_VERSION_MIN 1007000 + +#include "multiFileProject.h" + +// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error +#include "MySQL_Generic.h" + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + Serial.println("\nStart multiFileProject_QNEthernet"); + Serial.println(MYSQL_MARIADB_GENERIC_VERSION); + +#if defined(MYSQL_MARIADB_GENERIC_VERSION_MIN) + if (MYSQL_MARIADB_GENERIC_VERSION_INT < MYSQL_MARIADB_GENERIC_VERSION_MIN) + { + Serial.print("Warning. Must use this example on Version equal or later than : "); + Serial.println(MYSQL_MARIADB_GENERIC_VERSION_MIN_TARGET); + } +#endif +} + +void loop() +{ + // put your main code here, to run repeatedly: +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Basic_Insert_WT32_ETH01/Basic_Insert_WT32_ETH01.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Basic_Insert_WT32_ETH01/Basic_Insert_WT32_ETH01.ino new file mode 100644 index 0000000..d78f5b2 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Basic_Insert_WT32_ETH01/Basic_Insert_WT32_ETH01.ino @@ -0,0 +1,168 @@ +/********************************************************************************************************************************* + Basic_Insert_ESP.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect by wifi + + This example demonstrates how to connect to a MySQL server from an + Arduino using an Arduino-compatible Wifi shield. Note that "compatible" + means it must conform to the Ethernet class library or be a derivative + with the same classes and methods. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Change the SSID and pass to match your WiFi network + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Created by: Dr. Charles A. Bell +*/ + +#if !(defined(ESP32)) + #error This code is intended to run on the WT32 boards and ESP32 platform ! Please check your Tools->Board setting. +#endif + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _ETHERNET_WEBSERVER_LOGLEVEL_ 3 +#define _MYSQL_LOGLEVEL_ 1 + +#include + +#include + +// Select the IP address according to your local network +IPAddress myIP(192, 168, 2, 232); +IPAddress myGW(192, 168, 2, 1); +IPAddress mySN(255, 255, 255, 0); + +// Google DNS Server IP +IPAddress myDNS(8, 8, 8, 8); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "test_arduino"; //"test_arduino"; +char default_table[] = "hello_arduino"; //"test_arduino"; + +String default_value = "Hello, Arduino!"; + +// Sample query +String INSERT_SQL = String("INSERT INTO ") + default_database + "." + default_table + + " (message) VALUES ('" + default_value + "')"; + +MySQL_Connection conn((Client *)&client); + +MySQL_Query *query_mem; + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Basic_Insert_WT32_ETH01 on", BOARD_NAME); + MYSQL_DISPLAY(WEBSERVER_WT32_ETH01_VERSION); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // To be called before ETH.begin() + WT32_ETH01_onEvent(); + + //bool begin(uint8_t phy_addr=ETH_PHY_ADDR, int power=ETH_PHY_POWER, int mdc=ETH_PHY_MDC, int mdio=ETH_PHY_MDIO, + // eth_phy_type_t type=ETH_PHY_TYPE, eth_clock_mode_t clk_mode=ETH_CLK_MODE); + //ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_TYPE, ETH_CLK_MODE); + ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER); + + // Static IP, leave without this line to get IP via DHCP + //bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0); + ETH.config(myIP, myGW, mySN, myDNS); + + WT32_ETH01_waitForConnect(); + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", ETH.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + MYSQL_DISPLAY(INSERT_SQL); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(INSERT_SQL.c_str()) ) + { + MYSQL_DISPLAY("Insert error"); + } + else + { + MYSQL_DISPLAY("Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Basic_Select_WT32_ETH01/Basic_Select_WT32_ETH01.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Basic_Select_WT32_ETH01/Basic_Select_WT32_ETH01.ino new file mode 100644 index 0000000..3ee3efb --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Basic_Select_WT32_ETH01/Basic_Select_WT32_ETH01.ino @@ -0,0 +1,215 @@ +/********************************************************************************************************************************* + Basic_Select_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : basic select + + This example demonstrates how to issue a SELECT query with no parameters + and use the data returned. For this, we use the Cursor class to execute + the query and get the results. + + It demonstrates who methods for running queries. The first allows you to + allocate memory for the cursor and later reclaim it, the second shows how + to use a single instance of the cursor use throughout a sketch. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + CAUTION: Don't mix and match the examples. Use one or the other in your + own sketch -- you'll get compilation errors at the least. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#if !(defined(ESP32)) + #error This code is intended to run on the WT32 boards and ESP32 platform ! Please check your Tools->Board setting. +#endif + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#include + +#include + +// Select the IP address according to your local network +IPAddress myIP(192, 168, 2, 232); +IPAddress myGW(192, 168, 2, 1); +IPAddress mySN(255, 255, 255, 0); + +// Google DNS Server IP +IPAddress myDNS(8, 8, 8, 8); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "world"; //"test_arduino"; +char default_table[] = "city"; //"test_arduino"; + +String default_column = "population"; +String default_value = "Toronto"; + +String query = String("SELECT ") + default_column + " FROM " + default_database + "." + default_table + + " WHERE name = '" + default_value + "'"; + +MySQL_Connection conn((Client *)&client); + +// Create an instance of the cursor passing in the connection +MySQL_Query sql_query = MySQL_Query(&conn); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Basic_Select_WT32_ETH01 on", BOARD_NAME); + MYSQL_DISPLAY(WEBSERVER_WT32_ETH01_VERSION); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // To be called before ETH.begin() + WT32_ETH01_onEvent(); + + //bool begin(uint8_t phy_addr=ETH_PHY_ADDR, int power=ETH_PHY_POWER, int mdc=ETH_PHY_MDC, int mdio=ETH_PHY_MDIO, + // eth_phy_type_t type=ETH_PHY_TYPE, eth_clock_mode_t clk_mode=ETH_CLK_MODE); + //ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_TYPE, ETH_CLK_MODE); + ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER); + + // Static IP, leave without this line to get IP via DHCP + //bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0); + ETH.config(myIP, myGW, mySN, myDNS); + + WT32_ETH01_waitForConnect(); + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", ETH.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runQuery() +{ + row_values *row = NULL; + long head_count = 0; + + MYSQL_DISPLAY("1) Demonstrating using a dynamically allocated query."); + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + MYSQL_DISPLAY(query); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(query.c_str()) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Fetch the columns (required) but we don't use them. + //column_names *columns = query_mem.get_columns(); + query_mem.get_columns(); + + // Read the row (we are only expecting the one) + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + head_count = atol(row->values[0]); + } + } while (row != NULL); + + // Show the result + MYSQL_DISPLAY1(" Toronto pop =", head_count); + + delay(500); + + MYSQL_DISPLAY("2) Demonstrating using a local, global query."); + + // Execute the query + MYSQL_DISPLAY(query); + sql_query.execute(query.c_str()); + + // Fetch the columns (required) but we don't use them. + sql_query.get_columns(); + + // Read the row (we are only expecting the one) + do + { + row = sql_query.get_next_row(); + if (row != NULL) + { + head_count = atol(row->values[0]); + } + } while (row != NULL); + + // Now we close the cursor to free any memory + sql_query.close(); + + // Show the result but this time do some math on it + MYSQL_DISPLAY1(" Toronto pop =", head_count); + MYSQL_DISPLAY1(" Toronto pop increased by 11725 =", head_count + 11725); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Complex_Insert_WT32_ETH01/Complex_Insert_WT32_ETH01.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Complex_Insert_WT32_ETH01/Complex_Insert_WT32_ETH01.ino new file mode 100644 index 0000000..622b605 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Complex_Insert_WT32_ETH01/Complex_Insert_WT32_ETH01.ino @@ -0,0 +1,205 @@ +/********************************************************************************************************************************* + Complex_Insert_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : complex insert + + This example demonstrates how to issue an INSERT query to store data in a + table using data from variables in our sketch. In this case, we supply the + values dynamically. + + This sketch simulates storing data from a sensor in a table. + + For this, we will create a special database and table for testing. + The following are the SQL commands you will need to run in order to setup + your database for running this sketch. + + CREATE DATABASE test_arduino; + CREATE TABLE test_arduino.hello_sensor ( + num integer primary key auto_increment, + message char(40), + sensor_num integer, + value float, + recorded timestamp + ); + + Here we have a table that contains an auto_increment primary key, a text + field, a field to identify the sensor, the value read, and timestamp of + the recorded data. + + Note: Since this sketch uses test data, we place the INSERT in the setup() + method so that it runs only once. Typically, you would have the + INSERT in the loop() method after your code to read from the sensor. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Create the database and table as shown above. + 2) Change the address of the server to the IP address of the MySQL server + 3) Change the user and password to a valid MySQL user and password + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + 8) After the sketch has run for some time, open a mysql client and issue + the command: "SELECT * FROM test_arduino.hello_sensor" to see the data + recorded. Note the field values and how the database handles both the + auto_increment and timestamp fields for us. You can clear the data with + "DELETE FROM test_arduino.hello_sensor". + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#if !(defined(ESP32)) + #error This code is intended to run on the WT32 boards and ESP32 platform ! Please check your Tools->Board setting. +#endif + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#include + +#include + +// Select the IP address according to your local network +IPAddress myIP(192, 168, 2, 232); +IPAddress myGW(192, 168, 2, 1); +IPAddress mySN(255, 255, 255, 0); + +// Google DNS Server IP +IPAddress myDNS(8, 8, 8, 8); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "test_arduino"; //"test_arduino"; +char default_table[] = "hello_sensor"; //"test_arduino"; + +// Sample query +char INSERT_DATA[] = "INSERT INTO %s.%s (message, sensor_num, value) VALUES ('%s',%d,%s)"; + +char query[128]; +char temperature[10]; + +MySQL_Connection conn((Client *)&client); + +#if !( ESP32 || ESP8266 || defined(CORE_TEENSY) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || ( defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_MBED) ) ) + +char *dtostrf(double val, signed char width, unsigned char prec, char *sout) +{ + char fmt[20]; + sprintf(fmt, "%%%d.%df", width, prec); + sprintf(sout, fmt, val); + return sout; +} +#endif + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Complex_Insert_WT32_ETH01 on", BOARD_NAME); + MYSQL_DISPLAY(WEBSERVER_WT32_ETH01_VERSION); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // To be called before ETH.begin() + WT32_ETH01_onEvent(); + + //bool begin(uint8_t phy_addr=ETH_PHY_ADDR, int power=ETH_PHY_POWER, int mdc=ETH_PHY_MDC, int mdio=ETH_PHY_MDIO, + // eth_phy_type_t type=ETH_PHY_TYPE, eth_clock_mode_t clk_mode=ETH_CLK_MODE); + //ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_TYPE, ETH_CLK_MODE); + ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER); + + // Static IP, leave without this line to get IP via DHCP + //bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0); + ETH.config(myIP, myGW, mySN, myDNS); + + WT32_ETH01_waitForConnect(); + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", ETH.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + // Save + dtostrf(50.125, 1, 1, temperature); + sprintf(query, INSERT_DATA, default_database, default_table, "test sensor", 24, temperature); + + // Execute the query + MYSQL_DISPLAY(query); + + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Complex Insert error"); + } + else + { + MYSQL_DISPLAY("Complex Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Complex_Select_WT32_ETH01/Complex_Select_WT32_ETH01.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Complex_Select_WT32_ETH01/Complex_Select_WT32_ETH01.ino new file mode 100644 index 0000000..6ec1852 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Complex_Select_WT32_ETH01/Complex_Select_WT32_ETH01.ino @@ -0,0 +1,212 @@ +/********************************************************************************************************************************* + Complex_Select_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : complex select + + This example demonstrates how to issue a SELECT query with parameters that + we provide from code. Thus, it demonstrates how to build query parameters + dynamically. + + Notice also the sketch demonstrates how to read columns and rows from + the result set. Study this example until you are familiar with how to + do this before writing your own sketch to read and consume query results. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#if !(defined(ESP32)) + #error This code is intended to run on the WT32 boards and ESP32 platform ! Please check your Tools->Board setting. +#endif + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#include + +#include + +// Select the IP address according to your local network +IPAddress myIP(192, 168, 2, 232); +IPAddress myGW(192, 168, 2, 1); +IPAddress mySN(255, 255, 255, 0); + +// Google DNS Server IP +IPAddress myDNS(8, 8, 8, 8); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "world"; //"test_arduino"; +char default_table[] = "city"; //"test_arduino"; + +// Sample query +// +// Notice the "%lu" - that's a placeholder for the parameter we will +// supply. See sprintf() documentation for more formatting specifier +// options + +unsigned long QUERY_POPULATION = 800000; + +const char QUERY_POP[] = "SELECT name, population FROM world.city WHERE population < %lu ORDER BY population DESC LIMIT 6;"; + +char query[128]; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Complex_Select_WT32_ETH01 on", BOARD_NAME); + MYSQL_DISPLAY(WEBSERVER_WT32_ETH01_VERSION); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // To be called before ETH.begin() + WT32_ETH01_onEvent(); + + //bool begin(uint8_t phy_addr=ETH_PHY_ADDR, int power=ETH_PHY_POWER, int mdc=ETH_PHY_MDC, int mdio=ETH_PHY_MDIO, + // eth_phy_type_t type=ETH_PHY_TYPE, eth_clock_mode_t clk_mode=ETH_CLK_MODE); + //ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_TYPE, ETH_CLK_MODE); + ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER); + + // Static IP, leave without this line to get IP via DHCP + //bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0); + ETH.config(myIP, myGW, mySN, myDNS); + + WT32_ETH01_waitForConnect(); + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", ETH.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runQuery() +{ + MYSQL_DISPLAY("===================================================="); + MYSQL_DISPLAY("> Running SELECT with dynamically supplied parameter"); + + // Supply the parameter for the query + // Here we use the QUERY_POP as the format string and query as the + // destination. This uses twice the memory so another option would be + // to allocate one buffer for all formatted queries or allocate the + // memory as needed (just make sure you allocate enough memory and + // free it when you're done!). + sprintf(query, QUERY_POP, QUERY_POPULATION + (( millis() % 100000 ) * 10) ); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Fetch the columns and print them + column_names *cols = query_mem.get_columns(); + + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(cols->fields[f]->name); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(","); + } + } + + MYSQL_DISPLAY(); + + // Read the rows and print them + row_values *row = NULL; + + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(row->values[f]); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(","); + } + } + + MYSQL_DISPLAY(); + } + } while (row != NULL); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(10000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Connect_Default_Database_WT32_ETH01/Connect_Default_Database_WT32_ETH01.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Connect_Default_Database_WT32_ETH01/Connect_Default_Database_WT32_ETH01.ino new file mode 100644 index 0000000..70259a3 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Connect_Default_Database_WT32_ETH01/Connect_Default_Database_WT32_ETH01.ino @@ -0,0 +1,130 @@ +/********************************************************************************************************************************* + Connect_Default_Database_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect with default database + + This example demonstrates how to connect to a MySQL server and specifying + the default database when connecting. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#if !(defined(ESP32)) + #error This code is intended to run on the WT32 boards and ESP32 platform ! Please check your Tools->Board setting. +#endif + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#include + +#include + +// Select the IP address according to your local network +IPAddress myIP(192, 168, 2, 232); +IPAddress myGW(192, 168, 2, 1); +IPAddress mySN(255, 255, 255, 0); + +// Google DNS Server IP +IPAddress myDNS(8, 8, 8, 8); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +char default_database[] = "world"; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Connect_Default_Database_WT32_ETH01 on", BOARD_NAME); + MYSQL_DISPLAY(WEBSERVER_WT32_ETH01_VERSION); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // To be called before ETH.begin() + WT32_ETH01_onEvent(); + + //bool begin(uint8_t phy_addr=ETH_PHY_ADDR, int power=ETH_PHY_POWER, int mdc=ETH_PHY_MDC, int mdio=ETH_PHY_MDIO, + // eth_phy_type_t type=ETH_PHY_TYPE, eth_clock_mode_t clk_mode=ETH_CLK_MODE); + //ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_TYPE, ETH_CLK_MODE); + ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER); + + // Static IP, leave without this line to get IP via DHCP + //bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0); + ETH.config(myIP, myGW, mySN, myDNS); + + WT32_ETH01_waitForConnect(); + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", ETH.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password, default_database)) + if (conn.connectNonBlocking(server, server_port, user, password, default_database) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Connect_Disconnect_WT32_ETH01/Connect_Disconnect_WT32_ETH01.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Connect_Disconnect_WT32_ETH01/Connect_Disconnect_WT32_ETH01.ino new file mode 100644 index 0000000..12523f7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Connect_Disconnect_WT32_ETH01/Connect_Disconnect_WT32_ETH01.ino @@ -0,0 +1,144 @@ +/********************************************************************************************************************************* + Connect_Disconnect_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect and disconnect (close) + + This example demonstrates how to use the connection to open at the start + of a loop, perform some query, then close the connection. Use this technique + for solutions that must sleep for a long period or otherwise require + additional processing or delays. The connect/close pair allow you to + control how long the connection is open and thus reduce the amount of + time a connection is held open. It also helps for lossy connections. + + This example demonstrates how to connect to a MySQL server and specifying + the default database when connecting. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Created by: Dr. Charles A. Bell +*/ + +#if !(defined(ESP32)) + #error This code is intended to run on the WT32 boards and ESP32 platform ! Please check your Tools->Board setting. +#endif + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#include + +#include + +// Select the IP address according to your local network +IPAddress myIP(192, 168, 2, 232); +IPAddress myGW(192, 168, 2, 1); +IPAddress mySN(255, 255, 255, 0); + +// Google DNS Server IP +IPAddress myDNS(8, 8, 8, 8); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +MySQL_Connection conn((Client *)&client); +MySQL_Query query = MySQL_Query(&conn); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Connect_Disconnect_WT32_ETH01 on", BOARD_NAME); + MYSQL_DISPLAY(WEBSERVER_WT32_ETH01_VERSION); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // To be called before ETH.begin() + WT32_ETH01_onEvent(); + + //bool begin(uint8_t phy_addr=ETH_PHY_ADDR, int power=ETH_PHY_POWER, int mdc=ETH_PHY_MDC, int mdio=ETH_PHY_MDIO, + // eth_phy_type_t type=ETH_PHY_TYPE, eth_clock_mode_t clk_mode=ETH_CLK_MODE); + //ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_TYPE, ETH_CLK_MODE); + ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER); + + // Static IP, leave without this line to get IP via DHCP + //bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0); + ETH.config(myIP, myGW, mySN, myDNS); + + WT32_ETH01_waitForConnect(); + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", ETH.localIP()); +} + +void runQuery() +{ + MYSQL_DISPLAY("Running a query: SELECT * FROM test_arduino.hello_arduino LIMIT 6;"); + + // Execute the query + // KH, check if valid before fetching + if ( !query.execute("SELECT * FROM test_arduino.hello_arduino LIMIT 6;") ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + query.show_results(); // show the results + query.close(); // close the query +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Connect_WT32_ETH01/Connect_WT32_ETH01.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Connect_WT32_ETH01/Connect_WT32_ETH01.ino new file mode 100644 index 0000000..c8447b1 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Connect_WT32_ETH01/Connect_WT32_ETH01.ino @@ -0,0 +1,130 @@ +/********************************************************************************************************************************* + Connect_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect + + This example demonstrates how to connect to a MySQL server from an + Arduino using an Arduino-compatible Ethernet shield. Note that "compatible" + means it must conform to the Ethernet class library or be a derivative + with the same classes and methods. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#if !(defined(ESP32)) + #error This code is intended to run on the WT32 boards and ESP32 platform ! Please check your Tools->Board setting. +#endif + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#include + +#include + +// Select the IP address according to your local network +IPAddress myIP(192, 168, 2, 232); +IPAddress myGW(192, 168, 2, 1); +IPAddress mySN(255, 255, 255, 0); + +// Google DNS Server IP +IPAddress myDNS(8, 8, 8, 8); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Connect_WT32_ETH01 on", BOARD_NAME); + MYSQL_DISPLAY(WEBSERVER_WT32_ETH01_VERSION); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // To be called before ETH.begin() + WT32_ETH01_onEvent(); + + //bool begin(uint8_t phy_addr=ETH_PHY_ADDR, int power=ETH_PHY_POWER, int mdc=ETH_PHY_MDC, int mdio=ETH_PHY_MDIO, + // eth_phy_type_t type=ETH_PHY_TYPE, eth_clock_mode_t clk_mode=ETH_CLK_MODE); + //ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_TYPE, ETH_CLK_MODE); + ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER); + + // Static IP, leave without this line to get IP via DHCP + //bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0); + ETH.config(myIP, myGW, mySN, myDNS); + + WT32_ETH01_waitForConnect(); + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", ETH.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Query_Progmem_WT32_ETH01/Query_Progmem_WT32_ETH01.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Query_Progmem_WT32_ETH01/Query_Progmem_WT32_ETH01.ino new file mode 100644 index 0000000..1df8037 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Query_Progmem_WT32_ETH01/Query_Progmem_WT32_ETH01.ino @@ -0,0 +1,155 @@ +/********************************************************************************************************************************* + Query_Progmem_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : query with PROGMEM strings + + This example demonstrates how to issue queries using strings stored in + PROGMEM. As you will see, you need only add a parameter to the execute() + method in the cursor class, const and PROGMEM to the string declaration + and add the #include directive. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#if !(defined(ESP32)) + #error This code is intended to run on the WT32 boards and ESP32 platform ! Please check your Tools->Board setting. +#endif + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#include + +#include + +// Select the IP address according to your local network +IPAddress myIP(192, 168, 2, 232); +IPAddress myGW(192, 168, 2, 1); +IPAddress mySN(255, 255, 255, 0); + +// Google DNS Server IP +IPAddress myDNS(8, 8, 8, 8); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +// Sample query +const char PROGMEM query[] = "SELECT * FROM test_arduino.hello_arduino LIMIT 6;"; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Query_Progmem_WT32_ETH01 on", BOARD_NAME); + MYSQL_DISPLAY(WEBSERVER_WT32_ETH01_VERSION); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // To be called before ETH.begin() + WT32_ETH01_onEvent(); + + //bool begin(uint8_t phy_addr=ETH_PHY_ADDR, int power=ETH_PHY_POWER, int mdc=ETH_PHY_MDC, int mdio=ETH_PHY_MDIO, + // eth_phy_type_t type=ETH_PHY_TYPE, eth_clock_mode_t clk_mode=ETH_CLK_MODE); + //ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_TYPE, ETH_CLK_MODE); + ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER); + + // Static IP, leave without this line to get IP via DHCP + //bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0); + ETH.config(myIP, myGW, mySN, myDNS); + + WT32_ETH01_waitForConnect(); + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", ETH.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void runQuery() +{ + MYSQL_DISPLAY("\nRunning SELECT from PROGMEM and printing results\n"); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query with the PROGMEM option + // KH, check if valid before fetching + if ( !query_mem.execute(query, true) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Show the results + query_mem.show_results(); + // close the query + query_mem.close(); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Query_Results_WT32_ETH01/Query_Results_WT32_ETH01.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Query_Results_WT32_ETH01/Query_Results_WT32_ETH01.ino new file mode 100644 index 0000000..d5824e8 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Query_Results_WT32_ETH01/Query_Results_WT32_ETH01.ino @@ -0,0 +1,190 @@ +/********************************************************************************************************************************* + Query_Results_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : query results + + This example demonstrates how to issue a SELECT query and how to read columns + and rows from the result set. Study this example until you are familiar with how to + do this before writing your own sketch to read and consume query results. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#if !(defined(ESP32)) + #error This code is intended to run on the WT32 boards and ESP32 platform ! Please check your Tools->Board setting. +#endif + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#include + +#include + +// Select the IP address according to your local network +IPAddress myIP(192, 168, 2, 232); +IPAddress myGW(192, 168, 2, 1); +IPAddress mySN(255, 255, 255, 0); + +// Google DNS Server IP +IPAddress myDNS(8, 8, 8, 8); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +// Sample query +const char query[] = "SELECT * FROM world.city LIMIT 6"; +//const char query[] = "SELECT * FROM test_arduino.hello_arduino LIMIT 6;"; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Query_Results_WT32_ETH01 on", BOARD_NAME); + MYSQL_DISPLAY(WEBSERVER_WT32_ETH01_VERSION); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // To be called before ETH.begin() + WT32_ETH01_onEvent(); + + //bool begin(uint8_t phy_addr=ETH_PHY_ADDR, int power=ETH_PHY_POWER, int mdc=ETH_PHY_MDC, int mdio=ETH_PHY_MDIO, + // eth_phy_type_t type=ETH_PHY_TYPE, eth_clock_mode_t clk_mode=ETH_CLK_MODE); + //ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_TYPE, ETH_CLK_MODE); + ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER); + + // Static IP, leave without this line to get IP via DHCP + //bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0); + ETH.config(myIP, myGW, mySN, myDNS); + + WT32_ETH01_waitForConnect(); + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", ETH.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void runQuery() +{ + MYSQL_DISPLAY("\nRunning SELECT and printing results"); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + ////// + + // Fetch the columns and print them + column_names *cols = query_mem.get_columns(); + + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(cols->fields[f]->name); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(", "); + } + } + + MYSQL_DISPLAY(); + + // Read the rows and print them + row_values *row = NULL; + + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(row->values[f]); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(", "); + } + } + + MYSQL_DISPLAY(); + } + } while (row != NULL); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Reboot_WT32_ETH01/Reboot_WT32_ETH01.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Reboot_WT32_ETH01/Reboot_WT32_ETH01.ino new file mode 100644 index 0000000..503030e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/Reboot_WT32_ETH01/Reboot_WT32_ETH01.ino @@ -0,0 +1,216 @@ +/********************************************************************************************************************************* + Reboot_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : reboot if connection lost + + This example demonstrates how to reboot an Arduino if connection to the + server is lost for a period of time. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + To test the reboot, unplug your Ethernet cable once you see "disconnected" + then wait for the timeout. Once the Arduino reboots, plug the cable in again + and you should see the query processing resume. + + Created by: Dr. Charles A. Bell +*/ + +#if !(defined(ESP32)) + #error This code is intended to run on the WT32 boards and ESP32 platform ! Please check your Tools->Board setting. +#endif + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#include + +#include + +// Select the IP address according to your local network +IPAddress myIP(192, 168, 2, 232); +IPAddress myGW(192, 168, 2, 1); +IPAddress mySN(255, 255, 255, 0); + +// Google DNS Server IP +IPAddress myDNS(8, 8, 8, 8); + +#define USING_HOST_NAME false //true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +MySQL_Connection conn((Client *)&client); +MySQL_Query query = MySQL_Query(&conn); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Reboot_WT32_ETH01 on", BOARD_NAME); + MYSQL_DISPLAY(WEBSERVER_WT32_ETH01_VERSION); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // To be called before ETH.begin() + WT32_ETH01_onEvent(); + + //bool begin(uint8_t phy_addr=ETH_PHY_ADDR, int power=ETH_PHY_POWER, int mdc=ETH_PHY_MDC, int mdio=ETH_PHY_MDIO, + // eth_phy_type_t type=ETH_PHY_TYPE, eth_clock_mode_t clk_mode=ETH_CLK_MODE); + //ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_TYPE, ETH_CLK_MODE); + ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER); + + // Static IP, leave without this line to get IP via DHCP + //bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0); + ETH.config(myIP, myGW, mySN, myDNS); + + WT32_ETH01_waitForConnect(); + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", ETH.localIP()); +} + +// Begin reboot code +int num_fails; // variable for number of failure attempts +#define MAX_FAILED_CONNECTS 5 // maximum number of failed connects to MySQL + +void soft_reset() +{ +#if WIFI_USE_SAMD + #if ( defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) || defined(__SAMD51G19A__) ) + // For SAMD51 + // see Table 17-5 Timeout Period (valid values 0-11) + WDT->CONFIG.reg = 5; + WDT->CTRLA.reg = WDT_CTRLA_ENABLE; + // To check if OK or bit.ENABLE/CLEAR + while (WDT->SYNCBUSY.bit.WEN == 1); + + // use the WDT watchdog timer to force a system reset. + WDT->CLEAR.reg = 0x00; + // To check if OK or bit.ENABLE/CLEAR + while (WDT->SYNCBUSY.bit.WEN == 1); + #else + // For SAMD21, etc + // see Table 17-5 Timeout Period (valid values 0-11) + WDT->CONFIG.reg = 5; + WDT->CTRL.reg = WDT_CTRL_ENABLE; + while (WDT->STATUS.bit.SYNCBUSY == 1); + + // use the WDT watchdog timer to force a system reset. + WDT->CLEAR.reg = 0x00; + while (WDT->STATUS.bit.SYNCBUSY == 1); + #endif +#elif WIFI_USE_NRF528XX + //delay(1000); + // Restart for nRF52 + NVIC_SystemReset(); +#elif WIFI_USE_SAMDUE + void(*resetFunc)() = 0; + resetFunc(); +#elif WIFI_USE_STM32 + void(*resetFunc)() = 0; + resetFunc(); + +#elif WIFI_USE_TEENSY + #if defined(__IMXRT1062__) + // Teensy 4.1/4.0 + SCB_AIRCR = 0x05FA0004; //write value for restart for Teensy + #else + void(*resetFunc)() = 0; + resetFunc(); + #endif + +#elif ( defined(WIFI_USE_RP2040) && defined(ARDUINO_ARCH_MBED) ) + + NVIC_SystemReset(); + +#endif +} + +// End reboot code + +void loop() +{ + if (conn.connected()) + { + MYSQL_DISPLAY("Running a query: SHOW DATABASES"); + + // Execute the query + + // KH, check if valid before fetching + if ( !query.execute("SHOW DATABASES") ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + ////// + + query.show_results(); // show the results + query.close(); // close the cursor + conn.close(); // close the connection + num_fails = 0; // reset failures + + delay(10000); + } + else + { + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + } + else + { + num_fails++; + MYSQL_DISPLAY("Connect failed!"); + + if (num_fails == MAX_FAILED_CONNECTS) + { + MYSQL_DISPLAY("Ok, that's it. I'm outta here. Rebooting..."); + delay(2000); + // Here we tell the Arduino to reboot by redirecting the instruction + // pointer to the "top" or position 0. This is a soft reset and may + // not solve all hardware-related lockups. + soft_reset(); + } + } + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("=========================================="); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/multiFileProject_WT32_ETH01/multiFileProject.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/multiFileProject_WT32_ETH01/multiFileProject.cpp new file mode 100644 index 0000000..e1f0fe7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/multiFileProject_WT32_ETH01/multiFileProject.cpp @@ -0,0 +1,17 @@ +/**************************************************************************************************************************** + multiFileProject.cpp + 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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#include "multiFileProject.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/multiFileProject_WT32_ETH01/multiFileProject.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/multiFileProject_WT32_ETH01/multiFileProject.h new file mode 100644 index 0000000..5811a68 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/multiFileProject_WT32_ETH01/multiFileProject.h @@ -0,0 +1,20 @@ +/**************************************************************************************************************************** + multiFileProject.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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#pragma once + +// Can be included as many times as necessary, without `Multiple Definitions` Linker Error +#include "MySQL_Generic.hpp" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/multiFileProject_WT32_ETH01/multiFileProject_WT32_ETH01.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/multiFileProject_WT32_ETH01/multiFileProject_WT32_ETH01.ino new file mode 100644 index 0000000..c6859a6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WT32_ETH01/multiFileProject_WT32_ETH01/multiFileProject_WT32_ETH01.ino @@ -0,0 +1,56 @@ +/**************************************************************************************************************************** + multiFileProject_WT32_ETH01.ino + 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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#if !(defined(ESP32)) + #error This code is intended to run on the WT32 boards and ESP32 platform ! Please check your Tools->Board setting. +#endif + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#include + +#define MYSQL_MARIADB_GENERIC_VERSION_MIN_TARGET "MySQL_MariaDB_Generic v1.7.0" +#define MYSQL_MARIADB_GENERIC_VERSION_MIN 1007000 + +#include "multiFileProject.h" + +// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error +#include "MySQL_Generic.h" + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + Serial.println("\nStart multiFileProject_WT32_ETH01"); + Serial.println(MYSQL_MARIADB_GENERIC_VERSION); + +#if defined(MYSQL_MARIADB_GENERIC_VERSION_MIN) + if (MYSQL_MARIADB_GENERIC_VERSION_INT < MYSQL_MARIADB_GENERIC_VERSION_MIN) + { + Serial.print("Warning. Must use this example on Version equal or later than : "); + Serial.println(MYSQL_MARIADB_GENERIC_VERSION_MIN_TARGET); + } +#endif +} + +void loop() +{ + // put your main code here, to run repeatedly: +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_ESP/Basic_Insert_ESP.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_ESP/Basic_Insert_ESP.ino new file mode 100644 index 0000000..a1e2eac --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_ESP/Basic_Insert_ESP.ino @@ -0,0 +1,152 @@ +/********************************************************************************************************************************* + Basic_Insert_ESP.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect by wifi + + This example demonstrates how to connect to a MySQL server from an + Arduino using an Arduino-compatible Wifi shield. Note that "compatible" + means it must conform to the Ethernet class library or be a derivative + with the same classes and methods. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Change the SSID and pass to match your WiFi network + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Created by: Dr. Charles A. Bell +*/ + +#if ! (ESP8266 || ESP32 ) + #error This code is intended to run on the ESP8266/ESP32 platform! Please check your Tools->Board setting +#endif + +#include "Credentials.h" + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "test_arduino"; //"test_arduino"; +char default_table[] = "hello_arduino"; //"test_arduino"; + +String default_value = "Hello, Arduino!"; + +// Sample query +String INSERT_SQL = String("INSERT INTO ") + default_database + "." + default_table + + " (message) VALUES ('" + default_value + "')"; + +MySQL_Connection conn((Client *)&client); + +MySQL_Query *query_mem; + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Basic_Insert_ESP on", ARDUINO_BOARD); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + MYSQL_DISPLAY(INSERT_SQL); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(INSERT_SQL.c_str()) ) + { + MYSQL_DISPLAY("Insert error"); + } + else + { + MYSQL_DISPLAY("Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_ESP/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_ESP/Credentials.h new file mode 100644 index 0000000..9e3d7e7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_ESP/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_WiFi/Basic_Insert_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_WiFi/Basic_Insert_WiFi.ino new file mode 100644 index 0000000..de135e6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_WiFi/Basic_Insert_WiFi.ino @@ -0,0 +1,183 @@ +/********************************************************************************************************************************* + Basic_Insert_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : basic insert + + This example demonstrates how to issue an INSERT query to store data in a + table. For this, we will create a special database and table for testing. + The following are the SQL commands you will need to run in order to setup + your database for running this sketch. + + CREATE DATABASE test_arduino; + CREATE TABLE test_arduino.hello_arduino ( + num integer primary key auto_increment, + message char(40), + recorded timestamp + ); + + Here we see one database and a table with three fields; a primary key that + is an auto_increment, a string, and a timestamp. This will demonstrate how + to save a date and time of when the row was inserted, which can help you + determine when data was recorded or updated. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Create the database and table as shown above. + 2) Change the address of the server to the IP address of the MySQL server + 3) Change the user and password to a valid MySQL user and password + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + 8) After the sketch has run for some time, open a mysql client and issue + the command: "SELECT * FROM test_arduino.hello_arduino" to see the data + recorded. Note the field values and how the database handles both the + auto_increment and timestamp fields for us. You can clear the data with + "DELETE FROM test_arduino.hello_arduino". + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "test_arduino"; //"test_arduino"; +char default_table[] = "hello_arduino"; //"test_arduino"; + +String default_value = "Hello, Arduino!"; + +// Sample query +String INSERT_SQL = String("INSERT INTO ") + default_database + "." + default_table + + " (message) VALUES ('" + default_value + "')"; + +MySQL_Connection conn((Client *)&client); + +MySQL_Query *query_mem; + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Basic_Insert_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Remember to initialize your WiFi module +#if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #if ( USING_WIFI_ESP8266_AT ) + MYSQL_DISPLAY("Using ESP8266_AT/ESP8266_AT_WebServer Library"); + #elif ( USING_WIFIESPAT_LIB ) + MYSQL_DISPLAY("Using WiFiEspAT Library"); + #endif + + // initialize serial for ESP module + EspSerial.begin(115200); + // initialize ESP module + WiFi.init(&EspSerial); + + MYSQL_DISPLAY(F("WiFi shield init done")); + + // check for the presence of the shield + if (WiFi.status() == WL_NO_SHIELD) + { + MYSQL_DISPLAY(F("WiFi shield not present")); + // don't continue + while (true); + } +#endif + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + MYSQL_DISPLAY(INSERT_SQL); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(INSERT_SQL.c_str()) ) + { + MYSQL_DISPLAY("Insert error"); + } + else + { + MYSQL_DISPLAY("Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_WiFi/Credentials.h new file mode 100644 index 0000000..a311e60 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_WiFi/defines.h new file mode 100644 index 0000000..ed63a72 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Insert_WiFi/defines.h @@ -0,0 +1,381 @@ +/**************************************************************************************************************************** + 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 DEBUG_ESP8266_AT_WEBSERVER_PORT Serial + +// Debug Level from 0 to 4 +#define _ESP_AT_LOGLEVEL_ 1 + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ! (ESP8266 || ESP32 ) + // Select only one of these libraries, only for boards other than ESP8266/ESP32 + #define USING_WIFI_ESP8266_AT false + #define USING_WIFININA_GENERIC false + #define USING_WIFININA false + #define USING_WIFIESPAT_LIB true + #define USING_WIFI_CUSTOM false +#endif + +#if defined(ARDUINO_SAMD_MKR1000) + #if defined(USE_WIFI_NINA) + #undef USE_WIFI_NINA + #endif + #define USE_WIFI_NINA false + #define USE_WIFI101 true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFI_USE_NRF528XX) + #undef WIFI_USE_NRF528XX + #endif + #define WIFI_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFI_USE_SAMD) + #undef WIFI_USE_SAMD + #endif + #define WIFI_USE_SAMD true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFI_USE_SAM_DUE) + #undef WIFI_USE_SAM_DUE + #endif + #define WIFI_USE_SAM_DUE true + #warning Use SAM_DUE architecture +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFI_USE_STM32) + #undef WIFI_USE_STM32 + #endif + #define WIFI_USE_STM32 true +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFI_USE_RP2040) + #undef WIFI_USE_RP2040 + #endif + #define WIFI_USE_RP2040 true +#endif + +#ifdef CORE_TEENSY + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For Teensy 4.1/4.0 + #define EspSerial Serial2 //Serial2, Pin RX2 : 7, TX2 : 8 + #endif + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" +#endif + +#elif defined(WIFI_USE_NRF528XX) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif defined(WIFI_USE_SAMD) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For SAMD + #define EspSerial Serial1 + #endif + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif defined(WIFI_USE_STM32) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For STM32 + #if defined(ARDUINO_NUCLEO_F767ZI) + #warning Nucleo-144 NUCLEO_F767ZI board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); + #elif defined(ARDUINO_NUCLEO_L053R8) + #warning Nucleo-64 NUCLEO_L053R8 board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); // (PA3, PA2); + #endif + + #warning EspSerial using SERIAL_PORT_HARDWARE, can be Serial or Serial1. See your board variant.h + #define EspSerial SERIAL_PORT_HARDWARE //Serial1 + #endif + + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif (ESP8266) + #warning ESP8266 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif (ESP32) + #warning ESP32 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif defined(WIFI_USE_RP2040) && !defined(ARDUINO_ARCH_MBED) + + // For RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + +#elif defined(WIFI_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + // For MBED RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#else + // For Mega + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #define BOARD_TYPE "AVR Mega" +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Select_WiFi/Basic_Select_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Select_WiFi/Basic_Select_WiFi.ino new file mode 100644 index 0000000..b732d66 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Select_WiFi/Basic_Select_WiFi.ino @@ -0,0 +1,216 @@ +/********************************************************************************************************************************* + Basic_Select_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : basic select + + This example demonstrates how to issue a SELECT query with no parameters + and use the data returned. For this, we use the Cursor class to execute + the query and get the results. + + It demonstrates who methods for running queries. The first allows you to + allocate memory for the cursor and later reclaim it, the second shows how + to use a single instance of the cursor use throughout a sketch. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + CAUTION: Don't mix and match the examples. Use one or the other in your + own sketch -- you'll get compilation errors at the least. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "world"; //"test_arduino"; +char default_table[] = "city"; //"test_arduino"; + +String default_column = "population"; +String default_value = "Toronto"; + +String query = String("SELECT ") + default_column + " FROM " + default_database + "." + default_table + + " WHERE name = '" + default_value + "'"; + +MySQL_Connection conn((Client *)&client); + +// Create an instance of the cursor passing in the connection +MySQL_Query sql_query = MySQL_Query(&conn); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Basic_Select_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Remember to initialize your WiFi module +#if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #if ( USING_WIFI_ESP8266_AT ) + MYSQL_DISPLAY("Using ESP8266_AT/ESP8266_AT_WebServer Library"); + #elif ( USING_WIFIESPAT_LIB ) + MYSQL_DISPLAY("Using WiFiEspAT Library"); + #endif + + // initialize serial for ESP module + EspSerial.begin(115200); + // initialize ESP module + WiFi.init(&EspSerial); + + MYSQL_DISPLAY(F("WiFi shield init done")); + + // check for the presence of the shield + if (WiFi.status() == WL_NO_SHIELD) + { + MYSQL_DISPLAY(F("WiFi shield not present")); + // don't continue + while (true); + } +#endif + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runQuery() +{ + row_values *row = NULL; + long head_count = 0; + + MYSQL_DISPLAY("1) Demonstrating using a dynamically allocated query."); + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + MYSQL_DISPLAY(query); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(query.c_str()) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Fetch the columns (required) but we don't use them. + //column_names *columns = query_mem.get_columns(); + query_mem.get_columns(); + + // Read the row (we are only expecting the one) + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + head_count = atol(row->values[0]); + } + } while (row != NULL); + + // Show the result + MYSQL_DISPLAY1(" Toronto pop =", head_count); + + delay(500); + + MYSQL_DISPLAY("2) Demonstrating using a local, global query."); + + // Execute the query + MYSQL_DISPLAY(query); + sql_query.execute(query.c_str()); + + // Fetch the columns (required) but we don't use them. + sql_query.get_columns(); + + // Read the row (we are only expecting the one) + do + { + row = sql_query.get_next_row(); + if (row != NULL) + { + head_count = atol(row->values[0]); + } + } while (row != NULL); + + // Now we close the cursor to free any memory + sql_query.close(); + + // Show the result but this time do some math on it + MYSQL_DISPLAY1(" Toronto pop =", head_count); + MYSQL_DISPLAY1(" Toronto pop increased by 11725 =", head_count + 11725); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Select_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Select_WiFi/Credentials.h new file mode 100644 index 0000000..a311e60 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Select_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Select_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Select_WiFi/defines.h new file mode 100644 index 0000000..ed63a72 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Basic_Select_WiFi/defines.h @@ -0,0 +1,381 @@ +/**************************************************************************************************************************** + 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 DEBUG_ESP8266_AT_WEBSERVER_PORT Serial + +// Debug Level from 0 to 4 +#define _ESP_AT_LOGLEVEL_ 1 + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ! (ESP8266 || ESP32 ) + // Select only one of these libraries, only for boards other than ESP8266/ESP32 + #define USING_WIFI_ESP8266_AT false + #define USING_WIFININA_GENERIC false + #define USING_WIFININA false + #define USING_WIFIESPAT_LIB true + #define USING_WIFI_CUSTOM false +#endif + +#if defined(ARDUINO_SAMD_MKR1000) + #if defined(USE_WIFI_NINA) + #undef USE_WIFI_NINA + #endif + #define USE_WIFI_NINA false + #define USE_WIFI101 true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFI_USE_NRF528XX) + #undef WIFI_USE_NRF528XX + #endif + #define WIFI_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFI_USE_SAMD) + #undef WIFI_USE_SAMD + #endif + #define WIFI_USE_SAMD true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFI_USE_SAM_DUE) + #undef WIFI_USE_SAM_DUE + #endif + #define WIFI_USE_SAM_DUE true + #warning Use SAM_DUE architecture +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFI_USE_STM32) + #undef WIFI_USE_STM32 + #endif + #define WIFI_USE_STM32 true +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFI_USE_RP2040) + #undef WIFI_USE_RP2040 + #endif + #define WIFI_USE_RP2040 true +#endif + +#ifdef CORE_TEENSY + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For Teensy 4.1/4.0 + #define EspSerial Serial2 //Serial2, Pin RX2 : 7, TX2 : 8 + #endif + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" +#endif + +#elif defined(WIFI_USE_NRF528XX) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif defined(WIFI_USE_SAMD) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For SAMD + #define EspSerial Serial1 + #endif + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif defined(WIFI_USE_STM32) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For STM32 + #if defined(ARDUINO_NUCLEO_F767ZI) + #warning Nucleo-144 NUCLEO_F767ZI board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); + #elif defined(ARDUINO_NUCLEO_L053R8) + #warning Nucleo-64 NUCLEO_L053R8 board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); // (PA3, PA2); + #endif + + #warning EspSerial using SERIAL_PORT_HARDWARE, can be Serial or Serial1. See your board variant.h + #define EspSerial SERIAL_PORT_HARDWARE //Serial1 + #endif + + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif (ESP8266) + #warning ESP8266 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif (ESP32) + #warning ESP32 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif defined(WIFI_USE_RP2040) && !defined(ARDUINO_ARCH_MBED) + + // For RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + +#elif defined(WIFI_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + // For MBED RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#else + // For Mega + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #define BOARD_TYPE "AVR Mega" +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Insert_WiFi/Complex_Insert_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Insert_WiFi/Complex_Insert_WiFi.ino new file mode 100644 index 0000000..044aeff --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Insert_WiFi/Complex_Insert_WiFi.ino @@ -0,0 +1,206 @@ +/********************************************************************************************************************************* + Complex_Insert_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : complex insert + + This example demonstrates how to issue an INSERT query to store data in a + table using data from variables in our sketch. In this case, we supply the + values dynamically. + + This sketch simulates storing data from a sensor in a table. + + For this, we will create a special database and table for testing. + The following are the SQL commands you will need to run in order to setup + your database for running this sketch. + + CREATE DATABASE test_arduino; + CREATE TABLE test_arduino.hello_sensor ( + num integer primary key auto_increment, + message char(40), + sensor_num integer, + value float, + recorded timestamp + ); + + Here we have a table that contains an auto_increment primary key, a text + field, a field to identify the sensor, the value read, and timestamp of + the recorded data. + + Note: Since this sketch uses test data, we place the INSERT in the setup() + method so that it runs only once. Typically, you would have the + INSERT in the loop() method after your code to read from the sensor. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Create the database and table as shown above. + 2) Change the address of the server to the IP address of the MySQL server + 3) Change the user and password to a valid MySQL user and password + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + 8) After the sketch has run for some time, open a mysql client and issue + the command: "SELECT * FROM test_arduino.hello_sensor" to see the data + recorded. Note the field values and how the database handles both the + auto_increment and timestamp fields for us. You can clear the data with + "DELETE FROM test_arduino.hello_sensor". + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "test_arduino"; //"test_arduino"; +char default_table[] = "hello_sensor"; //"test_arduino"; + +// Sample query +char INSERT_DATA[] = "INSERT INTO %s.%s (message, sensor_num, value) VALUES ('%s',%d,%s)"; + +char query[128]; +char temperature[10]; + +MySQL_Connection conn((Client *)&client); + +#if !( ESP32 || ESP8266 || defined(CORE_TEENSY) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || ( defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_MBED) ) ) + +char *dtostrf(double val, signed char width, unsigned char prec, char *sout) +{ + char fmt[20]; + sprintf(fmt, "%%%d.%df", width, prec); + sprintf(sout, fmt, val); + return sout; +} +#endif + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Complex_Insert_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Remember to initialize your WiFi module +#if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #if ( USING_WIFI_ESP8266_AT ) + MYSQL_DISPLAY("Using ESP8266_AT/ESP8266_AT_WebServer Library"); + #elif ( USING_WIFIESPAT_LIB ) + MYSQL_DISPLAY("Using WiFiEspAT Library"); + #endif + + // initialize serial for ESP module + EspSerial.begin(115200); + // initialize ESP module + WiFi.init(&EspSerial); + + MYSQL_DISPLAY(F("WiFi shield init done")); + + // check for the presence of the shield + if (WiFi.status() == WL_NO_SHIELD) + { + MYSQL_DISPLAY(F("WiFi shield not present")); + // don't continue + while (true); + } +#endif + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + // Save + dtostrf(50.125, 1, 1, temperature); + sprintf(query, INSERT_DATA, default_database, default_table, "test sensor", 24, temperature); + + // Execute the query + MYSQL_DISPLAY(query); + + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Complex Insert error"); + } + else + { + MYSQL_DISPLAY("Complex Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Insert_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Insert_WiFi/Credentials.h new file mode 100644 index 0000000..a311e60 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Insert_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Insert_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Insert_WiFi/defines.h new file mode 100644 index 0000000..ed63a72 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Insert_WiFi/defines.h @@ -0,0 +1,381 @@ +/**************************************************************************************************************************** + 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 DEBUG_ESP8266_AT_WEBSERVER_PORT Serial + +// Debug Level from 0 to 4 +#define _ESP_AT_LOGLEVEL_ 1 + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ! (ESP8266 || ESP32 ) + // Select only one of these libraries, only for boards other than ESP8266/ESP32 + #define USING_WIFI_ESP8266_AT false + #define USING_WIFININA_GENERIC false + #define USING_WIFININA false + #define USING_WIFIESPAT_LIB true + #define USING_WIFI_CUSTOM false +#endif + +#if defined(ARDUINO_SAMD_MKR1000) + #if defined(USE_WIFI_NINA) + #undef USE_WIFI_NINA + #endif + #define USE_WIFI_NINA false + #define USE_WIFI101 true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFI_USE_NRF528XX) + #undef WIFI_USE_NRF528XX + #endif + #define WIFI_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFI_USE_SAMD) + #undef WIFI_USE_SAMD + #endif + #define WIFI_USE_SAMD true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFI_USE_SAM_DUE) + #undef WIFI_USE_SAM_DUE + #endif + #define WIFI_USE_SAM_DUE true + #warning Use SAM_DUE architecture +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFI_USE_STM32) + #undef WIFI_USE_STM32 + #endif + #define WIFI_USE_STM32 true +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFI_USE_RP2040) + #undef WIFI_USE_RP2040 + #endif + #define WIFI_USE_RP2040 true +#endif + +#ifdef CORE_TEENSY + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For Teensy 4.1/4.0 + #define EspSerial Serial2 //Serial2, Pin RX2 : 7, TX2 : 8 + #endif + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" +#endif + +#elif defined(WIFI_USE_NRF528XX) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif defined(WIFI_USE_SAMD) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For SAMD + #define EspSerial Serial1 + #endif + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif defined(WIFI_USE_STM32) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For STM32 + #if defined(ARDUINO_NUCLEO_F767ZI) + #warning Nucleo-144 NUCLEO_F767ZI board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); + #elif defined(ARDUINO_NUCLEO_L053R8) + #warning Nucleo-64 NUCLEO_L053R8 board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); // (PA3, PA2); + #endif + + #warning EspSerial using SERIAL_PORT_HARDWARE, can be Serial or Serial1. See your board variant.h + #define EspSerial SERIAL_PORT_HARDWARE //Serial1 + #endif + + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif (ESP8266) + #warning ESP8266 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif (ESP32) + #warning ESP32 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif defined(WIFI_USE_RP2040) && !defined(ARDUINO_ARCH_MBED) + + // For RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + +#elif defined(WIFI_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + // For MBED RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#else + // For Mega + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #define BOARD_TYPE "AVR Mega" +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Select_WiFi/Complex_Select_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Select_WiFi/Complex_Select_WiFi.ino new file mode 100644 index 0000000..6f49ea7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Select_WiFi/Complex_Select_WiFi.ino @@ -0,0 +1,213 @@ +/********************************************************************************************************************************* + Complex_Select_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : complex select + + This example demonstrates how to issue a SELECT query with parameters that + we provide from code. Thus, it demonstrates how to build query parameters + dynamically. + + Notice also the sketch demonstrates how to read columns and rows from + the result set. Study this example until you are familiar with how to + do this before writing your own sketch to read and consume query results. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "world"; //"test_arduino"; +char default_table[] = "city"; //"test_arduino"; + +// Sample query +// +// Notice the "%lu" - that's a placeholder for the parameter we will +// supply. See sprintf() documentation for more formatting specifier +// options + +unsigned long QUERY_POPULATION = 800000; + +const char QUERY_POP[] = "SELECT name, population FROM world.city WHERE population < %lu ORDER BY population DESC LIMIT 6;"; + +char query[128]; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Complex_Select_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Remember to initialize your WiFi module +#if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #if ( USING_WIFI_ESP8266_AT ) + MYSQL_DISPLAY("Using ESP8266_AT/ESP8266_AT_WebServer Library"); + #elif ( USING_WIFIESPAT_LIB ) + MYSQL_DISPLAY("Using WiFiEspAT Library"); + #endif + + // initialize serial for ESP module + EspSerial.begin(115200); + // initialize ESP module + WiFi.init(&EspSerial); + + MYSQL_DISPLAY(F("WiFi shield init done")); + + // check for the presence of the shield + if (WiFi.status() == WL_NO_SHIELD) + { + MYSQL_DISPLAY(F("WiFi shield not present")); + // don't continue + while (true); + } +#endif + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runQuery() +{ + MYSQL_DISPLAY("===================================================="); + MYSQL_DISPLAY("> Running SELECT with dynamically supplied parameter"); + + // Supply the parameter for the query + // Here we use the QUERY_POP as the format string and query as the + // destination. This uses twice the memory so another option would be + // to allocate one buffer for all formatted queries or allocate the + // memory as needed (just make sure you allocate enough memory and + // free it when you're done!). + sprintf(query, QUERY_POP, QUERY_POPULATION + (( millis() % 100000 ) * 10) ); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Fetch the columns and print them + column_names *cols = query_mem.get_columns(); + + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(cols->fields[f]->name); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(","); + } + } + + MYSQL_DISPLAY(); + + // Read the rows and print them + row_values *row = NULL; + + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(row->values[f]); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(","); + } + } + + MYSQL_DISPLAY(); + } + } while (row != NULL); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(10000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Select_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Select_WiFi/Credentials.h new file mode 100644 index 0000000..a311e60 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Select_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Select_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Select_WiFi/defines.h new file mode 100644 index 0000000..ed63a72 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Complex_Select_WiFi/defines.h @@ -0,0 +1,381 @@ +/**************************************************************************************************************************** + 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 DEBUG_ESP8266_AT_WEBSERVER_PORT Serial + +// Debug Level from 0 to 4 +#define _ESP_AT_LOGLEVEL_ 1 + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ! (ESP8266 || ESP32 ) + // Select only one of these libraries, only for boards other than ESP8266/ESP32 + #define USING_WIFI_ESP8266_AT false + #define USING_WIFININA_GENERIC false + #define USING_WIFININA false + #define USING_WIFIESPAT_LIB true + #define USING_WIFI_CUSTOM false +#endif + +#if defined(ARDUINO_SAMD_MKR1000) + #if defined(USE_WIFI_NINA) + #undef USE_WIFI_NINA + #endif + #define USE_WIFI_NINA false + #define USE_WIFI101 true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFI_USE_NRF528XX) + #undef WIFI_USE_NRF528XX + #endif + #define WIFI_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFI_USE_SAMD) + #undef WIFI_USE_SAMD + #endif + #define WIFI_USE_SAMD true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFI_USE_SAM_DUE) + #undef WIFI_USE_SAM_DUE + #endif + #define WIFI_USE_SAM_DUE true + #warning Use SAM_DUE architecture +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFI_USE_STM32) + #undef WIFI_USE_STM32 + #endif + #define WIFI_USE_STM32 true +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFI_USE_RP2040) + #undef WIFI_USE_RP2040 + #endif + #define WIFI_USE_RP2040 true +#endif + +#ifdef CORE_TEENSY + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For Teensy 4.1/4.0 + #define EspSerial Serial2 //Serial2, Pin RX2 : 7, TX2 : 8 + #endif + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" +#endif + +#elif defined(WIFI_USE_NRF528XX) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif defined(WIFI_USE_SAMD) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For SAMD + #define EspSerial Serial1 + #endif + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif defined(WIFI_USE_STM32) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For STM32 + #if defined(ARDUINO_NUCLEO_F767ZI) + #warning Nucleo-144 NUCLEO_F767ZI board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); + #elif defined(ARDUINO_NUCLEO_L053R8) + #warning Nucleo-64 NUCLEO_L053R8 board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); // (PA3, PA2); + #endif + + #warning EspSerial using SERIAL_PORT_HARDWARE, can be Serial or Serial1. See your board variant.h + #define EspSerial SERIAL_PORT_HARDWARE //Serial1 + #endif + + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif (ESP8266) + #warning ESP8266 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif (ESP32) + #warning ESP32 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif defined(WIFI_USE_RP2040) && !defined(ARDUINO_ARCH_MBED) + + // For RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + +#elif defined(WIFI_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + // For MBED RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#else + // For Mega + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #define BOARD_TYPE "AVR Mega" +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Default_Database_WiFi/Connect_Default_Database_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Default_Database_WiFi/Connect_Default_Database_WiFi.ino new file mode 100644 index 0000000..0375809 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Default_Database_WiFi/Connect_Default_Database_WiFi.ino @@ -0,0 +1,132 @@ +/********************************************************************************************************************************* + Connect_Default_Database_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* +/* + MySQL Connector/Arduino Example : connect with default database + + This example demonstrates how to connect to a MySQL server and specifying + the default database when connecting. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "world"; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Connect_Default_Database_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Remember to initialize your WiFi module +#if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #if ( USING_WIFI_ESP8266_AT ) + MYSQL_DISPLAY("Using ESP8266_AT/ESP8266_AT_WebServer Library"); + #elif ( USING_WIFIESPAT_LIB ) + MYSQL_DISPLAY("Using WiFiEspAT Library"); + #endif + + // initialize serial for ESP module + EspSerial.begin(115200); + // initialize ESP module + WiFi.init(&EspSerial); + + MYSQL_DISPLAY(F("WiFi shield init done")); + + // check for the presence of the shield + if (WiFi.status() == WL_NO_SHIELD) + { + MYSQL_DISPLAY(F("WiFi shield not present")); + // don't continue + while (true); + } +#endif + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password, default_database)) + if (conn.connectNonBlocking(server, server_port, user, password, default_database) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Default_Database_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Default_Database_WiFi/Credentials.h new file mode 100644 index 0000000..a311e60 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Default_Database_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Default_Database_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Default_Database_WiFi/defines.h new file mode 100644 index 0000000..ed63a72 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Default_Database_WiFi/defines.h @@ -0,0 +1,381 @@ +/**************************************************************************************************************************** + 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 DEBUG_ESP8266_AT_WEBSERVER_PORT Serial + +// Debug Level from 0 to 4 +#define _ESP_AT_LOGLEVEL_ 1 + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ! (ESP8266 || ESP32 ) + // Select only one of these libraries, only for boards other than ESP8266/ESP32 + #define USING_WIFI_ESP8266_AT false + #define USING_WIFININA_GENERIC false + #define USING_WIFININA false + #define USING_WIFIESPAT_LIB true + #define USING_WIFI_CUSTOM false +#endif + +#if defined(ARDUINO_SAMD_MKR1000) + #if defined(USE_WIFI_NINA) + #undef USE_WIFI_NINA + #endif + #define USE_WIFI_NINA false + #define USE_WIFI101 true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFI_USE_NRF528XX) + #undef WIFI_USE_NRF528XX + #endif + #define WIFI_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFI_USE_SAMD) + #undef WIFI_USE_SAMD + #endif + #define WIFI_USE_SAMD true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFI_USE_SAM_DUE) + #undef WIFI_USE_SAM_DUE + #endif + #define WIFI_USE_SAM_DUE true + #warning Use SAM_DUE architecture +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFI_USE_STM32) + #undef WIFI_USE_STM32 + #endif + #define WIFI_USE_STM32 true +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFI_USE_RP2040) + #undef WIFI_USE_RP2040 + #endif + #define WIFI_USE_RP2040 true +#endif + +#ifdef CORE_TEENSY + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For Teensy 4.1/4.0 + #define EspSerial Serial2 //Serial2, Pin RX2 : 7, TX2 : 8 + #endif + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" +#endif + +#elif defined(WIFI_USE_NRF528XX) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif defined(WIFI_USE_SAMD) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For SAMD + #define EspSerial Serial1 + #endif + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif defined(WIFI_USE_STM32) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For STM32 + #if defined(ARDUINO_NUCLEO_F767ZI) + #warning Nucleo-144 NUCLEO_F767ZI board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); + #elif defined(ARDUINO_NUCLEO_L053R8) + #warning Nucleo-64 NUCLEO_L053R8 board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); // (PA3, PA2); + #endif + + #warning EspSerial using SERIAL_PORT_HARDWARE, can be Serial or Serial1. See your board variant.h + #define EspSerial SERIAL_PORT_HARDWARE //Serial1 + #endif + + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif (ESP8266) + #warning ESP8266 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif (ESP32) + #warning ESP32 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif defined(WIFI_USE_RP2040) && !defined(ARDUINO_ARCH_MBED) + + // For RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + +#elif defined(WIFI_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + // For MBED RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#else + // For Mega + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #define BOARD_TYPE "AVR Mega" +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Disconnect_WiFi/Connect_Disconnect_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Disconnect_WiFi/Connect_Disconnect_WiFi.ino new file mode 100644 index 0000000..637c21c --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Disconnect_WiFi/Connect_Disconnect_WiFi.ino @@ -0,0 +1,145 @@ +/********************************************************************************************************************************* + Connect_Disconnect_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect and disconnect (close) + + This example demonstrates how to use the connection to open at the start + of a loop, perform some query, then close the connection. Use this technique + for solutions that must sleep for a long period or otherwise require + additional processing or delays. The connect/close pair allow you to + control how long the connection is open and thus reduce the amount of + time a connection is held open. It also helps for lossy connections. + + This example demonstrates how to connect to a MySQL server and specifying + the default database when connecting. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +MySQL_Connection conn((Client *)&client); +MySQL_Query query = MySQL_Query(&conn); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Connect_Disconnect_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Remember to initialize your WiFi module +#if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #if ( USING_WIFI_ESP8266_AT ) + MYSQL_DISPLAY("Using ESP8266_AT/ESP8266_AT_WebServer Library"); + #elif ( USING_WIFIESPAT_LIB ) + MYSQL_DISPLAY("Using WiFiEspAT Library"); + #endif + + // initialize serial for ESP module + EspSerial.begin(115200); + // initialize ESP module + WiFi.init(&EspSerial); + + MYSQL_DISPLAY(F("WiFi shield init done")); + + // check for the presence of the shield + if (WiFi.status() == WL_NO_SHIELD) + { + MYSQL_DISPLAY(F("WiFi shield not present")); + // don't continue + while (true); + } +#endif + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); +} + +void runQuery() +{ + MYSQL_DISPLAY("Running a query: SELECT * FROM test_arduino.hello_arduino LIMIT 6;"); + + // Execute the query + // KH, check if valid before fetching + if ( !query.execute("SELECT * FROM test_arduino.hello_arduino LIMIT 6;") ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + query.show_results(); // show the results + query.close(); // close the query +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Disconnect_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Disconnect_WiFi/Credentials.h new file mode 100644 index 0000000..a311e60 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Disconnect_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Disconnect_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Disconnect_WiFi/defines.h new file mode 100644 index 0000000..ed63a72 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_Disconnect_WiFi/defines.h @@ -0,0 +1,381 @@ +/**************************************************************************************************************************** + 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 DEBUG_ESP8266_AT_WEBSERVER_PORT Serial + +// Debug Level from 0 to 4 +#define _ESP_AT_LOGLEVEL_ 1 + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ! (ESP8266 || ESP32 ) + // Select only one of these libraries, only for boards other than ESP8266/ESP32 + #define USING_WIFI_ESP8266_AT false + #define USING_WIFININA_GENERIC false + #define USING_WIFININA false + #define USING_WIFIESPAT_LIB true + #define USING_WIFI_CUSTOM false +#endif + +#if defined(ARDUINO_SAMD_MKR1000) + #if defined(USE_WIFI_NINA) + #undef USE_WIFI_NINA + #endif + #define USE_WIFI_NINA false + #define USE_WIFI101 true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFI_USE_NRF528XX) + #undef WIFI_USE_NRF528XX + #endif + #define WIFI_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFI_USE_SAMD) + #undef WIFI_USE_SAMD + #endif + #define WIFI_USE_SAMD true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFI_USE_SAM_DUE) + #undef WIFI_USE_SAM_DUE + #endif + #define WIFI_USE_SAM_DUE true + #warning Use SAM_DUE architecture +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFI_USE_STM32) + #undef WIFI_USE_STM32 + #endif + #define WIFI_USE_STM32 true +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFI_USE_RP2040) + #undef WIFI_USE_RP2040 + #endif + #define WIFI_USE_RP2040 true +#endif + +#ifdef CORE_TEENSY + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For Teensy 4.1/4.0 + #define EspSerial Serial2 //Serial2, Pin RX2 : 7, TX2 : 8 + #endif + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" +#endif + +#elif defined(WIFI_USE_NRF528XX) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif defined(WIFI_USE_SAMD) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For SAMD + #define EspSerial Serial1 + #endif + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif defined(WIFI_USE_STM32) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For STM32 + #if defined(ARDUINO_NUCLEO_F767ZI) + #warning Nucleo-144 NUCLEO_F767ZI board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); + #elif defined(ARDUINO_NUCLEO_L053R8) + #warning Nucleo-64 NUCLEO_L053R8 board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); // (PA3, PA2); + #endif + + #warning EspSerial using SERIAL_PORT_HARDWARE, can be Serial or Serial1. See your board variant.h + #define EspSerial SERIAL_PORT_HARDWARE //Serial1 + #endif + + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif (ESP8266) + #warning ESP8266 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif (ESP32) + #warning ESP32 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif defined(WIFI_USE_RP2040) && !defined(ARDUINO_ARCH_MBED) + + // For RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + +#elif defined(WIFI_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + // For MBED RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#else + // For Mega + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #define BOARD_TYPE "AVR Mega" +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_WiFi/Connect_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_WiFi/Connect_WiFi.ino new file mode 100644 index 0000000..1dc0972 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_WiFi/Connect_WiFi.ino @@ -0,0 +1,131 @@ +/********************************************************************************************************************************* + Connect_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect + + This example demonstrates how to connect to a MySQL server from an + Arduino using an Arduino-compatible Ethernet shield. Note that "compatible" + means it must conform to the Ethernet class library or be a derivative + with the same classes and methods. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Connect_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Remember to initialize your WiFi module +#if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #if ( USING_WIFI_ESP8266_AT ) + MYSQL_DISPLAY("Using ESP8266_AT/ESP8266_AT_WebServer Library"); + #elif ( USING_WIFIESPAT_LIB ) + MYSQL_DISPLAY("Using WiFiEspAT Library"); + #endif + + // initialize serial for ESP module + EspSerial.begin(115200); + // initialize ESP module + WiFi.init(&EspSerial); + + MYSQL_DISPLAY(F("WiFi shield init done")); + + // check for the presence of the shield + if (WiFi.status() == WL_NO_SHIELD) + { + MYSQL_DISPLAY(F("WiFi shield not present")); + // don't continue + while (true); + } +#endif + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_WiFi/Credentials.h new file mode 100644 index 0000000..a311e60 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_WiFi/defines.h new file mode 100644 index 0000000..ed63a72 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Connect_WiFi/defines.h @@ -0,0 +1,381 @@ +/**************************************************************************************************************************** + 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 DEBUG_ESP8266_AT_WEBSERVER_PORT Serial + +// Debug Level from 0 to 4 +#define _ESP_AT_LOGLEVEL_ 1 + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ! (ESP8266 || ESP32 ) + // Select only one of these libraries, only for boards other than ESP8266/ESP32 + #define USING_WIFI_ESP8266_AT false + #define USING_WIFININA_GENERIC false + #define USING_WIFININA false + #define USING_WIFIESPAT_LIB true + #define USING_WIFI_CUSTOM false +#endif + +#if defined(ARDUINO_SAMD_MKR1000) + #if defined(USE_WIFI_NINA) + #undef USE_WIFI_NINA + #endif + #define USE_WIFI_NINA false + #define USE_WIFI101 true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFI_USE_NRF528XX) + #undef WIFI_USE_NRF528XX + #endif + #define WIFI_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFI_USE_SAMD) + #undef WIFI_USE_SAMD + #endif + #define WIFI_USE_SAMD true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFI_USE_SAM_DUE) + #undef WIFI_USE_SAM_DUE + #endif + #define WIFI_USE_SAM_DUE true + #warning Use SAM_DUE architecture +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFI_USE_STM32) + #undef WIFI_USE_STM32 + #endif + #define WIFI_USE_STM32 true +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFI_USE_RP2040) + #undef WIFI_USE_RP2040 + #endif + #define WIFI_USE_RP2040 true +#endif + +#ifdef CORE_TEENSY + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For Teensy 4.1/4.0 + #define EspSerial Serial2 //Serial2, Pin RX2 : 7, TX2 : 8 + #endif + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" +#endif + +#elif defined(WIFI_USE_NRF528XX) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif defined(WIFI_USE_SAMD) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For SAMD + #define EspSerial Serial1 + #endif + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif defined(WIFI_USE_STM32) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For STM32 + #if defined(ARDUINO_NUCLEO_F767ZI) + #warning Nucleo-144 NUCLEO_F767ZI board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); + #elif defined(ARDUINO_NUCLEO_L053R8) + #warning Nucleo-64 NUCLEO_L053R8 board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); // (PA3, PA2); + #endif + + #warning EspSerial using SERIAL_PORT_HARDWARE, can be Serial or Serial1. See your board variant.h + #define EspSerial SERIAL_PORT_HARDWARE //Serial1 + #endif + + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif (ESP8266) + #warning ESP8266 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif (ESP32) + #warning ESP32 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif defined(WIFI_USE_RP2040) && !defined(ARDUINO_ARCH_MBED) + + // For RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + +#elif defined(WIFI_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + // For MBED RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#else + // For Mega + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #define BOARD_TYPE "AVR Mega" +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Progmem_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Progmem_WiFi/Credentials.h new file mode 100644 index 0000000..a311e60 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Progmem_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Progmem_WiFi/Query_Progmem_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Progmem_WiFi/Query_Progmem_WiFi.ino new file mode 100644 index 0000000..da01363 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Progmem_WiFi/Query_Progmem_WiFi.ino @@ -0,0 +1,160 @@ +/********************************************************************************************************************************* + Query_Progmem_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : query with PROGMEM strings + + This example demonstrates how to issue queries using strings stored in + PROGMEM. As you will see, you need only add a parameter to the execute() + method in the cursor class, const and PROGMEM to the string declaration + and add the #include directive. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#if ! (ESP32 || ESP8266) + #include +#endif + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +// Sample query +const char PROGMEM query[] = "SELECT * FROM test_arduino.hello_arduino LIMIT 6;"; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Query_Progmem_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Remember to initialize your WiFi module +#if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #if ( USING_WIFI_ESP8266_AT ) + MYSQL_DISPLAY("Using ESP8266_AT/ESP8266_AT_WebServer Library"); + #elif ( USING_WIFIESPAT_LIB ) + MYSQL_DISPLAY("Using WiFiEspAT Library"); + #endif + + // initialize serial for ESP module + EspSerial.begin(115200); + // initialize ESP module + WiFi.init(&EspSerial); + + MYSQL_DISPLAY(F("WiFi shield init done")); + + // check for the presence of the shield + if (WiFi.status() == WL_NO_SHIELD) + { + MYSQL_DISPLAY(F("WiFi shield not present")); + // don't continue + while (true); + } +#endif + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void runQuery() +{ + MYSQL_DISPLAY("\nRunning SELECT from PROGMEM and printing results\n"); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query with the PROGMEM option + // KH, check if valid before fetching + if ( !query_mem.execute(query, true) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Show the results + query_mem.show_results(); + // close the query + query_mem.close(); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Progmem_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Progmem_WiFi/defines.h new file mode 100644 index 0000000..ed63a72 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Progmem_WiFi/defines.h @@ -0,0 +1,381 @@ +/**************************************************************************************************************************** + 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 DEBUG_ESP8266_AT_WEBSERVER_PORT Serial + +// Debug Level from 0 to 4 +#define _ESP_AT_LOGLEVEL_ 1 + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ! (ESP8266 || ESP32 ) + // Select only one of these libraries, only for boards other than ESP8266/ESP32 + #define USING_WIFI_ESP8266_AT false + #define USING_WIFININA_GENERIC false + #define USING_WIFININA false + #define USING_WIFIESPAT_LIB true + #define USING_WIFI_CUSTOM false +#endif + +#if defined(ARDUINO_SAMD_MKR1000) + #if defined(USE_WIFI_NINA) + #undef USE_WIFI_NINA + #endif + #define USE_WIFI_NINA false + #define USE_WIFI101 true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFI_USE_NRF528XX) + #undef WIFI_USE_NRF528XX + #endif + #define WIFI_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFI_USE_SAMD) + #undef WIFI_USE_SAMD + #endif + #define WIFI_USE_SAMD true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFI_USE_SAM_DUE) + #undef WIFI_USE_SAM_DUE + #endif + #define WIFI_USE_SAM_DUE true + #warning Use SAM_DUE architecture +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFI_USE_STM32) + #undef WIFI_USE_STM32 + #endif + #define WIFI_USE_STM32 true +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFI_USE_RP2040) + #undef WIFI_USE_RP2040 + #endif + #define WIFI_USE_RP2040 true +#endif + +#ifdef CORE_TEENSY + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For Teensy 4.1/4.0 + #define EspSerial Serial2 //Serial2, Pin RX2 : 7, TX2 : 8 + #endif + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" +#endif + +#elif defined(WIFI_USE_NRF528XX) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif defined(WIFI_USE_SAMD) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For SAMD + #define EspSerial Serial1 + #endif + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif defined(WIFI_USE_STM32) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For STM32 + #if defined(ARDUINO_NUCLEO_F767ZI) + #warning Nucleo-144 NUCLEO_F767ZI board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); + #elif defined(ARDUINO_NUCLEO_L053R8) + #warning Nucleo-64 NUCLEO_L053R8 board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); // (PA3, PA2); + #endif + + #warning EspSerial using SERIAL_PORT_HARDWARE, can be Serial or Serial1. See your board variant.h + #define EspSerial SERIAL_PORT_HARDWARE //Serial1 + #endif + + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif (ESP8266) + #warning ESP8266 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif (ESP32) + #warning ESP32 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif defined(WIFI_USE_RP2040) && !defined(ARDUINO_ARCH_MBED) + + // For RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + +#elif defined(WIFI_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + // For MBED RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#else + // For Mega + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #define BOARD_TYPE "AVR Mega" +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Results_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Results_WiFi/Credentials.h new file mode 100644 index 0000000..a311e60 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Results_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Results_WiFi/Query_Results_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Results_WiFi/Query_Results_WiFi.ino new file mode 100644 index 0000000..4add7a5 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Results_WiFi/Query_Results_WiFi.ino @@ -0,0 +1,191 @@ +/********************************************************************************************************************************* + Query_Results_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : query results + + This example demonstrates how to issue a SELECT query and how to read columns + and rows from the result set. Study this example until you are familiar with how to + do this before writing your own sketch to read and consume query results. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +// Sample query +const char query[] = "SELECT * FROM world.city LIMIT 6"; +//const char query[] = "SELECT * FROM test_arduino.hello_arduino LIMIT 6;"; + +MySQL_Connection conn((Client *)&client); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Query_Results_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Remember to initialize your WiFi module +#if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #if ( USING_WIFI_ESP8266_AT ) + MYSQL_DISPLAY("Using ESP8266_AT/ESP8266_AT_WebServer Library"); + #elif ( USING_WIFIESPAT_LIB ) + MYSQL_DISPLAY("Using WiFiEspAT Library"); + #endif + + // initialize serial for ESP module + EspSerial.begin(115200); + // initialize ESP module + WiFi.init(&EspSerial); + + MYSQL_DISPLAY(F("WiFi shield init done")); + + // check for the presence of the shield + if (WiFi.status() == WL_NO_SHIELD) + { + MYSQL_DISPLAY(F("WiFi shield not present")); + // don't continue + while (true); + } +#endif + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void runQuery() +{ + MYSQL_DISPLAY("\nRunning SELECT and printing results"); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + ////// + + // Fetch the columns and print them + column_names *cols = query_mem.get_columns(); + + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(cols->fields[f]->name); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(", "); + } + } + + MYSQL_DISPLAY(); + + // Read the rows and print them + row_values *row = NULL; + + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(row->values[f]); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(", "); + } + } + + MYSQL_DISPLAY(); + } + } while (row != NULL); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Results_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Results_WiFi/defines.h new file mode 100644 index 0000000..ed63a72 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Query_Results_WiFi/defines.h @@ -0,0 +1,381 @@ +/**************************************************************************************************************************** + 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 DEBUG_ESP8266_AT_WEBSERVER_PORT Serial + +// Debug Level from 0 to 4 +#define _ESP_AT_LOGLEVEL_ 1 + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ! (ESP8266 || ESP32 ) + // Select only one of these libraries, only for boards other than ESP8266/ESP32 + #define USING_WIFI_ESP8266_AT false + #define USING_WIFININA_GENERIC false + #define USING_WIFININA false + #define USING_WIFIESPAT_LIB true + #define USING_WIFI_CUSTOM false +#endif + +#if defined(ARDUINO_SAMD_MKR1000) + #if defined(USE_WIFI_NINA) + #undef USE_WIFI_NINA + #endif + #define USE_WIFI_NINA false + #define USE_WIFI101 true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFI_USE_NRF528XX) + #undef WIFI_USE_NRF528XX + #endif + #define WIFI_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFI_USE_SAMD) + #undef WIFI_USE_SAMD + #endif + #define WIFI_USE_SAMD true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFI_USE_SAM_DUE) + #undef WIFI_USE_SAM_DUE + #endif + #define WIFI_USE_SAM_DUE true + #warning Use SAM_DUE architecture +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFI_USE_STM32) + #undef WIFI_USE_STM32 + #endif + #define WIFI_USE_STM32 true +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFI_USE_RP2040) + #undef WIFI_USE_RP2040 + #endif + #define WIFI_USE_RP2040 true +#endif + +#ifdef CORE_TEENSY + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For Teensy 4.1/4.0 + #define EspSerial Serial2 //Serial2, Pin RX2 : 7, TX2 : 8 + #endif + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" +#endif + +#elif defined(WIFI_USE_NRF528XX) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif defined(WIFI_USE_SAMD) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For SAMD + #define EspSerial Serial1 + #endif + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif defined(WIFI_USE_STM32) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For STM32 + #if defined(ARDUINO_NUCLEO_F767ZI) + #warning Nucleo-144 NUCLEO_F767ZI board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); + #elif defined(ARDUINO_NUCLEO_L053R8) + #warning Nucleo-64 NUCLEO_L053R8 board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); // (PA3, PA2); + #endif + + #warning EspSerial using SERIAL_PORT_HARDWARE, can be Serial or Serial1. See your board variant.h + #define EspSerial SERIAL_PORT_HARDWARE //Serial1 + #endif + + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif (ESP8266) + #warning ESP8266 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif (ESP32) + #warning ESP32 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif defined(WIFI_USE_RP2040) && !defined(ARDUINO_ARCH_MBED) + + // For RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + +#elif defined(WIFI_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + // For MBED RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#else + // For Mega + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #define BOARD_TYPE "AVR Mega" +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Reboot_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Reboot_WiFi/Credentials.h new file mode 100644 index 0000000..a311e60 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Reboot_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Reboot_WiFi/Reboot_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Reboot_WiFi/Reboot_WiFi.ino new file mode 100644 index 0000000..cf8cae7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Reboot_WiFi/Reboot_WiFi.ino @@ -0,0 +1,217 @@ +/********************************************************************************************************************************* + Reboot_WiFi.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : reboot if connection lost + + This example demonstrates how to reboot an Arduino if connection to the + server is lost for a period of time. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + To test the reboot, unplug your Ethernet cable once you see "disconnected" + then wait for the timeout. Once the Arduino reboots, plug the cable in again + and you should see the query processing resume. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +MySQL_Connection conn((Client *)&client); +MySQL_Query query = MySQL_Query(&conn); + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Reboot_WiFi on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // Remember to initialize your WiFi module +#if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #if ( USING_WIFI_ESP8266_AT ) + MYSQL_DISPLAY("Using ESP8266_AT/ESP8266_AT_WebServer Library"); + #elif ( USING_WIFIESPAT_LIB ) + MYSQL_DISPLAY("Using WiFiEspAT Library"); + #endif + + // initialize serial for ESP module + EspSerial.begin(115200); + // initialize ESP module + WiFi.init(&EspSerial); + + MYSQL_DISPLAY(F("WiFi shield init done")); + + // check for the presence of the shield + if (WiFi.status() == WL_NO_SHIELD) + { + MYSQL_DISPLAY(F("WiFi shield not present")); + // don't continue + while (true); + } +#endif + + // Begin WiFi section + MYSQL_DISPLAY1("Connecting to", ssid); + + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) + { + delay(500); + MYSQL_DISPLAY0("."); + } + + // print out info about the connection: + MYSQL_DISPLAY1("Connected to network. My IP address is:", WiFi.localIP()); +} + +// Begin reboot code +int num_fails; // variable for number of failure attempts +#define MAX_FAILED_CONNECTS 5 // maximum number of failed connects to MySQL + +void soft_reset() +{ +#if WIFI_USE_SAMD + #if ( defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) || defined(__SAMD51G19A__) ) + // For SAMD51 + // see Table 17-5 Timeout Period (valid values 0-11) + WDT->CONFIG.reg = 5; + WDT->CTRLA.reg = WDT_CTRLA_ENABLE; + // To check if OK or bit.ENABLE/CLEAR + while (WDT->SYNCBUSY.bit.WEN == 1); + + // use the WDT watchdog timer to force a system reset. + WDT->CLEAR.reg = 0x00; + // To check if OK or bit.ENABLE/CLEAR + while (WDT->SYNCBUSY.bit.WEN == 1); + #else + // For SAMD21, etc + // see Table 17-5 Timeout Period (valid values 0-11) + WDT->CONFIG.reg = 5; + WDT->CTRL.reg = WDT_CTRL_ENABLE; + while (WDT->STATUS.bit.SYNCBUSY == 1); + + // use the WDT watchdog timer to force a system reset. + WDT->CLEAR.reg = 0x00; + while (WDT->STATUS.bit.SYNCBUSY == 1); + #endif +#elif WIFI_USE_NRF528XX + //delay(1000); + // Restart for nRF52 + NVIC_SystemReset(); +#elif WIFI_USE_SAMDUE + void(*resetFunc)() = 0; + resetFunc(); +#elif WIFI_USE_STM32 + void(*resetFunc)() = 0; + resetFunc(); + +#elif WIFI_USE_TEENSY + #if defined(__IMXRT1062__) + // Teensy 4.1/4.0 + SCB_AIRCR = 0x05FA0004; //write value for restart for Teensy + #else + void(*resetFunc)() = 0; + resetFunc(); + #endif + +#elif ( defined(WIFI_USE_RP2040) && defined(ARDUINO_ARCH_MBED) ) + + NVIC_SystemReset(); + +#endif +} + +// End reboot code + +void loop() +{ + if (conn.connected()) + { + MYSQL_DISPLAY("Running a query: SHOW DATABASES"); + + // Execute the query + + // KH, check if valid before fetching + if ( !query.execute("SHOW DATABASES") ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + ////// + + query.show_results(); // show the results + query.close(); // close the cursor + conn.close(); // close the connection + num_fails = 0; // reset failures + + delay(10000); + } + else + { + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + } + else + { + num_fails++; + MYSQL_DISPLAY("Connect failed!"); + + if (num_fails == MAX_FAILED_CONNECTS) + { + MYSQL_DISPLAY("Ok, that's it. I'm outta here. Rebooting..."); + delay(2000); + // Here we tell the Arduino to reboot by redirecting the instruction + // pointer to the "top" or position 0. This is a soft reset and may + // not solve all hardware-related lockups. + soft_reset(); + } + } + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("=========================================="); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Reboot_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Reboot_WiFi/defines.h new file mode 100644 index 0000000..ed63a72 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/Reboot_WiFi/defines.h @@ -0,0 +1,381 @@ +/**************************************************************************************************************************** + 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 DEBUG_ESP8266_AT_WEBSERVER_PORT Serial + +// Debug Level from 0 to 4 +#define _ESP_AT_LOGLEVEL_ 1 + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ! (ESP8266 || ESP32 ) + // Select only one of these libraries, only for boards other than ESP8266/ESP32 + #define USING_WIFI_ESP8266_AT false + #define USING_WIFININA_GENERIC false + #define USING_WIFININA false + #define USING_WIFIESPAT_LIB true + #define USING_WIFI_CUSTOM false +#endif + +#if defined(ARDUINO_SAMD_MKR1000) + #if defined(USE_WIFI_NINA) + #undef USE_WIFI_NINA + #endif + #define USE_WIFI_NINA false + #define USE_WIFI101 true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFI_USE_NRF528XX) + #undef WIFI_USE_NRF528XX + #endif + #define WIFI_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFI_USE_SAMD) + #undef WIFI_USE_SAMD + #endif + #define WIFI_USE_SAMD true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFI_USE_SAM_DUE) + #undef WIFI_USE_SAM_DUE + #endif + #define WIFI_USE_SAM_DUE true + #warning Use SAM_DUE architecture +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFI_USE_STM32) + #undef WIFI_USE_STM32 + #endif + #define WIFI_USE_STM32 true +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFI_USE_RP2040) + #undef WIFI_USE_RP2040 + #endif + #define WIFI_USE_RP2040 true +#endif + +#ifdef CORE_TEENSY + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For Teensy 4.1/4.0 + #define EspSerial Serial2 //Serial2, Pin RX2 : 7, TX2 : 8 + #endif + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" +#endif + +#elif defined(WIFI_USE_NRF528XX) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif defined(WIFI_USE_SAMD) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For SAMD + #define EspSerial Serial1 + #endif + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif defined(WIFI_USE_STM32) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For STM32 + #if defined(ARDUINO_NUCLEO_F767ZI) + #warning Nucleo-144 NUCLEO_F767ZI board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); + #elif defined(ARDUINO_NUCLEO_L053R8) + #warning Nucleo-64 NUCLEO_L053R8 board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); // (PA3, PA2); + #endif + + #warning EspSerial using SERIAL_PORT_HARDWARE, can be Serial or Serial1. See your board variant.h + #define EspSerial SERIAL_PORT_HARDWARE //Serial1 + #endif + + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif (ESP8266) + #warning ESP8266 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif (ESP32) + #warning ESP32 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif defined(WIFI_USE_RP2040) && !defined(ARDUINO_ARCH_MBED) + + // For RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + +#elif defined(WIFI_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + // For MBED RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#else + // For Mega + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #define BOARD_TYPE "AVR Mega" +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/Credentials.h new file mode 100644 index 0000000..a311e60 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/defines.h new file mode 100644 index 0000000..ed63a72 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/defines.h @@ -0,0 +1,381 @@ +/**************************************************************************************************************************** + 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 DEBUG_ESP8266_AT_WEBSERVER_PORT Serial + +// Debug Level from 0 to 4 +#define _ESP_AT_LOGLEVEL_ 1 + +#define MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ! (ESP8266 || ESP32 ) + // Select only one of these libraries, only for boards other than ESP8266/ESP32 + #define USING_WIFI_ESP8266_AT false + #define USING_WIFININA_GENERIC false + #define USING_WIFININA false + #define USING_WIFIESPAT_LIB true + #define USING_WIFI_CUSTOM false +#endif + +#if defined(ARDUINO_SAMD_MKR1000) + #if defined(USE_WIFI_NINA) + #undef USE_WIFI_NINA + #endif + #define USE_WIFI_NINA false + #define USE_WIFI101 true +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFI_USE_NRF528XX) + #undef WIFI_USE_NRF528XX + #endif + #define WIFI_USE_NRF528XX true +#endif + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFI_USE_SAMD) + #undef WIFI_USE_SAMD + #endif + #define WIFI_USE_SAMD true +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFI_USE_SAM_DUE) + #undef WIFI_USE_SAM_DUE + #endif + #define WIFI_USE_SAM_DUE true + #warning Use SAM_DUE architecture +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFI_USE_STM32) + #undef WIFI_USE_STM32 + #endif + #define WIFI_USE_STM32 true +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFI_USE_RP2040) + #undef WIFI_USE_RP2040 + #endif + #define WIFI_USE_RP2040 true +#endif + +#ifdef CORE_TEENSY + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For Teensy 4.1/4.0 + #define EspSerial Serial2 //Serial2, Pin RX2 : 7, TX2 : 8 + #endif + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" +#endif + +#elif defined(WIFI_USE_NRF528XX) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#elif defined(WIFI_USE_SAMD) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For SAMD + #define EspSerial Serial1 + #endif + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#elif defined(WIFI_USE_STM32) + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + // For STM32 + #if defined(ARDUINO_NUCLEO_F767ZI) + #warning Nucleo-144 NUCLEO_F767ZI board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); + #elif defined(ARDUINO_NUCLEO_L053R8) + #warning Nucleo-64 NUCLEO_L053R8 board selected, using HardwareSerial Serial1 @ pin D0/RX and D1/TX + // RX TX + HardwareSerial Serial1(D0, D1); // (PA3, PA2); + #endif + + #warning EspSerial using SERIAL_PORT_HARDWARE, can be Serial or Serial1. See your board variant.h + #define EspSerial SERIAL_PORT_HARDWARE //Serial1 + #endif + + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#elif (ESP8266) + #warning ESP8266 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif (ESP32) + #warning ESP32 board selected + #define BOARD_TYPE ARDUINO_BOARD + +#elif defined(WIFI_USE_RP2040) && !defined(ARDUINO_ARCH_MBED) + + // For RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + +#elif defined(WIFI_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + // For MBED RP2040 + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#else + // For Mega + #if ( USING_WIFI_ESP8266_AT || USING_WIFIESPAT_LIB ) + #define EspSerial Serial1 + #endif + + #define BOARD_TYPE "AVR Mega" +#endif + +#ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE +#endif + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/multiFileProject.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/multiFileProject.cpp new file mode 100644 index 0000000..e1f0fe7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/multiFileProject.cpp @@ -0,0 +1,17 @@ +/**************************************************************************************************************************** + multiFileProject.cpp + 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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#include "multiFileProject.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/multiFileProject.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/multiFileProject.h new file mode 100644 index 0000000..5811a68 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/multiFileProject.h @@ -0,0 +1,20 @@ +/**************************************************************************************************************************** + multiFileProject.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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#pragma once + +// Can be included as many times as necessary, without `Multiple Definitions` Linker Error +#include "MySQL_Generic.hpp" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/multiFileProject_WiFi.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/multiFileProject_WiFi.ino new file mode 100644 index 0000000..31c1064 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFi/multiFileProject_WiFi/multiFileProject_WiFi.ino @@ -0,0 +1,48 @@ +/**************************************************************************************************************************** + multiFileProject_WiFi.ino + 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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#include "defines.h" +#include "Credentials.h" + +#define MYSQL_MARIADB_GENERIC_VERSION_MIN_TARGET "MySQL_MariaDB_Generic v1.7.0" +#define MYSQL_MARIADB_GENERIC_VERSION_MIN 1007000 + +#include "multiFileProject.h" + +// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error +#include "MySQL_Generic.h" + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + Serial.println("\nStart multiFileProject_WiFi"); + Serial.println(MYSQL_MARIADB_GENERIC_VERSION); + +#if defined(MYSQL_MARIADB_GENERIC_VERSION_MIN) + if (MYSQL_MARIADB_GENERIC_VERSION_INT < MYSQL_MARIADB_GENERIC_VERSION_MIN) + { + Serial.print("Warning. Must use this example on Version equal or later than : "); + Serial.println(MYSQL_MARIADB_GENERIC_VERSION_MIN_TARGET); + } +#endif +} + +void loop() +{ + // put your main code here, to run repeatedly: +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Insert_WiFiNINA/Basic_Insert_WiFiNINA.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Insert_WiFiNINA/Basic_Insert_WiFiNINA.ino new file mode 100644 index 0000000..e387865 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Insert_WiFiNINA/Basic_Insert_WiFiNINA.ino @@ -0,0 +1,184 @@ +/********************************************************************************************************************************* + Basic_Insert_WiFiNINA.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : basic insert + + This example demonstrates how to issue an INSERT query to store data in a + table. For this, we will create a special database and table for testing. + The following are the SQL commands you will need to run in order to setup + your database for running this sketch. + + CREATE DATABASE test_arduino; + CREATE TABLE test_arduino.hello_arduino ( + num integer primary key auto_increment, + message char(40), + recorded timestamp + ); + + Here we see one database and a table with three fields; a primary key that + is an auto_increment, a string, and a timestamp. This will demonstrate how + to save a date and time of when the row was inserted, which can help you + determine when data was recorded or updated. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Create the database and table as shown above. + 2) Change the address of the server to the IP address of the MySQL server + 3) Change the user and password to a valid MySQL user and password + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + 8) After the sketch has run for some time, open a mysql client and issue + the command: "SELECT * FROM test_arduino.hello_arduino" to see the data + recorded. Note the field values and how the database handles both the + auto_increment and timestamp fields for us. You can clear the data with + "DELETE FROM test_arduino.hello_arduino". + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "test_arduino"; //"test_arduino"; +char default_table[] = "hello_arduino"; //"test_arduino"; + +String default_value = "Hello, Arduino!"; + +// Sample query +String INSERT_SQL = String("INSERT INTO ") + default_database + "." + default_table + + " (message) VALUES ('" + default_value + "')"; + +MySQL_Connection conn((Client *)&client); + +int status = WL_IDLE_STATUS; + +void printWifiStatus() +{ + // print the SSID and IP address of the network you're attached to: + MYSQL_DISPLAY3("SSID:", WiFi.SSID(), "IP Address:", WiFi.localIP()); + + // print the received signal strength: + MYSQL_DISPLAY2("Signal strength (RSSI):", WiFi.RSSI(), "dBm"); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Basic_Insert_WiFiNINA on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // check for the WiFi module: + if (WiFi.status() == WL_NO_MODULE) + { + MYSQL_DISPLAY("Communication with WiFi module failed!"); + // don't continue + while (true); + } + + String fv = WiFi.firmwareVersion(); + + if (fv < WIFI_FIRMWARE_LATEST_VERSION) + { + MYSQL_DISPLAY("Please upgrade the firmware"); + } + + // attempt to connect to Wifi network: + while (status != WL_CONNECTED) + { + MYSQL_DISPLAY1("Attempting to connect to SSID:", ssid); + // Connect to WPA/WPA2 network. Change this line if using open or WEP network: + status = WiFi.begin(ssid, pass); + + // wait 10 seconds for connection: + //delay(10000); + } + + printWifiStatus(); + + // End WiFi section + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + MYSQL_DISPLAY(INSERT_SQL); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(INSERT_SQL.c_str()) ) + { + MYSQL_DISPLAY("Insert error"); + } + else + { + MYSQL_DISPLAY("Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Insert_WiFiNINA/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Insert_WiFiNINA/Credentials.h new file mode 100644 index 0000000..c8f6b7a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Insert_WiFiNINA/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Insert_WiFiNINA/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Insert_WiFiNINA/defines.h new file mode 100644 index 0000000..2f6ab02 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Insert_WiFiNINA/defines.h @@ -0,0 +1,356 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFININA_USE_SAMD) + #undef WIFININA_USE_SAMD + #endif + #define WIFININA_USE_SAMD true +#endif + +#if defined(WIFININA_USE_SAMD) + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFININA_USE_NRF52) + #undef WIFININA_USE_NRF52 + #endif + #define WIFININA_USE_NRF52 true +#endif + +#if defined(WIFININA_USE_NRF52) + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFININA_USE_SAMDUE) + #undef WIFININA_USE_SAMDUE + #endif + #define WIFININA_USE_SAMDUE true +#endif + +#if defined(WIFININA_USE_SAMDUE) + + // For SAM DUE + #if defined(ARDUINO_SAM_DUE) + #define BOARD_TYPE "SAM DUE" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM SAM3X8E" + #else + #define BOARD_TYPE "SAM Unknown" + #endif + +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFININA_USE_STM32) + #undef WIFININA_USE_STM32 + #endif + #define WIFININA_USE_STM32 true +#endif + +#if defined(WIFININA_USE_STM32) + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#endif + +#ifdef CORE_TEENSY + + #if defined(WIFININA_USE_TEENSY) + #undef WIFININA_USE_TEENSY + #endif + #define WIFININA_USE_TEENSY true + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#endif + +#if ( defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA) ) + #if defined(ARDUINO_AVR_MEGA2560) + #define BOARD_TYPE "AVR Mega 2560" + #elif defined(ARDUINO_AVR_MEGA) + #define BOARD_TYPE "AVR Mega" + #endif +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFININA_USE_RP2040) + #undef WIFININA_USE_RP2040 + #undef WIFI_USE_RP2040 + #endif + #define WIFININA_USE_RP2040 true + #define WIFI_USE_RP2040 true +#endif + + +#if defined(WIFININA_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#endif + +#ifndef BOARD_TYPE + #define BOARD_TYPE "Unknown Board" +#endif + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#define DEBUG_WIFININA_PORT Serial +// Debug Level from 0 to 4 +#define _WIFININA_LOGLEVEL_ 1 + +#define USING_WIFININA_GENERIC true +#define USING_WIFININA false + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Select_WiFiNINA/Basic_Select_WiFiNINA.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Select_WiFiNINA/Basic_Select_WiFiNINA.ino new file mode 100644 index 0000000..9f05113 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Select_WiFiNINA/Basic_Select_WiFiNINA.ino @@ -0,0 +1,219 @@ +/********************************************************************************************************************************* + Basic_Select_WiFiNINA.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : basic select + + This example demonstrates how to issue a SELECT query with no parameters + and use the data returned. For this, we use the Cursor class to execute + the query and get the results. + + It demonstrates who methods for running queries. The first allows you to + allocate memory for the cursor and later reclaim it, the second shows how + to use a single instance of the cursor use throughout a sketch. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + CAUTION: Don't mix and match the examples. Use one or the other in your + own sketch -- you'll get compilation errors at the least. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "world"; //"test_arduino"; +char default_table[] = "city"; //"test_arduino"; + +String default_column = "population"; +String default_value = "Toronto"; + +// Sample query +String query = String("SELECT ") + default_column + " FROM " + default_database + "." + default_table + + " WHERE name = '" + default_value + "'"; + +MySQL_Connection conn((Client *)&client); +// Create an instance of the cursor passing in the connection +MySQL_Query sql_query = MySQL_Query(&conn); + +int status = WL_IDLE_STATUS; + +void printWifiStatus() +{ + // print the SSID and IP address of the network you're attached to: + MYSQL_DISPLAY3("SSID:", WiFi.SSID(), "IP Address:", WiFi.localIP()); + + // print the received signal strength: + MYSQL_DISPLAY2("Signal strength (RSSI):", WiFi.RSSI(), "dBm"); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Basic_Select_WiFiNINA on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // check for the WiFi module: + if (WiFi.status() == WL_NO_MODULE) + { + MYSQL_DISPLAY("Communication with WiFi module failed!"); + // don't continue + while (true); + } + + String fv = WiFi.firmwareVersion(); + + if (fv < WIFI_FIRMWARE_LATEST_VERSION) + { + MYSQL_DISPLAY("Please upgrade the firmware"); + } + + // attempt to connect to Wifi network: + while (status != WL_CONNECTED) + { + MYSQL_DISPLAY1("Attempting to connect to SSID:", ssid); + // Connect to WPA/WPA2 network. Change this line if using open or WEP network: + status = WiFi.begin(ssid, pass); + + // wait 10 seconds for connection: + //delay(10000); + } + + printWifiStatus(); + + // End WiFi section + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runQuery() +{ + row_values *row = NULL; + long head_count = 0; + + MYSQL_DISPLAY("1) Demonstrating using a dynamically allocated query."); + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + MYSQL_DISPLAY(query); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(query.c_str()) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Fetch the columns (required) but we don't use them. + //column_names *columns = query_mem.get_columns(); + query_mem.get_columns(); + + // Read the row (we are only expecting the one) + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + head_count = atol(row->values[0]); + } + } while (row != NULL); + + // Show the result + MYSQL_DISPLAY1(" Toronto pop =", head_count); + + delay(500); + + MYSQL_DISPLAY("2) Demonstrating using a local, global query."); + + // Execute the query + MYSQL_DISPLAY(query); + sql_query.execute(query.c_str()); + + // Fetch the columns (required) but we don't use them. + sql_query.get_columns(); + + // Read the row (we are only expecting the one) + do + { + row = sql_query.get_next_row(); + if (row != NULL) + { + head_count = atol(row->values[0]); + } + } while (row != NULL); + + // Now we close the cursor to free any memory + sql_query.close(); + + // Show the result but this time do some math on it + MYSQL_DISPLAY1(" Toronto pop =", head_count); + MYSQL_DISPLAY1(" Toronto pop increased by 11725 =", head_count + 11725); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Select_WiFiNINA/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Select_WiFiNINA/Credentials.h new file mode 100644 index 0000000..c8f6b7a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Select_WiFiNINA/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Select_WiFiNINA/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Select_WiFiNINA/defines.h new file mode 100644 index 0000000..2f6ab02 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Basic_Select_WiFiNINA/defines.h @@ -0,0 +1,356 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFININA_USE_SAMD) + #undef WIFININA_USE_SAMD + #endif + #define WIFININA_USE_SAMD true +#endif + +#if defined(WIFININA_USE_SAMD) + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFININA_USE_NRF52) + #undef WIFININA_USE_NRF52 + #endif + #define WIFININA_USE_NRF52 true +#endif + +#if defined(WIFININA_USE_NRF52) + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFININA_USE_SAMDUE) + #undef WIFININA_USE_SAMDUE + #endif + #define WIFININA_USE_SAMDUE true +#endif + +#if defined(WIFININA_USE_SAMDUE) + + // For SAM DUE + #if defined(ARDUINO_SAM_DUE) + #define BOARD_TYPE "SAM DUE" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM SAM3X8E" + #else + #define BOARD_TYPE "SAM Unknown" + #endif + +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFININA_USE_STM32) + #undef WIFININA_USE_STM32 + #endif + #define WIFININA_USE_STM32 true +#endif + +#if defined(WIFININA_USE_STM32) + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#endif + +#ifdef CORE_TEENSY + + #if defined(WIFININA_USE_TEENSY) + #undef WIFININA_USE_TEENSY + #endif + #define WIFININA_USE_TEENSY true + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#endif + +#if ( defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA) ) + #if defined(ARDUINO_AVR_MEGA2560) + #define BOARD_TYPE "AVR Mega 2560" + #elif defined(ARDUINO_AVR_MEGA) + #define BOARD_TYPE "AVR Mega" + #endif +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFININA_USE_RP2040) + #undef WIFININA_USE_RP2040 + #undef WIFI_USE_RP2040 + #endif + #define WIFININA_USE_RP2040 true + #define WIFI_USE_RP2040 true +#endif + + +#if defined(WIFININA_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#endif + +#ifndef BOARD_TYPE + #define BOARD_TYPE "Unknown Board" +#endif + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#define DEBUG_WIFININA_PORT Serial +// Debug Level from 0 to 4 +#define _WIFININA_LOGLEVEL_ 1 + +#define USING_WIFININA_GENERIC true +#define USING_WIFININA false + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Insert_WiFiNINA/Complex_Insert_WiFiNINA.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Insert_WiFiNINA/Complex_Insert_WiFiNINA.ino new file mode 100644 index 0000000..06c26d1 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Insert_WiFiNINA/Complex_Insert_WiFiNINA.ino @@ -0,0 +1,209 @@ +/********************************************************************************************************************************* + Complex_Insert_WiFiNINA.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : complex insert + + This example demonstrates how to issue an INSERT query to store data in a + table using data from variables in our sketch. In this case, we supply the + values dynamically. + + This sketch simulates storing data from a sensor in a table. + + For this, we will create a special database and table for testing. + The following are the SQL commands you will need to run in order to setup + your database for running this sketch. + + CREATE DATABASE test_arduino; + CREATE TABLE test_arduino.hello_sensor ( + num integer primary key auto_increment, + message char(40), + sensor_num integer, + value float, + recorded timestamp + ); + + Here we have a table that contains an auto_increment primary key, a text + field, a field to identify the sensor, the value read, and timestamp of + the recorded data. + + Note: Since this sketch uses test data, we place the INSERT in the setup() + method so that it runs only once. Typically, you would have the + INSERT in the loop() method after your code to read from the sensor. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Create the database and table as shown above. + 2) Change the address of the server to the IP address of the MySQL server + 3) Change the user and password to a valid MySQL user and password + 4) Connect a USB cable to your Arduino + 5) Select the correct board and port + 6) Compile and upload the sketch to your Arduino + 7) Once uploaded, open Serial Monitor (use 115200 speed) and observe + 8) After the sketch has run for some time, open a mysql client and issue + the command: "SELECT * FROM test_arduino.hello_sensor" to see the data + recorded. Note the field values and how the database handles both the + auto_increment and timestamp fields for us. You can clear the data with + "DELETE FROM test_arduino.hello_sensor". + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "test_arduino"; //"test_arduino"; +char default_table[] = "hello_sensor"; //"test_arduino"; + +// Sample query +char INSERT_DATA[] = "INSERT INTO %s.%s (message, sensor_num, value) VALUES ('%s',%d,%s)"; + +char query[128]; +char temperature[10]; + +MySQL_Connection conn((Client *)&client); + +int status = WL_IDLE_STATUS; + +#if !( ESP32 || ESP8266 || defined(CORE_TEENSY) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || ( defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_MBED) ) ) + +char *dtostrf(double val, signed char width, unsigned char prec, char *sout) +{ + char fmt[20]; + sprintf(fmt, "%%%d.%df", width, prec); + sprintf(sout, fmt, val); + return sout; +} +#endif + +void printWifiStatus() +{ + // print the SSID and IP address of the network you're attached to: + MYSQL_DISPLAY3("SSID:", WiFi.SSID(), "IP Address:", WiFi.localIP()); + + // print the received signal strength: + MYSQL_DISPLAY2("Signal strength (RSSI):", WiFi.RSSI(), "dBm"); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Complex_Insert_WiFiNINA on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // check for the WiFi module: + if (WiFi.status() == WL_NO_MODULE) + { + MYSQL_DISPLAY("Communication with WiFi module failed!"); + // don't continue + while (true); + } + + String fv = WiFi.firmwareVersion(); + + if (fv < WIFI_FIRMWARE_LATEST_VERSION) + { + MYSQL_DISPLAY("Please upgrade the firmware"); + } + + // attempt to connect to Wifi network: + while (status != WL_CONNECTED) + { + MYSQL_DISPLAY1("Attempting to connect to SSID:", ssid); + // Connect to WPA/WPA2 network. Change this line if using open or WEP network: + status = WiFi.begin(ssid, pass); + + // wait 10 seconds for connection: + //delay(10000); + } + + printWifiStatus(); + + // End WiFi section + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runInsert() +{ + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + if (conn.connected()) + { + // Save + dtostrf(50.125, 1, 1, temperature); + sprintf(query, INSERT_DATA, default_database, default_table, "test sensor", 24, temperature); + + // Execute the query + MYSQL_DISPLAY(query); + + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Complex Insert error"); + } + else + { + MYSQL_DISPLAY("Complex Data Inserted."); + } + } + else + { + MYSQL_DISPLAY("Disconnected from Server. Can't insert."); + } +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runInsert(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Insert_WiFiNINA/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Insert_WiFiNINA/Credentials.h new file mode 100644 index 0000000..c8f6b7a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Insert_WiFiNINA/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Insert_WiFiNINA/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Insert_WiFiNINA/defines.h new file mode 100644 index 0000000..2f6ab02 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Insert_WiFiNINA/defines.h @@ -0,0 +1,356 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFININA_USE_SAMD) + #undef WIFININA_USE_SAMD + #endif + #define WIFININA_USE_SAMD true +#endif + +#if defined(WIFININA_USE_SAMD) + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFININA_USE_NRF52) + #undef WIFININA_USE_NRF52 + #endif + #define WIFININA_USE_NRF52 true +#endif + +#if defined(WIFININA_USE_NRF52) + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFININA_USE_SAMDUE) + #undef WIFININA_USE_SAMDUE + #endif + #define WIFININA_USE_SAMDUE true +#endif + +#if defined(WIFININA_USE_SAMDUE) + + // For SAM DUE + #if defined(ARDUINO_SAM_DUE) + #define BOARD_TYPE "SAM DUE" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM SAM3X8E" + #else + #define BOARD_TYPE "SAM Unknown" + #endif + +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFININA_USE_STM32) + #undef WIFININA_USE_STM32 + #endif + #define WIFININA_USE_STM32 true +#endif + +#if defined(WIFININA_USE_STM32) + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#endif + +#ifdef CORE_TEENSY + + #if defined(WIFININA_USE_TEENSY) + #undef WIFININA_USE_TEENSY + #endif + #define WIFININA_USE_TEENSY true + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#endif + +#if ( defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA) ) + #if defined(ARDUINO_AVR_MEGA2560) + #define BOARD_TYPE "AVR Mega 2560" + #elif defined(ARDUINO_AVR_MEGA) + #define BOARD_TYPE "AVR Mega" + #endif +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFININA_USE_RP2040) + #undef WIFININA_USE_RP2040 + #undef WIFI_USE_RP2040 + #endif + #define WIFININA_USE_RP2040 true + #define WIFI_USE_RP2040 true +#endif + + +#if defined(WIFININA_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#endif + +#ifndef BOARD_TYPE + #define BOARD_TYPE "Unknown Board" +#endif + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#define DEBUG_WIFININA_PORT Serial +// Debug Level from 0 to 4 +#define _WIFININA_LOGLEVEL_ 1 + +#define USING_WIFININA_GENERIC true +#define USING_WIFININA false + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Select_WiFiNINA/Complex_Select_WiFiNINA.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Select_WiFiNINA/Complex_Select_WiFiNINA.ino new file mode 100644 index 0000000..73b881a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Select_WiFiNINA/Complex_Select_WiFiNINA.ino @@ -0,0 +1,215 @@ +/********************************************************************************************************************************* + Complex_Select_WiFiNINA.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : complex select + + This example demonstrates how to issue a SELECT query with parameters that + we provide from code. Thus, it demonstrates how to build query parameters + dynamically. + + Notice also the sketch demonstrates how to read columns and rows from + the result set. Study this example until you are familiar with how to + do this before writing your own sketch to read and consume query results. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "world"; //"test_arduino"; +char default_table[] = "city"; //"test_arduino"; + +// Sample query +// +// Notice the "%lu" - that's a placeholder for the parameter we will +// supply. See sprintf() documentation for more formatting specifier +// options +unsigned long QUERY_POPULATION = 800000; + +const char QUERY_POP[] = "SELECT name, population FROM world.city WHERE population < %lu ORDER BY population DESC LIMIT 12;"; + +char query[128]; + +MySQL_Connection conn((Client *)&client); + +int status = WL_IDLE_STATUS; + +void printWifiStatus() +{ + // print the SSID and IP address of the network you're attached to: + MYSQL_DISPLAY3("SSID:", WiFi.SSID(), "IP Address:", WiFi.localIP()); + + // print the received signal strength: + MYSQL_DISPLAY2("Signal strength (RSSI):", WiFi.RSSI(), "dBm"); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Complex_Select_WiFiNINA on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // check for the WiFi module: + if (WiFi.status() == WL_NO_MODULE) + { + MYSQL_DISPLAY("Communication with WiFi module failed!"); + // don't continue + while (true); + } + + String fv = WiFi.firmwareVersion(); + + if (fv < WIFI_FIRMWARE_LATEST_VERSION) + { + MYSQL_DISPLAY("Please upgrade the firmware"); + } + + // attempt to connect to Wifi network: + while (status != WL_CONNECTED) + { + MYSQL_DISPLAY1("Attempting to connect to SSID:", ssid); + // Connect to WPA/WPA2 network. Change this line if using open or WEP network: + status = WiFi.begin(ssid, pass); + + // wait 10 seconds for connection: + //delay(10000); + } + + printWifiStatus(); + + // End WiFi section + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void runQuery() +{ + MYSQL_DISPLAY("===================================================="); + MYSQL_DISPLAY("> Running SELECT with dynamically supplied parameter"); + + // Supply the parameter for the query + // Here we use the QUERY_POP as the format string and query as the + // destination. This uses twice the memory so another option would be + // to allocate one buffer for all formatted queries or allocate the + // memory as needed (just make sure you allocate enough memory and + // free it when you're done!). + sprintf(query, QUERY_POP, QUERY_POPULATION + (( millis() % 100000 ) * 10) ); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Fetch the columns and print them + column_names *cols = query_mem.get_columns(); + + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(cols->fields[f]->name); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(","); + } + } + + MYSQL_DISPLAY(); + + // Read the rows and print them + row_values *row = NULL; + + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(row->values[f]); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(","); + } + } + + MYSQL_DISPLAY(); + } + } while (row != NULL); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(10000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Select_WiFiNINA/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Select_WiFiNINA/Credentials.h new file mode 100644 index 0000000..c8f6b7a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Select_WiFiNINA/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Select_WiFiNINA/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Select_WiFiNINA/defines.h new file mode 100644 index 0000000..2f6ab02 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Complex_Select_WiFiNINA/defines.h @@ -0,0 +1,356 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFININA_USE_SAMD) + #undef WIFININA_USE_SAMD + #endif + #define WIFININA_USE_SAMD true +#endif + +#if defined(WIFININA_USE_SAMD) + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFININA_USE_NRF52) + #undef WIFININA_USE_NRF52 + #endif + #define WIFININA_USE_NRF52 true +#endif + +#if defined(WIFININA_USE_NRF52) + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFININA_USE_SAMDUE) + #undef WIFININA_USE_SAMDUE + #endif + #define WIFININA_USE_SAMDUE true +#endif + +#if defined(WIFININA_USE_SAMDUE) + + // For SAM DUE + #if defined(ARDUINO_SAM_DUE) + #define BOARD_TYPE "SAM DUE" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM SAM3X8E" + #else + #define BOARD_TYPE "SAM Unknown" + #endif + +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFININA_USE_STM32) + #undef WIFININA_USE_STM32 + #endif + #define WIFININA_USE_STM32 true +#endif + +#if defined(WIFININA_USE_STM32) + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#endif + +#ifdef CORE_TEENSY + + #if defined(WIFININA_USE_TEENSY) + #undef WIFININA_USE_TEENSY + #endif + #define WIFININA_USE_TEENSY true + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#endif + +#if ( defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA) ) + #if defined(ARDUINO_AVR_MEGA2560) + #define BOARD_TYPE "AVR Mega 2560" + #elif defined(ARDUINO_AVR_MEGA) + #define BOARD_TYPE "AVR Mega" + #endif +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFININA_USE_RP2040) + #undef WIFININA_USE_RP2040 + #undef WIFI_USE_RP2040 + #endif + #define WIFININA_USE_RP2040 true + #define WIFI_USE_RP2040 true +#endif + + +#if defined(WIFININA_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#endif + +#ifndef BOARD_TYPE + #define BOARD_TYPE "Unknown Board" +#endif + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#define DEBUG_WIFININA_PORT Serial +// Debug Level from 0 to 4 +#define _WIFININA_LOGLEVEL_ 1 + +#define USING_WIFININA_GENERIC true +#define USING_WIFININA false + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Default_Database_WiFiNINA/Connect_Default_Database_WiFiNINA.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Default_Database_WiFiNINA/Connect_Default_Database_WiFiNINA.ino new file mode 100644 index 0000000..6bae4cc --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Default_Database_WiFiNINA/Connect_Default_Database_WiFiNINA.ino @@ -0,0 +1,134 @@ +/********************************************************************************************************************************* + Connect_Default_Database_WiFiNINA.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect with default database + + This example demonstrates how to connect to a MySQL server and specifying + the default database when connecting. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +char default_database[] = "world"; + +MySQL_Connection conn((Client *)&client); + +int status = WL_IDLE_STATUS; + +void printWifiStatus() +{ + // print the SSID and IP address of the network you're attached to: + MYSQL_DISPLAY3("SSID:", WiFi.SSID(), "IP Address:", WiFi.localIP()); + + // print the received signal strength: + MYSQL_DISPLAY2("Signal strength (RSSI):", WiFi.RSSI(), "dBm"); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Connect_Default_Database_WiFiNINA on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // check for the WiFi module: + if (WiFi.status() == WL_NO_MODULE) + { + MYSQL_DISPLAY("Communication with WiFi module failed!"); + // don't continue + while (true); + } + + String fv = WiFi.firmwareVersion(); + + if (fv < WIFI_FIRMWARE_LATEST_VERSION) + { + MYSQL_DISPLAY("Please upgrade the firmware"); + } + + // attempt to connect to Wifi network: + while (status != WL_CONNECTED) + { + MYSQL_DISPLAY1("Attempting to connect to SSID:", ssid); + // Connect to WPA/WPA2 network. Change this line if using open or WEP network: + status = WiFi.begin(ssid, pass); + + // wait 10 seconds for connection: + //delay(10000); + } + + printWifiStatus(); + + // End WiFi section + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY5("User =", user, ", PW =", password, ", DB =", default_database); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password, default_database)) + if (conn.connectNonBlocking(server, server_port, user, password, default_database) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Default_Database_WiFiNINA/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Default_Database_WiFiNINA/Credentials.h new file mode 100644 index 0000000..c8f6b7a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Default_Database_WiFiNINA/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Default_Database_WiFiNINA/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Default_Database_WiFiNINA/defines.h new file mode 100644 index 0000000..2f6ab02 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Default_Database_WiFiNINA/defines.h @@ -0,0 +1,356 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFININA_USE_SAMD) + #undef WIFININA_USE_SAMD + #endif + #define WIFININA_USE_SAMD true +#endif + +#if defined(WIFININA_USE_SAMD) + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFININA_USE_NRF52) + #undef WIFININA_USE_NRF52 + #endif + #define WIFININA_USE_NRF52 true +#endif + +#if defined(WIFININA_USE_NRF52) + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFININA_USE_SAMDUE) + #undef WIFININA_USE_SAMDUE + #endif + #define WIFININA_USE_SAMDUE true +#endif + +#if defined(WIFININA_USE_SAMDUE) + + // For SAM DUE + #if defined(ARDUINO_SAM_DUE) + #define BOARD_TYPE "SAM DUE" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM SAM3X8E" + #else + #define BOARD_TYPE "SAM Unknown" + #endif + +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFININA_USE_STM32) + #undef WIFININA_USE_STM32 + #endif + #define WIFININA_USE_STM32 true +#endif + +#if defined(WIFININA_USE_STM32) + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#endif + +#ifdef CORE_TEENSY + + #if defined(WIFININA_USE_TEENSY) + #undef WIFININA_USE_TEENSY + #endif + #define WIFININA_USE_TEENSY true + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#endif + +#if ( defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA) ) + #if defined(ARDUINO_AVR_MEGA2560) + #define BOARD_TYPE "AVR Mega 2560" + #elif defined(ARDUINO_AVR_MEGA) + #define BOARD_TYPE "AVR Mega" + #endif +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFININA_USE_RP2040) + #undef WIFININA_USE_RP2040 + #undef WIFI_USE_RP2040 + #endif + #define WIFININA_USE_RP2040 true + #define WIFI_USE_RP2040 true +#endif + + +#if defined(WIFININA_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#endif + +#ifndef BOARD_TYPE + #define BOARD_TYPE "Unknown Board" +#endif + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#define DEBUG_WIFININA_PORT Serial +// Debug Level from 0 to 4 +#define _WIFININA_LOGLEVEL_ 1 + +#define USING_WIFININA_GENERIC true +#define USING_WIFININA false + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Disconnect_WiFiNINA/Connect_Disconnect_WiFiNINA.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Disconnect_WiFiNINA/Connect_Disconnect_WiFiNINA.ino new file mode 100644 index 0000000..df3116e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Disconnect_WiFiNINA/Connect_Disconnect_WiFiNINA.ino @@ -0,0 +1,151 @@ +/********************************************************************************************************************************* + Connect_Disconnect_WiFiNINA.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : connect and disconnect (close) + + This example demonstrates how to use the connection to open at the start + of a loop, perform some query, then close the connection. Use this technique + for solutions that must sleep for a long period or otherwise require + additional processing or delays. The connect/close pair allow you to + control how long the connection is open and thus reduce the amount of + time a connection is held open. It also helps for lossy connections. + + This example demonstrates how to connect to a MySQL server and specifying + the default database when connecting. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +MySQL_Connection conn((Client *)&client); +MySQL_Query query = MySQL_Query(&conn); + +int status = WL_IDLE_STATUS; + +void printWifiStatus() +{ + // print the SSID and IP address of the network you're attached to: + MYSQL_DISPLAY3("SSID:", WiFi.SSID(), "IP Address:", WiFi.localIP()); + + // print the received signal strength: + MYSQL_DISPLAY2("Signal strength (RSSI):", WiFi.RSSI(), "dBm"); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Connect_Disconnect_WiFiNINA on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // check for the WiFi module: + if (WiFi.status() == WL_NO_MODULE) + { + MYSQL_DISPLAY("Communication with WiFi module failed!"); + // don't continue + while (true); + } + + String fv = WiFi.firmwareVersion(); + + if (fv < WIFI_FIRMWARE_LATEST_VERSION) + { + MYSQL_DISPLAY("Please upgrade the firmware"); + } + + // attempt to connect to Wifi network: + while (status != WL_CONNECTED) + { + MYSQL_DISPLAY1("Attempting to connect to SSID:", ssid); + // Connect to WPA/WPA2 network. Change this line if using open or WEP network: + status = WiFi.begin(ssid, pass); + + // wait 10 seconds for connection: + //delay(10000); + } + + printWifiStatus(); + + // End WiFi section + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); +} + +void runQuery() +{ + MYSQL_DISPLAY("Running a query: SELECT * FROM test_arduino.hello_arduino LIMIT 6;"); + + // Execute the query + // KH, check if valid before fetching + if ( !query.execute("SELECT * FROM test_arduino.hello_arduino LIMIT 6;") ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + query.show_results(); // show the results + query.close(); // close the query +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Disconnect_WiFiNINA/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Disconnect_WiFiNINA/Credentials.h new file mode 100644 index 0000000..c8f6b7a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Disconnect_WiFiNINA/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Disconnect_WiFiNINA/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Disconnect_WiFiNINA/defines.h new file mode 100644 index 0000000..2f6ab02 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_Disconnect_WiFiNINA/defines.h @@ -0,0 +1,356 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFININA_USE_SAMD) + #undef WIFININA_USE_SAMD + #endif + #define WIFININA_USE_SAMD true +#endif + +#if defined(WIFININA_USE_SAMD) + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFININA_USE_NRF52) + #undef WIFININA_USE_NRF52 + #endif + #define WIFININA_USE_NRF52 true +#endif + +#if defined(WIFININA_USE_NRF52) + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFININA_USE_SAMDUE) + #undef WIFININA_USE_SAMDUE + #endif + #define WIFININA_USE_SAMDUE true +#endif + +#if defined(WIFININA_USE_SAMDUE) + + // For SAM DUE + #if defined(ARDUINO_SAM_DUE) + #define BOARD_TYPE "SAM DUE" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM SAM3X8E" + #else + #define BOARD_TYPE "SAM Unknown" + #endif + +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFININA_USE_STM32) + #undef WIFININA_USE_STM32 + #endif + #define WIFININA_USE_STM32 true +#endif + +#if defined(WIFININA_USE_STM32) + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#endif + +#ifdef CORE_TEENSY + + #if defined(WIFININA_USE_TEENSY) + #undef WIFININA_USE_TEENSY + #endif + #define WIFININA_USE_TEENSY true + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#endif + +#if ( defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA) ) + #if defined(ARDUINO_AVR_MEGA2560) + #define BOARD_TYPE "AVR Mega 2560" + #elif defined(ARDUINO_AVR_MEGA) + #define BOARD_TYPE "AVR Mega" + #endif +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFININA_USE_RP2040) + #undef WIFININA_USE_RP2040 + #undef WIFI_USE_RP2040 + #endif + #define WIFININA_USE_RP2040 true + #define WIFI_USE_RP2040 true +#endif + + +#if defined(WIFININA_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#endif + +#ifndef BOARD_TYPE + #define BOARD_TYPE "Unknown Board" +#endif + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#define DEBUG_WIFININA_PORT Serial +// Debug Level from 0 to 4 +#define _WIFININA_LOGLEVEL_ 1 + +#define USING_WIFININA_GENERIC true +#define USING_WIFININA false + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_WiFiNINA/Connect_WiFiNINA.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_WiFiNINA/Connect_WiFiNINA.ino new file mode 100644 index 0000000..5387e76 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_WiFiNINA/Connect_WiFiNINA.ino @@ -0,0 +1,134 @@ +/********************************************************************************************************************************* + Connect_WiFiNINA.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : connect + + This example demonstrates how to connect to a MySQL server from an + Arduino using an Arduino-compatible Ethernet shield. Note that "compatible" + means it must conform to the Ethernet class library or be a derivative + with the same classes and methods. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + If you do not see messages indicating you have a connection, refer to the + manual for troubleshooting tips. The most common issues are the server is + not accessible from the network or the user name and password is incorrect. + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +MySQL_Connection conn((Client *)&client); + +int status = WL_IDLE_STATUS; + +void printWifiStatus() +{ + // print the SSID and IP address of the network you're attached to: + MYSQL_DISPLAY3("SSID:", WiFi.SSID(), "IP Address:", WiFi.localIP()); + + // print the received signal strength: + MYSQL_DISPLAY2("Signal strength (RSSI):", WiFi.RSSI(), "dBm"); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Connect_WiFiNINA on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // check for the WiFi module: + if (WiFi.status() == WL_NO_MODULE) + { + MYSQL_DISPLAY("Communication with WiFi module failed!"); + // don't continue + while (true); + } + + String fv = WiFi.firmwareVersion(); + + if (fv < WIFI_FIRMWARE_LATEST_VERSION) + { + MYSQL_DISPLAY("Please upgrade the firmware"); + } + + // attempt to connect to Wifi network: + while (status != WL_CONNECTED) + { + MYSQL_DISPLAY1("Attempting to connect to SSID:", ssid); + // Connect to WPA/WPA2 network. Change this line if using open or WEP network: + status = WiFi.begin(ssid, pass); + + // wait 10 seconds for connection: + //delay(10000); + } + + printWifiStatus(); + + // End WiFi section + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + MYSQL_DISPLAY("Closing connection..."); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_WiFiNINA/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_WiFiNINA/Credentials.h new file mode 100644 index 0000000..c8f6b7a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_WiFiNINA/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_WiFiNINA/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_WiFiNINA/defines.h new file mode 100644 index 0000000..2f6ab02 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Connect_WiFiNINA/defines.h @@ -0,0 +1,356 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFININA_USE_SAMD) + #undef WIFININA_USE_SAMD + #endif + #define WIFININA_USE_SAMD true +#endif + +#if defined(WIFININA_USE_SAMD) + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFININA_USE_NRF52) + #undef WIFININA_USE_NRF52 + #endif + #define WIFININA_USE_NRF52 true +#endif + +#if defined(WIFININA_USE_NRF52) + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFININA_USE_SAMDUE) + #undef WIFININA_USE_SAMDUE + #endif + #define WIFININA_USE_SAMDUE true +#endif + +#if defined(WIFININA_USE_SAMDUE) + + // For SAM DUE + #if defined(ARDUINO_SAM_DUE) + #define BOARD_TYPE "SAM DUE" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM SAM3X8E" + #else + #define BOARD_TYPE "SAM Unknown" + #endif + +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFININA_USE_STM32) + #undef WIFININA_USE_STM32 + #endif + #define WIFININA_USE_STM32 true +#endif + +#if defined(WIFININA_USE_STM32) + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#endif + +#ifdef CORE_TEENSY + + #if defined(WIFININA_USE_TEENSY) + #undef WIFININA_USE_TEENSY + #endif + #define WIFININA_USE_TEENSY true + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#endif + +#if ( defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA) ) + #if defined(ARDUINO_AVR_MEGA2560) + #define BOARD_TYPE "AVR Mega 2560" + #elif defined(ARDUINO_AVR_MEGA) + #define BOARD_TYPE "AVR Mega" + #endif +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFININA_USE_RP2040) + #undef WIFININA_USE_RP2040 + #undef WIFI_USE_RP2040 + #endif + #define WIFININA_USE_RP2040 true + #define WIFI_USE_RP2040 true +#endif + + +#if defined(WIFININA_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#endif + +#ifndef BOARD_TYPE + #define BOARD_TYPE "Unknown Board" +#endif + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#define DEBUG_WIFININA_PORT Serial +// Debug Level from 0 to 4 +#define _WIFININA_LOGLEVEL_ 1 + +#define USING_WIFININA_GENERIC true +#define USING_WIFININA false + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Progmem_WiFiNINA/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Progmem_WiFiNINA/Credentials.h new file mode 100644 index 0000000..c8f6b7a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Progmem_WiFiNINA/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Progmem_WiFiNINA/Query_Progmem_WiFiNINA.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Progmem_WiFiNINA/Query_Progmem_WiFiNINA.ino new file mode 100644 index 0000000..fbdc250 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Progmem_WiFiNINA/Query_Progmem_WiFiNINA.ino @@ -0,0 +1,162 @@ +/********************************************************************************************************************************* + Query_Progmem_WiFiNINA.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : query with PROGMEM strings + + This example demonstrates how to issue queries using strings stored in + PROGMEM. As you will see, you need only add a parameter to the execute() + method in the cursor class, const and PROGMEM to the string declaration + and add the #include directive. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ +#include "defines.h" +#include "Credentials.h" + +#include + +#if !( ESP32 || ESP8266) + #include +#endif + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +// Sample query +const char PROGMEM query[] = "SELECT * FROM world.city LIMIT 12"; + +MySQL_Connection conn((Client *)&client); + +int status = WL_IDLE_STATUS; + +void printWifiStatus() +{ + // print the SSID and IP address of the network you're attached to: + MYSQL_DISPLAY3("SSID:", WiFi.SSID(), "IP Address:", WiFi.localIP()); + + // print the received signal strength: + MYSQL_DISPLAY2("Signal strength (RSSI):", WiFi.RSSI(), "dBm"); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Query_Progmem_WiFiNINA on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // check for the WiFi module: + if (WiFi.status() == WL_NO_MODULE) + { + MYSQL_DISPLAY("Communication with WiFi module failed!"); + // don't continue + while (true); + } + + String fv = WiFi.firmwareVersion(); + + if (fv < WIFI_FIRMWARE_LATEST_VERSION) + { + MYSQL_DISPLAY("Please upgrade the firmware"); + } + + // attempt to connect to Wifi network: + while (status != WL_CONNECTED) + { + MYSQL_DISPLAY1("Attempting to connect to SSID:", ssid); + // Connect to WPA/WPA2 network. Change this line if using open or WEP network: + status = WiFi.begin(ssid, pass); + + // wait 10 seconds for connection: + //delay(10000); + } + + printWifiStatus(); + + // End WiFi section + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void runQuery() +{ + MYSQL_DISPLAY("\nRunning SELECT from PROGMEM and printing results\n"); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query with the PROGMEM option + // KH, check if valid before fetching + if ( !query_mem.execute(query, true) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + + // Show the results + query_mem.show_results(); + // close the query + query_mem.close(); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Progmem_WiFiNINA/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Progmem_WiFiNINA/defines.h new file mode 100644 index 0000000..2f6ab02 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Progmem_WiFiNINA/defines.h @@ -0,0 +1,356 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFININA_USE_SAMD) + #undef WIFININA_USE_SAMD + #endif + #define WIFININA_USE_SAMD true +#endif + +#if defined(WIFININA_USE_SAMD) + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFININA_USE_NRF52) + #undef WIFININA_USE_NRF52 + #endif + #define WIFININA_USE_NRF52 true +#endif + +#if defined(WIFININA_USE_NRF52) + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFININA_USE_SAMDUE) + #undef WIFININA_USE_SAMDUE + #endif + #define WIFININA_USE_SAMDUE true +#endif + +#if defined(WIFININA_USE_SAMDUE) + + // For SAM DUE + #if defined(ARDUINO_SAM_DUE) + #define BOARD_TYPE "SAM DUE" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM SAM3X8E" + #else + #define BOARD_TYPE "SAM Unknown" + #endif + +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFININA_USE_STM32) + #undef WIFININA_USE_STM32 + #endif + #define WIFININA_USE_STM32 true +#endif + +#if defined(WIFININA_USE_STM32) + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#endif + +#ifdef CORE_TEENSY + + #if defined(WIFININA_USE_TEENSY) + #undef WIFININA_USE_TEENSY + #endif + #define WIFININA_USE_TEENSY true + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#endif + +#if ( defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA) ) + #if defined(ARDUINO_AVR_MEGA2560) + #define BOARD_TYPE "AVR Mega 2560" + #elif defined(ARDUINO_AVR_MEGA) + #define BOARD_TYPE "AVR Mega" + #endif +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFININA_USE_RP2040) + #undef WIFININA_USE_RP2040 + #undef WIFI_USE_RP2040 + #endif + #define WIFININA_USE_RP2040 true + #define WIFI_USE_RP2040 true +#endif + + +#if defined(WIFININA_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#endif + +#ifndef BOARD_TYPE + #define BOARD_TYPE "Unknown Board" +#endif + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#define DEBUG_WIFININA_PORT Serial +// Debug Level from 0 to 4 +#define _WIFININA_LOGLEVEL_ 1 + +#define USING_WIFININA_GENERIC true +#define USING_WIFININA false + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Results_WiFiNINA/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Results_WiFiNINA/Credentials.h new file mode 100644 index 0000000..c8f6b7a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Results_WiFiNINA/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Results_WiFiNINA/Query_Results_WiFiNINA.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Results_WiFiNINA/Query_Results_WiFiNINA.ino new file mode 100644 index 0000000..919925b --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Results_WiFiNINA/Query_Results_WiFiNINA.ino @@ -0,0 +1,193 @@ +/********************************************************************************************************************************* + Query_Results_WiFiNINA.ino + + 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 + **********************************************************************************************************************************/ +/* + MySQL Connector/Arduino Example : query results + + This example demonstrates how to issue a SELECT query and how to read columns + and rows from the result set. Study this example until you are familiar with how to + do this before writing your own sketch to read and consume query results. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + NOTICE: You must download and install the World sample database to run + this sketch unaltered. See http://dev.mysql.com/doc/index-other.html. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + Note: The MAC address can be anything so long as it is unique on your network. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +// Sample query +char query[] = "SELECT * FROM world.city LIMIT 12"; + +MySQL_Connection conn((Client *)&client); + +int status = WL_IDLE_STATUS; + +void printWifiStatus() +{ + // print the SSID and IP address of the network you're attached to: + MYSQL_DISPLAY3("SSID:", WiFi.SSID(), "IP Address:", WiFi.localIP()); + + // print the received signal strength: + MYSQL_DISPLAY2("Signal strength (RSSI):", WiFi.RSSI(), "dBm"); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Query_Results_WiFiNINA on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // check for the WiFi module: + if (WiFi.status() == WL_NO_MODULE) + { + MYSQL_DISPLAY("Communication with WiFi module failed!"); + // don't continue + while (true); + } + + String fv = WiFi.firmwareVersion(); + + if (fv < WIFI_FIRMWARE_LATEST_VERSION) + { + MYSQL_DISPLAY("Please upgrade the firmware"); + } + + // attempt to connect to Wifi network: + while (status != WL_CONNECTED) + { + MYSQL_DISPLAY1("Attempting to connect to SSID:", ssid); + // Connect to WPA/WPA2 network. Change this line if using open or WEP network: + status = WiFi.begin(ssid, pass); + + // wait 10 seconds for connection: + //delay(10000); + } + + printWifiStatus(); + + // End WiFi section + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); +} + +void runQuery() +{ + MYSQL_DISPLAY("\nRunning SELECT and printing results"); + MYSQL_DISPLAY(query); + + // Initiate the query class instance + MySQL_Query query_mem = MySQL_Query(&conn); + + // Execute the query + + // KH, check if valid before fetching + if ( !query_mem.execute(query) ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + ////// + + // Fetch the columns and print them + column_names *cols = query_mem.get_columns(); + + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(cols->fields[f]->name); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(", "); + } + } + + MYSQL_DISPLAY(); + + // Read the rows and print them + row_values *row = NULL; + + do + { + row = query_mem.get_next_row(); + + if (row != NULL) + { + for (int f = 0; f < cols->num_fields; f++) + { + MYSQL_DISPLAY0(row->values[f]); + + if (f < cols->num_fields - 1) + { + MYSQL_DISPLAY0(", "); + } + } + + MYSQL_DISPLAY(); + } + } while (row != NULL); +} + +void loop() +{ + MYSQL_DISPLAY("Connecting..."); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + runQuery(); + conn.close(); // close the connection + } + else + { + MYSQL_DISPLAY("\nConnect failed. Trying again on next iteration."); + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("================================================"); + + delay(60000); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Results_WiFiNINA/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Results_WiFiNINA/defines.h new file mode 100644 index 0000000..2f6ab02 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Query_Results_WiFiNINA/defines.h @@ -0,0 +1,356 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFININA_USE_SAMD) + #undef WIFININA_USE_SAMD + #endif + #define WIFININA_USE_SAMD true +#endif + +#if defined(WIFININA_USE_SAMD) + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFININA_USE_NRF52) + #undef WIFININA_USE_NRF52 + #endif + #define WIFININA_USE_NRF52 true +#endif + +#if defined(WIFININA_USE_NRF52) + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFININA_USE_SAMDUE) + #undef WIFININA_USE_SAMDUE + #endif + #define WIFININA_USE_SAMDUE true +#endif + +#if defined(WIFININA_USE_SAMDUE) + + // For SAM DUE + #if defined(ARDUINO_SAM_DUE) + #define BOARD_TYPE "SAM DUE" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM SAM3X8E" + #else + #define BOARD_TYPE "SAM Unknown" + #endif + +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFININA_USE_STM32) + #undef WIFININA_USE_STM32 + #endif + #define WIFININA_USE_STM32 true +#endif + +#if defined(WIFININA_USE_STM32) + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#endif + +#ifdef CORE_TEENSY + + #if defined(WIFININA_USE_TEENSY) + #undef WIFININA_USE_TEENSY + #endif + #define WIFININA_USE_TEENSY true + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#endif + +#if ( defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA) ) + #if defined(ARDUINO_AVR_MEGA2560) + #define BOARD_TYPE "AVR Mega 2560" + #elif defined(ARDUINO_AVR_MEGA) + #define BOARD_TYPE "AVR Mega" + #endif +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFININA_USE_RP2040) + #undef WIFININA_USE_RP2040 + #undef WIFI_USE_RP2040 + #endif + #define WIFININA_USE_RP2040 true + #define WIFI_USE_RP2040 true +#endif + + +#if defined(WIFININA_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#endif + +#ifndef BOARD_TYPE + #define BOARD_TYPE "Unknown Board" +#endif + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#define DEBUG_WIFININA_PORT Serial +// Debug Level from 0 to 4 +#define _WIFININA_LOGLEVEL_ 1 + +#define USING_WIFININA_GENERIC true +#define USING_WIFININA false + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Reboot_WiFiNINA/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Reboot_WiFiNINA/Credentials.h new file mode 100644 index 0000000..c8f6b7a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Reboot_WiFiNINA/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Reboot_WiFiNINA/Reboot_WiFiNINA.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Reboot_WiFiNINA/Reboot_WiFiNINA.ino new file mode 100644 index 0000000..bc43b2c --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Reboot_WiFiNINA/Reboot_WiFiNINA.ino @@ -0,0 +1,231 @@ +/********************************************************************************************************************************* + Reboot_WiFiNINA.ino + + 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 + **********************************************************************************************************************************/ + +/* + MySQL Connector/Arduino Example : reboot if connection lost + + This example demonstrates how to reboot an Arduino if connection to the + server is lost for a period of time. + + For more information and documentation, visit the wiki: + https://github.com/ChuckBell/MySQL_Connector_Arduino/wiki. + + INSTRUCTIONS FOR USE + + 1) Change the address of the server to the IP address of the MySQL server + 2) Change the user and password to a valid MySQL user and password + 3) Connect a USB cable to your Arduino + 4) Select the correct board and port + 5) Compile and upload the sketch to your Arduino + 6) Once uploaded, open Serial Monitor (use 115200 speed) and observe + + To test the reboot, unplug your Ethernet cable once you see "disconnected" + then wait for the timeout. Once the Arduino reboots, plug the cable in again + and you should see the query processing resume. + + Created by: Dr. Charles A. Bell +*/ + +#include "defines.h" +#include "Credentials.h" + +#include + +#define USING_HOST_NAME true + +#if USING_HOST_NAME + // Optional using hostname, and Ethernet built-in DNS lookup + char server[] = "your_account.ddns.net"; // change to your server's hostname/URL +#else + IPAddress server(192, 168, 2, 112); +#endif + +uint16_t server_port = 5698; //3306; + +MySQL_Connection conn((Client *)&client); +MySQL_Query query = MySQL_Query(&conn); + +int status = WL_IDLE_STATUS; + +void printWifiStatus() +{ + // print the SSID and IP address of the network you're attached to: + MYSQL_DISPLAY3("SSID:", WiFi.SSID(), "IP Address:", WiFi.localIP()); + + // print the received signal strength: + MYSQL_DISPLAY2("Signal strength (RSSI):", WiFi.RSSI(), "dBm"); +} + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + MYSQL_DISPLAY1("\nStarting Reboot_WiFiNINA on", BOARD_NAME); + MYSQL_DISPLAY(MYSQL_MARIADB_GENERIC_VERSION); + + // check for the WiFi module: + if (WiFi.status() == WL_NO_MODULE) + { + MYSQL_DISPLAY("Communication with WiFi module failed!"); + // don't continue + while (true); + } + + String fv = WiFi.firmwareVersion(); + + if (fv < WIFI_FIRMWARE_LATEST_VERSION) + { + MYSQL_DISPLAY("Please upgrade the firmware"); + } + + // attempt to connect to Wifi network: + while (status != WL_CONNECTED) + { + MYSQL_DISPLAY1("Attempting to connect to SSID:", ssid); + // Connect to WPA/WPA2 network. Change this line if using open or WEP network: + status = WiFi.begin(ssid, pass); + + // wait 10 seconds for connection: + //delay(10000); + } + + printWifiStatus(); + + // End WiFi section + + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); + + if (conn.connect(server, server_port, user, password)) + { + delay(1000); + } + else + MYSQL_DISPLAY("Connection failed."); +} + +// Begin reboot code +int num_fails; // variable for number of failure attempts +#define MAX_FAILED_CONNECTS 5 // maximum number of failed connects to MySQL + +void soft_reset() +{ +#if WIFININA_USE_SAMD + #if ( defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) || defined(__SAMD51G19A__) ) + // For SAMD51 + // see Table 17-5 Timeout Period (valid values 0-11) + WDT->CONFIG.reg = 5; + WDT->CTRLA.reg = WDT_CTRLA_ENABLE; + // To check if OK or bit.ENABLE/CLEAR + while (WDT->SYNCBUSY.bit.WEN == 1); + + // use the WDT watchdog timer to force a system reset. + WDT->CLEAR.reg = 0x00; + // To check if OK or bit.ENABLE/CLEAR + while (WDT->SYNCBUSY.bit.WEN == 1); + #else + // For SAMD21, etc + // see Table 17-5 Timeout Period (valid values 0-11) + WDT->CONFIG.reg = 5; + WDT->CTRL.reg = WDT_CTRL_ENABLE; + while (WDT->STATUS.bit.SYNCBUSY == 1); + + // use the WDT watchdog timer to force a system reset. + WDT->CLEAR.reg = 0x00; + while (WDT->STATUS.bit.SYNCBUSY == 1); + #endif +#elif WIFININA_USE_NRF52 + //delay(1000); + // Restart for nRF52 + NVIC_SystemReset(); +#elif WIFININA_USE_SAMDUE + void(*resetFunc)() = 0; + resetFunc(); +#elif WIFININA_USE_STM32 + void(*resetFunc)() = 0; + resetFunc(); + +#elif WIFININA_USE_TEENSY + #if defined(__IMXRT1062__) + // Teensy 4.1/4.0 + SCB_AIRCR = 0x05FA0004; //write value for restart for Teensy + #else + void(*resetFunc)() = 0; + resetFunc(); + #endif + +#elif ( defined(WIFININA_USE_RP2040) && defined(ARDUINO_ARCH_MBED) ) + + NVIC_SystemReset(); + +#endif +} + +// End reboot code + +void loop() +{ + if (conn.connected()) + { + MYSQL_DISPLAY("Running a query: SHOW DATABASES"); + + // Execute the query + + // KH, check if valid before fetching + if ( !query.execute("SHOW DATABASES") ) + { + MYSQL_DISPLAY("Querying error"); + return; + } + ////// + + query.show_results(); // show the results + query.close(); // close the cursor + conn.close(); // close the connection + num_fails = 0; // reset failures + + delay(10000); + } + else + { + MYSQL_DISPLAY3("Connecting to SQL Server @", server, ", Port =", server_port); + MYSQL_DISPLAY3("User =", user, ", PW =", password); + + //if (conn.connect(server, server_port, user, password)) + if (conn.connectNonBlocking(server, server_port, user, password) != RESULT_FAIL) + { + delay(500); + } + else + { + num_fails++; + MYSQL_DISPLAY("Connect failed!"); + + if (num_fails == MAX_FAILED_CONNECTS) + { + MYSQL_DISPLAY("Ok, that's it. I'm outta here. Rebooting..."); + delay(2000); + // Here we tell the Arduino to reboot by redirecting the instruction + // pointer to the "top" or position 0. This is a soft reset and may + // not solve all hardware-related lockups. + soft_reset(); + } + } + } + + MYSQL_DISPLAY("\nSleeping..."); + MYSQL_DISPLAY("=========================================="); +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Reboot_WiFiNINA/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Reboot_WiFiNINA/defines.h new file mode 100644 index 0000000..2f6ab02 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/Reboot_WiFiNINA/defines.h @@ -0,0 +1,356 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFININA_USE_SAMD) + #undef WIFININA_USE_SAMD + #endif + #define WIFININA_USE_SAMD true +#endif + +#if defined(WIFININA_USE_SAMD) + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFININA_USE_NRF52) + #undef WIFININA_USE_NRF52 + #endif + #define WIFININA_USE_NRF52 true +#endif + +#if defined(WIFININA_USE_NRF52) + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFININA_USE_SAMDUE) + #undef WIFININA_USE_SAMDUE + #endif + #define WIFININA_USE_SAMDUE true +#endif + +#if defined(WIFININA_USE_SAMDUE) + + // For SAM DUE + #if defined(ARDUINO_SAM_DUE) + #define BOARD_TYPE "SAM DUE" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM SAM3X8E" + #else + #define BOARD_TYPE "SAM Unknown" + #endif + +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFININA_USE_STM32) + #undef WIFININA_USE_STM32 + #endif + #define WIFININA_USE_STM32 true +#endif + +#if defined(WIFININA_USE_STM32) + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#endif + +#ifdef CORE_TEENSY + + #if defined(WIFININA_USE_TEENSY) + #undef WIFININA_USE_TEENSY + #endif + #define WIFININA_USE_TEENSY true + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#endif + +#if ( defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA) ) + #if defined(ARDUINO_AVR_MEGA2560) + #define BOARD_TYPE "AVR Mega 2560" + #elif defined(ARDUINO_AVR_MEGA) + #define BOARD_TYPE "AVR Mega" + #endif +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFININA_USE_RP2040) + #undef WIFININA_USE_RP2040 + #undef WIFI_USE_RP2040 + #endif + #define WIFININA_USE_RP2040 true + #define WIFI_USE_RP2040 true +#endif + + +#if defined(WIFININA_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#endif + +#ifndef BOARD_TYPE + #define BOARD_TYPE "Unknown Board" +#endif + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#define DEBUG_WIFININA_PORT Serial +// Debug Level from 0 to 4 +#define _WIFININA_LOGLEVEL_ 1 + +#define USING_WIFININA_GENERIC true +#define USING_WIFININA false + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/Credentials.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/Credentials.h new file mode 100644 index 0000000..c8f6b7a --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/Credentials.h @@ -0,0 +1,24 @@ +/**************************************************************************************************************************** + Credentials.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 Credentials_h +#define Credentials_h + +char ssid[] = "****"; // your network SSID (name) +char pass[] = "12345678"; // your network password + +char user[] = "invited-guest"; // MySQL user login username +char password[] = "the-invited-guest"; // MySQL user login password + +#endif //Credentials_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/defines.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/defines.h new file mode 100644 index 0000000..2f6ab02 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/defines.h @@ -0,0 +1,356 @@ +/**************************************************************************************************************************** + 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 MYSQL_DEBUG_PORT Serial + +// Debug Level from 0 to 4 +#define _MYSQL_LOGLEVEL_ 1 + +#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \ + || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) ) + #if defined(WIFININA_USE_SAMD) + #undef WIFININA_USE_SAMD + #endif + #define WIFININA_USE_SAMD true +#endif + +#if defined(WIFININA_USE_SAMD) + + #if defined(ARDUINO_SAMD_ZERO) + #define BOARD_TYPE "SAMD Zero" + #elif defined(ARDUINO_SAMD_MKR1000) + #define BOARD_TYPE "SAMD MKR1000" + #elif defined(ARDUINO_SAMD_MKRWIFI1010) + #define BOARD_TYPE "SAMD MKRWIFI1010" + #elif defined(ARDUINO_SAMD_NANO_33_IOT) + #define BOARD_TYPE "SAMD NANO_33_IOT" + #elif defined(ARDUINO_SAMD_MKRFox1200) + #define BOARD_TYPE "SAMD MKRFox1200" + #elif ( defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ) + #define BOARD_TYPE "SAMD MKRWAN13X0" + #elif defined(ARDUINO_SAMD_MKRGSM1400) + #define BOARD_TYPE "SAMD MKRGSM1400" + #elif defined(ARDUINO_SAMD_MKRNB1500) + #define BOARD_TYPE "SAMD MKRNB1500" + #elif defined(ARDUINO_SAMD_MKRVIDOR4000) + #define BOARD_TYPE "SAMD MKRVIDOR4000" + #elif defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) + #define BOARD_TYPE "SAMD ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS" + #elif defined(ADAFRUIT_FEATHER_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_FEATHER_M0_EXPRESS" + #elif defined(ADAFRUIT_METRO_M0_EXPRESS) + #define BOARD_TYPE "SAMD21 ADAFRUIT_METRO_M0_EXPRESS" + #elif defined(ADAFRUIT_CIRCUITPLAYGROUND_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_CIRCUITPLAYGROUND_M0" + #elif defined(ADAFRUIT_GEMMA_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_GEMMA_M0" + #elif defined(ADAFRUIT_TRINKET_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_TRINKET_M0" + #elif defined(ADAFRUIT_ITSYBITSY_M0) + #define BOARD_TYPE "SAMD21 ADAFRUIT_ITSYBITSY_M0" + #elif defined(ARDUINO_SAMD_HALLOWING_M0) + #define BOARD_TYPE "SAMD21 ARDUINO_SAMD_HALLOWING_M0" + #elif defined(ADAFRUIT_METRO_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_EXPRESS" + #elif defined(ADAFRUIT_GRAND_CENTRAL_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_GRAND_CENTRAL_M4" + #elif defined(ADAFRUIT_FEATHER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_FEATHER_M4_EXPRESS" + #elif defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_ITSYBITSY_M4_EXPRESS" + #elif defined(ADAFRUIT_TRELLIS_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_TRELLIS_M4_EXPRESS" + #elif defined(ADAFRUIT_PYPORTAL) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL" + #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYPORTAL_M4_TITANO" + #elif defined(ADAFRUIT_PYBADGE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_M4_EXPRESS" + #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) + #define BOARD_TYPE "SAMD51 ADAFRUIT_METRO_M4_AIRLIFT_LITE" + #elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_M4_EXPRESS" + #elif defined(ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYGAMER_ADVANCE_M4_EXPRESS" + #elif defined(ADAFRUIT_PYBADGE_AIRLIFT_M4) + #define BOARD_TYPE "SAMD51 ADAFRUIT_PYBADGE_AIRLIFT_M4" + #elif defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_MONSTER_M4SK_EXPRESS" + #elif defined(ADAFRUIT_HALLOWING_M4_EXPRESS) + #define BOARD_TYPE "SAMD51 ADAFRUIT_HALLOWING_M4_EXPRESS" + #elif defined(SEEED_WIO_TERMINAL) + #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" + #elif defined(SEEED_FEMTO_M0) + #define BOARD_TYPE "SAMD SEEED_FEMTO_M0" + #elif defined(SEEED_XIAO_M0) + #define BOARD_TYPE "SAMD SEEED_XIAO_M0" + #elif defined(Wio_Lite_MG126) + #define BOARD_TYPE "SAMD SEEED Wio_Lite_MG126" + #elif defined(WIO_GPS_BOARD) + #define BOARD_TYPE "SAMD SEEED WIO_GPS_BOARD" + #elif defined(SEEEDUINO_ZERO) + #define BOARD_TYPE "SAMD SEEEDUINO_ZERO" + #elif defined(SEEEDUINO_LORAWAN) + #define BOARD_TYPE "SAMD SEEEDUINO_LORAWAN" + #elif defined(SEEED_GROVE_UI_WIRELESS) + #define BOARD_TYPE "SAMD SEEED_GROVE_UI_WIRELESS" + #elif defined(__SAMD21E18A__) + #define BOARD_TYPE "SAMD21E18A" + #elif defined(__SAMD21G18A__) + #define BOARD_TYPE "SAMD21G18A" + #elif defined(__SAMD51G19A__) + #define BOARD_TYPE "SAMD51G19A" + #elif defined(__SAMD51J19A__) + #define BOARD_TYPE "SAMD51J19A" + #elif defined(__SAMD51P19A__) + #define BOARD_TYPE "__SAMD51P19A__" + #elif defined(__SAMD51J20A__) + #define BOARD_TYPE "SAMD51J20A" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM3X8E" + #elif defined(__CPU_ARC__) + #define BOARD_TYPE "CPU_ARC" + #elif defined(__SAMD51__) + #define BOARD_TYPE "SAMD51" + #else + #define BOARD_TYPE "SAMD Unknown" + #endif + +#endif + +#if ( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \ + defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \ + defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) ) + #if defined(WIFININA_USE_NRF52) + #undef WIFININA_USE_NRF52 + #endif + #define WIFININA_USE_NRF52 true +#endif + +#if defined(WIFININA_USE_NRF52) + + #if defined(NRF52840_FEATHER) + #define BOARD_TYPE "NRF52840_FEATHER_EXPRESS" + #elif defined(NRF52832_FEATHER) + #define BOARD_TYPE "NRF52832_FEATHER" + #elif defined(NRF52840_FEATHER_SENSE) + #define BOARD_TYPE "NRF52840_FEATHER_SENSE" + #elif defined(NRF52840_ITSYBITSY) + #define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS" + #elif defined(NRF52840_CIRCUITPLAY) + #define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND" + #elif defined(NRF52840_CLUE) + #define BOARD_TYPE "NRF52840_CLUE" + #elif defined(NRF52840_METRO) + #define BOARD_TYPE "NRF52840_METRO_EXPRESS" + #elif defined(NRF52840_PCA10056) + #define BOARD_TYPE "NORDIC_NRF52840DK" + #elif defined(NINA_B302_ublox) + #define BOARD_TYPE "NINA_B302_ublox" + #elif defined(NINA_B112_ublox) + #define BOARD_TYPE "NINA_B112_ublox" + #elif defined(PARTICLE_XENON) + #define BOARD_TYPE "PARTICLE_XENON" + #elif defined(MDBT50Q_RX) + #define BOARD_TYPE "RAYTAC_MDBT50Q_RX" + #elif defined(ARDUINO_NRF52_ADAFRUIT) + #define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT" + #else + #define BOARD_TYPE "nRF52 Unknown" + #endif + +#endif + +#if ( defined(ARDUINO_SAM_DUE) || defined(__SAM3X8E__) ) + #if defined(WIFININA_USE_SAMDUE) + #undef WIFININA_USE_SAMDUE + #endif + #define WIFININA_USE_SAMDUE true +#endif + +#if defined(WIFININA_USE_SAMDUE) + + // For SAM DUE + #if defined(ARDUINO_SAM_DUE) + #define BOARD_TYPE "SAM DUE" + #elif defined(__SAM3X8E__) + #define BOARD_TYPE "SAM SAM3X8E" + #else + #define BOARD_TYPE "SAM Unknown" + #endif + +#endif + +#if ( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L1) || defined(STM32L4) || defined(STM32H7) ||defined(STM32G0) || defined(STM32G4) || \ + defined(STM32WB) || defined(STM32MP1) ) + #if defined(WIFININA_USE_STM32) + #undef WIFININA_USE_STM32 + #endif + #define WIFININA_USE_STM32 true +#endif + +#if defined(WIFININA_USE_STM32) + #if defined(STM32F0) + #warning STM32F0 board selected + #define BOARD_TYPE "STM32F0" + #elif defined(STM32F1) + #warning STM32F1 board selected + #define BOARD_TYPE "STM32F1" + #elif defined(STM32F2) + #warning STM32F2 board selected + #define BOARD_TYPE "STM32F2" + #elif defined(STM32F3) + #warning STM32F3 board selected + #define BOARD_TYPE "STM32F3" + #elif defined(STM32F4) + #warning STM32F4 board selected + #define BOARD_TYPE "STM32F4" + #elif defined(STM32F7) + #warning STM32F7 board selected + #define BOARD_TYPE "STM32F7" + #elif defined(STM32L0) + #warning STM32L0 board selected + #define BOARD_TYPE "STM32L0" + #elif defined(STM32L1) + #warning STM32L1 board selected + #define BOARD_TYPE "STM32L1" + #elif defined(STM32L4) + #warning STM32L4 board selected + #define BOARD_TYPE "STM32L4" + #elif defined(STM32H7) + #warning STM32H7 board selected + #define BOARD_TYPE "STM32H7" + #elif defined(STM32G0) + #warning STM32G0 board selected + #define BOARD_TYPE "STM32G0" + #elif defined(STM32G4) + #warning STM32G4 board selected + #define BOARD_TYPE "STM32G4" + #elif defined(STM32WB) + #warning STM32WB board selected + #define BOARD_TYPE "STM32WB" + #elif defined(STM32MP1) + #warning STM32MP1 board selected + #define BOARD_TYPE "STM32MP1" + #else + #warning STM32 unknown board selected + #define BOARD_TYPE "STM32 Unknown" + #endif + +#endif + +#ifdef CORE_TEENSY + + #if defined(WIFININA_USE_TEENSY) + #undef WIFININA_USE_TEENSY + #endif + #define WIFININA_USE_TEENSY true + + #if defined(__IMXRT1062__) + // For Teensy 4.1/4.0 + #define BOARD_TYPE "TEENSY 4.1/4.0" + #elif defined(__MK66FX1M0__) + #define BOARD_TYPE "Teensy 3.6" + #elif defined(__MK64FX512__) + #define BOARD_TYPE "Teensy 3.5" + #elif defined(__MKL26Z64__) + #define BOARD_TYPE "Teensy LC" + #elif defined(__MK20DX256__) + #define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete) + #elif defined(__MK20DX128__) + #define BOARD_TYPE "Teensy 3.0" + #elif defined(__AVR_AT90USB1286__) + #error Teensy 2.0++ not supported yet + #elif defined(__AVR_ATmega32U4__) + #error Teensy 2.0 not supported yet + #else + // For Other Boards + #define BOARD_TYPE "Unknown Teensy Board" + #endif + +#endif + +#if ( defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA) ) + #if defined(ARDUINO_AVR_MEGA2560) + #define BOARD_TYPE "AVR Mega 2560" + #elif defined(ARDUINO_AVR_MEGA) + #define BOARD_TYPE "AVR Mega" + #endif +#endif + +#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + #if defined(WIFININA_USE_RP2040) + #undef WIFININA_USE_RP2040 + #undef WIFI_USE_RP2040 + #endif + #define WIFININA_USE_RP2040 true + #define WIFI_USE_RP2040 true +#endif + + +#if defined(WIFININA_USE_RP2040) && defined(ARDUINO_ARCH_MBED) + + #warning Using ARDUINO_ARCH_MBED + + #if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \ + defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) ) + // Only undef known BOARD_NAME to use better one + #undef BOARD_NAME + #endif + + #if defined(ARDUINO_RASPBERRY_PI_PICO) + #define BOARD_NAME "MBED RASPBERRY_PI_PICO" + #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) + #define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040" + #elif defined(ARDUINO_GENERIC_RP2040) + #define BOARD_NAME "MBED GENERIC_RP2040" + #elif defined(ARDUINO_NANO_RP2040_CONNECT) + #define BOARD_NAME "MBED NANO_RP2040_CONNECT" + #else + // Use default BOARD_NAME if exists + #if !defined(BOARD_NAME) + #define BOARD_NAME "MBED Unknown RP2040" + #endif + #endif + +#endif + +#ifndef BOARD_TYPE + #define BOARD_TYPE "Unknown Board" +#endif + +#if defined(ARDUINO_BOARD) + #define BOARD_NAME ARDUINO_BOARD +#else + #ifndef BOARD_NAME + #define BOARD_NAME BOARD_TYPE + #endif +#endif + +#define DEBUG_WIFININA_PORT Serial +// Debug Level from 0 to 4 +#define _WIFININA_LOGLEVEL_ 1 + +#define USING_WIFININA_GENERIC true +#define USING_WIFININA false + +#endif //defines_h diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/multiFileProject.cpp b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/multiFileProject.cpp new file mode 100644 index 0000000..e1f0fe7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/multiFileProject.cpp @@ -0,0 +1,17 @@ +/**************************************************************************************************************************** + multiFileProject.cpp + 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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#include "multiFileProject.h" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/multiFileProject.h b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/multiFileProject.h new file mode 100644 index 0000000..5811a68 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/multiFileProject.h @@ -0,0 +1,20 @@ +/**************************************************************************************************************************** + multiFileProject.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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#pragma once + +// Can be included as many times as necessary, without `Multiple Definitions` Linker Error +#include "MySQL_Generic.hpp" diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/multiFileProject_WiFiNINA.ino b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/multiFileProject_WiFiNINA.ino new file mode 100644 index 0000000..b0188b0 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/examples/WiFiNINA/multiFileProject_WiFiNINA/multiFileProject_WiFiNINA.ino @@ -0,0 +1,48 @@ +/**************************************************************************************************************************** + multiFileProject_WiFiNINA.ino + 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 +*****************************************************************************************************************************/ + +// To demo how to include files in multi-file Projects + +#include "defines.h" +#include "Credentials.h" + +#define MYSQL_MARIADB_GENERIC_VERSION_MIN_TARGET "MySQL_MariaDB_Generic v1.7.0" +#define MYSQL_MARIADB_GENERIC_VERSION_MIN 1007000 + +#include "multiFileProject.h" + +// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error +#include "MySQL_Generic.h" + +void setup() +{ + Serial.begin(115200); + while (!Serial && millis() < 5000); // wait for serial port to connect + + Serial.println("\nStart multiFileProject_WiFiNINA"); + Serial.println(MYSQL_MARIADB_GENERIC_VERSION); + +#if defined(MYSQL_MARIADB_GENERIC_VERSION_MIN) + if (MYSQL_MARIADB_GENERIC_VERSION_INT < MYSQL_MARIADB_GENERIC_VERSION_MIN) + { + Serial.print("Warning. Must use this example on Version equal or later than : "); + Serial.println(MYSQL_MARIADB_GENERIC_VERSION_MIN_TARGET); + } +#endif +} + +void loop() +{ + // put your main code here, to run repeatedly: +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/keywords.txt b/libraries/MySQL_MariaDB_Generic-1.7.2/keywords.txt new file mode 100644 index 0000000..f26c482 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/keywords.txt @@ -0,0 +1,120 @@ +####################################### +# Data types (KEYWORD1) +####################################### + +MySQL_Connection KEYWORD1 +MySQL_Packet KEYWORD1 +MySQL_Query KEYWORD1 +Encrypt_SHA1 KEYWORD1 + +Connection_Result KEYWORD1 +field_struct KEYWORD1 +column_names KEYWORD1 +row_values KEYWORD1 +_buffer KEYWORD1 +_state KEYWORD1 + +####################################### +# Methods and Functions (KEYWORD2) +####################################### + +############################## +# MySQL_Generic_Connection +############################## + +SQL_IPAddressToString KEYWORD2 +connect KEYWORD2 +connectNonBlocking KEYWORD2 +connected KEYWORD2 +version KEYWORD2 +close KEYWORD2 + +############################## +# MySQL_Generic_Packet +############################## + +complete_handshake KEYWORD2 +send_authentication_packet KEYWORD2 +parse_handshake_packet KEYWORD2 +scramble_password KEYWORD2 +read_packet KEYWORD2 +get_packet_type KEYWORD2 +parse_error_packet KEYWORD2 +get_lcb_len KEYWORD2 +read_int KEYWORD2 +store_int KEYWORD2 +read_lcb_int KEYWORD2 +wait_for_bytes KEYWORD2 +print_packet KEYWORD2 + + +############################## +# MySQL_Generic_Query +############################## + +execute KEYWORD2 +close KEYWORD2 +get_columns KEYWORD2 +get_next_row KEYWORD2 +show_results KEYWORD2 +get_rows_affected KEYWORD2 +get_last_insert_id KEYWORD2 + + +############################## +# MySQL_Generic_Encrypt_Sha1 +############################## + +init KEYWORD2 +initHmac KEYWORD2 +result KEYWORD2 +write KEYWORD2 + +####################################### +# Literals (LITERAL1) +####################################### + +Sha1 KEYWORD3 +CONNECTED KEYWORD3 +DISCONNECTED KEYWORD3 +MEMORY_ERROR KEYWORD3 +PACKET_ERROR KEYWORD3 +READ_TIMEOUT KEYWORD3 +BAD_MOJO KEYWORD3 +ROWS KEYWORD3 +READ_COLS KEYWORD3 +NOT_CONNECTED KEYWORD3 +sha1InitState KEYWORD3 + +####################################### +# Constants (LITERAL1) +####################################### + +MYSQL_GENERIC_VERSION LITERAL1 +MYSQL_MARIADB_GENERIC_VERSION LITERAL1 +MYSQL_MARIADB_GENERIC_VERSION_MAJOR LITERAL1 +MYSQL_MARIADB_GENERIC_VERSION_MINOR LITERAL1 +MYSQL_MARIADB_GENERIC_VERSION_PATCH LITERAL1 +MYSQL_MARIADB_GENERIC_VERSION_INT LITERAL1 + +MYSQL_OK_PACKET LITERAL1 +MYSQL_EOF_PACKET LITERAL1 +MYSQL_ERROR_PACKET LITERAL1 + +MAX_TRANSMISSION_UNIT LITERAL1 + +MYSQL_DATA_TIMEOUT LITERAL1 +MYSQL_WAIT_INTERVAL LITERAL1 + +HASH_LENGTH LITERAL1 +BLOCK_LENGTH LITERAL1 + +MYSQL_SHA1_K0 LITERAL1 +MYSQL_SHA1_K20 LITERAL1 +MYSQL_SHA1_K40 LITERAL1 +MYSQL_SHA1_K60 LITERAL1 + +HMAC_IPAD LITERAL1 +HMAC_OPAD LITERAL1 + + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/library.json b/libraries/MySQL_MariaDB_Generic-1.7.2/library.json new file mode 100644 index 0000000..e628ce2 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/library.json @@ -0,0 +1,99 @@ +{ + "name": "MySQL_MariaDB_Generic", + "version": "1.7.2", + "keywords": "Communication, Database, Storage, MySQL, MariaDB, wt32-eth01, Teensy, SAMD, nRF52, W5x00, Ethernet, wifi, wifinina, lan8720, rp2040, nano-33-iot, nano-rp2040-connect, QNEthernet, native-ethernet, Portenta-H7, SAM DUE, ENC28J60, rpi-pico, Arduino, AVR", + "description": "Connects to MySQL or MariaDB using ESP8266/ESP32, WT32_ETH01 (ESP32 + LAN8720A), nRF52, SAMD21/SAMD51, STM32F/L/H/G/WB/MP1, Teensy, SAM DUE, Mega, RP2040-based boards, Portenta_H7, etc. with W5x00, ENC28J60 Ethernet, Teensy 4.1 NativeEthernet/QNEthernet, WiFiNINA modules/shields or Portenta_H7 WiFi/Ethernet. W5x00 can use Ethernet, EthernetLarge, Ethernet2 or Ethernet3 library. ENC28J60 can use either EthernetENC or UIPEthernet Library. Now accepting server's hostname, besides IPAddress. Ethernet_Generic library is used as default for W5x00", + "authors": [ + { + "name": "Dr. Charles Bell", + "url": "https://github.com/ChuckBell", + "email": "chuck.bell@oracle.com" + }, + { + "name": "Khoi Hoang", + "url": "https://github.com/khoih-prog", + "email": "khoih-prog@gmail.com", + "maintainer": true + } + ], + "repository": + { + "type": "git", + "url": "https://github.com/khoih-prog/MySQL_MariaDB_Generic" + }, + "homepage": "https://github.com/khoih-prog/MySQL_MariaDB_Generic", + "export": { + "exclude": [ + "linux", + "extras", + "tests" + ] + }, + "dependencies": + [ + { + "owner": "khoih-prog", + "name": "WiFiNINA_Generic", + "version": "^1.8.14-3", + "platforms": ["*"] + }, + { + "owner": "khoih-prog", + "name": "WebServer_WT32_ETH01", + "version": ">=1.4.1", + "platforms": ["*"] + }, + { + "owner": "khoih-prog", + "name": "ESP8266_AT_WebServer", + "version": "^1.5.3", + "platforms": ["*"] + }, + { + "owner": "stm32duino", + "name": "STM32duino LwIP", + "version": ">=2.1.2", + "platforms": ["ststm32"] + }, + { + "owner": "stm32duino", + "name": "STM32Ethernet", + "version": ">=1.2.0", + "platforms": ["ststm32"] + }, + { + "owner": "uipethernet", + "name": "UIPEthernet", + "version": ">=2.0.8", + "platforms": ["*"] + }, + { + "owner": "jandrassy", + "name": "EthernetENC", + "version": ">=2.0.2", + "platforms": ["*"] + }, + { + "owner": "jandrassy", + "name": "WiFiEspAT", + "version": ">=1.3.2", + "platforms": ["*"] + }, + { + "owner": "khoih-prog", + "name": "Ethernet_Generic", + "version": "^2.0.1" + }, + { + "owner": "ssilverman", + "name": "QNEthernet", + "version": ">=0.14.0", + "platforms": ["teensy"] + } + ], + "license": "MIT", + "frameworks": "*", + "platforms": "*", + "examples": "examples/*/*/*.ino", + "headers": ["MySQL_Generic.h", "MySQL_Generic.hpp"] +} diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/library.properties b/libraries/MySQL_MariaDB_Generic-1.7.2/library.properties new file mode 100644 index 0000000..febd4c4 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/library.properties @@ -0,0 +1,11 @@ +name=MySQL_MariaDB_Generic +version=1.7.2 +author=Dr. Charles Bell , Khoi Hoang +maintainer=Khoi Hoang +sentence=Connects to MySQL or MariaDB using ESP8266/ESP32, WT32_ETH01 (ESP32 + LAN8720A), nRF52, SAMD21/SAMD51, STM32F/L/H/G/WB/MP1, Teensy, SAM DUE, Mega, RP2040-based boards, Portenta_H7, etc. with W5x00, ENC28J60 Ethernet, Teensy 4.1 NativeEthernet/QNEthernet, WiFiNINA modules/shields or Portenta_H7 WiFi/Ethernet. W5x00 can use Ethernet_Generic library. ENC28J60 can use either EthernetENC or UIPEthernet Library. +paragraph=You can use this library to connect your Arduino project directly to a MySQL / MariaDB server without using an intermediate computer or a web-based or cloud-based service. Having direct access to a database server means you can store data acquired from your project as well as check values stored in tables on the server. This also means you can setup your own, local MySQL / MariaDB server to store your data further removing the need for Internet connectivity. If that is not an issue, you can still connect to and store data on a MySQL / MariaDB server via your network, Internet, or even in the cloud! Now accepting server hostname, besides IPAddress. Ethernet_Generic library is used as default for W5x00 +category=Communication +url=https://github.com/khoih-prog/MySQL_MariaDB_Generic +architectures=* +depends=WiFiNINA_Generic, WebServer_WT32_ETH01, Ethernet_Generic, EthernetENC, UIPEthernet, WiFiEspAT, NativeEthernet, QNEthernet +includes=MySQL_Generic.h, MySQL_Generic.hpp diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/pics/Basic_Insert_ESP32_S2.png b/libraries/MySQL_MariaDB_Generic-1.7.2/pics/Basic_Insert_ESP32_S2.png new file mode 100644 index 0000000000000000000000000000000000000000..93642b1db996f7910a3101e4ecf58b40aad81a08 GIT binary patch literal 78271 zcmaHT1yGzzur4Qtg)t?lSuqqOd?YwHI1~wSVMRE&7Y1-}&-M|X0e8$#s1$&Io;!dg zlo1dRW|!m^flD+;5p_o;8)HX^zP%BglBtuUqmjMgw;@D0xOZ?8!a~X}GrKT|$6JvH z_`~Vu=H6^Qw^Concj^8Gd2e5KfU$(4Ne^#Lk*Gzo0-gnBP>W=9(F7sneK|#w#4vXQ zHP=ejYs2pD%54d|*Ax-|5j>bYIj&DiNl8eV?cIw@NXd3P+m(19hSrL%xFQldd9kp) zY)%PRW%mqP3spaiM2Wk<88ParP>0D>ogq6w32}Z!>&_lu4XX9*=_c3PTEeev7ZPk( zg{b<;URxW-D=c-ZAbU4cxh}O0cD+E#ekjo?qmyMQa=^6U_%slA@M4I@Kd$(mPRj6Z zZg&ln2Vv#Hqv^bA?6`hfPZ|M3Wp1X@?IgkSrIlshpEc=&gdHlUtbHQQise$mi6Q+V z>r$`tX^Z{U`QIIdVH?L9B09OAY?=P*4(>O*HjK33s$!lzycUmcd9iUAEX~8AMEE1y zYlXtVnABI)((rs7{2!zn`Y+wgx$MryN!IVQ`3?I0J?RXV8NNLeQP2{YQRKMZnZE1G zdMLT86FpH((Y@QPoSb{fvt~Mi>fLZ`b8}(7z7*+o$1?|+xs+$yiV4+&?Vn9Y%L`2> zIGs3mni22a-lU1Zu2g)7-aHr7;2sgfYBsy?6rWw96Cm0qhaQc7BVkklkITAWj7hS9(c@%zf;aqB-OZmzQ2Y4;PC_bb2%;BcZ*HScQm#~|j8{R&FmuXc zb9dV2G6_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sq-cXxf6o{N1&HF;0W^Xv?52@9Y=w(t^Wl^?`p4IsnOH zwv`9!$T8c-j4YP%;+;PY6owsa*5GsXbkE(P{Et9C^mIR~MF1;lpbQVylkn1?lIU@d ztEN8f6d*;eh-3M(WA4$G-AFP72uJ$5DF7nhN+0|JWA4$#1t{>42s^-r5vk zJpRF;C>DPHbR7PA0JHv!{{YjUyMGpg^j>qH%fGvS7L^W;Jug4kzq@}HxOBjR59Qz8 zzl%m!5f9K!bzl%V6U)+kKi$w(j-7?4@@#l{J0P=6*(2kiA{ygpQ`nU0DprgM=f9b#7zl&Y^G(Xp$yMGpn z3Jf}Ff&TzKe(n5P2I;O({Pp{{@oH2s!=~8(03CMteP8&rBc}Km{ImPN@o7*7{T%uK z0FFO*{w;Ut=lwJLzwv3%9r`%`08D=G{95nP&-!Ecf8xL__f2QnEwDAANvpD)1d?UI|N|e@;~+;#jgDx05C52{{Y;77K$AJ zdUQOC!3X~UVf s{x`?|#*{DJgxc~qF literal 0 HcmV?d00001 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/pics/ICSP_connector.jpg b/libraries/MySQL_MariaDB_Generic-1.7.2/pics/ICSP_connector.jpg new file mode 100644 index 0000000000000000000000000000000000000000..54bda5cd41d19e2045d278d08ac13438e9ae7941 GIT binary patch literal 9748 zcmcI}1yq#X*Y7g}Ln|{hNDMG^moyArDnpl~bV#?--Cfcptso+zARr|vjf8ZEARtJ7 z;QRjTe(SsI-gVbKGwVFh+55MDbDrnyv(H|8uBWaS0I0IOk~{zcfdR^!4{&`25X!h% zn7Ub*!#!=>tluCTF4FrIp zXwVzMS^hr^|6I{XUySB8h}0dgxlQd3mh_>0%44l>E@~2Ft2@1T;y5DRz>L^Nyx%S= z!mTXz61QVMetC>P&H@< zB7P^oeFAu_IGGfd%9MvLSvA$qZZQDmy3Cq^MUqOy*NTKGfnkyb08n(yB6zD_qE4E9 zMz~(Ip;SZHa|5K|{n|`Gp04pSt-}J8=g!9YTq&>xFdL+4!aL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ySQL_MariaDB_Generic-1.7.2/pics/W5500.jpg new file mode 100644 index 0000000000000000000000000000000000000000..43957298171154f8fc1203e822ada2ce1b124b80 GIT binary patch literal 170351 zcmeFYbyQpL(mxt1SQRhc;_j}+-QA0XKtiBcaHwEKi#rrAgy0DdE$$R2Xp2K|E!x}j zp1XeM{J!75=XdXacdh&Gtn4*2&t&E^Gh3cL`^m4FU*7>wRTWhf0a#dAfLFgifM2%& zaXDQD8GS8XvF9K=PVj3W=sAp+i|09ur@Nyw=(&oj(sNa91*PXOAwE`)=dPaCPL3Wv z&n2IW3gZ8o1IPjH{I-RK^^g6Xe{A>e{$qdt-o3l`u4;LE;4+k3?_W>>* z{y(dguP#yZ7;NuyOuN<^R?0S37_J_dd(r&AV81fI9?OcL}h5 zbpogXSO5Ud?@<4>VcorV9~%ev4&Lu!s^24b{|o*98ppcx&+%WgfQNUn0C%3=eF^|z z?SKDY3jag=|2YF#xFWREJ*`&kRt7_-sv40Kx{ef^xQPKZrwOZa>DR zm0%HL^=6KqnFr}7i%G|A_tUal`E{MD9MuNsIt;BH++=@rw`9TnME55A|CCQ$f8=G- z(ew$ewAl^!MgDA?)=(F^DE(4n&o<9P)3cn3pGt2_x}VGJhW7$~a`z3N)zLyyE!XPa z^u_e-M7CAGC(cA*#P#_+Mf&-qnP%-yw$NU&ju)_f=_jb>um>fQgOUaw`BJVuncPp5 z;#%nGx6tae@Yq*-Qs%zlD}ZBp0D{~wOLMQyLNK@PM;nFpzW{lDtS6s?r2M}BAHd_} zWV9*&*tI@-zdb)Sd6AYHa5tf6)flb;yh%OA8sPZE9>&mheaU9^_< z;)> zGv@xeCp?+ak=&>k7GzrN1Qs^}u6lQCO~)`+@C}i5jE)QMxG?N*Fk*f>>8H)=wW08r(QG{-3at$V&1}a)tCVCeT2BnJ2Cf5$^;vS zHhYri@yD;+q2|J{%{yPooo$+oyX0UryC7D>UcDuxwKYBcZxE~$;%Nq zPr)%7bxCNGy#>L3oUnTwPOBfB>_{gs=>{5|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tffYxfYHI3|dyXAndX*z6Y9qpJ&_9=@ea2(vBcbVztbsZ+0avd^}Nh2^G#t(CTx1Nz5HU4YXh zs(Jj+p(yMd`9M}gDZe~${uKu@GbQG%jMVztT1j}*eTyGV_d=0`Jgp4>QwwNlK zM4Pya5nFKlm~3Rq)=)rXTZj|+rM`hUsI6kIp(3^ zUv_L*mq`A7-8C81?ICy8{QlSQRwY)=-XepArUwyAC=a-ez1Vz>*x6Gxw-|(%(#aGH zkfTBjZr<;j>Eka1UPi9YA_(L<3^EiDa#2M+F6lLsO1T@sDL+Ly_wZJ`-=C>@`=TOT tkzni>Es*33B{A3kjcMY4VW;@F&A(&)F9!a_z`q#y7X$xKFaX{j{12kSc#Hr5 literal 0 HcmV?d00001 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/platformio/platformio.ini b/libraries/MySQL_MariaDB_Generic-1.7.2/platformio/platformio.ini new file mode 100644 index 0000000..8452548 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/platformio/platformio.ini @@ -0,0 +1,503 @@ +;PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; https://docs.platformio.org/page/projectconf.html + +[platformio] +; ============================================================ +; chose environment: +; ESP8266 +; ESP32 +; SAMD +; DUE +; NRF52 +; STM32 +; AVR +; TEENSY +; pico +;portenta_h7_m7 +;portenta_h7_m4 + +; ============================================================ +;default_envs = ESP8266 +;default_envs = ESP32 +default_envs = SAMD +;default_envs = DUE +;default_envs = NRF52 +;default_envs = STM32 +;default_envs = AVR +;default_envs = TEENSY +;default_envs = pico +;default_envs = portenta_h7_m7 +;default_envs = portenta_h7_m4 + +[env] +; ============================================================ +; Serial configuration +; choose upload speed, serial-monitor speed +; ============================================================ +upload_speed = 921600 +;upload_port = COM11 +;monitor_speed = 9600 +;monitor_port = COM11 + +; Checks for the compatibility with frameworks and dev/platforms +lib_compat_mode = strict + +lib_deps = +; PlatformIO 4.x +; WiFiNINA_Generic@~1.8.14-3 +; WebServer_WT32_ETH01@~1.4.1 +; Ethernet_Generic@>=2.0.1 +; EthernetENC@~2.0.0 +; UIPEthernet@~2.0.8 +; WiFiEspAT@~1.3.2 +; ESP8266_AT_WebServer@~1.5.3 +; QNEthernet@>=0.14.0 +; STM32duino STM32Ethernet@~1.2.0 +; STM32duino LwIP@~2.1.2 +; +; PlatformIO 5.x + khoih-prog/WiFiNINA_Generic@~1.8.14-3 + khoih-prog/WebServer_WT32_ETH01@~1.4.1 + khoih-prog/Ethernet_Generic@~2.0.1 + jandrassy/EthernetENC@~2.0.0 + UIPEthernet/UIPEthernet@~2.0.8 + jandrassy/WiFiEspAT@~1.3.2 + khoih-prog/ESP8266_AT_WebServer@~1.5.3 +; stm32duino/STM32duino LwIP@~2.1.2 +; stm32duino/STM32duino STM32Ethernet@~1.2.0 + ssilverman/QNEthernet@>=0.14.0 + + +build_flags = +; set your debug output (default=Serial) +; -D DEBUG_ESP_PORT=Serial +; comment the folowing line to enable WiFi debugging +; -D NDEBUG + +[env:DUE] +platform = atmelsam +framework = arduino +board = due + +; change microcontroller +board_build.mcu = at91sam3x8e + +; change MCU frequency +board_build.f_cpu = 84000000L + +; ============================================================ +; ============================================================ + +[env:ESP8266] +platform = espressif8266 +framework = arduino +; ============================================================ +; Board configuration +; choose your board by uncommenting one of the following lines +; ============================================================ +;board = gen4iod +;board = huzzah +;board = oak +;board = esp_wroom_02 +;board = espduino +;board = espectro +;board = espino +;board = espresso_lite_v1 +;board = espresso_lite_v2 +;board = esp12e +;board = esp01_1m +;board = esp01 +;board = esp07 +;board = esp8285 +;board = heltec_wifi_kit_8 +;board = inventone +;board = nodemcu +board = nodemcuv2 +;board = modwifi +;board = phoenix_v1 +;board = phoenix_v2 +;board = sparkfunBlynk +;board = thing +;board = thingdev +;board = esp210 +;board = espinotee +;board = d1 +;board = d1_mini +;board = d1_mini_lite +;board = d1_mini_pro +;board = wifi_slot +;board = wifiduino +;board = wifinfo +;board = wio_link +;board = wio_node +;board = xinabox_cw01 +;board = esp32doit-devkit-v1 + +; ============================================================ +; ============================================================ + +[env:ESP32] +platform = espressif32 +framework = arduino +; ============================================================ +; Board configuration +; choose your board by uncommenting one of the following lines +; ============================================================ +;board = esp32cam +;board = alksesp32 +;board = featheresp32 +;board = espea32 +;board = bpi-bit +;board = d-duino-32 +board = esp32doit-devkit-v1 +;board = pocket_32 +;board = fm-devkit +;board = pico32 +;board = esp32-evb +;board = esp32-gateway +;board = esp32-pro +;board = esp32-poe +;board = oroca_edubot +;board = onehorse32dev +;board = lopy +;board = lopy4 +;board = wesp32 +;board = esp32thing +;board = sparkfun_lora_gateway_1-channel +;board = ttgo-lora32-v1 +;board = ttgo-t-beam +;board = turta_iot_node +;board = lolin_d32 +;board = lolin_d32_pro +;board = lolin32 +;board = wemosbat +;board = widora-air +;board = xinabox_cw02 +;board = iotbusio +;board = iotbusproteus +;board = nina_w10 + +; ============================================================ +; ============================================================ + +[env:SAMD] +platform = atmelsam +framework = arduino +; ============================================================ +; Choose your board by uncommenting one of the following lines +; ============================================================ +; ============================================================ +; Board configuration Adafruit SAMD +; ============================================================ + +;board = adafruit_feather_m0 +;board = adafruit_feather_m0_express +;board = adafruit_metro_m0 +;board = adafruit_circuitplayground_m0 +;board = adafruit_gemma_m0 +;board = adafruit_trinket_m0 +;board = adafruit_itsybitsy_m0 +;board = adafruit_pirkey +;board = adafruit_hallowing +;board = adafruit_crickit_m0 +;board = adafruit_metro_m4 +;board = adafruit_grandcentral_m4 +board = adafruit_itsybitsy_m4 +;board = adafruit_feather_m4 +;board = adafruit_trellis_m4 +;board = adafruit_pyportal_m4 +;board = adafruit_pyportal_m4_titano +;board = adafruit_pybadge_m4 +;board = adafruit_metro_m4_airliftlite +;board = adafruit_pygamer_m4 +;board = adafruit_pygamer_advance_m4 +;board = adafruit_pybadge_airlift_m4 +;board = adafruit_monster_m4sk +;board = adafruit_hallowing_m4 + +; ============================================================ +; Board configuration Arduino SAMD and SAM +; ============================================================ + +;board = arduino_zero_edbg +;board = arduino_zero_native +;board = mkr1000 +;board = mkrzero +;board = mkrwifi1010 +;board = nano_33_iot +;board = mkrfox1200 +;board = mkrwan1300 +;board = mkrwan1310 +;board = mkrgsm1400 +;board = mkrnb1500 +;board = mkrvidor4000 +;board = adafruit_circuitplayground_m0 +;board = mzero_pro_bl_dbg +;board = mzero_pro_bl +;board = mzero_bl +;board = tian +;board = tian_cons +;board = arduino_due_x_dbg +;board = arduino_due_x + +; ============================================================ +; Board configuration Seeeduino SAMD +; ============================================================ + +;board = seeed_wio_terminal +;board = Seeed_femto_m0 +;board = seeed_XIAO_m0 +;board = Wio_Lite_MG126 +;board = WioGPS +;board = zero +;board = rolawan +;board = seeed_grove_ui_wireless + +; ============================================================ +; ============================================================ + +[env:NRF52] +platform = nordicnrf52 +framework = arduino +; ============================================================ +; Board configuration Adafruit nRF52 +; choose your board by uncommenting one of the following lines +; ============================================================ +;board = feather52832 +board = feather52840 +;board = feather52840sense +;board = itsybitsy52840 +;board = cplaynrf52840 +;board = cluenrf52840 +;board = metro52840 +;board = pca10056 +;board = particle_xenon +;board = mdbt50qrx +;board = ninab302 +;board = ninab112 + +; ============================================================ +; ============================================================ + +[env:STM32] +platform = ststm32 +framework = arduino + +; ============================================================ +; Choose your board by uncommenting one of the following lines +; ============================================================ + +; ============================================================ +; Board configuration Nucleo-144 +; ============================================================ + +;board = nucleo_f207zg +;board = nucleo_f429zi +;board = nucleo_f746zg +;board = nucleo_f756zg +;board = nucleo_f767zi +;board = nucleo_h743zi +;board = nucleo_l496zg +;board = nucleo_l496zg-p +;board = nucleo_l4r5zi +;board = nucleo_l4r5zi-p + +; ============================================================ +; Board configuration Nucleo-64 +; ============================================================ + +;board = nucleo_f030r8 +;board = nucleo_f072rb + +;board = nucleo_f091rc +;board = nucleo_f103rb +;board = nucleo_f302r8 +;board = nucleo_f303re +;board = nucleo_f401re +;board = nucleo_f411re +;board = nucleo_f446re +;board = nucleo_g071rb +;board = nucleo_g431rb +;board = nucleo_g474re +;board = nucleo_l053r8 +;board = nucleo_l073rz +;board = nucleo_l152re +;board = nucleo_l433rc_p +;board = nucleo_l452re +;board = nucleo_l452re-p +;board = nucleo_l476rg +;board = pnucleo_wb55rg + +; ============================================================ +; Board configuration Nucleo-32 +; ============================================================ + +;board = nucleo_f031k6 +;board = nucleo_l031k6 +;board = nucleo_l412kb +;board = nucleo_l432lc +;board = nucleo_f303k8 +;board = nucleo_g431kb + +; ============================================================ +; Board configuration Discovery Boards +; ============================================================ + +;board = disco_f030r8 +;board = disco_f072rb +;board = disco_f030r8 +;board = disco_f100rb +;board = disco_f407vg +;board = disco_f413zh +;board = disco_f746ng +;board = disco_g0316 +;board = disco_l475vg_iot +;board = disco_f072cz-lrwan1 + +; ============================================================ +; Board configuration STM32MP1 Boards +; ============================================================ + +;board = stm32mp157a-dk1 +;board = stm32mp157c-dk2 + +; ============================================================ +; Board configuration Generic Boards +; ============================================================ + +;board = bluepill_f103c6 +;board = bluepill_f103c8 +;board = blackpill_f103c8 +;board = stm32f103cx +;board = stm32f103rx +;board = stm32f103tx +;board = stm32f103vx +;board = stm32f103zx +;board = stm32f103zet6 +;board = maplemini_f103cb +;board = blackpill_f303cc +;board = black_f407ve +;board = black_f407vg +;board = black_f407ze +;board = black_f407zg +;board = blue_f407ve_mini +;board = blackpill_f401cc +;board = blackpill_f411ce +;board = coreboard_f401rc +;board = feather_f405 + +; ============================================================ +; Board configuration Many more Boards to be filled +; ============================================================ + +; ============================================================ +; ============================================================ + +[env:AVR] +platform = atmelavr +framework = arduino + +; ============================================================ +; Board configuration AVR +; ============================================================ + +;board = yun +;board = uno +;board = diecimila +;board = nano +;board = nanoatmega328 +;board = mega +board = megaatmega2560 +;board = megaADK +;board = leonardo +;board = leonardoeth +;board = micro +;board = esplora +;board = mini +;board = ethernet +;board = fio +;board = bt +;board = LilyPadUSB +;board = lilypad +;board = pro +;board = atmegang +;board = robotControl +;board = robotMotor +;board = gemma +;board = circuitplay32u4cat +;board = yunmini +;board = chiwawa +;board = one +;board = unowifi + +; ============================================================ +; ============================================================ + +[env:TEENSY] +platform = teensy +framework = arduino + +; ============================================================ +; Choose your board by uncommenting one of the following lines +; ============================================================ + +; ============================================================ +; Board configuration TEENSY +; ============================================================ + +;board = teensy2 +;board = teensy2pp +;board = teensy30 +;board = teensy31 +;board = teensylc +;board = teensy35 +;board = teensy36 +;board = teensy40 +;board = teensy41 + +; ============================================================ +; Choose your board by uncommenting one of the following lines +; ============================================================ + +; ============================================================ +; Board configuration raspberrypi pico +; ============================================================ + +[env:pico] +; ============================================================ +; Just a sample +; You have to research and fix if there is issue +; ============================================================ +platform = raspberrypi +board = pico +framework = arduino +upload_protocol = picotool + +; ============================================================ +; ============================================================ + +; ============================================================ +; Board configuration portenta_h7_m7 +; ============================================================ + +[env:portenta_h7_m7] +platform = ststm32 +board = portenta_h7_m7 +framework = arduino + +; ============================================================ +; Board configuration portenta_h7_m4 +; ============================================================ + +[env:portenta_h7_m4] +platform = ststm32 +board = portenta_h7_m4 +framework = arduino + diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic.h b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic.h new file mode 100644 index 0000000..b6d8ad7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic.h @@ -0,0 +1,67 @@ +/********************************************************************************************************************************* + MySQL_Generic.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, WT32_ETH01, Teensy, Portenta_H7, etc. boards + using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/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 + + Version: 1.7.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/08/2020 Initial coding/porting to support nRF52, SAM DUE and SAMD21/SAMD51 boards using W5x00 Ethernet + (Ethernet, EthernetLarge, Ethernet2, Ethernet3 library), WiFiNINA and ESP8266/ESP32-AT shields + ... + 1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet + 1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet + 1.5.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.5.2 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 + 1.6.0 K Hoang 10/03/2022 Fix memory leak bug. Optimize code + 1.6.1 K Hoang 12/03/2022 Fix memory management bug + 1.7.0 K Hoang 12/03/2022 Convert to `h-only` style library + 1.7.1 K Hoang 10/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040/ESP32 + 1.7.2 K Hoang 11/04/2022 Fix missing paragraph in `library.properties` + **********************************************************************************************************************************/ + +#pragma once + +#ifndef MYSQL_GENERIC_H +#define MYSQL_GENERIC_H + +#if ( USE_ETHERNET_GENERIC || USE_ETHERNET_ENC || USE_ETHERNET_ESP8266 || USE_UIP_ETHERNET || USE_ETHERNET_LAN8742A || \ + USE_ETHERNET_LAN8720 || USE_NATIVE_ETHERNET || USE_QN_ETHERNET || USE_CUSTOM_ETHERNET || USE_ETHERNET_PORTENTA_H7 || \ + USE_CUSTOM_ETHERNET ) + + #include "MySQL_Generic_Ethernet.h" + +#elif ( USING_WIFININA_GENERIC || USING_WIFININA ) + + #include "MySQL_Generic_WiFiNINA.h" + +#elif ( ESP8266 || ESP32 || USING_WIFI_ESP8266_AT || USING_WIFININA_GENERIC || USING_WIFININA || USING_WIFIESPAT_LIB || \ + USING_WIFI_CUSTOM || USE_WIFI_PORTENTA_H7 ) + + #include "MySQL_Generic_WiFi.h" + + +#else + + #error Must select a Ethernet / WiFi module and Library + +#endif + +#include + +#include +#include +#include +#include + +#endif //MYSQL_GENERIC_H diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic.hpp b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic.hpp new file mode 100644 index 0000000..95f8b49 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic.hpp @@ -0,0 +1,55 @@ +/********************************************************************************************************************************* + MySQL_Generic.hpp + + 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, WT32_ETH01, Teensy, Portenta_H7, etc. boards + using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/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 + + Version: 1.7.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/08/2020 Initial coding/porting to support nRF52, SAM DUE and SAMD21/SAMD51 boards using W5x00 Ethernet + (Ethernet, EthernetLarge, Ethernet2, Ethernet3 library), WiFiNINA and ESP8266/ESP32-AT shields + ... + 1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet + 1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet + 1.5.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.5.2 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 + 1.6.0 K Hoang 10/03/2022 Fix memory leak bug. Optimize code + 1.6.1 K Hoang 12/03/2022 Fix memory management bug + 1.7.0 K Hoang 12/03/2022 Convert to `h-only` style library + 1.7.1 K Hoang 10/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040/ESP32 + 1.7.2 K Hoang 11/04/2022 Fix missing paragraph in `library.properties` + **********************************************************************************************************************************/ + +#pragma once + +#ifndef MYSQL_GENERIC_HPP +#define MYSQL_GENERIC_HPP + +#define MYSQL_GENERIC_VERSION "1.7.2" + +#ifndef MYSQL_MARIADB_GENERIC_VERSION + #define MYSQL_MARIADB_GENERIC_VERSION ("MySQL_MariaDB_Generic v" MYSQL_GENERIC_VERSION) + + #define MYSQL_MARIADB_GENERIC_VERSION_MAJOR 1 + #define MYSQL_MARIADB_GENERIC_VERSION_MINOR 7 + #define MYSQL_MARIADB_GENERIC_VERSION_PATCH 2 + + #define MYSQL_MARIADB_GENERIC_VERSION_INT 1007002 +#endif + +#include +#include +#include +#include + +#endif //MYSQL_GENERIC_HPP diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Connection.h b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Connection.h new file mode 100644 index 0000000..c6c7183 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Connection.h @@ -0,0 +1,99 @@ +/********************************************************************************************************************************* + MySQL_Generic_Connection.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, WT32_ETH01, Teensy, Portenta_H7, etc. boards + using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/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 + + Version: 1.7.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/08/2020 Initial coding/porting to support nRF52, SAM DUE and SAMD21/SAMD51 boards using W5x00 Ethernet + (Ethernet, EthernetLarge, Ethernet2, Ethernet3 library), WiFiNINA and ESP8266/ESP32-AT shields + ... + 1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet + 1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet + 1.5.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.5.2 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 + 1.6.0 K Hoang 10/03/2022 Fix memory leak bug. Optimize code + 1.6.1 K Hoang 12/03/2022 Fix memory management bug + 1.7.0 K Hoang 12/03/2022 Convert to `h-only` style library + 1.7.1 K Hoang 10/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040/ESP32 + 1.7.2 K Hoang 11/04/2022 Fix missing paragraph in `library.properties` + **********************************************************************************************************************************/ + +/********************************************************************************************************************************* + Copyright (c) 2012, 2016 Oracle and/or its affiliates. All rights reserved. + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + **********************************************************************************************************************************/ + +#pragma once + +#ifndef MYSQL_GENERIC_CONNECTION_H +#define MYSQL_GENERIC_CONNECTION_H + +#include "MySQL_Generic_Debug.h" + +#include + +typedef enum +{ + RESULT_OK = 0, + RESULT_FAIL, + RESULT_PENDING +} Connection_Result; + + +class MySQL_Connection : public MySQL_Packet +{ + public: + MySQL_Connection(Client *client_instance) : MySQL_Packet(client_instance) {} + + virtual ~MySQL_Connection() + { + this->close(); + }; + + bool connect(const IPAddress& server, const uint16_t& port, char *user, char *password, char *db = NULL); + + Connection_Result connectNonBlocking(const IPAddress& server, const uint16_t& port, char *user, char *password, char *db = NULL); + + // KH, add to use hostname. from v1.4.0 + bool connect(const char *hostname, const uint16_t& port, char *user, char *password, char *db = NULL); + + Connection_Result connectNonBlocking(const char *hostname, const uint16_t& port, char *user, char *password, char *db = NULL); + //////// + + int connected() + { + return client->connected(); + } + + const char *version() + { + return MYSQL_GENERIC_VERSION; + } + + void close(); +}; + +//#include + +#endif // MYSQL_GENERIC_CONNECTION_H diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Connection_Impl.h b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Connection_Impl.h new file mode 100644 index 0000000..823328e --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Connection_Impl.h @@ -0,0 +1,284 @@ +/********************************************************************************************************************************* + MySQL_Generic_Connection_Impl.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, WT32_ETH01, Teensy, Portenta_H7, etc. boards + using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/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 + + Version: 1.7.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/08/2020 Initial coding/porting to support nRF52, SAM DUE and SAMD21/SAMD51 boards using W5x00 Ethernet + (Ethernet, EthernetLarge, Ethernet2, Ethernet3 library), WiFiNINA and ESP8266/ESP32-AT shields + ... + 1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet + 1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet + 1.5.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.5.2 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 + 1.6.0 K Hoang 10/03/2022 Fix memory leak bug. Optimize code + 1.6.1 K Hoang 12/03/2022 Fix memory management bug + 1.7.0 K Hoang 12/03/2022 Convert to `h-only` style library + 1.7.1 K Hoang 10/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040/ESP32 + 1.7.2 K Hoang 11/04/2022 Fix missing paragraph in `library.properties` + **********************************************************************************************************************************/ + +/********************************************************************************************************************************* + Copyright (c) 2012, 2016 Oracle and/or its affiliates. All rights reserved. + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + **********************************************************************************************************************************/ + +#pragma once + +#ifndef MYSQL_GENERIC_CONNECTION_IMPL_H +#define MYSQL_GENERIC_CONNECTION_IMPL_H + +#include + +#include + +#define MAX_CONNECT_ATTEMPTS 10 +#define CONNECT_DELAY_MS 1000 +#define SUCCESS 1 + +/* + connect - Connect to a MySQL server. + + This method is used to connect to a MySQL server. It will attempt to + connect to the server as a client retrying up to MAX_CONNECT_ATTEMPTS. + This permits the possibility of longer than normal network lag times + for wireless networks. You can adjust MAX_CONNECT_ATTEMPTS to suit + your environment. + + server[in] IP address of the server as IPAddress type + port[in] port number of the server + user[in] user name + password[in] (optional) user password + db[in] (optional) default database + + Returns bool - True = connection succeeded +*/ + + +String SQL_IPAddressToString(const IPAddress& _address) +{ + String str = String(_address[0]); + str += "."; + str += String(_address[1]); + str += "."; + str += String(_address[2]); + str += "."; + str += String(_address[3]); + + return str; +} + +////////////////////////////////////////////////////////////// + +bool MySQL_Connection::connect(const char *hostname, const uint16_t& port, char *user, char *password, char *db) +{ + int connected = 0; + int retries = 0; + bool returnVal = false; + + MYSQL_LOGWARN3("Connecting to Server:", hostname, ", Port = ", port); + + if (db) + MYSQL_LOGWARN1("Using Database:", db); + + // Retry up to MAX_CONNECT_ATTEMPTS times. + while (retries++ < MAX_CONNECT_ATTEMPTS) + { + connected = client->connect(hostname, port); + + MYSQL_LOGDEBUG1("connected =", connected); + + if (connected != SUCCESS) + { + MYSQL_LOGDEBUG1("Can't connect. Retry #", retries); + delay(CONNECT_DELAY_MS); + } + else + { + break; + } + } + + if (connected != SUCCESS) + return false; + + MYSQL_LOGINFO("Connect OK. Try reading packets"); + + if ( !read_packet() ) + { + MYSQL_LOGERROR("Can't connect. Error reading packets"); + return false; + } + + MYSQL_LOGINFO("Try parsing packets"); + + parse_handshake_packet(); + + MYSQL_LOGINFO("Try send_authentication packets"); + + send_authentication_packet(user, password, db); + + if ( !read_packet() ) + { + MYSQL_LOGERROR("Can't connect. Error reading auth packets"); + } + else if (get_packet_type() != MYSQL_OK_PACKET) + { + parse_error_packet(); + } + else + { + MYSQL_LOGWARN1("Connected. Server Version =", server_version); + returnVal = true; + } + + if (server_version) + { + free(server_version); // don't need it anymore + server_version = NULL; + } + + return returnVal; +} + +////////////////////////////////////////////////////////////// + +Connection_Result MySQL_Connection::connectNonBlocking(const char *hostname, const uint16_t& port, char *user, char *password, char *db) +{ + int connected = 0; + int retries = 0; + + Connection_Result returnVal = RESULT_FAIL; + + long now = 0; + + MYSQL_LOGWARN3("Connecting to Server:", hostname, ", Port = ", port); + + if (db) + MYSQL_LOGWARN1("Using Database:", db); + + while (retries < MAX_CONNECT_ATTEMPTS) + { + if ( (now == 0) || ( millis() - now ) > CONNECT_DELAY_MS ) + { + now = millis(); + + connected = client->connect(hostname, port); + + retries++; + + MYSQL_LOGDEBUG1("connected =", connected); + + if (connected == SUCCESS) + { + break; + } + else + { + MYSQL_LOGDEBUG1("Can't connect. Retry #", retries); + } + } + else + { + //delay(CONNECT_DELAY_MS); + yield(); + } + } + + if (connected != SUCCESS) + return RESULT_FAIL; + + MYSQL_LOGINFO("Connect OK. Try reading packets"); + + if ( !read_packet() ) + { + MYSQL_LOGERROR("Can't connect. Error reading packets"); + return RESULT_FAIL; + } + + MYSQL_LOGINFO("Try parsing packets"); + + parse_handshake_packet(); + + MYSQL_LOGINFO("Try send_authentication packets"); + + send_authentication_packet(user, password, db); + + if ( !read_packet() ) + { + MYSQL_LOGERROR("Can't connect. Error reading auth packets"); + } + else if (get_packet_type() != MYSQL_OK_PACKET) + { + parse_error_packet(); + } + else + { + MYSQL_LOGWARN1("Connected. Server Version =", server_version); + returnVal = RESULT_OK; + } + + if (server_version) + { + free(server_version); // don't need it anymore + server_version = NULL; + } + + return returnVal; +} + +////////////////////////////////////////////////////////////// + +bool MySQL_Connection::connect(const IPAddress& server, const uint16_t& port, char *user, char *password, char *db) +{ + return connect(SQL_IPAddressToString(server).c_str(), port, user, password, db); +} + +////////////////////////////////////////////////////////////// + +Connection_Result MySQL_Connection::connectNonBlocking(const IPAddress& server, const uint16_t& port, char *user, char *password, char *db) +{ + return connectNonBlocking(SQL_IPAddressToString(server).c_str(), port, user, password, db); +} + +////////////////////////////////////////////////////////////// + +/* + close - cancel the connection + + This method closes the connection to the server and frees up any memory + used in the buffer. +*/ +void MySQL_Connection::close() +{ + if (connected()) + { + client->flush(); + client->stop(); + + MYSQL_LOGERROR("Disconnected"); + } +} + +#endif // MYSQL_GENERIC_CONNECTION_IMPL_H diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Debug.h b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Debug.h new file mode 100644 index 0000000..fe89a2c --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Debug.h @@ -0,0 +1,151 @@ +/********************************************************************************************************************************* + MySQL_Generic_Debug.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, WT32_ETH01, Teensy, Portenta_H7, etc. boards + using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/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 + + Version: 1.7.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/08/2020 Initial coding/porting to support nRF52, SAM DUE and SAMD21/SAMD51 boards using W5x00 Ethernet + (Ethernet, EthernetLarge, Ethernet2, Ethernet3 library), WiFiNINA and ESP8266/ESP32-AT shields + ... + 1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet + 1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet + 1.5.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.5.2 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 + 1.6.0 K Hoang 10/03/2022 Fix memory leak bug. Optimize code + 1.6.1 K Hoang 12/03/2022 Fix memory management bug + 1.7.0 K Hoang 12/03/2022 Convert to `h-only` style library + 1.7.1 K Hoang 10/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040/ESP32 + 1.7.2 K Hoang 11/04/2022 Fix missing paragraph in `library.properties` + **********************************************************************************************************************************/ + +/********************************************************************************************************************************* + Copyright (c) 2012, 2016 Oracle and/or its affiliates. All rights reserved. + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + **********************************************************************************************************************************/ + +#pragma once + +#ifndef MYSQL_GENERIC_DEBUG_H +#define MYSQL_GENERIC_DEBUG_H + +#include + +const char CONNECTED[] /*PROGMEM*/ = "Connected"; +const char DISCONNECTED[] /*PROGMEM*/ = "Disconnected."; + +const char MEMORY_ERROR[] /*PROGMEM*/ = "Memory error."; +const char PACKET_ERROR[] /*PROGMEM*/ = "Packet error."; +const char READ_TIMEOUT[] /*PROGMEM*/ = "ERROR: Timeout waiting for client."; + +const char BAD_MOJO[] /*PROGMEM*/ = "Bad mojo. EOF found reading column header."; +const char ROWS[] /*PROGMEM*/ = " rows in result."; +const char READ_COLS[] /*PROGMEM*/ = "ERROR: You must read the columns first!"; +const char NOT_CONNECTED[] /*PROGMEM*/ = "ERROR: Class requires connected server."; + + +#ifdef MYSQL_DEBUG_PORT + #define MYSQL_DEBUG_OUTPUT MYSQL_DEBUG_PORT +#else + #define MYSQL_DEBUG_OUTPUT Serial +#endif + +// Change _MYSQL_LOGLEVEL_ to set tracing and logging verbosity +// 0: DISABLED: no logging +// 1: ERROR: errors +// 2: WARN: errors and warnings +// 3: INFO: errors, warnings and informational (default) +// 4: DEBUG: errors, warnings, informational and debug + +#ifndef _MYSQL_LOGLEVEL_ +#define _MYSQL_LOGLEVEL_ 0 +#endif + +////////////////////////////////////////// + +const char MYSQL_MARK[] = "[SQL] "; +const char MYSQL_SP[] = " "; + +#define MYSQL_PRINT MYSQL_DEBUG_OUTPUT.print +#define MYSQL_PRINTLN MYSQL_DEBUG_OUTPUT.println + +#define MYSQL_PRINT_MARK MYSQL_PRINT(MYSQL_MARK) +#define MYSQL_PRINT_SP MYSQL_PRINT(MYSQL_SP) + +/////////////////////////////////////////////////// + +#define MYSQL_DISPLAY(x) { MYSQL_PRINTLN(x); } +#define MYSQL_DISPLAY0(x) { MYSQL_PRINT(x); } +#define MYSQL_DISPLAY1(x,y) { MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINTLN(y); } +#define MYSQL_DISPLAY2(x,y,z) { MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINT(y); MYSQL_PRINT_SP; MYSQL_PRINTLN(z); } +#define MYSQL_DISPLAY3(x,y,z,w) { MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINT(y); MYSQL_PRINT_SP; MYSQL_PRINT(z); MYSQL_PRINT_SP; MYSQL_PRINTLN(w); } +#define MYSQL_DISPLAY5(x,y,z,w,xx,yy) { MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINT(y); MYSQL_PRINT_SP; MYSQL_PRINT(z); MYSQL_PRINT_SP; MYSQL_PRINT(w); MYSQL_PRINT_SP; MYSQL_PRINT(xx); MYSQL_PRINT_SP; MYSQL_PRINTLN(yy); } + +/////////////////////////////////////////////////// + +#define MYSQL_LOGERROR(x) if(_MYSQL_LOGLEVEL_>0) { MYSQL_PRINT_MARK; MYSQL_PRINTLN(x); } +#define MYSQL_LOGERROR0(x) if(_MYSQL_LOGLEVEL_>0) { MYSQL_PRINT(x); } +#define MYSQL_LOGERROR0LN(x) if(_MYSQL_LOGLEVEL_>0) { MYSQL_PRINTLN(x); } +#define MYSQL_LOGERROR1(x,y) if(_MYSQL_LOGLEVEL_>0) { MYSQL_PRINT_MARK; MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINTLN(y); } +#define MYSQL_LOGERROR2(x,y,z) if(_MYSQL_LOGLEVEL_>0) { MYSQL_PRINT_MARK; MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINT(y); MYSQL_PRINT_SP; MYSQL_PRINTLN(z); } +#define MYSQL_LOGERROR3(x,y,z,w) if(_MYSQL_LOGLEVEL_>0) { MYSQL_PRINT_MARK; MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINT(y); MYSQL_PRINT_SP; MYSQL_PRINT(z); MYSQL_PRINT_SP; MYSQL_PRINTLN(w); } + +/////////////////////////////////////////////////// + +#define MYSQL_LOGWARN(x) if(_MYSQL_LOGLEVEL_>1) { MYSQL_PRINT_MARK; MYSQL_PRINTLN(x); } +#define MYSQL_LOGWARN0(x) if(_MYSQL_LOGLEVEL_>1) { MYSQL_PRINT(x); } +#define MYSQL_LOGWARN0LN(x) if(_MYSQL_LOGLEVEL_>1) { MYSQL_PRINTLN(x); } +#define MYSQL_LOGWARN1(x,y) if(_MYSQL_LOGLEVEL_>1) { MYSQL_PRINT_MARK; MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINTLN(y); } +#define MYSQL_LOGWARN2(x,y,z) if(_MYSQL_LOGLEVEL_>1) { MYSQL_PRINT_MARK; MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINT(y); MYSQL_PRINT_SP; MYSQL_PRINTLN(z); } +#define MYSQL_LOGWARN3(x,y,z,w) if(_MYSQL_LOGLEVEL_>1) { MYSQL_PRINT_MARK; MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINT(y); MYSQL_PRINT_SP; MYSQL_PRINT(z); MYSQL_PRINT_SP; MYSQL_PRINTLN(w); } + +/////////////////////////////////////////////////// + +#define MYSQL_LOGINFO(x) if(_MYSQL_LOGLEVEL_>2) { MYSQL_PRINT_MARK; MYSQL_PRINTLN(x); } +#define MYSQL_LOGINFO0(x) if(_MYSQL_LOGLEVEL_>2) { MYSQL_PRINT(x); } +#define MYSQL_LOGINFO0LN(x) if(_MYSQL_LOGLEVEL_>2) { MYSQL_PRINTLN(x); } +#define MYSQL_LOGINFO1(x,y) if(_MYSQL_LOGLEVEL_>2) { MYSQL_PRINT_MARK; MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINTLN(y); } +#define MYSQL_LOGINFO2(x,y,z) if(_MYSQL_LOGLEVEL_>2) { MYSQL_PRINT_MARK; MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINT(y); MYSQL_PRINT_SP; MYSQL_PRINTLN(z); } +#define MYSQL_LOGINFO3(x,y,z,w) if(_MYSQL_LOGLEVEL_>2) { MYSQL_PRINT_MARK; MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINT(y); MYSQL_PRINT_SP; MYSQL_PRINT(z); MYSQL_PRINT_SP; MYSQL_PRINTLN(w); } + +/////////////////////////////////////////////////// + +#define MYSQL_LOGDEBUG(x) if(_MYSQL_LOGLEVEL_>3) { MYSQL_PRINT_MARK; MYSQL_PRINTLN(x); } +#define MYSQL_LOGDEBUG0(x) if(_MYSQL_LOGLEVEL_>3) { MYSQL_PRINT(x); } +#define MYSQL_LOGDEBUG0LN(x) if(_MYSQL_LOGLEVEL_>3) { MYSQL_PRINTLN(x); } +#define MYSQL_LOGDEBUG1(x,y) if(_MYSQL_LOGLEVEL_>3) { MYSQL_PRINT_MARK; MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINTLN(y); } +#define MYSQL_LOGDEBUG2(x,y,z) if(_MYSQL_LOGLEVEL_>3) { MYSQL_PRINT_MARK; MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINT(y); MYSQL_PRINT_SP; MYSQL_PRINTLN(z); } +#define MYSQL_LOGDEBUG3(x,y,z,w) if(_MYSQL_LOGLEVEL_>3) { MYSQL_PRINT_MARK; MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINT(y); MYSQL_PRINT_SP; MYSQL_PRINT(z); MYSQL_PRINT_SP; MYSQL_PRINTLN(w); } + +/////////////////////////////////////////////////// + +#define MYSQL_LOGLEVEL5(x) if(_MYSQL_LOGLEVEL_>4) { MYSQL_PRINT_MARK; MYSQL_PRINTLN(x); } +#define MYSQL_LOGLEVEL5_0(x) if(_MYSQL_LOGLEVEL_>4) { MYSQL_PRINT(x); } +#define MYSQL_LOGLEVEL5_0LN(x) if(_MYSQL_LOGLEVEL_>4) { MYSQL_PRINTLN(x); } +#define MYSQL_LOGLEVEL5_1(x,y) if(_MYSQL_LOGLEVEL_>4) { MYSQL_PRINT_MARK; MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINTLN(y); } +#define MYSQL_LOGLEVEL5_2(x,y,z) if(_MYSQL_LOGLEVEL_>4) { MYSQL_PRINT_MARK; MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINT(y); MYSQL_PRINT_SP; MYSQL_PRINTLN(z); } +#define MYSQL_LOGLEVEL5_3(x,y,z,w) if(_MYSQL_LOGLEVEL_>4) { MYSQL_PRINT_MARK; MYSQL_PRINT(x); MYSQL_PRINT_SP; MYSQL_PRINT(y); MYSQL_PRINT_SP; MYSQL_PRINT(z); MYSQL_PRINT_SP; MYSQL_PRINTLN(w); } + +/////////////////////////////////////////////////// + +#endif // MYSQL_GENERIC_DEBUG_H diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Encrypt_Sha1.h b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Encrypt_Sha1.h new file mode 100644 index 0000000..ff328c7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Encrypt_Sha1.h @@ -0,0 +1,88 @@ +/********************************************************************************************************************************* + MySQL_Generic_Encrypt_Sha1.h + + GNU GPL v3: + This file is part of the code entitled, "cryptosuite" available at https://code.google.com/p/cryptosuite/. The file was copied from that + repository and renamed for use in Connector/Arduino to preserve compatibility and protect against namespace collisions for users who + want to use the full cryptosuite functionality. For Connector/Arduino all that is needed is this one sha1 class. + + 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, WT32_ETH01, Teensy, Portenta_H7, etc. boards + using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/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 + + Version: 1.7.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/08/2020 Initial coding/porting to support nRF52, SAM DUE and SAMD21/SAMD51 boards using W5x00 Ethernet + (Ethernet, EthernetLarge, Ethernet2, Ethernet3 library), WiFiNINA and ESP8266/ESP32-AT shields + ... + 1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet + 1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet + 1.5.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.5.2 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 + 1.6.0 K Hoang 10/03/2022 Fix memory leak bug. Optimize code + 1.6.1 K Hoang 12/03/2022 Fix memory management bug + 1.7.0 K Hoang 12/03/2022 Convert to `h-only` style library + 1.7.1 K Hoang 10/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040/ESP32 + 1.7.2 K Hoang 11/04/2022 Fix missing paragraph in `library.properties` + **********************************************************************************************************************************/ + +#pragma once + +#ifndef MYSQL_GENERIC_ENCRYPT_SHA1_H +#define MYSQL_GENERIC_ENCRYPT_SHA1_H + +#include +#include "Print.h" + +#define HASH_LENGTH 20 +#define BLOCK_LENGTH 64 + +union _buffer +{ + uint8_t b [BLOCK_LENGTH]; + uint32_t w [BLOCK_LENGTH / 4]; +}; + +union _state +{ + uint8_t b [HASH_LENGTH]; + uint32_t w [HASH_LENGTH / 4]; +}; + +class Encrypt_SHA1 : public Print +{ + public: + void init(); + void initHmac(const uint8_t* secret, const int& secretLength); + uint8_t* result(); + virtual size_t write(uint8_t data); + virtual size_t write(uint8_t* data, const int& length); + using Print::write; + + private: + void pad(); + void addUncounted(const uint8_t& data); + void hashBlock(); + uint32_t rol32(const uint32_t& number, const uint8_t& bits); + _buffer buffer; + uint8_t bufferOffset; + _state state; + uint32_t byteCount; + uint8_t keyBuffer[BLOCK_LENGTH]; + uint8_t innerHash[HASH_LENGTH]; +}; + +//extern Encrypt_SHA1 Sha1; + +//#include "MySQL_Generic_Encrypt_Sha1_Impl.h" + +#endif // MYSQL_GENERIC_ENCRYPT_SHA1_H diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Encrypt_Sha1_Impl.h b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Encrypt_Sha1_Impl.h new file mode 100644 index 0000000..6edcbc6 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Encrypt_Sha1_Impl.h @@ -0,0 +1,208 @@ +/********************************************************************************************************************************* + MySQL_Generic_Encrypt_Sha1_Impl.h + + GNU GPL v3: + This file is part of the code entitled, "cryptosuite" available at https://code.google.com/p/cryptosuite/. The file was copied from that + repository and renamed for use in Connector/Arduino to preserve compatibility and protect against namespace collisions for users who + want to use the full cryptosuite functionality. For Connector/Arduino all that is needed is this one sha1 class. + + 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, WT32_ETH01, Teensy, Portenta_H7, etc. boards + using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/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 + + Version: 1.7.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/08/2020 Initial coding/porting to support nRF52, SAM DUE and SAMD21/SAMD51 boards using W5x00 Ethernet + (Ethernet, EthernetLarge, Ethernet2, Ethernet3 library), WiFiNINA and ESP8266/ESP32-AT shields + ... + 1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet + 1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet + 1.5.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.5.2 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 + 1.6.0 K Hoang 10/03/2022 Fix memory leak bug. Optimize code + 1.6.1 K Hoang 12/03/2022 Fix memory management bug + 1.7.0 K Hoang 12/03/2022 Convert to `h-only` style library + 1.7.1 K Hoang 10/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040/ESP32 + 1.7.2 K Hoang 11/04/2022 Fix missing paragraph in `library.properties` + **********************************************************************************************************************************/ + +#pragma once + +#ifndef MYSQL_GENERIC_ENCRYPT_SHA1_IMPL_H +#define MYSQL_GENERIC_ENCRYPT_SHA1_IMPL_H + +#include + +#define MYSQL_SHA1_K0 0x5a827999 +#define MYSQL_SHA1_K20 0x6ed9eba1 +#define MYSQL_SHA1_K40 0x8f1bbcdc +#define MYSQL_SHA1_K60 0xca62c1d6 + +const uint8_t sha1InitState[] PROGMEM = +{ + 0x01, 0x23, 0x45, 0x67, // H0 + 0x89, 0xab, 0xcd, 0xef, // H1 + 0xfe, 0xdc, 0xba, 0x98, // H2 + 0x76, 0x54, 0x32, 0x10, // H3 + 0xf0, 0xe1, 0xd2, 0xc3 // H4 +}; + +void Encrypt_SHA1::init() +{ + // KH + //memcpy_P(state.b, sha1InitState, HASH_LENGTH); + memcpy(state.b, sha1InitState, HASH_LENGTH); + + byteCount = 0; + bufferOffset = 0; +} + +uint32_t Encrypt_SHA1::rol32(const uint32_t& number, const uint8_t& bits) +{ + return ((number << bits) | (number >> (32 - bits))); +} + +void Encrypt_SHA1::hashBlock() +{ + // SHA1 only for now + uint8_t i; + uint32_t a, b, c, d, e, t; + + a = state.w[0]; + b = state.w[1]; + c = state.w[2]; + d = state.w[3]; + e = state.w[4]; + + for (i = 0; i < 80; i++) + { + if (i >= 16) + { + t = buffer.w[(i + 13) & 15] ^ buffer.w[(i + 8) & 15] ^ buffer.w[(i + 2) & 15] ^ buffer.w[i & 15]; + buffer.w[i & 15] = rol32(t, 1); + } + + if (i < 20) + { + t = (d ^ (b & (c ^ d))) + MYSQL_SHA1_K0; + } + else if (i < 40) + { + t = (b ^ c ^ d) + MYSQL_SHA1_K20; + } + else if (i < 60) + { + t = ((b & c) | (d & (b | c))) + MYSQL_SHA1_K40; + } + else + { + t = (b ^ c ^ d) + MYSQL_SHA1_K60; + } + + t += rol32(a, 5) + e + buffer.w[i & 15]; + e = d; + d = c; + c = rol32(b, 30); + b = a; + a = t; + } + + state.w[0] += a; + state.w[1] += b; + state.w[2] += c; + state.w[3] += d; + state.w[4] += e; +} + +void Encrypt_SHA1::addUncounted(const uint8_t& data) +{ + buffer.b[bufferOffset ^ 3] = data; + bufferOffset++; + + if (bufferOffset == BLOCK_LENGTH) + { + hashBlock(); + bufferOffset = 0; + } +} + +size_t Encrypt_SHA1::write(uint8_t data) +{ + ++byteCount; + addUncounted(data); + + // KH add + return 1; +} + +size_t Encrypt_SHA1::write(uint8_t* data, const int& length) +{ + for (int i = 0; i < length; i++) + { + write(data[i]); + } + + // KH add + return length; +} + +void Encrypt_SHA1::pad() +{ + // Implement SHA-1 padding (fips180-2 §5.1.1) + + // Pad with 0x80 followed by 0x00 until the end of the block + addUncounted(0x80); + + while (bufferOffset != 56) + addUncounted(0x00); + + // Append length in the last 8 bytes + addUncounted(0); // We're only using 32 bit lengths + addUncounted(0); // But SHA-1 supports 64 bit lengths + addUncounted(0); // So zero pad the top bits + addUncounted(byteCount >> 29); // Shifting to multiply by 8 + addUncounted(byteCount >> 21); // as SHA-1 supports bitstreams as well as + addUncounted(byteCount >> 13); // byte. + addUncounted(byteCount >> 5); + addUncounted(byteCount << 3); +} + + +uint8_t* Encrypt_SHA1::result() +{ + // Pad to complete the last block + pad(); + + // Swap byte order back + for (int i = 0; i < 5; i++) + { + uint32_t a, b; + + a = state.w[i]; + b = a << 24; + b |= (a << 8) & 0x00ff0000; + b |= (a >> 8) & 0x0000ff00; + b |= a >> 24; + state.w[i] = b; + } + + // Return pointer to hash (20 characters) + return state.b; +} + + +#define HMAC_IPAD 0x36 +#define HMAC_OPAD 0x5c + +static Encrypt_SHA1 Sha1; + +#endif // MYSQL_GENERIC_ENCRYPT_SHA1_IMPL_H diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Ethernet.h b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Ethernet.h new file mode 100644 index 0000000..1210383 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Ethernet.h @@ -0,0 +1,176 @@ +/********************************************************************************************************************************* + MySQL_Generic_Ethernet.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, WT32_ETH01, Teensy, Portenta_H7, etc. boards + using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/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 + + Version: 1.7.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/08/2020 Initial coding/porting to support nRF52, SAM DUE and SAMD21/SAMD51 boards using W5x00 Ethernet + (Ethernet, EthernetLarge, Ethernet2, Ethernet3 library), WiFiNINA and ESP8266/ESP32-AT shields + ... + 1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet + 1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet + 1.5.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.5.2 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 + 1.6.0 K Hoang 10/03/2022 Fix memory leak bug. Optimize code + 1.6.1 K Hoang 12/03/2022 Fix memory management bug + 1.7.0 K Hoang 12/03/2022 Convert to `h-only` style library + 1.7.1 K Hoang 10/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040/ESP32 + 1.7.2 K Hoang 11/04/2022 Fix missing paragraph in `library.properties` + **********************************************************************************************************************************/ + +#ifndef MYSQL_GENERIC_ETHERNET_H +#define MYSQL_GENERIC_ETHERNET_H + +#include + +/////////////////////////////////////////////////////// + +#if USE_ETHERNET_PORTENTA_H7 + #include + #include + + EthernetClient client; + + #define SHIELD_TYPE "Ethernet using Portenta_Ethernet Library" + +////////////////////////////////////// + +#elif USE_QN_ETHERNET + #include + using namespace qindesign::network; + + EthernetClient client; + + #define SHIELD_TYPE "Ethernet using Teensy 4.1 QNEthernet Library" + +////////////////////////////////////// + +#elif USE_NATIVE_ETHERNET + #include "NativeEthernet.h" + + EthernetClient client; + + #define SHIELD_TYPE "Ethernet using Teensy 4.1 NativeEthernet Library" + +////////////////////////////////////// + +#elif USE_ETHERNET_LAN8742A + #include + #include + + EthernetClient client; + + #define SHIELD_TYPE "LAN8742A Ethernet & STM32Ethernet Library" + +////////////////////////////////////// + +#elif USE_ETHERNET_LAN8720 + #include + #include + + EthernetClient client; + + #define SHIELD_TYPE "LAN8720 Ethernet & STM32Ethernet Library" + +////////////////////////////////////// + +#elif USE_ETHERNET_GENERIC + #if (ESP32) + #include + + // Optional SPI2 + //#define USING_SPI2 true + + #if USING_SPI2 + #define PIN_MISO HSPI_IOMUX_PIN_NUM_MISO + #define PIN_MOSI HSPI_IOMUX_PIN_NUM_MOSI + #define PIN_SCK HSPI_IOMUX_PIN_NUM_CLK + #define PIN_SS HSPI_IOMUX_PIN_NUM_CS + + #define SHIELD_TYPE "W5x00 using Ethernet_Generic Library on SPI2" + + #else + + #define PIN_MISO MISO + #define PIN_MOSI MOSI + #define PIN_SCK SCK + #define PIN_SS SS + + #define SHIELD_TYPE "W5x00 using Ethernet_Generic Library on SPI" + + #endif + + #else + #if USING_SPI2 + #define SHIELD_TYPE "W5x00 using Ethernet_Generic Library on SPI1" + #else + #define SHIELD_TYPE "W5x00 using Ethernet_Generic Library on SPI0/SPI" + #endif + #endif + + #include "Ethernet_Generic.h" + + EthernetClient client; + +////////////////////////////////////// + +#elif USE_ETHERNET_ESP8266 + #include "Ethernet_ESP8266.h" + + EthernetClient client; + + #define SHIELD_TYPE "W5x00 using Ethernet_ESP8266 Library" + +////////////////////////////////////// + +#elif USE_ETHERNET_ENC + #include "EthernetENC.h" + + EthernetClient client; + + #define SHIELD_TYPE "ENC28J60 using EthernetENC Library" + +////////////////////////////////////// + +#elif USE_CUSTOM_ETHERNET + // You have to include an Ethernet library in your program + //#include "Ethernet_XYZ.h" + //#include "EthernetLarge.h" + + EthernetClient client; + + #if !defined(SHIELD_TYPE) + #define SHIELD_TYPE "Custom Ethernet using your choice of Library" + #endif + +////////////////////////////////////// + +#else + + #ifdef USE_ETHERNET_GENERIC + #undef USE_ETHERNET_GENERIC + #endif + #define USE_ETHERNET_GENERIC true + #include "Ethernet_Generic.h" + + EthernetClient client; + + #define SHIELD_TYPE "W5x00 using default Ethernet_Generic Library" + +#endif + +/////////////////////////////////////////////////////// + +#endif //MYSQL_GENERIC_ETHERNET_H diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Packet.h b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Packet.h new file mode 100644 index 0000000..15800a2 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Packet.h @@ -0,0 +1,119 @@ +/********************************************************************************************************************************* + MySQL_Generic_Packet.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, WT32_ETH01, Teensy, Portenta_H7, etc. boards + using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/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 + + Version: 1.7.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/08/2020 Initial coding/porting to support nRF52, SAM DUE and SAMD21/SAMD51 boards using W5x00 Ethernet + (Ethernet, EthernetLarge, Ethernet2, Ethernet3 library), WiFiNINA and ESP8266/ESP32-AT shields + ... + 1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet + 1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet + 1.5.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.5.2 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 + 1.6.0 K Hoang 10/03/2022 Fix memory leak bug. Optimize code + 1.6.1 K Hoang 12/03/2022 Fix memory management bug + 1.7.0 K Hoang 12/03/2022 Convert to `h-only` style library + 1.7.1 K Hoang 10/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040/ESP32 + 1.7.2 K Hoang 11/04/2022 Fix missing paragraph in `library.properties` + **********************************************************************************************************************************/ + +/********************************************************************************************************************************* + Copyright (c) 2012, 2016 Oracle and/or its affiliates. All rights reserved. + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + **********************************************************************************************************************************/ + +#pragma once + +#ifndef MYSQL_GENERIC_PACKET_H +#define MYSQL_GENERIC_PACKET_H + +// KH +#include +#include + +#define MYSQL_OK_PACKET 0x00 +#define MYSQL_EOF_PACKET 0xfe +#define MYSQL_ERROR_PACKET 0xff + +// KH, for validating packet size +#define MAX_TRANSMISSION_UNIT 1500 +////// + +class MySQL_Packet +{ + public: + byte *buffer; // buffer for reading packets + + // KH, from v1.0.1 + uint16_t largest_buffer_size = 0; + ////// + + int packet_len; // length of current packet + Client *client; // instance of client class (e.g. EthernetClient) + char *server_version; // save server version from handshake + + MySQL_Packet(Client *client_instance); + virtual ~MySQL_Packet() + { + if (buffer) + { + MYSQL_LOGDEBUG("Free buffer"); + + free(buffer); + } + if (server_version) + { + MYSQL_LOGDEBUG("Free server_version"); + + free(server_version); + } + }; + + bool complete_handshake(char *user, char *password); + void send_authentication_packet(char *user, char *password, char *db = NULL); + void parse_handshake_packet(); + bool scramble_password(char *password, byte *pwd_hash); + + // KH, mod from v1.0.2. Return true if valid packet + bool read_packet(); + + int get_packet_type(); + void parse_error_packet(); + int get_lcb_len(const int& offset); + int read_int(const int& offset, const int& size = 0); + void store_int(byte *buff, const long& value, const int& size); + int read_lcb_int(const int& offset); + int wait_for_bytes(const int& bytes_need); + + void print_packet(); + + private: + byte seed[20]; +}; + +//#include + + +#endif // MYSQL_GENERIC_PACKET_H diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Packet_Impl.h b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Packet_Impl.h new file mode 100644 index 0000000..ca9c2f7 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Packet_Impl.h @@ -0,0 +1,778 @@ +/********************************************************************************************************************************* + MySQL_Generic_Packet_Impl.h + + This file defines the base packet handling code for connecting to a MySQL/MariaDB server and executing queries. + + 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, WT32_ETH01, Teensy, Portenta_H7, etc. boards + using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/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 + + Version: 1.7.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/08/2020 Initial coding/porting to support nRF52, SAM DUE and SAMD21/SAMD51 boards using W5x00 Ethernet + (Ethernet, EthernetLarge, Ethernet2, Ethernet3 library), WiFiNINA and ESP8266/ESP32-AT shields + ... + 1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet + 1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet + 1.5.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.5.2 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 + 1.6.0 K Hoang 10/03/2022 Fix memory leak bug. Optimize code + 1.6.1 K Hoang 12/03/2022 Fix memory management bug + 1.7.0 K Hoang 12/03/2022 Convert to `h-only` style library + 1.7.1 K Hoang 10/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040/ESP32 + 1.7.2 K Hoang 11/04/2022 Fix missing paragraph in `library.properties` + **********************************************************************************************************************************/ + +/********************************************************************************************************************************* + Copyright (c) 2012, 2016 Oracle and/or its affiliates. All rights reserved. + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + **********************************************************************************************************************************/ + +#pragma once + +#ifndef MYSQL_GENERIC_PACKET_IMPL_H +#define MYSQL_GENERIC_PACKET_IMPL_H + +#include + +#include + +// KH, from v1.0.1 +#if ( USE_UIP_ETHERNET || USING_WIFIESPAT_LIB || USING_WIFI_ESP_AT ) + #define MYSQL_DATA_TIMEOUT 10000 // UIPEthernet client wait in milliseconds !!!! +#else + #define MYSQL_DATA_TIMEOUT 6000 // Client wait in milliseconds +#endif +////// + +#define MYSQL_WAIT_INTERVAL 300 // WiFi client wait interval + +/* + Constructor + + Initialize the buffer and store client instance. +*/ +MySQL_Packet::MySQL_Packet(Client *client_instance) +{ + buffer = NULL; + server_version = NULL; + client = client_instance; +} + +/* + send_authentication_packet + + This method builds a response packet used to respond to the server's + challenge packet (called the handshake packet). It includes the user + name and password scrambled using the SHA1 seed from the handshake + packet. It also sets the character set (default is 8 which you can + change to meet your needs). + + Note: you can also set the default database in this packet. See + the code before for a comment on where this happens. + + The authentication packet is defined as follows. + + Bytes Name + ----- ---- + 4 client_flags + 4 max_packet_size + 1 charset_number + 23 (filler) always 0x00... + n (Null-Terminated String) user + n (Length Coded Binary) scramble_buff (1 + x bytes) + n (Null-Terminated String) databasename (optional) + + user[in] User name + password[in] password + db[in] default database +*/ + +void MySQL_Packet::send_authentication_packet(char *user, char *password, char *db) +{ + byte this_buffer[256]; + byte scramble[20]; + + int size_send = 4; + + // client flags + this_buffer[size_send] = byte(0x0D); + this_buffer[size_send + 1] = byte(0xa6); + this_buffer[size_send + 2] = byte(0x03); + this_buffer[size_send + 3] = byte(0x00); + size_send += 4; + + // max_allowed_packet + this_buffer[size_send] = 0; + this_buffer[size_send + 1] = 0; + this_buffer[size_send + 2] = 0; + this_buffer[size_send + 3] = 1; + size_send += 4; + + // charset - default is 8 + this_buffer[size_send] = byte(0x08); + size_send += 1; + + for (int i = 0; i < 24; i++) + this_buffer[size_send + i] = 0x00; + + size_send += 23; + + // user name + memcpy((char *) &this_buffer[size_send], user, strlen(user)); + size_send += strlen(user) + 1; + this_buffer[size_send - 1] = 0x00; + + if (scramble_password(password, scramble)) + { + this_buffer[size_send] = 0x14; + size_send += 1; + + for (int i = 0; i < 20; i++) + this_buffer[i + size_send] = scramble[i]; + + size_send += 20; + this_buffer[size_send] = 0x00; + } + + if (db) + { + memcpy((char *)&this_buffer[size_send], db, strlen(db)); + size_send += strlen(db) + 1; + this_buffer[size_send - 1] = 0x00; + } + else + { + this_buffer[size_send + 1] = 0x00; + size_send += 1; + } + + // Write packet size + int p_size = size_send - 4; + store_int(&this_buffer[0], p_size, 3); + this_buffer[3] = byte(0x01); + + // Write the packet + MYSQL_LOGINFO1("Writing this_buffer, size_send =", size_send); + + client->write((uint8_t*)this_buffer, size_send); + client->flush(); +} + +/* + scramble_password - Build a SHA1 scramble of the user password + + This method uses the password hash seed sent from the server to + form a SHA1 hash of the password. This is used to send back to + the server to complete the challenge and response step in the + authentication handshake. + + password[in] User's password in clear text + pwd_hash[in] Seed from the server + + Returns bool - True = scramble succeeded +*/ +bool MySQL_Packet::scramble_password(char *password, byte *pwd_hash) +{ + byte *digest; + byte hash1[20]; + byte hash2[20]; + byte hash3[20]; + byte pwd_buffer[40]; + + if (strlen(password) == 0) + return false; + + // hash1 + Sha1.init(); + Sha1.print(password); + digest = Sha1.result(); + memcpy(hash1, digest, 20); + + // hash2 + Sha1.init(); + Sha1.write(hash1, 20); + digest = Sha1.result(); + memcpy(hash2, digest, 20); + + // hash3 of seed + hash2 + Sha1.init(); + memcpy(pwd_buffer, &seed, 20); + memcpy(pwd_buffer + 20, hash2, 20); + Sha1.write(pwd_buffer, 40); + digest = Sha1.result(); + memcpy(hash3, digest, 20); + + // XOR for hash4 + for (int i = 0; i < 20; i++) + pwd_hash[i] = hash1[i] ^ hash3[i]; + + return true; +} + +/* + wait_for_bytes - Wait until data is available for reading + + This method is used to permit the connector to respond to servers + that have high latency or execute long queries. The timeout is + set by MYSQL_DATA_TIMEOUT. Adjust this value to match the performance of + your server and network. + + It is also used to read how many bytes in total are available from the + server. Thus, it can be used to know how large a data burst is from + the server. + + bytes_need[in] Bytes count to wait for + + Returns integer - Number of bytes available to read. +*/ +int MySQL_Packet::wait_for_bytes(const int& bytes_need) +{ + const long wait_till = millis() + MYSQL_DATA_TIMEOUT; + int num = 0; + + long now = 0; + + do + { + if ( (now == 0) || ( millis() - now ) > MYSQL_WAIT_INTERVAL ) + { + now = millis(); + num = client->available(); + + MYSQL_LOGLEVEL5_3("MySQL_Packet::wait_for_bytes: Num bytes= ", num, ", need bytes= ", bytes_need); + + if (num >= bytes_need) + break; + } + + yield(); + //delay(0); + } while (now < wait_till); + + if (num == 0 && now >= wait_till) + { + MYSQL_LOGDEBUG("MySQL_Packet::wait_for_bytes: client->stop"); + + //client->stop(); + } + + MYSQL_LOGDEBUG1("MySQL_Packet::wait_for_bytes: OK, Num bytes= ", num); + ////// + + return num; +} + +/* + read_packet - Read a packet from the server and store it in the buffer + + This method reads the bytes sent by the server as a packet. All packets + have a packet header defined as follows. + + Bytes Name + ----- ---- + 3 Packet Length + 1 Packet Number + + Thus, the length of the packet (not including the packet header) can + be found by reading the first 4 bytes from the server then reading + N bytes for the packet payload. +*/ + +//KH, from v1.0.1. Use largest alocated buffer and keep until larger packet is received +// TODO: Pass buffer pointer instead of using global buffer + +// KH, mod from v1.0.2. Return true if valid packet +bool MySQL_Packet::read_packet() +{ + #define PACKET_HEADER_SZ 4 + + byte local[PACKET_HEADER_SZ]; + + MYSQL_LOGLEVEL5("MySQL_Packet::read_packet: step 1"); + + // KH, be sure to safely clear the buffer + if ( largest_buffer_size > 0 ) + memset(buffer, 0, largest_buffer_size); + + // Read packet header + if (wait_for_bytes(PACKET_HEADER_SZ) < PACKET_HEADER_SZ) + { + // KH, add + packet_len = 0; + ////// + + MYSQL_LOGINFO1("MySQL_Packet::read_packet: ", READ_TIMEOUT); + + return false; + } + + MYSQL_LOGLEVEL5("MySQL_Packet::read_packet: step 2"); + + // KH, clear packet_len + packet_len = 0; + + for (int i = 0; i < PACKET_HEADER_SZ; i++) + local[i] = client->read(); + + // Get packet length + packet_len = local[0]; + packet_len += (local[1] << 8); + packet_len += ((uint32_t)local[2] << 16); + + // We must wait for slow arriving packets for Ethernet shields only. + /* + if (wait_for_bytes(packet_len) < packet_len) + { + MYSQL_LOGERROR(READ_TIMEOUT); + return false; + } + */ + + MYSQL_LOGINFO1("MySQL_Packet::read_packet: packet_len= ", packet_len); + + // Check for valid packet. + // KH mod + if ( (packet_len < 0) || ( packet_len > MAX_TRANSMISSION_UNIT ) ) + { + MYSQL_LOGERROR(PACKET_ERROR); + packet_len = 0; + + return false; + } + + if ( largest_buffer_size < packet_len + PACKET_HEADER_SZ ) + { + if (largest_buffer_size == 0 ) + { + // Check if we need to allocate buffer the first time + largest_buffer_size = packet_len + PACKET_HEADER_SZ; + MYSQL_LOGINFO1("MySQL_Packet::read_packet: First time allocate buffer, size = ", largest_buffer_size); + + buffer = (byte *) malloc(largest_buffer_size); + } + else + { + // Check if we need to reallocate buffer + largest_buffer_size = packet_len + PACKET_HEADER_SZ; + MYSQL_LOGINFO1("MySQL_Packet::read_packet: Reallocate buffer, size = ", largest_buffer_size); + + buffer = (byte *) realloc(buffer, largest_buffer_size); + } + } + + if (buffer == NULL) + { + MYSQL_LOGERROR("MySQL_Packet::read_packet: NULL buffer"); + largest_buffer_size = 0; + + return false; + } + else + { + memset(buffer, 0, largest_buffer_size); + } + + for (int i = 0; i < PACKET_HEADER_SZ; i++) + buffer[i] = local[i]; + + for (int i = PACKET_HEADER_SZ; i < packet_len + PACKET_HEADER_SZ; i++) + buffer[i] = client->read(); + + MYSQL_LOGDEBUG("MySQL_Packet::read_packet: exit"); + + return true; +} + + +/* + parse_handshake_packet - Decipher the server's challenge data + + This method reads the server version string and the seed from the + server. The handshake packet is defined as follows. + + Bytes Name + ----- ---- + 1 protocol_version + n (Null-Terminated String) server_version + 4 thread_id + 8 scramble_buff + 1 (filler) always 0x00 + 2 server_capabilities + 1 server_language + 2 server_status + 2 server capabilities (two upper bytes) + 1 length of the scramble seed + 10 (filler) always 0 + n rest of the plugin provided data + (at least 12 bytes) + 1 \0 byte, terminating the second part of + a scramble seed +*/ +// KH, TODO: Pass buffer pointer instead of using global buffer +void MySQL_Packet::parse_handshake_packet() +{ + if (!buffer) + { + MYSQL_LOGERROR("MySQL_Packet::parse_handshake_packet: NULL buffer"); + return; + } + + int i = 5; + + do + { + i++; + } while (buffer[i - 1] != 0x00); + + if (i > 5) + { + server_version = (char *) malloc(i - 5); + + if (server_version) + { + strncpy(server_version, (char *) &buffer[5], i - 5); + server_version[i - 5 - 1] = 0; + } + } + + // Capture the first 8 characters of seed + i += 4; // Skip thread id + + for (int j = 0; j < 8; j++) + { + seed[j] = buffer[i + j]; + } + + // Capture rest of seed + i += 27; // skip ahead + + for (int j = 0; j < 12; j++) + { + seed[j + 8] = buffer[i + j]; + } +} + +/* + parse_error_packet - Display the error returned from the server + + This method parses an error packet from the server and displays the + error code and text via Serial.print. The error packet is defined + as follows. + + Note: the error packet is already stored in the buffer since this + packet is not an expected response. + + Bytes Name + ----- ---- + 1 field_count, always = 0xff + 2 errno + 1 (sqlstate marker), always '#' + 5 sqlstate (5 characters) + n message +*/ +// KH, TODO: Pass buffer pointer instead of using global buffer +void MySQL_Packet::parse_error_packet() +{ + MYSQL_LOGDEBUG2("Error: ", read_int(5, 2), " = "); + + if (!buffer) + { + MYSQL_LOGERROR("MySQL_Packet::parse_error_packet: NULL buffer"); + return; + } + + for (int i = 0; i < packet_len - 9; i++) + { + MYSQL_LOGDEBUG0((char)buffer[i + 13]); + } + + MYSQL_LOGDEBUG0LN("."); +} + + +/* + get_packet_type - Returns the packet type received from the server. + + Bytes Name + ----- ---- + 1 (Length Coded Binary) field_count, always = 0 + 1-9 (Length Coded Binary) affected_rows + 1-9 (Length Coded Binary) insert_id + 2 server_status + 2 warning_count + n (until end of packet) message + + Returns integer - 0 = successful parse, packet type if not an Ok packet +*/ +// KH, TODO: Pass buffer pointer instead of using global buffer +int MySQL_Packet::get_packet_type() +{ + if (!buffer) + { + MYSQL_LOGERROR("MySQL_Packet::get_packet_type: NULL buffer"); + return -1; + } + + int type = buffer[4]; + + MYSQL_LOGDEBUG1("MySQL_Packet::get_packet_type: packet type= ", type); + + if (type == MYSQL_OK_PACKET) + { + MYSQL_LOGDEBUG("MySQL_Packet::get_packet_type: packet type= MYSQL_OK_PACKET"); + } + else if (type == MYSQL_EOF_PACKET) + { + MYSQL_LOGDEBUG("MySQL_Packet::get_packet_type: packet type= MYSQL_EOF_PACKET"); + } + else if (type == MYSQL_ERROR_PACKET) + { + MYSQL_LOGDEBUG("MySQL_Packet::get_packet_type: packet type= MYSQL_ERROR_PACKET"); + } + else + { + MYSQL_LOGDEBUG("MySQL_Packet::get_packet_type: Packet Type Error"); + } + + return type; +} + + +/* + get_lcb_len - Retrieves the length of a length coded binary value + + This reads the first byte from the offset into the buffer and returns + the number of bytes (size) that the integer consumes. It is used in + conjunction with read_int() to read length coded binary integers + from the buffer. + + Returns integer - number of bytes integer consumes +*/ +// KH, TODO: Pass buffer pointer instead of using global buffer +int MySQL_Packet::get_lcb_len(const int& offset) +{ + if (!buffer) + { + MYSQL_LOGERROR("MySQL_Packet::get_lcb_len: NULL buffer"); + return 0; + } + + int read_len = buffer[offset]; + + if (read_len > 250) + { + // read type: + byte type = buffer[offset + 1]; + + if (type == 0xfc) + read_len = 2; + else if (type == 0xfd) + read_len = 3; + else if (type == 0xfe) + read_len = 8; + } + else + { + read_len = 1; + } + + MYSQL_LOGDEBUG1("MySQL_Packet::get_lcb_len: read_len= ", read_len); + + return read_len; +} + +/* + read_int - Retrieve an integer from the buffer in size bytes. + + This reads an integer from the buffer at offset position indicated for + the number of bytes specified (size). + + offset[in] offset from start of buffer + size[in] number of bytes to use to store the integer + + Returns integer - integer from the buffer +*/ +// KH, TODO: Pass buffer pointer instead of using global buffer +int MySQL_Packet::read_int(const int& offset, const int& size) +{ + int value = 0; + int new_size = 0; + + if (!buffer) + { + MYSQL_LOGERROR("MySQL_Packet::read_int: NULL buffer"); + return -1; + } + + if (size == 0) + new_size = get_lcb_len(offset); + + if (size == 1) + return buffer[offset]; + + new_size = size; + int shifter = (new_size - 1) * 8; + + for (int i = new_size; i > 0; i--) + { + value += (buffer[i - 1] << shifter); + shifter -= 8; + } + + return value; +} + + +/* + store_int - Store an integer value into a byte array of size bytes. + + This writes an integer into the buffer at the current position of the + buffer. It will transform an integer of size to a length coded binary + form where 1-3 bytes are used to store the value (set by size). + + buff[in] pointer to location in internal buffer where the + integer will be stored + value[in] integer value to be stored + size[in] number of bytes to use to store the integer +*/ +void MySQL_Packet::store_int(byte *buff, const long& value, const int& size) +{ + if (!buff) + { + MYSQL_LOGERROR("MySQL_Packet::store_int: NULL buffer"); + return; + } + + memset(buff, 0, size); + + if (value <= 0xff) + buff[0] = (byte)value; + else if (value <= 0xffff) + { + buff[0] = (byte)value; + buff[1] = (byte)(value >> 8); + } + else if (value <= 0xffffff) + { + buff[0] = (byte)value; + buff[1] = (byte)(value >> 8); + buff[2] = (byte)(value >> 16); + } + else if (value > 0xffffff) + { + buff[0] = (byte)value; + buff[1] = (byte)(value >> 8); + buff[2] = (byte)(value >> 16); + buff[3] = (byte)(value >> 24); + } +} + +/* + read_lcb_int - Read an integer with len encoded byte + + This reads an integer from the buffer looking at the first byte in the offset + as the encoded length of the integer. + + offset[in] offset from start of buffer + + Returns integer - integer from the buffer +*/ +// KH, TODO: Pass buffer pointer instead of using global buffer +int MySQL_Packet::read_lcb_int(const int& offset) +{ + int len_size = 0; + int value = 0; + + if (!buffer) + { + MYSQL_LOGERROR("MySQL_Packet::read_lcb_int: NULL buffer"); + return -1; + } + + len_size = buffer[offset]; + + if (len_size < 252) + { + return buffer[offset]; + } + else if (len_size == 252) + { + len_size = 2; + } + else if (len_size == 253) + { + len_size = 3; + } + else + { + len_size = 8; + } + + int shifter = (len_size - 1) * 8; + + for (int i = len_size; i > 0; i--) + { + value += (buffer[offset + i] << shifter); + shifter -= 8; + } + + return value; +} + +/* + print_packet - Print the contents of a packet via Serial.print + + This method is a diagnostic method. It is best used to decipher a + packet from the server (or before being sent to the server). If you + are looking for additional program memory space, you can safely + delete this method. +*/ +// KH, TODO: Pass buffer pointer instead of using global buffer +void MySQL_Packet::print_packet() +{ + if (!buffer) + { + MYSQL_LOGERROR("MySQL_Packet::print_packet: NULL buffer"); + return; + } + + MYSQL_LOGDEBUG3("Packet: ", buffer[3], " contains no. bytes = ", packet_len + 3); + + MYSQL_LOGDEBUG0(" HEX: "); + + for (int i = 0; i < packet_len + 3; i++) + { + MYSQL_LOGDEBUG0(String(buffer[i], HEX)); + MYSQL_LOGDEBUG0(" "); + } + + MYSQL_LOGDEBUG0LN(""); + + MYSQL_LOGDEBUG0("ASCII: "); + + for (int i = 0; i < packet_len + 3; i++) + MYSQL_LOGDEBUG0((char)buffer[i]); + + MYSQL_LOGDEBUG0LN(""); +} + +#endif // MYSQL_GENERIC_PACKET_IMPL_H diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Query.h b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Query.h new file mode 100644 index 0000000..fd0d9e5 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Query.h @@ -0,0 +1,146 @@ +/********************************************************************************************************************************* + MySQL_Generic_Query.h + + This header file defines a query class for running queries on a MySQL/MariaDB server. + You can issue any command using SQL statements for inserting or retrieving data. + + 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, WT32_ETH01, Teensy, Portenta_H7, etc. boards + using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/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 + + Version: 1.7.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/08/2020 Initial coding/porting to support nRF52, SAM DUE and SAMD21/SAMD51 boards using W5x00 Ethernet + (Ethernet, EthernetLarge, Ethernet2, Ethernet3 library), WiFiNINA and ESP8266/ESP32-AT shields + ... + 1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet + 1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet + 1.5.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.5.2 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 + 1.6.0 K Hoang 10/03/2022 Fix memory leak bug. Optimize code + 1.6.1 K Hoang 12/03/2022 Fix memory management bug + 1.7.0 K Hoang 12/03/2022 Convert to `h-only` style library + 1.7.1 K Hoang 10/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040/ESP32 + 1.7.2 K Hoang 11/04/2022 Fix missing paragraph in `library.properties` + **********************************************************************************************************************************/ + +/********************************************************************************************************************************* + Copyright (c) 2012, 2016 Oracle and/or its affiliates. All rights reserved. + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + **********************************************************************************************************************************/ + +#pragma once + +#ifndef MYSQL_GENERIC_QUERY_H +#define MYSQL_GENERIC_QUERY_H + +#include "MySQL_Generic_Debug.h" + +#include + +// Comment this if you don't need SELECT queries to reduce memory footprint of the library. +#define WITH_SELECT + +#define MAX_FIELDS 0x20 // Maximum number of fields. Reduce to save memory. Default=32 + +#ifdef WITH_SELECT + +// Structure for retrieving a field (minimal implementation). +typedef struct +{ + char *db; + char *table; + char *name; +} field_struct; + +// Structure for storing result set metadata. +typedef struct +{ + int num_fields; // actual number of fields + field_struct *fields[MAX_FIELDS]; +} column_names; + +// Structure for storing row data. +typedef struct +{ + char *values[MAX_FIELDS]; +} row_values; + +#endif // WITH_SELECT + +class MySQL_Query +{ + public: + MySQL_Query(MySQL_Connection *connection); + ~MySQL_Query(); + bool execute(const char *query, bool progmem = false); + + private: + bool execute_query(const int& query_len); + +#ifdef WITH_SELECT + + public: + void close(); + column_names *get_columns(); + row_values *get_next_row(); + void show_results(); + + int get_rows_affected() + { + return rows_affected; + } + + int get_last_insert_id() + { + return last_insert_id; + } + + private: + void free_columns_buffer(); + void free_row_buffer(); + bool clear_ok_packet(); + + char *read_string(int *offset); + int get_field(field_struct *fs); + int get_row(); + bool get_fields(); + int get_row_values(); + column_names *query_result(); + + bool columns_read; + int num_cols; + + column_names columns; + row_values row; + + int rows_affected; + int last_insert_id; + +#endif + + MySQL_Connection *conn; +}; + +//#include + + +#endif // MYSQL_GENERIC_QUERY_H diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Query_Impl.h b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Query_Impl.h new file mode 100644 index 0000000..7544209 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_Query_Impl.h @@ -0,0 +1,773 @@ +/********************************************************************************************************************************* + MySQL_Generic_Query_Impl.h + + This file defines a query class for running queries on a MySQL/MariaDB server. + You can issue any command using SQL statements for inserting or retrieving data. + + 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, WT32_ETH01, Teensy, Portenta_H7, etc. boards + using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/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 + + Version: 1.7.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/08/2020 Initial coding/porting to support nRF52, SAM DUE and SAMD21/SAMD51 boards using W5x00 Ethernet + (Ethernet, EthernetLarge, Ethernet2, Ethernet3 library), WiFiNINA and ESP8266/ESP32-AT shields + ... + 1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet + 1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet + 1.5.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.5.2 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 + 1.6.0 K Hoang 10/03/2022 Fix memory leak bug. Optimize code + 1.6.1 K Hoang 12/03/2022 Fix memory management bug + 1.7.0 K Hoang 12/03/2022 Convert to `h-only` style library + 1.7.1 K Hoang 10/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040/ESP32 + 1.7.2 K Hoang 11/04/2022 Fix missing paragraph in `library.properties` + **********************************************************************************************************************************/ + +/********************************************************************************************************************************* + Copyright (c) 2012, 2016 Oracle and/or its affiliates. All rights reserved. + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + **********************************************************************************************************************************/ + +#pragma once + +#ifndef MYSQL_GENERIC_QUERY_IMPL_H +#define MYSQL_GENERIC_QUERY_IMPL_H + +#define COMMAND_HEADER_LEN 5 + +/* + Constructor + + Requires an instance of the MySQL_Connection class to communicate with a + MySQL server. + + connection[in] Connection to a MySQL server - must be connected. +*/ +MySQL_Query::MySQL_Query(MySQL_Connection *connection) +{ + conn = connection; + +#ifdef WITH_SELECT + columns.num_fields = 0; + + for (int f = 0; f < MAX_FIELDS; f++) + { + columns.fields[f] = NULL; + row.values[f] = NULL; + } + + columns_read = false; + rows_affected = -1; + last_insert_id = -1; +#endif +} + +/* + Destructor +*/ +MySQL_Query::~MySQL_Query() +{ +#ifdef WITH_SELECT + close(); +#endif +} + +/* + execute - Execute a SQL statement + + This method executes the query specified as a character array. It copies + the query to the local buffer then calls the execute_query() method to + execute the query. + + If a result set is available after the query executes, the field + packets and rows can be read separately using the get_field() and + get_row() methods. + + query[in] SQL statement (using normal memory access) + progmem[in] True if string is in program memory + + Returns bool - True = a result set is available for reading +*/ + +// TODO: Pass buffer pointer instead of using global buffer +bool MySQL_Query::execute(const char *query, bool progmem) +{ + int query_len; // length of query + + if (!conn->connected()) + { + MYSQL_LOGERROR(NOT_CONNECTED); + + return false; + } + + if (progmem) + { + query_len = (int) strlen_P(query); + } + else + { + query_len = (int) strlen(query); + } + + // KH, new from v1.0.1 + if ( conn->largest_buffer_size < query_len + COMMAND_HEADER_LEN ) + { + if ( conn->largest_buffer_size == 0 ) + { + // Check if we need to allocate buffer the first time. Don't need, but to be safe + conn->largest_buffer_size = query_len + COMMAND_HEADER_LEN; + MYSQL_LOGWARN1("MySQL_Query::execute: First time allocate buffer, size = ", conn->largest_buffer_size); + + conn->buffer = (byte *) malloc(conn->largest_buffer_size); + } + else + { + // Check if we need to reallocate buffer + conn->largest_buffer_size = query_len + COMMAND_HEADER_LEN; + MYSQL_LOGWARN1("MySQL_Query::execute: Reallocate buffer, size = ", conn->largest_buffer_size); + + conn->buffer = (byte *) realloc(conn->buffer, conn->largest_buffer_size); + } + } + else + { + MYSQL_LOGDEBUG3("MySQL_Query::execute: Reuse allocated buffer, conn->largest_buffer_size = ", conn->largest_buffer_size, " > ", query_len + COMMAND_HEADER_LEN); + } + + if (conn->buffer == NULL) + { + MYSQL_LOGERROR("MySQL_Query::execute: NULL buffer"); + + return false; + } + else + { + memset(conn->buffer, 0, conn->largest_buffer_size); + } + ////// + + // Write query to packet + if (progmem) + { + for (int c = 0; c < query_len; c++) + conn->buffer[c + COMMAND_HEADER_LEN] = pgm_read_byte_near(query + c); + } + else + { + memcpy(&conn->buffer[COMMAND_HEADER_LEN], query, query_len); + } + + MYSQL_LOGDEBUG1("MySQL_Query::execute: query = ", (char *) &conn->buffer[COMMAND_HEADER_LEN] ); + + // Send the query + return execute_query(query_len); +} + + +/* + execute_query - execute a query + + This method sends the query string to the server and waits for a + response. If the result is a result set, it returns true, if it is + an error, it processes the error packet and prints the error via + Serial.print(). If it is an Ok packet, it parses the packet and + returns false. + + query_len[in] Number of bytes in the query string + + Returns bool - true = result set available, + false = no result set returned. +*/ +// TODO: Pass buffer pointer instead of using global buffer +bool MySQL_Query::execute_query(const int& query_len) +{ + if (!conn->buffer) + { + MYSQL_LOGERROR("MySQL_Query::execute_query: NULL buffer"); + return false; + } + + // Reset the rows affected and last insert id before query. + rows_affected = -1; + last_insert_id = -1; + + conn->store_int(&conn->buffer[0], query_len + 1, 3); + conn->buffer[3] = byte(0x00); + conn->buffer[4] = byte(0x03); // command packet + + // Send the query + MYSQL_LOGDEBUG1("MySQL_Query::execute_query: query = ", (char *) &conn->buffer[COMMAND_HEADER_LEN] ); + + conn->client->write((uint8_t*)conn->buffer, query_len + COMMAND_HEADER_LEN); + conn->client->flush(); + + // Read a response packet and check it for Ok or Error. + // KH mod, check if packet_len is valid. + if ( !conn->read_packet() || ( conn->packet_len <= 0 ) || ( conn->packet_len > MAX_TRANSMISSION_UNIT ) ) + return false; + ////// + + int res = conn->get_packet_type(); + + if (res == MYSQL_ERROR_PACKET) + { + conn->parse_error_packet(); + return false; + } + else if (res == MYSQL_OK_PACKET || res == MYSQL_EOF_PACKET) + { + // Read the rows affected and last insert id. + int loc1 = conn->buffer[5]; // Location of rows affected + int loc2 = 5; + + if (loc1 < 252) + { + loc2++; + } + else if (loc1 == 252) + { + loc2 += 2; + } + else if (loc1 == 253) + { + loc2 += 3; + } + else + { + loc2 += 8; + } + + rows_affected = conn->read_lcb_int(5); + + if (rows_affected > 0) + { + last_insert_id = conn->read_lcb_int(loc2); + } + + return true; + } + + // Not an Ok packet, so we now have the result set to process. +#ifdef WITH_SELECT + columns_read = false; +#endif + return true; +} + +#ifdef WITH_SELECT +/* + Close + + Takes care of removing allocated memory. +*/ +void MySQL_Query::close() +{ + free_columns_buffer(); + free_row_buffer(); +} + + +/* + get_columns - Get a list of the columns (fields) + + This method returns an instance of the column_names structure + that contains an array of fields. + + Note: you should call free_columns_buffer() after consuming + the field data to free memory. +*/ +column_names *MySQL_Query::get_columns() +{ + free_columns_buffer(); + free_row_buffer(); + num_cols = 0; + + if (get_fields()) + { + columns_read = true; + return &columns; + } + + return NULL; +} + + +/* + get_next_row - Iterator for reading rows from a result set + + This method returns an instance of a structure (row_values) + that contains an array of strings representing the row + values returned from the server. + + The caller can use the values however needed - by first + converting them to a specific type or as a string. +*/ +row_values *MySQL_Query::get_next_row() +{ + int res = 0; + + free_row_buffer(); + + // Read the rows + MYSQL_LOGDEBUG("MySQL_Query::get_next_row: get_row_values"); + + res = get_row_values(); + + if (res != MYSQL_EOF_PACKET) + { + return &row; + } + + return NULL; +} + +/* + show_results - Show a result set from the server via Serial.print + + This method reads a result from the server and displays it via the + via the Serial.print methods. It can be used in cases where + you may want to issue a SELECT or SHOW and see the results on your + computer from the Arduino. + + It is also a good example of how to read a result set from the + because it uses the public methods designed to return result + sets from the server. +*/ +void MySQL_Query::show_results() +{ + column_names *cols; + int rows = 0; + + // Get the columns + cols = get_columns(); + + if (cols == NULL) + { + return; + } + + for (int f = 0; f < columns.num_fields; f++) + { + MYSQL_LOGERROR0(columns.fields[f]->name); + + if (f < columns.num_fields - 1) + MYSQL_LOGERROR0(','); + } + + MYSQL_LOGERROR0LN(""); + + // Read the rows + while (get_next_row()) + { + rows++; + + for (int f = 0; f < columns.num_fields; f++) + { + MYSQL_LOGERROR0(row.values[f]); + + if (f < columns.num_fields - 1) + MYSQL_LOGERROR0(','); + } + + free_row_buffer(); + MYSQL_LOGERROR0LN(""); + } + + // Report how many rows were read + MYSQL_LOGERROR0(rows); + MYSQL_LOGERROR0LN(ROWS); + + free_columns_buffer(); + + // Free any post-query messages in queue for stored procedures + clear_ok_packet(); +} + + +/* + clear_ok_packet - clear last Ok packet (if present) + + This method reads the header and status to see if this is an Ok packet. + If it is, it reads the packet and discards it. This is useful for + processing result sets from stored procedures. + + Returns False if the packet was not an Ok packet. +*/ +bool MySQL_Query::clear_ok_packet() +{ + int num = 0; + + do + { + num = conn->client->available(); + + if (num > 0) + { + // KH mod, check if packet_len is valid. + if ( !conn->read_packet() || ( conn->packet_len <= 0 ) || ( conn->packet_len > MAX_TRANSMISSION_UNIT ) ) + return false; + ////// + + if (conn->get_packet_type() != MYSQL_OK_PACKET) + { + conn->parse_error_packet(); + return false; + } + } + } while (num > 0); + + rows_affected = -1; + last_insert_id = -1; + + return true; +} + + +/* + free_columns_buffer - Free memory allocated for column names + + This method frees the memory allocated during the get_columns() + method. + + NOTICE: Failing to call this method after calling get_columns() + and consuming the column names, types, etc. will result + in a memory leak. The size of the leak will depend on + the size of the combined column names (bytes). +*/ +void MySQL_Query::free_columns_buffer() +{ + // clear the columns + for (int f = 0; f < MAX_FIELDS; f++) + { + if (columns.fields[f] != NULL) + { + free(columns.fields[f]->db); + free(columns.fields[f]->table); + free(columns.fields[f]->name); + free(columns.fields[f]); + } + + columns.fields[f] = NULL; + } + + num_cols = 0; + columns_read = false; +} + + +/* + free_row_buffer - Free memory allocated for row values + + This method frees the memory allocated during the get_next_row() + method. + + NOTICE: You must call this method at least once after you + have consumed the values you wish to process. Failing + to do will result in a memory leak equal to the sum + of the length of values and one byte for each max cols. +*/ +void MySQL_Query::free_row_buffer() +{ + // clear the row + for (int f = 0; f < MAX_FIELDS; f++) + { + if (row.values[f] != NULL) + { + free(row.values[f]); + } + + row.values[f] = NULL; + } +} + + +/* + read_string - Retrieve a string from the buffer + + This reads a string from the buffer. It reads the length of the string + as the first byte. + + offset[in] offset from start of buffer + + Returns string - String from the buffer +*/ +char *MySQL_Query::read_string(int *offset) +{ + char *str; + + MYSQL_LOGLEVEL5("MySQL_Query::read_string: step 1"); + + int len_bytes = conn->get_lcb_len(conn->buffer[*offset]); + int len = conn->read_int(*offset, len_bytes); + + MYSQL_LOGINFO1("MySQL_Query::read_string: offset = ", *offset); + MYSQL_LOGINFO3("MySQL_Query::read_string: len = ", len, "len_bytes =", len_bytes); + + if (len == 251) + { + // This is a null field. + str = (char *) malloc(5); + strcpy(str, "NULL"); + str[4] = 0x00; + *offset += len_bytes; + } + + // KH, new from v1.0.1 + if ( (len < 251) && (len > 0) ) + { + // TODO, KH, check where str is freed + str = (char *) malloc(len + 1); + + MYSQL_LOGINFO3("MySQL_Query::read_string: len = ", len, "conn->buffer size =", conn->largest_buffer_size); + + strncpy(str, (char *)&conn->buffer[*offset + len_bytes], len); + str[len] = 0x00; + *offset += len_bytes + len; + + MYSQL_LOGDEBUG1("MySQL_Query::read_string: str = ", str); + + return str; + } + + MYSQL_LOGDEBUG("MySQL_Query::read_string: return NULL"); + + return NULL; + ////// +} + + +/* + get_field - Read a field from the server + + This method reads a field packet from the server. Field packets are + defined as: + + Bytes Name + ----- ---- + n (Length Coded String) catalog + n (Length Coded String) db + n (Length Coded String) table + n (Length Coded String) org_table + n (Length Coded String) name + n (Length Coded String) org_name + 1 (filler) + 2 charsetnr + 4 length + 1 type + 2 flags + 1 decimals + 2 (filler), always 0x00 + n (Length Coded Binary) default + + Note: the sum of all db, column, and field names must be < 255 in length +*/ +int MySQL_Query::get_field(field_struct *fs) +{ + int len_bytes; + int len; + int offset; + + // KH add + if (conn->buffer == NULL) + { + MYSQL_LOGERROR("MySQL_Query::get_field: NULL buffer"); + return MYSQL_ERROR_PACKET; + } + ////// + + // Read field packets until EOF + MYSQL_LOGDEBUG("MySQL_Query::get_field: read_packet"); + + // KH mod, check if packet_len is valid. + if ( !conn->read_packet() || ( conn->packet_len <= 0 ) || ( conn->packet_len > MAX_TRANSMISSION_UNIT ) ) + return MYSQL_ERROR_PACKET; + ////// + + // KH, bug here and read garbage + if (conn->buffer && conn->buffer[4] != MYSQL_EOF_PACKET) + { + // calculate location of db + len_bytes = conn->get_lcb_len(4); + len = conn->read_int(4, len_bytes); + offset = 4 + len_bytes + len; + + MYSQL_LOGDEBUG("MySQL_Query::get_field: read_string to fs->db"); + fs->db = read_string(&offset); + MYSQL_LOGDEBUG1("MySQL_Query::get_field: fs->db = ", fs->db); + + // get table + MYSQL_LOGDEBUG("MySQL_Query::get_field: read_string to fs->table"); + fs->table = read_string(&offset); + MYSQL_LOGDEBUG1("MySQL_Query::get_field: fs->table = ", fs->table); + + // calculate location of name + len_bytes = conn->get_lcb_len(offset); + len = conn->read_int(offset, len_bytes); + offset += len_bytes + len; + + // get name + MYSQL_LOGDEBUG("MySQL_Query::get_field: read_string to fs->name"); + fs->name = read_string(&offset); + MYSQL_LOGDEBUG1("MySQL_Query::get_field: fs->name = ", fs->name); + + //return 0; + return MYSQL_OK_PACKET; + } + else if (conn->buffer && conn->buffer[4] == MYSQL_EOF_PACKET) + return MYSQL_EOF_PACKET; + else + return MYSQL_ERROR_PACKET; + ////// +} + + +/* + get_row - Read a row from the server and store it in the buffer + + This reads a single row and stores it in the buffer. If there are + no more rows, it returns MYSQL_EOF_PACKET. A row packet is defined as + follows. + + Bytes Name + ----- ---- + n (Length Coded String) (column value) + ... + + Note: each column is store as a length coded string concatenated + as a single stream + + Returns integer - MYSQL_EOF_PACKET if no more rows, 0 if more rows available +*/ +int MySQL_Query::get_row() +{ + // Read row packets + // KH mod, check if packet_len is valid.// get row + MYSQL_LOGDEBUG("MySQL_Query::get_row: read_packet"); + + if ( !conn->read_packet() || ( conn->packet_len <= 0 ) || ( conn->packet_len > MAX_TRANSMISSION_UNIT ) ) + return MYSQL_EOF_PACKET; //MYSQL_ERROR_PACKET; + ////// + + if (conn->buffer && conn->buffer[4] != MYSQL_EOF_PACKET) + return MYSQL_OK_PACKET; + + return MYSQL_EOF_PACKET; +} + + +/* + get_fields - reads the fields from the read buffer + + This method is used to read the field names, types, etc. + from the read buffer and store them in the columns structure + in the class. +*/ +bool MySQL_Query::get_fields() +{ + int num_fields = 0; + int res = 0; + + if (conn->buffer == NULL) + { + MYSQL_LOGERROR("MySQL_Query::get_fields: NULL buffer"); + return false; + } + + num_fields = conn->buffer[4]; // From result header packet + columns.num_fields = num_fields; + num_cols = num_fields; // Save this for later use + + for (int f = 0; f < num_fields; f++) + { + field_struct *field = (field_struct *) malloc(sizeof(field_struct)); + res = get_field(field); + + // KH + //if (res == MYSQL_EOF_PACKET) + if ( (res == MYSQL_EOF_PACKET) || (res == MYSQL_ERROR_PACKET) ) + { + MYSQL_LOGERROR(BAD_MOJO); + + return false; + } + + columns.fields[f] = field; + } + + // KH mod, check if packet_len is valid. + // EOF packet + MYSQL_LOGDEBUG("MySQL_Query::get_fields: read_packet"); + + if ( !conn->read_packet() || ( conn->packet_len <= 0 ) || ( conn->packet_len > MAX_TRANSMISSION_UNIT ) ) + return false; + ////// + + return true; +} + +/* + get_row_values - reads the row values from the read buffer + + This method is used to read the row column values + from the read buffer and store them in the row structure + in the class. +*/ +int MySQL_Query::get_row_values() +{ + int res = 0; + int offset = 0; + + // It is an error to try to read rows before columns + // are read. + if (!columns_read) + { + MYSQL_LOGERROR(READ_COLS); + + return MYSQL_EOF_PACKET; + } + + // Drop any row data already read + free_row_buffer(); + + // Read a row + MYSQL_LOGDEBUG("MySQL_Query::get_row_values: get_row"); + + res = get_row(); + + // KH mod + if ( (res != MYSQL_EOF_PACKET) && (res != MYSQL_ERROR_PACKET) ) + { + offset = 4; + + for (int f = 0; f < num_cols; f++) + { + row.values[f] = read_string(&offset); + } + } + + return res; +} + +#endif // WITH_SELECT + +#endif // MYSQL_GENERIC_QUERY_IMPL_H diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_WiFi.h b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_WiFi.h new file mode 100644 index 0000000..e1ba379 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_WiFi.h @@ -0,0 +1,93 @@ +/**************************************************************************************************************************** + MySQL_Generic_WiFi.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, WT32_ETH01, Teensy, Portenta_H7, etc. boards + using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/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 + + Version: 1.7.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/08/2020 Initial coding/porting to support nRF52, SAM DUE and SAMD21/SAMD51 boards using W5x00 Ethernet + (Ethernet, EthernetLarge, Ethernet2, Ethernet3 library), WiFiNINA and ESP8266/ESP32-AT shields + ... + 1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet + 1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet + 1.5.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.5.2 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 + 1.6.0 K Hoang 10/03/2022 Fix memory leak bug. Optimize code + 1.6.1 K Hoang 12/03/2022 Fix memory management bug + 1.7.0 K Hoang 12/03/2022 Convert to `h-only` style library + 1.7.1 K Hoang 10/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040/ESP32 + 1.7.2 K Hoang 11/04/2022 Fix missing paragraph in `library.properties` + **********************************************************************************************************************************/ + +#pragma once + +#ifndef MYSQL_GENERIC_WIFI_H +#define MYSQL_GENERIC_WIFI_H + +// ESP8266 and ESP32 built-in WiFi have highest priority and will override all other settings +#if (ESP8266) + #warning Using ESP8266 built-in WiFi + #include + WiFiClient client; + +#elif (ESP32) + #warning Using ESP32 built-in WiFi + #include + WiFiClient client; + +#elif USING_WIFI_ESP8266_AT + // Changed from USING_WIFI_ESP_AT to USING_WIFI_ESP8266_AT from v1.0.2 + #error Using ESP8266_AT Library not supported now + // Uncomment to use ESP32-AT commands + //#define USE_ESP32_AT true + + #include + #include + #include + ESP8266_AT_Client client; +#elif (USING_WIFININA_GENERIC) + #warning Using WiFiNINA_Generic Library + #include "WiFiNINA_Generic.h" + #include "WiFiClient_Generic.h" + WiFiClient client; + +#elif (USING_WIFININA) + #warning Using WiFiNINA Library + #include "WiFiNINA.h" + #include "WiFiClient.h" + WiFiClient client; + +#elif (USING_WIFIESPAT_LIB) + #warning Using WiFiEspAT Library + #include "WiFiEspAT.h" + WiFiClient client; + + // KH, from v1.5.0 +#elif USE_WIFI_PORTENTA_H7 + #warning Using Portenta_H7 WiFi Library + #include "WiFi.h" + WiFiClient client; + +#elif (USING_WIFI_CUSTOM) + #warning Using Custom WiFi Library. To modify according to Library. + #include "WiFi_XYZ.h" + #include "WiFi_XYZ_Client.h" + WiFiClient client; + +#else + #error You must specify a WiFi Library to use. + +#endif + +#endif //MYSQL_GENERIC_WIFI_H diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_WiFiNINA.h b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_WiFiNINA.h new file mode 100644 index 0000000..f3448c2 --- /dev/null +++ b/libraries/MySQL_MariaDB_Generic-1.7.2/src/MySQL_Generic_WiFiNINA.h @@ -0,0 +1,56 @@ +/**************************************************************************************************************************** + MySQL_Generic_WiFiNINA.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, WT32_ETH01, Teensy, Portenta_H7, etc. boards + using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/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 + + Version: 1.7.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 13/08/2020 Initial coding/porting to support nRF52, SAM DUE and SAMD21/SAMD51 boards using W5x00 Ethernet + (Ethernet, EthernetLarge, Ethernet2, Ethernet3 library), WiFiNINA and ESP8266/ESP32-AT shields + ... + 1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet + 1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet + 1.5.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.5.2 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 + 1.6.0 K Hoang 10/03/2022 Fix memory leak bug. Optimize code + 1.6.1 K Hoang 12/03/2022 Fix memory management bug + 1.7.0 K Hoang 12/03/2022 Convert to `h-only` style library + 1.7.1 K Hoang 10/04/2022 Use Ethernet_Generic library as default. Support SPI1/SPI2 for RP2040/ESP32 + 1.7.2 K Hoang 11/04/2022 Fix missing paragraph in `library.properties` + **********************************************************************************************************************************/ + +#pragma once + +#ifndef MYSQL_GENERIC_WIFININA_H +#define MYSQL_GENERIC_WIFININA_H + +#if (ESP8266 || ESP32) + #error This code is not intended to run on the ESP8266/ESP32 platform! Please check your Tools->Board setting +#endif + +#if (USING_WIFININA_GENERIC) + #warning Using WiFiNINA_Generic Library + #include "WiFiNINA_Generic.h" + #include "WiFiClient_Generic.h" + WiFiClient client; // Use this for WiFi instead of EthernetClient +#elif (USING_WIFININA) + #warning Using WiFiNINA Library + #include "WiFiNINA.h" + #include "WiFiClient.h" + WiFiClient client; // Use this for WiFi instead of EthernetClient +#else + #error Must pick a Library +#endif + +#endif //MYSQL_GENERIC_WIFININA_H diff --git a/libraries/esp32cam-main/.clang-format b/libraries/esp32cam-main/.clang-format new file mode 100644 index 0000000..2a701e9 --- /dev/null +++ b/libraries/esp32cam-main/.clang-format @@ -0,0 +1,12 @@ +--- +BasedOnStyle: Mozilla +AllowShortFunctionsOnASingleLine: Empty +BinPackArguments: true +BinPackParameters: true +ColumnLimit: 100 +Cpp11BracedListStyle: true +FixNamespaceComments: true +ReflowComments: false +SortIncludes: true +SortUsingDeclarations: true +SpacesInContainerLiterals: false diff --git a/libraries/esp32cam-main/.github/workflows/build.yml b/libraries/esp32cam-main/.github/workflows/build.yml new file mode 100644 index 0000000..1bc2212 --- /dev/null +++ b/libraries/esp32cam-main/.github/workflows/build.yml @@ -0,0 +1,73 @@ +name: build +on: + push: + pull_request: + workflow_dispatch: +permissions: {} +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - uses: arduino/setup-arduino-cli@v1 + - id: cores + name: Refresh Arduino cores + run: | + echo 'https://espressif.github.io/arduino-esp32/package_esp32_index.json' >~/arduino-cores.txt + arduino-cli version + arduino-cli update --additional-urls "$(<~/arduino-cores.txt)" + echo d=$(sha256sum ~/.arduino15/package_*index.json | sha256sum | cut -d' ' -f1) >> $GITHUB_OUTPUT + - name: Cache Arduino cores + uses: actions/cache@v3 + with: + path: ~/.arduino15/staging/packages + key: cores-${{ steps.cores.outputs.d }} + - name: Install Arduino cores + run: | + arduino-cli core install esp32:esp32 --additional-urls "$(<~/arduino-cores.txt)" + - name: Install dependencies + run: | + sudo apt-get install -y --no-install-recommends clang-format-11 doxygen + - uses: actions/checkout@v3 + - name: Check code style + run: | + mk/format-code.sh + git diff --exit-code + - name: Prepare Arduino libraries + run: | + mkdir -p $HOME/Arduino/libraries + cd $HOME/Arduino/libraries + ln -s $GITHUB_WORKSPACE esp32cam + mkdir -p AsyncTCP ESPAsyncWebServer ODROID-GO + curl -fsLS https://github.com/me-no-dev/AsyncTCP/archive/${ASYNCTCP_VERSION}.tar.gz \ + | tar -C AsyncTCP -xz --strip-components=1 + curl -fsLS https://github.com/me-no-dev/ESPAsyncWebServer/archive/${ESPASYNCWEBSERVER_VERSION}.tar.gz \ + | tar -C ESPAsyncWebServer -xz --strip-components=1 + curl -fsLS https://github.com/hardkernel/ODROID-GO/archive/${ODROIDGO_VERSION}.tar.gz \ + | tar -C ODROID-GO -xz --strip-components=1 --wildcards '*/library.properties' '*/src/odroid_go.*' '*/src/Fonts' '*/src/utility' + env: + ASYNCTCP_VERSION: ca8ac5f919d02bea07b474531981ddbfd64de97c + ESPASYNCWEBSERVER_VERSION: 1d46269cedf477661ca8a29518414f4b74e957d4 + ODROIDGO_VERSION: 4a496e337d16bca4ddedbeca3486d7b60662d017 + - name: Compile examples + run: | + arduino-cli compile -b esp32:esp32:esp32wrover ./examples/WifiCam + arduino-cli compile -b esp32:esp32:esp32wrover ./examples/AsyncCam + arduino-cli compile -b esp32:esp32:odroid_esp32 ./examples/GoDisplay + - name: Build docs + run: docs/build.sh + - name: Deploy docs + uses: nwtgck/actions-netlify@30aa80fe8d5eec30813fc8b17b77e0a6663f09b5 + with: + publish-dir: ./docs/html/ + production-deploy: true + github-token: ${{ secrets.GITHUB_TOKEN }} + deploy-message: ${{ github.sha }} ${{ github.run_id }} + enable-pull-request-comment: false + enable-commit-comment: false + enable-commit-status: false + enable-github-deployment: false + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: 7de100ca-e942-419d-af2c-18e6c528b96e + if: ${{ github.repository == 'yoursunny/esp32cam' && github.event_name == 'push' }} + timeout-minutes: 30 diff --git a/libraries/esp32cam-main/.gitignore b/libraries/esp32cam-main/.gitignore new file mode 100644 index 0000000..12e0396 --- /dev/null +++ b/libraries/esp32cam-main/.gitignore @@ -0,0 +1,3 @@ +/.vscode +/docs/html +/examples/*/build diff --git a/libraries/esp32cam-main/LICENSE b/libraries/esp32cam-main/LICENSE new file mode 100644 index 0000000..18064ca --- /dev/null +++ b/libraries/esp32cam-main/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2020-2023, Junxiao Shi + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/libraries/esp32cam-main/README.md b/libraries/esp32cam-main/README.md new file mode 100644 index 0000000..f59b617 --- /dev/null +++ b/libraries/esp32cam-main/README.md @@ -0,0 +1,20 @@ +# esp32cam: OV2640 camera on ESP32-CAM + +[![GitHub build status](https://img.shields.io/github/actions/workflow/status/yoursunny/esp32cam/build.yml?style=flat)](https://github.com/yoursunny/esp32cam/actions) [![GitHub code size](https://img.shields.io/github/languages/code-size/yoursunny/esp32cam?style=flat)](https://github.com/yoursunny/esp32cam) + +**esp32cam** library provides an object oriented API to use OV2640 camera on ESP32 microcontroller. +It is a wrapper of [esp32-camera library](https://github.com/espressif/esp32-camera). +This library has been tested with AI Thinker [ESP32-CAM](http://www.ai-thinker.com/pro_view-24.html) board and OV2640 camera. + +* [Doxygen documentation](https://esp32cam.yoursunny.dev) +* [#esp32cam on Twitter](https://twitter.com/hashtag/esp32cam) +* [video tutorial](https://youtu.be/Sb08leLWOgA) + +![esp32cam logo](docs/logo.svg) + +## Installation + +1. Clone this repository under `$HOME/Arduino/libraries` directory. +2. Add `#include ` to your sketch. +3. In *Tools* - *Board* menu, select **ESP32 Wrover Module** to enable 4MB external PSRAM. +4. Check out the [examples](examples/) for how to use. diff --git a/libraries/esp32cam-main/docs/Doxyfile b/libraries/esp32cam-main/docs/Doxyfile new file mode 100644 index 0000000..d115cfd --- /dev/null +++ b/libraries/esp32cam-main/docs/Doxyfile @@ -0,0 +1,20 @@ +PROJECT_NAME = esp32cam +PROJECT_BRIEF = "OV2640 camera on ESP32-CAM" +OUTPUT_DIRECTORY = "." +MARKDOWN_SUPPORT = NO +AUTOLINK_SUPPORT = NO +BUILTIN_STL_SUPPORT = YES +EXTRACT_ALL = YES +EXTRACT_PRIV_VIRTUAL = YES +QUIET = YES +INPUT = "../src" "../examples" +FILE_PATTERNS = "*.h" "*.hpp" "*.c" "*.cpp" "*.ino" +EXTENSION_MAPPING = "ino=C++" +RECURSIVE = YES +PREDEFINED = "ARDUINO=100" "ARDUINO_ARCH_ESP32=1" +HTML_COLORSTYLE_HUE = 293 +HTML_COLORSTYLE_SAT = 255 +HTML_COLORSTYLE_GAMMA = 130 +GENERATE_LATEX = NO +CLASS_DIAGRAMS = NO +HAVE_DOT = NO diff --git a/libraries/esp32cam-main/docs/_redirects b/libraries/esp32cam-main/docs/_redirects new file mode 100644 index 0000000..07ae66d --- /dev/null +++ b/libraries/esp32cam-main/docs/_redirects @@ -0,0 +1 @@ +https://esp32cam.netlify.app/* https://esp32cam.yoursunny.dev/:splat 301! diff --git a/libraries/esp32cam-main/docs/build.sh b/libraries/esp32cam-main/docs/build.sh new file mode 100644 index 0000000..b6acf51 --- /dev/null +++ b/libraries/esp32cam-main/docs/build.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -euo pipefail +cd "$( dirname "${BASH_SOURCE[0]}" )" + +doxygen Doxyfile 2>&1 | ./filter-Doxygen-warning.awk 1>&2 + +find html -name '*.html' | xargs sed -i '/<\/head>/ i\' +cp _redirects html/ diff --git a/libraries/esp32cam-main/docs/filter-Doxygen-warning.awk b/libraries/esp32cam-main/docs/filter-Doxygen-warning.awk new file mode 100644 index 0000000..ab23b47 --- /dev/null +++ b/libraries/esp32cam-main/docs/filter-Doxygen-warning.awk @@ -0,0 +1,14 @@ +#!/usr/bin/gawk -f +/warning: The following parameters? of .* not documented:/ { + skip = 1 + next +} +$0 ~ /^ parameter/ { + if (!skip) { + print + } +} +$0 !~ /^ / { + skip = 0 + print +} \ No newline at end of file diff --git a/libraries/esp32cam-main/docs/logo.svg b/libraries/esp32cam-main/docs/logo.svg new file mode 100644 index 0000000..73c94d5 --- /dev/null +++ b/libraries/esp32cam-main/docs/logo.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + esp32 + cam + + + + + + + diff --git a/libraries/esp32cam-main/examples/AsyncCam/AsyncCam.hpp b/libraries/esp32cam-main/examples/AsyncCam/AsyncCam.hpp new file mode 100644 index 0000000..f35e8a7 --- /dev/null +++ b/libraries/esp32cam-main/examples/AsyncCam/AsyncCam.hpp @@ -0,0 +1,16 @@ +#ifndef ASYNCCAM_HPP +#define ASYNCCAM_HPP + +#include + +#include + +extern esp32cam::Resolution initialResolution; +extern esp32cam::Resolution currentResolution; + +extern AsyncWebServer server; + +void +addRequestHandlers(); + +#endif // ASYNCCAM_HPP diff --git a/libraries/esp32cam-main/examples/AsyncCam/AsyncCam.ino b/libraries/esp32cam-main/examples/AsyncCam/AsyncCam.ino new file mode 100644 index 0000000..9ed4504 --- /dev/null +++ b/libraries/esp32cam-main/examples/AsyncCam/AsyncCam.ino @@ -0,0 +1,64 @@ +#include "AsyncCam.hpp" +#include + +static const char* WIFI_SSID = "my-ssid"; +static const char* WIFI_PASS = "my-pass"; + +esp32cam::Resolution initialResolution; +esp32cam::Resolution currentResolution; + +AsyncWebServer server(80); + +void +setup() +{ + Serial.begin(115200); + Serial.println(); + delay(2000); + + WiFi.persistent(false); + WiFi.mode(WIFI_STA); + WiFi.begin(WIFI_SSID, WIFI_PASS); + if (WiFi.waitForConnectResult() != WL_CONNECTED) { + Serial.println("WiFi failure"); + delay(5000); + ESP.restart(); + } + Serial.println("WiFi connected"); + + { + using namespace esp32cam; + + initialResolution = Resolution::find(1024, 768); + currentResolution = initialResolution; + + Config cfg; + cfg.setPins(pins::AiThinker); + cfg.setResolution(initialResolution); + cfg.setJpeg(80); + + bool ok = Camera.begin(cfg); + if (!ok) { + Serial.println("camera initialize failure"); + delay(5000); + ESP.restart(); + } + Serial.println("camera initialize success"); + } + + Serial.println("camera starting"); + Serial.print("http://"); + Serial.println(WiFi.localIP()); + + addRequestHandlers(); + server.begin(); +} + +void +loop() +{ + // esp32cam-asyncweb.h depends on FreeRTOS task API including vTaskDelete, so you must have a + // non-zero delay in the loop() function; otherwise, FreeRTOS kernel memory cannot be freed + // properly and the system would run out of memory. + delay(1); +} diff --git a/libraries/esp32cam-main/examples/AsyncCam/README.md b/libraries/esp32cam-main/examples/AsyncCam/README.md new file mode 100644 index 0000000..180ce66 --- /dev/null +++ b/libraries/esp32cam-main/examples/AsyncCam/README.md @@ -0,0 +1,6 @@ +# AsyncCam: camera on ESPAsyncWebServer + +This example runs on ESP32-CAM board. +It demonstrates how to use esp32cam library with [ESPAsyncWebServer](https://github.com/me-no-dev/ESPAsyncWebServer) library. +The HTTP server supports both JPEG still image and MJPEG stream, and allows changing camera resolution on the fly. +To use this example, modify WiFi SSID+password, then upload to ESP32. diff --git a/libraries/esp32cam-main/examples/AsyncCam/handlers.cpp b/libraries/esp32cam-main/examples/AsyncCam/handlers.cpp new file mode 100644 index 0000000..bbac65a --- /dev/null +++ b/libraries/esp32cam-main/examples/AsyncCam/handlers.cpp @@ -0,0 +1,127 @@ +#include "AsyncCam.hpp" +#include + +static const char FRONTPAGE[] = R"EOT( + +esp32cam AsyncCam example + +

esp32cam AsyncCam example

+

+Resolution + + +

+

+ + + +

+
+
+ +)EOT"; + +static String +rewriteFrontpage(const String& var) +{ + StreamString b; + if (var == "RESOLUTION_OPTIONS") { + for (const auto& r : esp32cam::Camera.listResolutions()) { + b.print(" initialResolution) { + b.print(" disabled"); + } + b.print('>'); + b.print(r); + b.print(""); + } + } + return b; +} + +void +addRequestHandlers() +{ + server.on("/", HTTP_GET, [](AsyncWebServerRequest* request) { + request->send_P(200, "text/html", reinterpret_cast(FRONTPAGE), + sizeof(FRONTPAGE), rewriteFrontpage); + }); + + server.on("/robots.txt", HTTP_GET, [](AsyncWebServerRequest* request) { + request->send(200, "text/html", "User-Agent: *\nDisallow: /\n"); + }); + + server.on("/change-resolution.cgi", HTTP_POST, [](AsyncWebServerRequest* request) { + long width = request->arg("width").toInt(); + long height = request->arg("height").toInt(); + auto r = esp32cam::Camera.listResolutions().find(width, height); + if (width == 0 || height == 0 || !r.isValid()) { + request->send(404, "text/plain", "non-existent resolution\n"); + return; + } + if (r.getWidth() != width || r.getHeight() != height) { + request->send(200); + return; + } + + if (!esp32cam::Camera.changeResolution(r, 0)) { + Serial.printf("changeResolution(%ld,%ld) failure\n", width, height); + request->send(500, "text/plain", "changeResolution error\n"); + return; + } + + currentResolution = r; + Serial.printf("changeResolution(%ld,%ld) success\n", width, height); + StreamString b; + b.print(currentResolution); + request->send(b, "text/plain", b.length()); + }); + + server.on("/cam.jpg", esp32cam::asyncweb::handleStill); + server.on("/cam.mjpeg", esp32cam::asyncweb::handleMjpeg); +} diff --git a/libraries/esp32cam-main/examples/GoDisplay/GoDisplay.ino b/libraries/esp32cam-main/examples/GoDisplay/GoDisplay.ino new file mode 100644 index 0000000..9cf053d --- /dev/null +++ b/libraries/esp32cam-main/examples/GoDisplay/GoDisplay.ino @@ -0,0 +1,51 @@ +#include "SpiRamOStream.hpp" + +#include +#include +#include + +static const char* WIFI_SSID = "my-ssid"; +static const char* WIFI_PASS = "my-pass"; +static const char* CAM_SERVER = "192.0.2.1"; +static const uint16_t CAM_PORT = 80; +static const char* CAM_URI = "/320x240.jpg"; + +void +setup() +{ + GO.begin(115200); + + WiFi.persistent(false); + WiFi.mode(WIFI_STA); + WiFi.begin(WIFI_SSID, WIFI_PASS); + if (WiFi.waitForConnectResult() != WL_CONNECTED) { + Serial.println("WiFi failure"); + delay(5000); + ESP.restart(); + } +} + +void +loop() +{ + WiFiClient tcp; + HTTPClient http; + http.begin(tcp, CAM_SERVER, CAM_PORT, CAM_URI); + http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS); + int httpCode = http.GET(); + if (httpCode != 200) { + Serial.printf("HTTP error %d\n", httpCode); + return; + } + + int length = http.getSize(); + if (length <= 0) { + Serial.printf("%lu JPEG length unknown\n", millis()); + return; + } + Serial.printf("%lu JPEG len=%d\n", millis(), length); + + SpiRamOStream os(length); + http.writeToStream(&os); + GO.lcd.drawJpg(os.data(), os.size(), 0, 0, 0, 0, 0, 0, JPEG_DIV_NONE); +} diff --git a/libraries/esp32cam-main/examples/GoDisplay/README.md b/libraries/esp32cam-main/examples/GoDisplay/README.md new file mode 100644 index 0000000..6bec9a3 --- /dev/null +++ b/libraries/esp32cam-main/examples/GoDisplay/README.md @@ -0,0 +1,8 @@ +# GoDisplay: camera image display for ODROID-GO + +This example runs on [ODROID-GO](https://wiki.odroid.com/odroid_go/odroid_go) game console. +It displays images captured by ESP32-CAM (running WifiCam example) and retrieved over HTTP. +To use this example, modify WiFi SSID+password and ESP32-CAM IP address, then upload to ODROID-GO. + +As of 2022-02-06, [ODROID-GO package](https://github.com/hardkernel/ODROID-GO) is incompatible with ESP32 Arduino core v2.0.x. +Deleting `ODROID-GO/src/sensors` and `ODROID-GO/src/web` directories would resolve the compile errors. diff --git a/libraries/esp32cam-main/examples/GoDisplay/SpiRamOStream.hpp b/libraries/esp32cam-main/examples/GoDisplay/SpiRamOStream.hpp new file mode 100644 index 0000000..b32047d --- /dev/null +++ b/libraries/esp32cam-main/examples/GoDisplay/SpiRamOStream.hpp @@ -0,0 +1,67 @@ +#ifndef SPIRAM_OSTREAM_HPP +#define SPIRAM_OSTREAM_HPP + +#include + +/** @brief write-only Stream backed by fixed-size SPIRAM buffer. */ +class SpiRamOStream : public Stream +{ +public: + explicit SpiRamOStream(size_t cap) + : m_buf(reinterpret_cast(heap_caps_malloc(cap, MALLOC_CAP_SPIRAM))) + , m_len(0) + , m_cap(cap) + {} + + ~SpiRamOStream() + { + free(m_buf); + } + + const uint8_t* data() const + { + return m_buf; + } + + const size_t size() const + { + return m_len; + } + + size_t write(const uint8_t* buffer, size_t size) override + { + size_t count = min(size, m_cap - m_len); + memcpy(m_buf + m_len, buffer, count); + m_len += count; + return count; + } + + size_t write(uint8_t data) override + { + return write(&data, 1); + } + + int available() override + { + return 0; + } + + int read() override + { + return -1; + } + + int peek() override + { + return -1; + } + + void flush() override {} + +private: + uint8_t* m_buf; + size_t m_len; + size_t m_cap; +}; + +#endif // SPIRAM_OSTREAM_HPP diff --git a/libraries/esp32cam-main/examples/WifiCam/README.md b/libraries/esp32cam-main/examples/WifiCam/README.md new file mode 100644 index 0000000..ff4d768 --- /dev/null +++ b/libraries/esp32cam-main/examples/WifiCam/README.md @@ -0,0 +1,11 @@ +# WifiCam: WiFi camera HTTP server + +This example runs on ESP32-CAM board. +It provides an HTTP server where you can access BMP, JPG, and MJPEG formats in various resolutions. +To use this example, modify WiFi SSID+password, then upload to ESP32. + +ESP32 `WebServer` can only serve one TCP connection at a time. +If you have accessed an MJPEG stream in a browser, you need to click *Stop* button to terminate the connection. +Otherwise, you won't be able to open another page or picture. + +Due to memory constraints, it's not recommended to access BMP format in high resolution. diff --git a/libraries/esp32cam-main/examples/WifiCam/WifiCam.hpp b/libraries/esp32cam-main/examples/WifiCam/WifiCam.hpp new file mode 100644 index 0000000..94f6516 --- /dev/null +++ b/libraries/esp32cam-main/examples/WifiCam/WifiCam.hpp @@ -0,0 +1,15 @@ +#ifndef WIFICAM_HPP +#define WIFICAM_HPP + +#include + +#include + +extern esp32cam::Resolution initialResolution; + +extern WebServer server; + +void +addRequestHandlers(); + +#endif // WIFICAM_HPP diff --git a/libraries/esp32cam-main/examples/WifiCam/WifiCam.ino b/libraries/esp32cam-main/examples/WifiCam/WifiCam.ino new file mode 100644 index 0000000..57bdb44 --- /dev/null +++ b/libraries/esp32cam-main/examples/WifiCam/WifiCam.ino @@ -0,0 +1,59 @@ +#include "WifiCam.hpp" +#include + +static const char* WIFI_SSID = "my-ssid"; +static const char* WIFI_PASS = "my-pass"; + +esp32cam::Resolution initialResolution; + +WebServer server(80); + +void +setup() +{ + Serial.begin(115200); + Serial.println(); + delay(2000); + + WiFi.persistent(false); + WiFi.mode(WIFI_STA); + WiFi.begin(WIFI_SSID, WIFI_PASS); + if (WiFi.waitForConnectResult() != WL_CONNECTED) { + Serial.println("WiFi failure"); + delay(5000); + ESP.restart(); + } + Serial.println("WiFi connected"); + + { + using namespace esp32cam; + + initialResolution = Resolution::find(1024, 768); + + Config cfg; + cfg.setPins(pins::AiThinker); + cfg.setResolution(initialResolution); + cfg.setJpeg(80); + + bool ok = Camera.begin(cfg); + if (!ok) { + Serial.println("camera initialize failure"); + delay(5000); + ESP.restart(); + } + Serial.println("camera initialize success"); + } + + Serial.println("camera starting"); + Serial.print("http://"); + Serial.println(WiFi.localIP()); + + addRequestHandlers(); + server.begin(); +} + +void +loop() +{ + server.handleClient(); +} diff --git a/libraries/esp32cam-main/examples/WifiCam/handlers.cpp b/libraries/esp32cam-main/examples/WifiCam/handlers.cpp new file mode 100644 index 0000000..8fe35f3 --- /dev/null +++ b/libraries/esp32cam-main/examples/WifiCam/handlers.cpp @@ -0,0 +1,137 @@ +#include "WifiCam.hpp" +#include +#include + +static const char FRONTPAGE[] = R"EOT( + +esp32cam WifiCam example + + +

esp32cam WifiCam example

+ + + +
BMPJPGMJPEG +
loading +
+ + +)EOT"; + +static void +serveStill(bool wantBmp) +{ + auto frame = esp32cam::capture(); + if (frame == nullptr) { + Serial.println("capture() failure"); + server.send(500, "text/plain", "still capture error\n"); + return; + } + Serial.printf("capture() success: %dx%d %zub\n", frame->getWidth(), frame->getHeight(), + frame->size()); + + if (wantBmp) { + if (!frame->toBmp()) { + Serial.println("toBmp() failure"); + server.send(500, "text/plain", "convert to BMP error\n"); + return; + } + Serial.printf("toBmp() success: %dx%d %zub\n", frame->getWidth(), frame->getHeight(), + frame->size()); + } + + server.setContentLength(frame->size()); + server.send(200, wantBmp ? "image/bmp" : "image/jpeg"); + WiFiClient client = server.client(); + frame->writeTo(client); +} + +static void +serveMjpeg() +{ + Serial.println("MJPEG streaming begin"); + WiFiClient client = server.client(); + auto startTime = millis(); + int nFrames = esp32cam::Camera.streamMjpeg(client); + auto duration = millis() - startTime; + Serial.printf("MJPEG streaming end: %dfrm %0.2ffps\n", nFrames, 1000.0 * nFrames / duration); +} + +void +addRequestHandlers() +{ + server.on("/", HTTP_GET, [] { + server.setContentLength(sizeof(FRONTPAGE)); + server.send(200, "text/html"); + server.sendContent(FRONTPAGE, sizeof(FRONTPAGE)); + }); + + server.on("/robots.txt", HTTP_GET, + [] { server.send(200, "text/html", "User-Agent: *\nDisallow: /\n"); }); + + server.on("/resolutions.csv", HTTP_GET, [] { + StreamString b; + for (const auto& r : esp32cam::Camera.listResolutions()) { + b.println(r); + } + server.send(200, "text/csv", b); + }); + + server.on(UriBraces("/{}x{}.{}"), HTTP_GET, [] { + long width = server.pathArg(0).toInt(); + long height = server.pathArg(1).toInt(); + String format = server.pathArg(2); + if (width == 0 || height == 0 || !(format == "bmp" || format == "jpg" || format == "mjpeg")) { + server.send(404); + return; + } + + auto r = esp32cam::Camera.listResolutions().find(width, height); + if (!r.isValid()) { + server.send(404, "text/plain", "non-existent resolution\n"); + return; + } + if (r.getWidth() != width || r.getHeight() != height) { + server.sendHeader("Location", + String("/") + r.getWidth() + "x" + r.getHeight() + "." + format); + server.send(302); + return; + } + + if (!esp32cam::Camera.changeResolution(r)) { + Serial.printf("changeResolution(%ld,%ld) failure\n", width, height); + server.send(500, "text/plain", "changeResolution error\n"); + } + Serial.printf("changeResolution(%ld,%ld) success\n", width, height); + + if (format == "bmp") { + serveStill(true); + } else if (format == "jpg") { + serveStill(false); + } else if (format == "mjpeg") { + serveMjpeg(); + } + }); +} diff --git a/libraries/esp32cam-main/library.properties b/libraries/esp32cam-main/library.properties new file mode 100644 index 0000000..d8fc152 --- /dev/null +++ b/libraries/esp32cam-main/library.properties @@ -0,0 +1,9 @@ +name=esp32cam +version=0.0.20221229 +author=Junxiao Shi +maintainer=Junxiao Shi +sentence=OV2640 camera on ESP32-CAM. +paragraph=This library enables access to OV2640 camera on AI Thinker ESP32-CAM module. +category=Sensors +url=https://yoursunny.com +architectures=esp32 diff --git a/libraries/esp32cam-main/mk/format-code.sh b/libraries/esp32cam-main/mk/format-code.sh new file mode 100644 index 0000000..9a05a65 --- /dev/null +++ b/libraries/esp32cam-main/mk/format-code.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -eo pipefail +cd "$( dirname "${BASH_SOURCE[0]}" )"/.. + +find -name '*.h' -or -name '*.[hc]pp' -or -name '*.ino' | \ + xargs clang-format-11 -i -style=file diff --git a/libraries/esp32cam-main/src/esp32cam-asyncweb.h b/libraries/esp32cam-main/src/esp32cam-asyncweb.h new file mode 100644 index 0000000..80aa0ea --- /dev/null +++ b/libraries/esp32cam-main/src/esp32cam-asyncweb.h @@ -0,0 +1,288 @@ +#ifndef ESP32CAM_ASYNCWEB_H +#define ESP32CAM_ASYNCWEB_H + +#include "esp32cam.h" + +#include +#include +#include + +namespace esp32cam { +/** + * @brief esp32cam integration with ESPAsyncWebServer library. + * @sa https://github.com/me-no-dev/ESPAsyncWebServer + */ +namespace asyncweb { + +/** @brief HTTP response of one still image. */ +class StillResponse : public AsyncAbstractResponse +{ +public: + /** + * @brief Constructor. + * @param frame a frame of still image. + */ + explicit StillResponse(std::unique_ptr frame) + : m_frame(std::move(frame)) + { + _code = 200; + _contentType = determineMineType(*m_frame); + _contentLength = m_frame->size(); + _sendContentLength = true; + } + + bool _sourceValid() const override + { + return true; + } + + size_t _fillBuffer(uint8_t* buf, size_t buflen) override + { + if (m_index >= m_frame->size()) { + return 0; + } + + size_t len = std::min(buflen, m_frame->size() - m_index); + std::copy_n(m_frame->data() + m_index, len, buf); + m_index += len; + return len; + } + +public: + /** + * @brief Capture a frame and respond to the request. + * @param ctx AsyncWebServerRequest* pointer. + * + * This function must run as a FreeRTOS task. It self-deletes upon completion. + */ + static void captureTask(void* ctx) + { + auto request = reinterpret_cast(ctx); + + auto frame = Camera.capture(); + if (frame == nullptr) { + request->send(500); + } else { + request->send(new StillResponse(std::move(frame))); + } + + vTaskDelete(nullptr); + } + +private: + static const char* determineMineType(const Frame& frame) + { + if (frame.isJpeg()) { + return "image/jpeg"; + } + if (frame.isBmp()) { + return "image/bmp"; + } + return "application/octet-stream"; + } + +private: + std::unique_ptr m_frame; + size_t m_index = 0; +}; + +/** + * @brief Handle HTTP request for still image. + * + * Start a FreeRTOS task to capture one frame of still image under the current camera settings, + * and then respond to the HTTP request with the frame. + * If this function is called multiple times with concurrent HTTP requests, each response will + * contain a different image. + * If task creation or image capture fails, respond with HTTP 500 error. + * + * To perform authentication or other operations before image capture, create another HTTP handler + * to do these, and then call this function. + */ +inline void +handleStill(AsyncWebServerRequest* request) +{ + TaskHandle_t task; + auto res = xTaskCreatePinnedToCore(StillResponse::captureTask, "esp32cam-still", 2048, request, 1, + &task, xPortGetCoreID()); + if (res != pdPASS) { + request->send(500); + } +} + +/** + * @brief HTTP response of MJPEG stream. + * + * Start a FreeRTOS task to capture image frames under the current camera settings, + * and respond to the HTTP request as a Motion JPEG stream. + * If multiple MjpegResponse instances are active concurrently, each stream will contain + * different images. + * If task creation fails, respond with HTTP 500 error. + * If image capture fails, the stream is stopped. + */ +class MjpegResponse : public AsyncAbstractResponse +{ +public: + explicit MjpegResponse(const MjpegConfig& cfg = MjpegConfig()) + : m_ctrl(cfg) + { + m_queue = xQueueCreate(4, sizeof(Frame*)); + if (xTaskCreatePinnedToCore(captureTask, "esp32cam-mjpeg", 2048, this, 1, &m_task, + xPortGetCoreID()) != pdPASS) { + m_task = nullptr; + }; + if (m_queue == nullptr || m_task == nullptr) { + _code = 500; + m_ctrl.notifyFail(); + return; + } + + _code = 200; + m_hdr.prepareResponseContentType(); + _contentType = String(m_hdr.buf, m_hdr.size); + _sendContentLength = false; + } + + ~MjpegResponse() override + { + if (m_task != nullptr) { + vTaskDelete(m_task); + m_task = nullptr; + } + + if (m_queue != nullptr) { + Frame* frame = nullptr; + while (xQueueReceive(m_queue, &frame, 0) == pdTRUE) { + delete frame; + } + vQueueDelete(m_queue); + m_queue = nullptr; + } + } + + bool _sourceValid() const override + { + return true; + } + + size_t _fillBuffer(uint8_t* buf, size_t buflen) override + { + auto act = m_ctrl.decideAction(); + switch (act) { + case Ctrl::CAPTURE: { + xTaskNotify(m_task, 1, eSetValueWithOverwrite); + m_ctrl.notifyCapture(); + return RESPONSE_TRY_AGAIN; + } + case Ctrl::RETURN: { + Frame* frame = nullptr; + if (xQueueReceive(m_queue, &frame, 0) == pdTRUE) { + m_ctrl.notifyReturn(std::unique_ptr(frame)); + } + m_sendNext = SIPartHeader; + m_sendRemain = 0; + if (m_ctrl.decideAction() != Ctrl::SEND) { + return RESPONSE_TRY_AGAIN; + } + // fallthrough + } + case Ctrl::SEND: { + size_t len = sendPart(buf, buflen); + if (len == 0 && m_sendNext == SINone) { + m_ctrl.notifySent(true); + return RESPONSE_TRY_AGAIN; + } + return len; + } + case Ctrl::STOP: + return 0; + default: + return RESPONSE_TRY_AGAIN; + } + } + +private: + static void captureTask(void* ctx) + { + auto self = reinterpret_cast(ctx); + while (true) { + uint32_t value = 0; + xTaskNotifyWait(0, UINT32_MAX, &value, pdMS_TO_TICKS(10000)); + if (value == 0) { + continue; + } + + auto frame = Camera.capture().release(); + while (xQueueSend(self->m_queue, &frame, pdMS_TO_TICKS(10000)) != pdTRUE) { + ; + } + } + } + + size_t sendPart(uint8_t* buf, size_t buflen) + { + if (m_sendRemain == 0) { + switch (m_sendNext) { + case SIPartHeader: + m_hdr.preparePartHeader(m_ctrl.getFrame()->size()); + m_sendBuf = reinterpret_cast(m_hdr.buf); + m_sendRemain = m_hdr.size; + m_sendNext = SIFrame; + break; + case SIFrame: + m_sendBuf = m_ctrl.getFrame()->data(); + m_sendRemain = m_ctrl.getFrame()->size(); + m_sendNext = SIPartTrailer; + break; + case SIPartTrailer: + m_hdr.preparePartTrailer(); + m_sendBuf = reinterpret_cast(m_hdr.buf); + m_sendRemain = m_hdr.size; + m_sendNext = SINone; + break; + case SINone: + return 0; + } + } + + size_t len = std::min(m_sendRemain, buflen); + std::copy_n(m_sendBuf, len, buf); + m_sendBuf += len; + m_sendRemain -= len; + return len; + } + +private: + QueueHandle_t m_queue = nullptr; + TaskHandle_t m_task = nullptr; + + using Ctrl = detail::MjpegController; + Ctrl m_ctrl; + detail::MjpegHeader m_hdr; + + enum SendItem + { + SINone, + SIPartHeader, + SIFrame, + SIPartTrailer, + }; + SendItem m_sendNext = SINone; + const uint8_t* m_sendBuf = nullptr; + size_t m_sendRemain = 0; +}; + +/** + * @brief Handle HTTP request for MJPEG stream. + * + * To specify MjpegConfig, construct MjpegResponse directly. + */ +inline void +handleMjpeg(AsyncWebServerRequest* request) +{ + request->send(new MjpegResponse()); +} + +} // namespace asyncweb +} // namespace esp32cam + +#endif // ESP32CAM_ASYNCWEB_H diff --git a/libraries/esp32cam-main/src/esp32cam.cpp b/libraries/esp32cam-main/src/esp32cam.cpp new file mode 100644 index 0000000..c0de13c --- /dev/null +++ b/libraries/esp32cam-main/src/esp32cam.cpp @@ -0,0 +1,110 @@ +#include "esp32cam.h" + +#include +#include + +namespace esp32cam { + +CameraClass Camera; + +bool +CameraClass::begin(const Config& config) +{ + return esp_camera_init(reinterpret_cast(config.m_cfg)) == ESP_OK; +} + +bool +CameraClass::end() +{ + return esp_camera_deinit() == ESP_OK; +} + +ResolutionList +CameraClass::listResolutions() const +{ + sensor_t* sensor = esp_camera_sensor_get(); + if (sensor == nullptr) { + return ResolutionList(); + } + + camera_sensor_info_t* info = esp_camera_sensor_get_info(&sensor->id); + if (info == nullptr) { + return ResolutionList(); + } + + return ResolutionList(info->max_size + 1); +} + +bool +CameraClass::changeResolution(const Resolution& resolution, int sleepFor) +{ + sensor_t* sensor = esp_camera_sensor_get(); + if (sensor == nullptr) { + return false; + } + + framesize_t frameSize = resolution.as(); + if (sensor->status.framesize == frameSize) { + return true; + } + + if (sensor->set_framesize(sensor, frameSize) != 0) { + return false; + } + if (sleepFor > 0) { + delay(sleepFor); + } + return true; +} + +std::unique_ptr +CameraClass::capture() +{ + camera_fb_t* fb = esp_camera_fb_get(); + if (fb == nullptr) { + return nullptr; + } + return std::unique_ptr(new Frame(fb)); +} + +int +CameraClass::streamMjpeg(Client& client, const MjpegConfig& cfg) +{ + detail::MjpegHeader hdr; + hdr.prepareResponseHeaders(); + hdr.writeTo(client); + + using Ctrl = detail::MjpegController; + Ctrl ctrl(cfg); + while (true) { + auto act = ctrl.decideAction(); + switch (act) { + case Ctrl::CAPTURE: { + ctrl.notifyCapture(); + break; + } + case Ctrl::RETURN: { + ctrl.notifyReturn(capture()); + break; + } + case Ctrl::SEND: { + hdr.preparePartHeader(ctrl.getFrame()->size()); + hdr.writeTo(client); + ctrl.notifySent(ctrl.getFrame()->writeTo(client, cfg.frameTimeout)); + hdr.preparePartTrailer(); + hdr.writeTo(client); + break; + } + case Ctrl::STOP: { + client.stop(); + return ctrl.countSentFrames(); + } + default: { + delay(act); + break; + } + } + } +} + +} // namespace esp32cam diff --git a/libraries/esp32cam-main/src/esp32cam.h b/libraries/esp32cam-main/src/esp32cam.h new file mode 100644 index 0000000..e2d0272 --- /dev/null +++ b/libraries/esp32cam-main/src/esp32cam.h @@ -0,0 +1,73 @@ +/** + * @mainpage esp32cam + * + * https://github.com/yoursunny/esp32cam + */ + +#ifndef ESP32CAM_H +#define ESP32CAM_H + +#include "internal/config.hpp" +#include "internal/mjpeg.hpp" + +namespace esp32cam { + +class CameraClass +{ +public: + /** + * @brief Enable camera. + * @return whether success. + */ + bool begin(const Config& config); + + /** + * @brief Disable camera. + * @return whether success. + */ + bool end(); + + /** + * @brief Retrieve list of resolutions (likely) supported by hardware. + * @pre Camera is enabled. + */ + ResolutionList listResolutions() const; + + /** + * @brief Change camera resolution. + * @pre Camera is enabled. + * @param resolution new resolution; must be no higher than initial resolution. + * @param sleepFor how long to wait for stabilization (millis). + */ + bool changeResolution(const Resolution& resolution, int sleepFor = 500); + + /** + * @brief Capture a frame of picture. + * @pre Camera is enabled. + * @return the picture frame, or nullptr on error. + */ + std::unique_ptr capture(); + + struct [[deprecated("use esp32cam::MjpegConfig")]] StreamMjpegConfig : MjpegConfig{}; + + /** + * @brief Stream Motion JPEG. + * @pre The camera has been initialized to JPEG mode. + * @return number of frames streamed. + */ + int streamMjpeg(Client& client, const MjpegConfig& cfg = MjpegConfig()); +}; + +/** @brief ESP32 camera API. */ +extern CameraClass Camera; + +/** @brief Capture a frame with the camera. */ +inline std::unique_ptr +capture() +{ + return Camera.capture(); +} + +} // namespace esp32cam + +#endif // ESP32CAM_H diff --git a/libraries/esp32cam-main/src/internal/config.cpp b/libraries/esp32cam-main/src/internal/config.cpp new file mode 100644 index 0000000..7d4be91 --- /dev/null +++ b/libraries/esp32cam-main/src/internal/config.cpp @@ -0,0 +1,104 @@ +#include "config.hpp" + +#include +#include +#include + +namespace esp32cam { +namespace detail { + +int +convertJpegQuality(int quality) +{ + return std::min(63, std::max(0, 100 - quality)); +} + +} // namespace detail + +class Config::CameraConfigT : public camera_config_t +{}; + +Config::Config() + : m_cfg(new CameraConfigT) +{ + std::memset(m_cfg, 0, sizeof(*m_cfg)); + m_cfg->xclk_freq_hz = 20000000; + m_cfg->ledc_timer = LEDC_TIMER_0; + m_cfg->ledc_channel = LEDC_CHANNEL_0; + m_cfg->pixel_format = PIXFORMAT_RGB565; + m_cfg->frame_size = FRAMESIZE_QQVGA; + m_cfg->fb_count = 2; + m_cfg->grab_mode = CAMERA_GRAB_LATEST; +} + +Config::~Config() +{ + delete m_cfg; +} + +Config& +Config::setPins(const Pins& pins) +{ + m_cfg->pin_pwdn = pins.PWDN; + m_cfg->pin_reset = pins.RESET; + m_cfg->pin_xclk = pins.XCLK; + m_cfg->pin_sscb_sda = pins.SDA; + m_cfg->pin_sscb_scl = pins.SCL; + m_cfg->pin_d7 = pins.D7; + m_cfg->pin_d6 = pins.D6; + m_cfg->pin_d5 = pins.D5; + m_cfg->pin_d4 = pins.D4; + m_cfg->pin_d3 = pins.D3; + m_cfg->pin_d2 = pins.D2; + m_cfg->pin_d1 = pins.D1; + m_cfg->pin_d0 = pins.D0; + m_cfg->pin_vsync = pins.VSYNC; + m_cfg->pin_href = pins.HREF; + m_cfg->pin_pclk = pins.PCLK; + return *this; +} + +Config& +Config::setResolution(const Resolution& resolution) +{ + m_cfg->frame_size = resolution.as(); + return *this; +} + +Config& +Config::setBufferCount(int n) +{ + m_cfg->fb_count = std::max(1, n); + return *this; +} + +Config& +Config::setRgb() +{ + m_cfg->pixel_format = PIXFORMAT_RGB565; + return *this; +} + +Config& +Config::setYuv() +{ + m_cfg->pixel_format = PIXFORMAT_YUV422; + return *this; +} + +Config& +Config::setGrayscale() +{ + m_cfg->pixel_format = PIXFORMAT_GRAYSCALE; + return *this; +} + +Config& +Config::setJpeg(int quality) +{ + m_cfg->pixel_format = PIXFORMAT_JPEG; + m_cfg->jpeg_quality = detail::convertJpegQuality(quality); + return *this; +} + +} // namespace esp32cam diff --git a/libraries/esp32cam-main/src/internal/config.hpp b/libraries/esp32cam-main/src/internal/config.hpp new file mode 100644 index 0000000..bd94dfb --- /dev/null +++ b/libraries/esp32cam-main/src/internal/config.hpp @@ -0,0 +1,58 @@ +#ifndef ESP32CAM_CONFIG_HPP +#define ESP32CAM_CONFIG_HPP + +#include "pins.hpp" +#include "resolution.hpp" + +namespace esp32cam { +namespace detail { + +/** @brief Convert JPEG quality from 0-100 scale to 63-0 scale. */ +int +convertJpegQuality(int quality); + +} // namespace detail + +/** @brief Camera configuration. */ +class Config +{ +public: + Config(); + + ~Config(); + + Config& setPins(const Pins& pins); + + Config& setResolution(const Resolution& resolution); + + /** + * @brief Set number of frame buffers. + * @param n >=1, having more frame buffers allows better streaming fps. + */ + Config& setBufferCount(int n); + + /** @brief Change pixel format to RGB565. */ + Config& setRgb(); + + /** @brief Change pixel format to YUV422. */ + Config& setYuv(); + + /** @brief Change pixel format to grayscale. */ + Config& setGrayscale(); + + /** + * @brief Change pixel format to JPEG. + * @param quality JPEG quality between 0 (worst) and 100 (best). + */ + Config& setJpeg(int quality); + +private: + class CameraConfigT; ///< camera_config_t + CameraConfigT* m_cfg; + + friend class CameraClass; +}; + +} // namespace esp32cam + +#endif // ESP32CAM_CONFIG_HPP diff --git a/libraries/esp32cam-main/src/internal/frame.cpp b/libraries/esp32cam-main/src/internal/frame.cpp new file mode 100644 index 0000000..06ce889 --- /dev/null +++ b/libraries/esp32cam-main/src/internal/frame.cpp @@ -0,0 +1,115 @@ +#include "frame.hpp" +#include "config.hpp" + +#include +#include + +namespace esp32cam { + +static const int PIXFORMAT_BMP = -101; + +struct Frame::CameraFbT : public camera_fb_t +{}; + +Frame::Frame() = default; + +Frame::Frame(void* fb) + : m_fb(static_cast(fb)) + , m_data(m_fb->buf) + , m_size(m_fb->len) + , m_width(m_fb->width) + , m_height(m_fb->height) + , m_pixFormat(m_fb->format) +{} + +Frame::~Frame() +{ + releaseFb(); + if (m_data != nullptr) { + free(m_data); + } +} + +void +Frame::releaseFb() +{ + if (m_fb != nullptr) { + esp_camera_fb_return(m_fb); + m_fb = nullptr; + m_data = nullptr; + } +} + +bool +Frame::writeTo(Print& os, int timeout) +{ + return writeToImpl(os, timeout, nullptr); +} + +bool +Frame::writeTo(Client& os, int timeout) +{ + return writeToImpl(os, timeout, &os); +} + +bool +Frame::writeToImpl(Print& os, int timeout, Client* client) +{ + auto startTime = millis(); + for (size_t i = 0; i < m_size; i += os.write(&m_data[i], m_size - i)) { + if (millis() - startTime > static_cast(timeout) || + (client != nullptr && !client->connected())) { + return false; + } + yield(); + } + return true; +} + +bool +Frame::isJpeg() const +{ + return m_pixFormat == PIXFORMAT_JPEG; +} + +bool +Frame::toJpeg(int quality) +{ + uint8_t* data; + size_t size; + bool ok = fmt2jpg(m_data, m_size, m_width, m_height, static_cast(m_pixFormat), + detail::convertJpegQuality(quality), &data, &size); + if (!ok) { + return false; + } + releaseFb(); + m_data = data; + m_size = size; + m_pixFormat = PIXFORMAT_JPEG; + return true; +} + +bool +Frame::isBmp() const +{ + return m_pixFormat == PIXFORMAT_BMP; +} + +bool +Frame::toBmp() +{ + uint8_t* data; + size_t size; + bool ok = + fmt2bmp(m_data, m_size, m_width, m_height, static_cast(m_pixFormat), &data, &size); + if (!ok) { + return false; + } + releaseFb(); + m_data = data; + m_size = size; + m_pixFormat = PIXFORMAT_BMP; + return true; +} + +} // namespace esp32cam diff --git a/libraries/esp32cam-main/src/internal/frame.hpp b/libraries/esp32cam-main/src/internal/frame.hpp new file mode 100644 index 0000000..8fb343b --- /dev/null +++ b/libraries/esp32cam-main/src/internal/frame.hpp @@ -0,0 +1,93 @@ +#ifndef ESP32CAM_FRAME_HPP +#define ESP32CAM_FRAME_HPP + +#include +#include + +class Client; +class Print; + +namespace esp32cam { + +/** @brief A frame of picture. */ +class Frame +{ +public: // access + ~Frame(); + + uint8_t* data() const + { + return m_data; + } + + size_t size() const + { + return m_size; + } + + int getWidth() const + { + return m_width; + } + + int getHeight() const + { + return m_height; + } + + /** + * @brief Write frame buffer to @p os . + * @param os output stream. + * @param timeout total time limit in millis. + * @retval true writing completed. + * @retval false writing disrupted by timeout. + */ + bool writeTo(Print& os, int timeout = 10000); + + /** + * @brief Write frame buffer to @p os . + * @param os output socket. + * @param timeout total time limit in millis. + * @retval true writing completed. + * @retval false writing disrupted by timeout or socket error. + */ + bool writeTo(Client& os, int timeout = 10000); + +public: // conversion + bool isJpeg() const; + + /** + * @brief Convert frame to JPEG. + * @param quality JPEG quality between 0 (worst) and 100 (best). + */ + bool toJpeg(int quality); + + bool isBmp() const; + + /** @brief Convert frame to BMP. */ + bool toBmp(); + +private: + Frame(); + + explicit Frame(void* fb); + + bool writeToImpl(Print& os, int timeout, Client* client); + + void releaseFb(); + +private: + class CameraFbT; ///< camera_fb_t + CameraFbT* m_fb = nullptr; + uint8_t* m_data = nullptr; + size_t m_size = 0; + int m_width = -1; + int m_height = -1; + int m_pixFormat = -1; + + friend class CameraClass; +}; + +} // namespace esp32cam + +#endif // ESP32CAM_FRAME_HPP diff --git a/libraries/esp32cam-main/src/internal/mjpeg.cpp b/libraries/esp32cam-main/src/internal/mjpeg.cpp new file mode 100644 index 0000000..2bdbdb2 --- /dev/null +++ b/libraries/esp32cam-main/src/internal/mjpeg.cpp @@ -0,0 +1,103 @@ +#include "mjpeg.hpp" + +#include + +namespace esp32cam { +namespace detail { + +MjpegController::MjpegController(MjpegConfig cfg) + : m_cfg(cfg) + , m_nextCaptureTime(millis()) +{} + +int +MjpegController::decideAction() +{ + if (m_nextAction == CAPTURE) { + auto t = static_cast(m_nextCaptureTime - millis()); + if (t > 0) { + return t; + } + return CAPTURE; + } + return m_nextAction; +} + +void +MjpegController::notifyCapture() +{ + m_nextAction = RETURN; + m_nextCaptureTime = millis() + static_cast(m_cfg.minInterval); +} + +void +MjpegController::notifyReturn(std::unique_ptr frame) +{ + if (frame == nullptr) { + notifyFail(); + return; + } + m_frame = std::move(frame); + m_nextAction = SEND; +} + +void +MjpegController::notifySent(bool ok) +{ + ++m_count; + if (!ok) { + notifyFail(); + return; + } + m_frame.reset(); + m_nextAction = m_cfg.maxFrames < 0 || m_count < m_cfg.maxFrames ? CAPTURE : STOP; +} + +void +MjpegController::notifyFail() +{ + m_frame.reset(); + m_nextAction = STOP; +} + +#define BOUNDARY "e8b8c539-047d-4777-a985-fbba6edff11e" + +void +MjpegHeader::prepareResponseHeaders() +{ + size = snprintf(buf, sizeof(buf), + "HTTP/1.1 200 OK\r\n" + "Content-Type: multipart/x-mixed-replace;boundary=" BOUNDARY "\r\n" + "\r\n"); +} + +void +MjpegHeader::prepareResponseContentType() +{ + size = snprintf(buf, sizeof(buf), "multipart/x-mixed-replace;boundary=" BOUNDARY); +} + +void +MjpegHeader::preparePartHeader(size_t contentLength) +{ + size = snprintf(buf, sizeof(buf), + "Content-Type: image/jpeg\r\n" + "Content-Length: %zu\r\n" + "\r\n", + contentLength); +} + +void +MjpegHeader::preparePartTrailer() +{ + size = snprintf(buf, sizeof(buf), "\r\n--" BOUNDARY "\r\n"); +} + +size_t +MjpegHeader::writeTo(Print& os) +{ + return os.write(buf, size); +} + +} // namespace detail +} // namespace esp32cam diff --git a/libraries/esp32cam-main/src/internal/mjpeg.hpp b/libraries/esp32cam-main/src/internal/mjpeg.hpp new file mode 100644 index 0000000..de283d8 --- /dev/null +++ b/libraries/esp32cam-main/src/internal/mjpeg.hpp @@ -0,0 +1,121 @@ +#ifndef ESP32CAM_MJPEG_HPP +#define ESP32CAM_MJPEG_HPP + +#include "frame.hpp" + +#include + +namespace esp32cam { + +struct MjpegConfig +{ + /** @brief minimum interval between frame captures. */ + int minInterval = 0; + /** @brief maximum number of frames before disconnecting. */ + int maxFrames = -1; + /** @brief time limit of writing one frame in millis. */ + int frameTimeout = 10000; +}; + +namespace detail { + +/** @brief Control MJPEG stream timing. */ +class MjpegController +{ +public: + explicit MjpegController(MjpegConfig cfg); + + /** @brief Retrieve config object. */ + const MjpegConfig& getConfig() const + { + return m_cfg; + } + + /** @brief Retrieve number of sent frames. */ + int countSentFrames() const + { + return m_count; + } + + enum + { + CAPTURE = -1, + RETURN = -2, + SEND = -3, + STOP = -4, + }; + + /** + * @brief Decide what to do now. + * @retval CAPTURE capture a frame. + * @retval RETURN return a captured frame. + * @retval SEND send current frame to the client. + * @retval STOP disconnect the client. + * @return if non-negative, how long to delay (millis) before the next action. + */ + int decideAction(); + + /** + * @brief Notify that frame capture has started. + * @post decideAction()==RETURN + */ + void notifyCapture(); + + /** + * @brief Notify that frame capture has completed. + * @param frame captured frame, possibly nullptr. + * @post if frame==nullptr, decideAction()==STOP; otherwise, decideAction()==SEND + */ + void notifyReturn(std::unique_ptr frame); + + /** @brief Retrieve current frame. */ + Frame* getFrame() const + { + return m_frame.get(); + } + + /** + * @brief Notify that a frame is sent to the client. + * @param ok whether sent successfully. + * @post getFrame()==nullptr + */ + void notifySent(bool ok); + + /** + * @brief Notify that an error has occurred. + * @post getFrame()==nullptr + * @post decideAction()==STOP + */ + void notifyFail(); + +private: + MjpegConfig m_cfg; + std::unique_ptr m_frame; + unsigned long m_nextCaptureTime; + int m_nextAction = CAPTURE; + int m_count = 0; +}; + +/** @brief Prepare HTTP headers related to MJPEG streaming. */ +class MjpegHeader +{ +public: + void prepareResponseHeaders(); + + void prepareResponseContentType(); + + void preparePartHeader(size_t contentLength); + + void preparePartTrailer(); + + size_t writeTo(Print& os); + +public: + size_t size = 0; + char buf[160]; +}; + +} // namespace detail +} // namespace esp32cam + +#endif // ESP32CAM_MJPEG_HPP diff --git a/libraries/esp32cam-main/src/internal/pins.hpp b/libraries/esp32cam-main/src/internal/pins.hpp new file mode 100644 index 0000000..970db04 --- /dev/null +++ b/libraries/esp32cam-main/src/internal/pins.hpp @@ -0,0 +1,136 @@ +#ifndef ESP32CAM_PINS_HPP +#define ESP32CAM_PINS_HPP + +namespace esp32cam { + +/** @brief Camera pins definition. */ +struct Pins +{ + int D0; + int D1; + int D2; + int D3; + int D4; + int D5; + int D6; + int D7; + int XCLK; + int PCLK; + int VSYNC; + int HREF; + int SDA; + int SCL; + int RESET; + int PWDN; +}; + +namespace pins { + +/** @brief Pin definition for AI Thinker ESP32-CAM. */ +constexpr Pins AiThinker{ + D0: 5, + D1: 18, + D2: 19, + D3: 21, + D4: 36, + D5: 39, + D6: 34, + D7: 35, + XCLK: 0, + PCLK: 22, + VSYNC: 25, + HREF: 23, + SDA: 26, + SCL: 27, + RESET: -1, + PWDN: 32, +}; + +/** @brief Pin definition for FREENOVE WROVER ESP32-CAM. */ +constexpr Pins FreeNove{ + D0: 4, + D1: 5, + D2: 18, + D3: 19, + D4: 36, + D5: 39, + D6: 34, + D7: 35, + XCLK: 21, + PCLK: 22, + VSYNC: 25, + HREF: 23, + SDA: 26, + SCL: 27, + RESET: -1, + PWDN: -1, +}; + +/** @brief Pin definition for M5Stack M5Camera. */ +constexpr Pins M5Camera{ + D0: 32, + D1: 35, + D2: 34, + D3: 5, + D4: 39, + D5: 18, + D6: 36, + D7: 19, + XCLK: 27, + PCLK: 21, + VSYNC: 25, + HREF: 26, + SDA: 22, + SCL: 23, + RESET: 15, + PWDN: -1, +}; + +/** + * @brief Pin definition for M5Stack M5Camera with LED. + * + * Red LED on GPIO 14, tally light when tied to PWDN + */ +constexpr Pins M5CameraLED{ + D0: 32, + D1: 35, + D2: 34, + D3: 5, + D4: 39, + D5: 18, + D6: 36, + D7: 19, + XCLK: 27, + PCLK: 21, + VSYNC: 25, + HREF: 26, + SDA: 22, + SCL: 23, + RESET: 15, + PWDN: 14, +}; + +/** @brief Pin definition for TTGO ESP32-CAM. */ +constexpr Pins TTGO{ + D0: 5, + D1: 14, + D2: 4, + D3: 15, + D4: 37, + D5: 38, + D6: 36, + D7: 39, + XCLK: 32, + PCLK: 19, + VSYNC: 27, + HREF: 25, + SDA: 13, + SCL: 12, + RESET: -1, + PWDN: -1, +}; + +} // namespace pins +} // namespace esp32cam + +#endif // ESP32CAM_PINS_HPP diff --git a/libraries/esp32cam-main/src/internal/resolution.cpp b/libraries/esp32cam-main/src/internal/resolution.cpp new file mode 100644 index 0000000..be25904 --- /dev/null +++ b/libraries/esp32cam-main/src/internal/resolution.cpp @@ -0,0 +1,86 @@ +#include "resolution.hpp" +#include + +#include + +namespace esp32cam { + +ResolutionList::ResolutionList(int max) + : m_max(max) +{} + +ResolutionList::Iterator +ResolutionList::begin() const +{ + return Iterator(0); +} + +ResolutionList::Iterator +ResolutionList::end() const +{ + return Iterator(m_max); +} + +Resolution +ResolutionList::find(int minWidth, int minHeight) const +{ + for (auto r : *this) { + if (r.getWidth() >= minWidth && r.getHeight() >= minHeight) { + return r; + } + } + return Resolution(); +} + +ResolutionList +Resolution::list() +{ + static ResolutionList list(FRAMESIZE_INVALID); + return list; +} + +Resolution +Resolution::find(int minWidth, int minHeight) +{ + return list().find(minWidth, minHeight); +} + +Resolution::Resolution(int frameSize) + : m_frameSize(frameSize) +{} + +bool +Resolution::isValid() const +{ + return m_frameSize >= 0 && m_frameSize < FRAMESIZE_INVALID; +} + +int +Resolution::getWidth() const +{ + if (!isValid()) { + return -1; + } + return ::resolution[m_frameSize].width; +} + +int +Resolution::getHeight() const +{ + if (!isValid()) { + return -1; + } + return ::resolution[m_frameSize].height; +} + +size_t +Resolution::printTo(Print& p) const +{ + size_t len = 0; + len += p.print(getWidth()); + len += p.print('x'); + len += p.print(getHeight()); + return len; +} + +} // namespace esp32cam diff --git a/libraries/esp32cam-main/src/internal/resolution.hpp b/libraries/esp32cam-main/src/internal/resolution.hpp new file mode 100644 index 0000000..51663d1 --- /dev/null +++ b/libraries/esp32cam-main/src/internal/resolution.hpp @@ -0,0 +1,159 @@ +#ifndef ESP32CAM_RESOLUTION_HPP +#define ESP32CAM_RESOLUTION_HPP + +#include +#include + +namespace esp32cam { + +class ResolutionList; + +/** @brief Picture width and height. */ +class Resolution : public Printable +{ +public: + /** + * @brief Return an iterable collection of possible resolutions. + * + * This list contains all resolutions defined in the esp32-camera library, + * but not necessarily supported by the camera hardware. + * Use @c Camera.listResolutions() to retrieve supported resolutions. + */ + static ResolutionList list(); + + /** + * @brief Find a resolution that satisfies given constraints. + * + * This searches among all resolutions defined in the esp32-camera libary, + * which is not necessarily supported by the camera hardware. + */ + static Resolution find(int minWidth, int minHeight); + + /** + * @brief Constructor. + * @param frameSize framesize_t value. + */ + explicit Resolution(int frameSize = -1); + + /** @brief Determine if this resolution is valid. */ + bool isValid() const; + + /** @brief Return picture width in pixels. */ + int getWidth() const; + + /** @brief Return picture height in pixels. */ + int getHeight() const; + + /** @brief Print WxH to output stream. */ + size_t printTo(Print& p) const override; + + /** + * @brief Convert to framesize_t (internal use). + * @tparam T framesize_t + */ + template + T as() const + { + return static_cast(m_frameSize); + } + +private: + int m_frameSize; ///< framesize_t + + friend bool operator==(const Resolution& lhs, const Resolution& rhs) + { + return (!lhs.isValid() && !rhs.isValid()) || (lhs.m_frameSize == rhs.m_frameSize); + } + + friend bool operator!=(const Resolution& lhs, const Resolution& rhs) + { + return !(lhs == rhs); + } + + friend bool operator<(const Resolution& lhs, const Resolution& rhs) + { + return lhs.m_frameSize < rhs.m_frameSize; + } + + friend bool operator>(const Resolution& lhs, const Resolution& rhs) + { + return lhs.m_frameSize > rhs.m_frameSize; + } +}; + +/** + * @brief A collection of resolutions. + * @code + * for (const auto& resolution : Resolution::list()) { + * Serial.println(resolution); + * } + * @endcode + */ +class ResolutionList +{ +public: + class Iterator + { + public: + using iterator_catagory = std::forward_iterator_tag; + using value_type = const Resolution; + using difference_type = std::ptrdiff_t; + using pointer = void; + using reference = value_type; + + explicit Iterator(int value = -1) + : m_frameSize(value) + {} + + Iterator& operator++() + { + ++m_frameSize; + return *this; + } + + Iterator operator++(int) + { + Iterator copy(*this); + ++*this; + return copy; + } + + reference operator*() + { + return Resolution(m_frameSize); + } + + private: + int m_frameSize; ///< framesize_t + + friend bool operator==(const Iterator& lhs, const Iterator& rhs) + { + return lhs.m_frameSize == rhs.m_frameSize; + } + + friend bool operator!=(const Iterator& lhs, const Iterator& rhs) + { + return !(lhs == rhs); + } + }; + + /** + * @brief Constructor. + * @param max exclusive maximum framesize_t. + */ + explicit ResolutionList(int max = 0); + + Iterator begin() const; + + Iterator end() const; + + /** @brief Find a resolution that satisfies given constraints. */ + Resolution find(int minWidth, int minHeight) const; + +private: + int m_max; +}; + +} // namespace esp32cam + +#endif // ESP32CAM_RESOLUTION_HPP diff --git a/libraries/readme.txt b/libraries/readme.txt new file mode 100644 index 0000000..96ce674 --- /dev/null +++ b/libraries/readme.txt @@ -0,0 +1 @@ +For information on installing libraries, see: http://www.arduino.cc/en/Guide/Libraries

vvX*B55em3tU_TJro`4b zh8cG{5*NaT;|qbpfcjS=^NINiqyo0fdw(!4vvg0^@pj{d&q(`Jz-<>262_29q7ip7 zv$sKU#eOm-mD^G-LJK2+mPA4|+6_f{vP4SX3VGvP>m7oxXzx5VIey1Tvor5?hZ&Qm zrePBt#t-1(H*emoQ7fS8)nVr$*0641BfTuPT?J;Ba5E_atBa?GdFdv=IRIx-0|gnte}=BthErO3Jn!0P0}>6Dt5}00#d7+*`aqF>tm?AgAPr?;LSaAcGI{vc}{=JrfRLt zYy}NZJ!rKBsOoX>6L1#cq%6>HU2jfbd6C18kZ>WWApeZ2EvZvai|FBB;WWY$?yhN}&1`!t$_ObXy^%OLh>!I0!sA>S_`|$SLVjD3d#n4a&7OgQAwc8>b}$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6j?|{{RemCXLWz-3_`0Z!A_>a~;(gAP1rhF>SU9r_p2`OTNKN-8~RkXazJ2 zU!ur&Q{`$feq7jMQ4xaxu;H++q=A*^UXDR zOO=M${YfXw{ar-rIt=d^p5%6v3y+k07Q8FJTH$yGL(!&=1m=WIZ2cEOR&BU23*_w* zJ1@0Ke+81ayi|-i@>;a;&fC2cf&_Od6>9K?%zK-j8W3!K{m!aQ(`yd_mpn~6;dZxa zl11*tn629!1w%```~DVye<1af?}s#Pa=E;U&R z6jPma3e0iX7_zB#LJ-ghR*(@Djuy@*Ax8KKfUI?I5pEI9*0{;aC-BKn;1k&57Mm#+ zj^RM3@Nsv>J$;m gf;kR^<^X-ewsOs)4i3;dh*4rR42E$!u>XG(08}MV!vFvP literal 0 HcmV?d00001 diff --git a/libraries/MySQL_MariaDB_Generic-1.7.2/pics/RP2040-Pinout.png b/libraries/MySQL_MariaDB_Generic-1.7.2/pics/RP2040-Pinout.png new file mode 100644 index 0000000000000000000000000000000000000000..6129592832b6a71e628fe5d754d2ce9a848bf42c GIT binary patch literal 60562 zcmcG#^5HFL#xA`SI5hzS@7006{VnyN+sAhD0|_jm~GpW@7>CjcOT zq3&(9)6-Ky5uxen>5}AuU&^TxH&u!<+_~Ikf-%ZU<@3vH%c{}ntE;Qa%c}`l+0D9^ zg=o>!lhgA(!Q+$TyUH11Z5nGEYsW`NzMbm_2Ztx8CtC;00#D`kj<#mDPmUM14v!A@ z_V*$?^ff;$3=WONb(zi1{)rpdlu^|9eJlHhk8;uX=cgNc%IXGx9Ey{B?54HftskC- z_H1nL>?|*@obDYOnp!XT*H(_b{IfZtTDdT5@m{ZH(dNstTkGn<(aF)mO84KggOPc& z&r2Iy8$x2&`&W(@_fH)h-BL%kr| zts?bZc6rsuv6VI`JaTmXcz$6)B}m5~3YQ7c$QkmOe_AuNRG-oB^6694N?gnA-DUFo(wC`}ik^z5>37@@W%dS! zw~x+t8peLi{V)wRC?9BkmGCAh-Dx?ZDYYR(Gu+HB!^+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