├── .codespellrc ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── dependabot.yml ├── stale.yml └── workflows │ ├── auto-github-actions.yml │ ├── check-arduino.yml │ ├── report-size-deltas.yml │ └── spell-check.yml ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── LibraryPatches └── ArduinoSTL │ └── src │ └── new_handler.cpp ├── Packages_Patches ├── Fab_SAM_Arduino │ └── hardware │ │ ├── hardware │ │ └── 1.6.18-alpha2 │ │ │ └── boards.txt │ │ └── samd │ │ ├── 1.6.18-alpha2 │ │ └── boards.txt │ │ ├── 1.7.0 │ │ └── boards.txt │ │ ├── 1.8.0 │ │ └── boards.txt │ │ └── 1.9.0 │ │ └── boards.txt ├── Maixduino │ └── hardware │ │ └── k210 │ │ ├── 0.3.10 │ │ └── cores │ │ │ └── arduino │ │ │ └── Stream.h │ │ └── 0.3.11 │ │ └── cores │ │ └── arduino │ │ └── Stream.h ├── STM32 │ └── hardware │ │ └── stm32 │ │ ├── 1.9.0 │ │ ├── system │ │ │ ├── STM32F4xx │ │ │ │ └── stm32f4xx_hal_conf_default.h │ │ │ └── STM32F7xx │ │ │ │ └── stm32f7xx_hal_conf_default.h │ │ └── variants │ │ │ ├── NUCLEO_F767ZI │ │ │ └── variant.h │ │ │ └── NUCLEO_L053R8 │ │ │ └── variant.h │ │ ├── 2.0.0 │ │ ├── system │ │ │ ├── STM32F4xx │ │ │ │ └── stm32f4xx_hal_conf_default.h │ │ │ └── STM32F7xx │ │ │ │ └── stm32f7xx_hal_conf_default.h │ │ └── variants │ │ │ ├── F765Z(G-I)T_F767Z(G-I)T_F777ZIT │ │ │ └── variant_NUCLEO_F767ZI.h │ │ │ ├── L052R(6-8)H_L053R(6-8)H │ │ │ └── variant_generic.h │ │ │ ├── STM32F7xx │ │ │ └── F765Z(G-I)T_F767Z(G-I)T_F777ZIT │ │ │ │ └── variant_NUCLEO_F767ZI.h │ │ │ └── STM32L0xx │ │ │ └── L052R(6-8)T_L053R(6-8)T_L063R8T │ │ │ └── variant_generic.h │ │ ├── 2.1.0 │ │ ├── system │ │ │ ├── STM32F4xx │ │ │ │ └── stm32f4xx_hal_conf_default.h │ │ │ └── STM32F7xx │ │ │ │ └── stm32f7xx_hal_conf_default.h │ │ └── variants │ │ │ ├── STM32F7xx │ │ │ └── F765Z(G-I)T_F767Z(G-I)T_F777ZIT │ │ │ │ └── variant_NUCLEO_F767ZI.h │ │ │ └── STM32L0xx │ │ │ └── L052R(6-8)T_L053R(6-8)T_L063R8T │ │ │ └── variant_generic.h │ │ ├── 2.2.0 │ │ ├── system │ │ │ ├── STM32F4xx │ │ │ │ └── stm32f4xx_hal_conf_default.h │ │ │ └── STM32F7xx │ │ │ │ └── stm32f7xx_hal_conf_default.h │ │ └── variants │ │ │ ├── STM32F7xx │ │ │ └── F765Z(G-I)T_F767Z(G-I)T_F777ZIT │ │ │ │ └── variant_NUCLEO_F767ZI.h │ │ │ └── STM32L0xx │ │ │ └── L052R(6-8)T_L053R(6-8)T_L063R8T │ │ │ └── variant_generic.h │ │ └── 2.3.0 │ │ ├── system │ │ ├── STM32F4xx │ │ │ └── stm32f4xx_hal_conf_default.h │ │ └── STM32F7xx │ │ │ └── stm32f7xx_hal_conf_default.h │ │ └── variants │ │ ├── STM32F7xx │ │ └── F765Z(G-I)T_F767Z(G-I)T_F777ZIT │ │ │ └── variant_NUCLEO_F767ZI.h │ │ └── STM32L0xx │ │ └── L052R(6-8)T_L053R(6-8)T_L063R8T │ │ └── variant_generic.h ├── Seeeduino │ └── hardware │ │ ├── nrf52 │ │ └── 1.0.0 │ │ │ ├── cores │ │ │ └── nRF5 │ │ │ │ ├── Print.cpp │ │ │ │ ├── Print.h │ │ │ │ └── Udp.h │ │ │ └── platform.txt │ │ ├── rp2040 │ │ ├── 1.9.3 │ │ │ └── variants │ │ │ │ └── rpipico │ │ │ │ └── pins_arduino.h │ │ └── 2.7.2 │ │ │ ├── boards.txt │ │ │ └── variants │ │ │ └── Seeed_XIAO_RP2040 │ │ │ └── pins_arduino.h │ │ └── samd │ │ ├── 1.7.0 │ │ └── boards.txt │ │ ├── 1.7.7 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Arduino.h │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.8 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Arduino.h │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.9 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Arduino.h │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.8.1 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Arduino.h │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.8.2 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Arduino.h │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ └── 1.8.3 │ │ ├── cores │ │ └── arduino │ │ │ ├── Arduino.h │ │ │ ├── Print.cpp │ │ │ └── Print.h │ │ └── platform.txt ├── SparkFun │ └── hardware │ │ └── samd │ │ └── 1.8.3 │ │ └── cores │ │ ├── arduino │ │ ├── Print.cpp │ │ └── Print.h │ │ └── arduino51 │ │ ├── Print.cpp │ │ └── Print.h ├── adafruit │ └── hardware │ │ ├── nrf52 │ │ ├── 0.19.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 0.20.1 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 0.20.5 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 0.21.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 0.22.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 0.22.1 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 0.23.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 0.24.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 1.0.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ ├── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── sparkfun_nrf52840_mini │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 1.1.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ ├── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── sparkfun_nrf52840_mini │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 1.2.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ ├── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── sparkfun_nrf52840_mini │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ └── 1.3.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ └── nRF5 │ │ │ │ ├── Print.cpp │ │ │ │ ├── Print.h │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ ├── NINA_B112_ublox │ │ │ ├── pins_arduino.h │ │ │ ├── variant.cpp │ │ │ └── variant.h │ │ │ ├── NINA_B302_ublox │ │ │ ├── pins_arduino.h │ │ │ ├── variant.cpp │ │ │ └── variant.h │ │ │ └── sparkfun_nrf52840_mini │ │ │ ├── variant.cpp │ │ │ └── variant.h │ │ └── samd │ │ ├── 1.5.14 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.6.0 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.6.3 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.6.4 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.6.5 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.6.6 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.6.7 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.6.8 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.0 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.1 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.10 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.11 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.2 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.3 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.4 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.5 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.6 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.7 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.8 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ └── 1.7.9 │ │ ├── cores │ │ └── arduino │ │ │ ├── Print.cpp │ │ │ └── Print.h │ │ └── platform.txt ├── arduino │ └── hardware │ │ ├── mbed_portenta │ │ ├── 2.4.1 │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ └── mbed │ │ │ │ │ └── connectivity │ │ │ │ │ └── lwipstack │ │ │ │ │ └── include │ │ │ │ │ └── lwipstack │ │ │ │ │ └── lwipopts.h │ │ │ ├── libraries │ │ │ │ └── SocketWrapper │ │ │ │ │ └── src │ │ │ │ │ ├── MbedUdp.cpp │ │ │ │ │ └── MbedUdp.h │ │ │ └── portenta_post_install.sh │ │ ├── 2.5.2 │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ └── mbed │ │ │ │ │ └── connectivity │ │ │ │ │ └── lwipstack │ │ │ │ │ └── include │ │ │ │ │ └── lwipstack │ │ │ │ │ └── lwipopts.h │ │ │ ├── libraries │ │ │ │ └── SocketWrapper │ │ │ │ │ └── src │ │ │ │ │ ├── MbedUdp.cpp │ │ │ │ │ └── MbedUdp.h │ │ │ └── portenta_post_install.sh │ │ ├── 2.6.1 │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ └── mbed │ │ │ │ │ └── connectivity │ │ │ │ │ └── lwipstack │ │ │ │ │ └── include │ │ │ │ │ └── lwipstack │ │ │ │ │ └── lwipopts.h │ │ │ ├── libraries │ │ │ │ └── SocketWrapper │ │ │ │ │ └── src │ │ │ │ │ ├── MbedUdp.cpp │ │ │ │ │ └── MbedUdp.h │ │ │ └── portenta_post_install.sh │ │ ├── 2.7.2 │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ └── mbed │ │ │ │ │ └── connectivity │ │ │ │ │ └── lwipstack │ │ │ │ │ └── include │ │ │ │ │ └── lwipstack │ │ │ │ │ └── lwipopts.h │ │ │ └── portenta_post_install.sh │ │ ├── 2.8.0 │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ └── mbed │ │ │ │ │ └── connectivity │ │ │ │ │ └── lwipstack │ │ │ │ │ └── include │ │ │ │ │ └── lwipstack │ │ │ │ │ └── lwipopts.h │ │ │ └── portenta_post_install.sh │ │ ├── 3.0.0 │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ └── mbed │ │ │ │ │ └── connectivity │ │ │ │ │ └── lwipstack │ │ │ │ │ └── include │ │ │ │ │ └── lwipstack │ │ │ │ │ └── lwipopts.h │ │ │ └── portenta_post_install.sh │ │ ├── 3.0.1 │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ └── mbed │ │ │ │ │ └── connectivity │ │ │ │ │ └── lwipstack │ │ │ │ │ └── include │ │ │ │ │ └── lwipstack │ │ │ │ │ └── lwipopts.h │ │ │ └── portenta_post_install.sh │ │ ├── 3.1.1 │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ └── mbed │ │ │ │ │ └── connectivity │ │ │ │ │ └── lwipstack │ │ │ │ │ └── include │ │ │ │ │ └── lwipstack │ │ │ │ │ └── lwipopts.h │ │ │ └── portenta_post_install.sh │ │ ├── 3.3.0 │ │ │ └── portenta_post_install.sh │ │ └── 3.4.1 │ │ │ └── portenta_post_install.sh │ │ ├── sam │ │ └── 1.6.12 │ │ │ └── platform.txt │ │ └── samd │ │ ├── 1.8.10 │ │ └── platform.txt │ │ ├── 1.8.11 │ │ └── platform.txt │ │ ├── 1.8.12 │ │ └── platform.txt │ │ ├── 1.8.13 │ │ └── platform.txt │ │ ├── 1.8.6 │ │ ├── cores │ │ │ └── arduino │ │ │ │ └── Arduino.h │ │ └── platform.txt │ │ ├── 1.8.7 │ │ ├── cores │ │ │ └── arduino │ │ │ │ └── Arduino.h │ │ └── platform.txt │ │ ├── 1.8.8 │ │ ├── cores │ │ │ ├── Arduino.h │ │ │ └── arduino │ │ │ │ └── Arduino.h │ │ └── platform.txt │ │ └── 1.8.9 │ │ ├── cores │ │ └── arduino │ │ │ └── Arduino.h │ │ └── platform.txt ├── hardware │ └── teensy │ │ └── avr │ │ ├── boards.txt │ │ └── cores │ │ ├── teensy │ │ ├── Stream.cpp │ │ └── Stream.h │ │ ├── teensy3 │ │ ├── Stream.cpp │ │ └── Stream.h │ │ └── teensy4 │ │ ├── Stream.cpp │ │ └── Stream.h ├── industrialshields │ └── hardware │ │ └── avr │ │ ├── 1.1.36 │ │ └── cores │ │ │ └── industrialshields │ │ │ └── Udp.h │ │ └── 1.1.37 │ │ └── cores │ │ └── industrialshields │ │ └── Udp.h ├── realtek │ └── hardware │ │ └── AmebaD │ │ ├── 3.0.10 │ │ └── cores │ │ │ └── arduino │ │ │ └── avr │ │ │ └── pgmspace.h │ │ ├── 3.0.8 │ │ └── cores │ │ │ └── arduino │ │ │ └── avr │ │ │ └── pgmspace.h │ │ ├── 3.1.0 │ │ └── cores │ │ │ └── arduino │ │ │ └── avr │ │ │ └── pgmspace.h │ │ ├── 3.1.1 │ │ └── cores │ │ │ └── arduino │ │ │ └── avr │ │ │ └── pgmspace.h │ │ ├── 3.1.2 │ │ └── cores │ │ │ └── arduino │ │ │ └── avr │ │ │ └── pgmspace.h │ │ ├── 3.1.3 │ │ └── cores │ │ │ └── ambd │ │ │ └── avr │ │ │ └── pgmspace.h │ │ └── 3.1.4 │ │ └── cores │ │ └── ambd │ │ └── avr │ │ └── pgmspace.h └── rp2040 │ └── hardware │ └── rp2040 │ ├── 1.2.1 │ └── platform.txt │ ├── 1.2.2 │ └── platform.txt │ ├── 1.3.1 │ ├── cores │ │ └── rp2040 │ │ │ └── Arduino.h │ └── platform.txt │ └── 1.4.0 │ ├── cores │ └── rp2040 │ │ └── Arduino.h │ └── platform.txt ├── README.md ├── changelog.md ├── examples ├── WiFiMulti │ ├── WiFiMulti.ino │ └── defines.h └── WiFiMulti_RP2040W │ ├── WiFiMulti_RP2040W.ino │ └── defines.h ├── library.json ├── library.properties ├── platformio └── platformio.ini ├── src ├── ESP32 │ ├── WiFiMulti_Generic.hpp │ └── WiFiMulti_Generic_Impl.h ├── ESP8266 │ ├── ESP8266WiFiMulti.hpp │ └── ESP8266WiFiMulti_Impl.h ├── ESP_AT │ ├── ESP_AT_WiFiMulti_Generic.hpp │ └── ESP_AT_WiFiMulti_Generic_Impl.h ├── PortentaH7 │ ├── PortentaH7_WiFiMulti_Generic.hpp │ └── PortentaH7_WiFiMulti_Generic_Impl.h ├── RP2040W │ ├── RP2040W_WiFiMulti_Generic.hpp │ └── RP2040W_WiFiMulti_Generic_Impl.h ├── RTL8720 │ ├── RTL8720_WiFiMulti_Generic.hpp │ └── RTL8720_WiFiMulti_Generic_Impl.h ├── WiFi101 │ ├── WiFi101_WiFiMulti_Generic.hpp │ └── WiFi101_WiFiMulti_Generic_Impl.h ├── WiFiMulti_Generic.h ├── WiFiMulti_Generic_Debug.h └── WiFiNINA │ ├── NINA_WiFiMulti_Generic.hpp │ └── NINA_WiFiMulti_Generic_Impl.h └── utils ├── astyle_library.conf └── restyle.sh /.codespellrc: -------------------------------------------------------------------------------- 1 | # See: https://github.com/codespell-project/codespell#using-a-config-file 2 | [codespell] 3 | # In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here: 4 | ignore-words-list = , 5 | check-filenames = 6 | check-hidden = 7 | skip = ./.git,./src,./examples,./Packages_Patches,./LibraryPatches 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ### Describe the bug 11 | 12 | A clear and concise description of what the bug is. 13 | 14 | ### Steps to Reproduce 15 | 16 | Steps to reproduce the behavior. Including the [MRE](https://stackoverflow.com/help/minimal-reproducible-example) sketches 17 | 18 | ### Expected behavior 19 | 20 | A clear and concise description of what you expected to happen. 21 | 22 | ### Actual behavior 23 | 24 | A clear and concise description of what you expected to happen. 25 | 26 | ### Debug and AT-command log (if applicable) 27 | 28 | A clear and concise description of what you expected to happen. 29 | 30 | ### Screenshots 31 | 32 | If applicable, add screenshots to help explain your problem. 33 | 34 | ### Information 35 | 36 | Please ensure to specify the following: 37 | 38 | * Arduino IDE version (e.g. 1.8.19) or Platform.io version 39 | * Board Core Version (e.g. Arduino SAMDUE core v1.6.12, ESP8266 core v3.0.2, ArduinoCore-mbed v3.4.1, etc.) 40 | * Contextual information (e.g. what you were trying to achieve) 41 | * Simplest possible steps to reproduce 42 | * Anything that might be relevant in your opinion, such as: 43 | * Operating system (Windows, Ubuntu, etc.) and the output of `uname -a` 44 | * Network configuration 45 | 46 | 47 | ### Example 48 | 49 | ``` 50 | Arduino IDE version: 1.8.19 51 | RASPBERRY_PI_PICO board 52 | ArduinoCore-mbed v3.4.1 53 | OS: Ubuntu 20.04 LTS 54 | Linux xy-Inspiron-3593 5.15.0-53-generic #59~20.04.1-Ubuntu SMP Thu Oct 20 15:10:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux 55 | 56 | Context: 57 | I encountered a crash while using this library 58 | 59 | Steps to reproduce: 60 | 1. ... 61 | 2. ... 62 | 3. ... 63 | 4. ... 64 | ``` 65 | 66 | --- 67 | 68 | ### Sending Feature Requests 69 | 70 | Feel free to post feature requests. It's helpful if you can explain exactly why the feature would be useful. 71 | 72 | There are usually some outstanding feature requests in the [existing issues list](https://github.com/khoih-prog/WiFiMulti_Generic/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement), feel free to add comments to them. 73 | 74 | --- 75 | 76 | ### Sending Pull Requests 77 | 78 | Pull Requests with changes and fixes are also welcome! 79 | 80 | Please use the `astyle` to reformat the updated library code as follows (demo for Ubuntu Linux) 81 | 82 | 1. Change directory to the library GitHub 83 | 84 | ``` 85 | xy@xy-Inspiron-3593:~$ cd Arduino/xy/WiFiMulti_Generic_GitHub/ 86 | xy@xy-Inspiron-3593:~/Arduino/xy/WiFiMulti_Generic_GitHub$ 87 | ``` 88 | 89 | 2. Issue astyle command 90 | 91 | ``` 92 | xy@xy-Inspiron-3593:~/Arduino/xy/WiFiMulti_Generic_GitHub$ bash utils/restyle.sh 93 | ``` 94 | 95 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ### Is your feature request related to a problem? Please describe. 11 | 12 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 13 | 14 | ### Describe the solution you'd like 15 | 16 | A clear and concise description of what you want to happen. 17 | 18 | ### Describe alternatives you've considered 19 | 20 | A clear and concise description of any alternative solutions or features you've considered. 21 | 22 | ### Additional context 23 | 24 | Add any other context or screenshots about the feature request here. 25 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # See: https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#about-the-dependabotyml-file 2 | version: 2 3 | 4 | updates: 5 | # Configure check for outdated GitHub Actions actions in workflows. 6 | # See: https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot 7 | - package-ecosystem: github-actions 8 | directory: / # Check the repository's workflows under /.github/workflows/ 9 | schedule: 10 | interval: daily 11 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-stale - https://github.com/probot/stale 2 | 3 | daysUntilStale: 60 4 | daysUntilClose: 14 5 | limitPerRun: 30 6 | staleLabel: stale 7 | exemptLabels: 8 | - pinned 9 | - security 10 | - "to be implemented" 11 | - "for reference" 12 | - "move to PR" 13 | - "enhancement" 14 | 15 | only: issues 16 | onlyLabels: [] 17 | exemptProjects: false 18 | exemptMilestones: false 19 | exemptAssignees: false 20 | 21 | markComment: > 22 | [STALE_SET] This issue has been automatically marked as stale because it has not had 23 | recent activity. It will be closed in 14 days if no further activity occurs. Thank you 24 | for your contributions. 25 | 26 | unmarkComment: > 27 | [STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it opening the future. 28 | 29 | closeComment: > 30 | [STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. 31 | 32 | -------------------------------------------------------------------------------- /.github/workflows/auto-github-actions.yml: -------------------------------------------------------------------------------- 1 | name: auto-github-actions 2 | on: [push] 3 | jobs: 4 | check-bats-version: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v3 8 | - uses: actions/setup-node@v3 9 | with: 10 | node-version: '14' 11 | - run: npm install -g bats 12 | - run: bats -v 13 | -------------------------------------------------------------------------------- /.github/workflows/check-arduino.yml: -------------------------------------------------------------------------------- 1 | name: Check Arduino 2 | 3 | # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows 4 | on: 5 | push: 6 | pull_request: 7 | schedule: 8 | # Run every Tuesday at 8 AM UTC to catch breakage caused by new rules added to Arduino Lint. 9 | - cron: "0 8 * * TUE" 10 | workflow_dispatch: 11 | repository_dispatch: 12 | 13 | jobs: 14 | lint: 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - name: Checkout repository 19 | uses: actions/checkout@v3 20 | 21 | - name: Arduino Lint 22 | uses: arduino/arduino-lint-action@v1 23 | with: 24 | compliance: specification 25 | library-manager: update 26 | # Always use this setting for official repositories. Remove for 3rd party projects. 27 | official: true 28 | project-type: library 29 | -------------------------------------------------------------------------------- /.github/workflows/report-size-deltas.yml: -------------------------------------------------------------------------------- 1 | name: Report Size Deltas 2 | 3 | on: 4 | schedule: 5 | - cron: '*/5 * * * *' 6 | 7 | jobs: 8 | report: 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - name: Comment size deltas reports to PRs 13 | uses: arduino/report-size-deltas@v1 14 | with: 15 | # The name of the workflow artifact created by the "Compile Examples" workflow 16 | sketches-reports-source: sketches-reports 17 | -------------------------------------------------------------------------------- /.github/workflows/spell-check.yml: -------------------------------------------------------------------------------- 1 | name: Spell Check 2 | 3 | on: 4 | pull_request: 5 | push: 6 | schedule: 7 | # run every Tuesday at 3 AM UTC 8 | - cron: "0 3 * * 2" 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | spellcheck: 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - name: Checkout 18 | uses: actions/checkout@v3 19 | 20 | # See: https://github.com/codespell-project/actions-codespell/blob/master/README.md 21 | - name: Spell check 22 | uses: codespell-project/actions-codespell@master 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing to WiFiMulti_Generic 2 | 3 | ### Reporting Bugs 4 | 5 | Please report bugs in WiFiMulti_Generic if you find them. 6 | 7 | However, before reporting a bug please check through the following: 8 | 9 | * [Existing Open Issues](https://github.com/khoih-prog/WiFiMulti_Generic/issues) - someone might have already encountered this. 10 | 11 | If you don't find anything, please [open a new issue](https://github.com/khoih-prog/WiFiMulti_Generic/issues/new). 12 | 13 | ### How to submit a bug report 14 | 15 | Please ensure to specify the following: 16 | 17 | * Arduino IDE version (e.g. 1.8.19) or Platform.io version 18 | * Board Core Version (e.g. Arduino SAMDUE core v1.6.12, ESP8266 core v3.0.2, ArduinoCore-mbed v3.4.1, etc.) 19 | * Contextual information (e.g. what you were trying to achieve) 20 | * Simplest possible steps to reproduce 21 | * Anything that might be relevant in your opinion, such as: 22 | * Operating system (Windows, Ubuntu, etc.) and the output of `uname -a` 23 | * Network configuration 24 | 25 | 26 | ### Example 27 | 28 | ``` 29 | Arduino IDE version: 1.8.19 30 | RASPBERRY_PI_PICO board 31 | ArduinoCore-mbed v3.4.1 32 | OS: Ubuntu 20.04 LTS 33 | Linux xy-Inspiron-3593 5.15.0-53-generic #59~20.04.1-Ubuntu SMP Thu Oct 20 15:10:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux 34 | 35 | Context: 36 | I encountered a crash while using this library 37 | 38 | Steps to reproduce: 39 | 1. ... 40 | 2. ... 41 | 3. ... 42 | 4. ... 43 | ``` 44 | 45 | --- 46 | 47 | ### Sending Feature Requests 48 | 49 | Feel free to post feature requests. It's helpful if you can explain exactly why the feature would be useful. 50 | 51 | There are usually some outstanding feature requests in the [existing issues list](https://github.com/khoih-prog/WiFiMulti_Generic/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement), feel free to add comments to them. 52 | 53 | --- 54 | 55 | ### Sending Pull Requests 56 | 57 | Pull Requests with changes and fixes are also welcome! 58 | 59 | Please use the `astyle` to reformat the updated library code as follows (demo for Ubuntu Linux) 60 | 61 | 1. Change directory to the library GitHub 62 | 63 | ``` 64 | xy@xy-Inspiron-3593:~$ cd Arduino/xy/WiFiMulti_Generic_GitHub/ 65 | xy@xy-Inspiron-3593:~/Arduino/xy/WiFiMulti_Generic_GitHub$ 66 | ``` 67 | 68 | 2. Issue astyle command 69 | 70 | ``` 71 | xy@xy-Inspiron-3593:~/Arduino/xy/WiFiMulti_Generic_GitHub$ bash utils/restyle.sh 72 | ``` 73 | 74 | -------------------------------------------------------------------------------- /LibraryPatches/ArduinoSTL/src/new_handler.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include "new" 21 | 22 | // KH, comment out for AVR board 23 | //const std::nothrow_t std::nothrow = { }; 24 | ////// 25 | 26 | //Name selected to be compatable with g++ code 27 | std::new_handler __new_handler; 28 | 29 | _UCXXEXPORT std::new_handler std::set_new_handler(std::new_handler new_p) _UCXX_USE_NOEXCEPT 30 | { 31 | std::new_handler retval = __new_handler; 32 | __new_handler = new_p; 33 | return retval; 34 | } 35 | -------------------------------------------------------------------------------- /Packages_Patches/Seeeduino/hardware/rp2040/1.9.3/variants/rpipico/pins_arduino.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Pin definitions taken from: 4 | // https://datasheets.raspberrypi.org/pico/pico-datasheet.pdf 5 | 6 | //KH 7 | // Pin count 8 | // ---- 9 | #define PINS_COUNT (30u) 10 | #define NUM_DIGITAL_PINS (30u) 11 | #define NUM_ANALOG_INPUTS (4u) 12 | #define NUM_ANALOG_OUTPUTS (0u) 13 | ////// 14 | 15 | // LEDs 16 | #define PIN_LED (25u) 17 | #define PIN_LED_0 (16u) 18 | #define PIN_LED_1 (17u) 19 | #define PIN_LED_2 (18u) 20 | // Serial 21 | #define PIN_SERIAL1_TX (0u) 22 | #define PIN_SERIAL1_RX (1u) 23 | 24 | #define PIN_SERIAL2_TX (31u) 25 | #define PIN_SERIAL2_RX (31u) 26 | 27 | 28 | // SPI 29 | #define PIN_SPI0_MISO (4u) 30 | #define PIN_SPI0_MOSI (3u) 31 | #define PIN_SPI0_SCK (2u) 32 | #define PIN_SPI0_SS (5u) 33 | 34 | // static const int SS = PIN_SPI0_SS; // SPI Slave SS not used. Set here only for reference. 35 | // static const int MOSI = PIN_SPI0_MOSI; 36 | // static const int MISO = PIN_SPI0_MISO; 37 | // static const int SCK = PIN_SPI0_SCK; 38 | 39 | #define PIN_SPI1_MISO (12u) 40 | #define PIN_SPI1_MOSI (31u) 41 | #define PIN_SPI1_SCK (31u) 42 | #define PIN_SPI1_SS (31u) 43 | // static const int MISO_1 = PIN_SPI1_MISO; 44 | 45 | #define PIN_A0 (26u) 46 | #define PIN_A1 (27u) 47 | #define PIN_A2 (28u) 48 | #define PIN_A3 (29u) 49 | 50 | static const int A0 = PIN_A0; 51 | static const int A1 = PIN_A1; 52 | static const int A2 = PIN_A2; 53 | static const int A3 = PIN_A3; 54 | 55 | // D0 - D10 56 | #define D26 (26u) 57 | #define D1 (27u) 58 | #define D2 (28u) 59 | #define D3 (29u) 60 | #define D4 (6u) 61 | #define D5 (7u) 62 | #define D0 (0u) 63 | #define D7 (1u) 64 | #define D8 (2u) 65 | #define D9 (4u) 66 | #define D10 (3u) 67 | 68 | // static const int 0 = D0; 69 | 70 | // Wire 71 | #define PIN_WIRE0_SDA (6u) 72 | #define PIN_WIRE0_SCL (7u) 73 | 74 | #define PIN_WIRE1_SDA (26u) 75 | #define PIN_WIRE1_SCL (27u) 76 | 77 | // #define SERIAL_HOWMANY (3u) 78 | // #define SPI_HOWMANY (2u) 79 | // #define WIRE_HOWMANY (2u) 80 | 81 | // #include "../generic/common.h" 82 | -------------------------------------------------------------------------------- /Packages_Patches/Seeeduino/hardware/rp2040/2.7.2/variants/Seeed_XIAO_RP2040/pins_arduino.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #ifndef __PINS_ARDUINO__ 6 | #define __PINS_ARDUINO__ 7 | 8 | #ifdef __cplusplus 9 | extern "C" unsigned int PINCOUNT_fn(); 10 | #endif 11 | 12 | // Pin count 13 | // ---- 14 | #define PINS_COUNT (PINCOUNT_fn()) 15 | #define NUM_DIGITAL_PINS (30u) 16 | #define NUM_ANALOG_INPUTS (4u) 17 | #define NUM_ANALOG_OUTPUTS (0u) 18 | 19 | extern PinName digitalPinToPinName(pin_size_t P); 20 | 21 | // LEDs 22 | // ---- 23 | #define PIN_LED (25u) 24 | #define LED_BUILTIN PIN_LED 25 | 26 | // Digital pins 27 | // ---- 28 | #define PIN_D0 (26u) 29 | #define PIN_D1 (27u) 30 | #define PIN_D2 (28u) 31 | #define PIN_D3 (29u) 32 | #define PIN_D4 (6u) 33 | #define PIN_D5 (7u) 34 | #define PIN_D6 (0u) 35 | #define PIN_D7 (1u) 36 | #define PIN_D8 (2u) 37 | #define PIN_D9 (4u) 38 | #define PIN_D10 (3u) 39 | 40 | static const uint8_t D0 = PIN_D0; 41 | static const uint8_t D1 = PIN_D1; 42 | static const uint8_t D2 = PIN_D2; 43 | static const uint8_t D3 = PIN_D3; 44 | static const uint8_t D4 = PIN_D4; 45 | static const uint8_t D5 = PIN_D5; 46 | static const uint8_t D6 = PIN_D6; 47 | static const uint8_t D7 = PIN_D7; 48 | static const uint8_t D8 = PIN_D8; 49 | static const uint8_t D9 = PIN_D9; 50 | static const uint8_t D10 = PIN_D10; 51 | 52 | 53 | // Analog pins 54 | // ----------- 55 | #define PIN_A0 (26u) 56 | #define PIN_A1 (27u) 57 | #define PIN_A2 (28u) 58 | #define PIN_A3 (29u) 59 | 60 | static const uint8_t A0 = PIN_A0; 61 | static const uint8_t A1 = PIN_A1; 62 | static const uint8_t A2 = PIN_A2; 63 | static const uint8_t A3 = PIN_A3; 64 | 65 | #define ADC_RESOLUTION 12 66 | 67 | // Serial 68 | #define PIN_SERIAL_TX (0ul) 69 | #define PIN_SERIAL_RX (1ul) 70 | 71 | // SPI 72 | //#define PIN_SPI_MISO (16u) 73 | //#define PIN_SPI_MOSI (19u) 74 | //#define PIN_SPI_SCK (18u) 75 | //#define PIN_SPI_SS (17u) 76 | // KH fix wrong pin 77 | #define PIN_SPI_MISO (D9) 78 | #define PIN_SPI_MOSI (D10) 79 | #define PIN_SPI_SCK (D8) 80 | #define PIN_SPI_SS (D7) 81 | ////// 82 | 83 | static const uint8_t SS = PIN_SPI_SS; // SPI Slave SS not used. Set here only for reference. 84 | static const uint8_t MOSI = PIN_SPI_MOSI; 85 | static const uint8_t MISO = PIN_SPI_MISO; 86 | static const uint8_t SCK = PIN_SPI_SCK; 87 | 88 | // Wire 89 | #define SDA (6u) 90 | #define SCL (7u) 91 | 92 | #define SERIAL_HOWMANY 1 93 | #define SERIAL1_TX (digitalPinToPinName(PIN_SERIAL_TX)) 94 | #define SERIAL1_RX (digitalPinToPinName(PIN_SERIAL_RX)) 95 | 96 | #define SERIAL_CDC 1 97 | #define HAS_UNIQUE_ISERIAL_DESCRIPTOR 98 | #define BOARD_VENDORID 0x2886 99 | #define BOARD_PRODUCTID 0x8042 100 | #define BOARD_NAME "RaspberryPi Pico" 101 | 102 | uint8_t getUniqueSerialNumber(uint8_t* name); 103 | void _ontouch1200bps_(); 104 | 105 | #define SPI_HOWMANY (1) 106 | #define SPI_MISO (digitalPinToPinName(PIN_SPI_MISO)) 107 | #define SPI_MOSI (digitalPinToPinName(PIN_SPI_MOSI)) 108 | #define SPI_SCK (digitalPinToPinName(PIN_SPI_SCK)) 109 | 110 | #define WIRE_HOWMANY (1) 111 | #define I2C_SDA (digitalPinToPinName(SDA)) 112 | #define I2C_SCL (digitalPinToPinName(SCL)) 113 | 114 | #define digitalPinToPort(P) (digitalPinToPinName(P)/32) 115 | 116 | #define SERIAL_PORT_USBVIRTUAL SerialUSB 117 | #define SERIAL_PORT_MONITOR SerialUSB 118 | #define SERIAL_PORT_HARDWARE Serial1 119 | #define SERIAL_PORT_HARDWARE_OPEN Serial1 120 | 121 | #define USB_MAX_POWER (500) 122 | 123 | #endif //__PINS_ARDUINO__ 124 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.19.0/cores/nRF5/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include // for size_t 23 | 24 | #include "WString.h" 25 | #include "Printable.h" 26 | 27 | #define DEC 10 28 | #define HEX 16 29 | #define OCT 8 30 | #define BIN 2 31 | 32 | class Print 33 | { 34 | private: 35 | int write_error; 36 | size_t printNumber(unsigned long, uint8_t); 37 | size_t printULLNumber(unsigned long long, uint8_t); 38 | size_t printFloat(double, int); 39 | protected: 40 | void setWriteError(int err = 1) { write_error = err; } 41 | public: 42 | Print() : write_error(0) {} 43 | 44 | int getWriteError() { return write_error; } 45 | void clearWriteError() { setWriteError(0); } 46 | 47 | virtual size_t write(uint8_t) = 0; 48 | size_t write(const char *str) { 49 | if (str == NULL) return 0; 50 | return write((const uint8_t *)str, strlen(str)); 51 | } 52 | virtual size_t write(const uint8_t *buffer, size_t size); 53 | size_t write(const char *buffer, size_t size) { 54 | return write((const uint8_t *)buffer, size); 55 | } 56 | 57 | // default to zero, meaning "a single write may block" 58 | // should be overridden by subclasses with buffering 59 | virtual int availableForWrite() { return 0; } 60 | 61 | size_t print(const __FlashStringHelper *); 62 | size_t print(const String &); 63 | size_t print(const char[]); 64 | size_t print(char); 65 | size_t print(unsigned char, int = DEC); 66 | size_t print(int, int = DEC); 67 | size_t print(unsigned int, int = DEC); 68 | size_t print(long, int = DEC); 69 | size_t print(unsigned long, int = DEC); 70 | size_t print(long long, int = DEC); 71 | size_t print(unsigned long long, int = DEC); 72 | size_t print(double, int = 2); 73 | size_t print(const Printable&); 74 | 75 | size_t println(const __FlashStringHelper *); 76 | size_t println(const String &s); 77 | size_t println(const char[]); 78 | size_t println(char); 79 | size_t println(unsigned char, int = DEC); 80 | size_t println(int, int = DEC); 81 | size_t println(unsigned int, int = DEC); 82 | size_t println(long, int = DEC); 83 | size_t println(unsigned long, int = DEC); 84 | size_t println(long long, int = DEC); 85 | size_t println(unsigned long long, int = DEC); 86 | size_t println(double, int = 2); 87 | size_t println(const Printable&); 88 | size_t println(void); 89 | 90 | size_t printf(const char * format, ...); 91 | 92 | size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 93 | size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) 94 | { 95 | return printBuffer((uint8_t const*) buffer, size, delim, byteline); 96 | } 97 | 98 | size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 99 | size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) 100 | { 101 | return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); 102 | } 103 | 104 | virtual void flush() { /* Empty implementation for backward compatibility */ } 105 | }; 106 | 107 | 108 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = { 31 | // D0 .. D13 32 | 5, // D0 is P0.05 (UART RX) 33 | 6, // D1 is P0.06 (UART TX) 34 | 7, // D2 is P0.07 35 | 31, // D3 is P0.31 36 | 18, // D4 is P0.18 (LED Blue) 37 | 99, // D5 (NC) 38 | 9, // D6 is P0.09 NFC1 39 | 10, // D7 is P0.10 (Button) NFC2 40 | 99, // D8 (NC) 41 | 8, // D9 is P0.08 42 | 11, // D10 is P0.11 CS 43 | 13, // D11 is P0.13 MOSI 44 | 12, // D12 is P0.12 MISO 45 | 14, // D13 is P0.14 SCK 46 | //I2C 47 | 2, // D14 is P0.2 (SDA) 48 | 3, // D15 is P0.3 (SCL) 49 | // D16 .. D21 (aka A0 .. A5) 50 | 3, // D16 is P0.03 (A0) 51 | 2, // D17 is P0.02 (A1) 52 | 4, // D18 is P0.04 (A2) 53 | 30, // D19 is P0.30 (A3) SW2 54 | 29, // D20 is P0.29 (A4) 55 | 28, // D21 is P0.28 (A5) 56 | 9, // P0.09 NFC 57 | 10, // P0.10 NFC 58 | 16, // SW1 (LED Green) 59 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.1/cores/nRF5/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include // for size_t 23 | 24 | #include "WString.h" 25 | #include "Printable.h" 26 | 27 | #define DEC 10 28 | #define HEX 16 29 | #define OCT 8 30 | #define BIN 2 31 | 32 | class Print 33 | { 34 | private: 35 | int write_error; 36 | size_t printNumber(unsigned long, uint8_t); 37 | size_t printULLNumber(unsigned long long, uint8_t); 38 | size_t printFloat(double, int); 39 | protected: 40 | void setWriteError(int err = 1) { write_error = err; } 41 | public: 42 | Print() : write_error(0) {} 43 | 44 | int getWriteError() { return write_error; } 45 | void clearWriteError() { setWriteError(0); } 46 | 47 | virtual size_t write(uint8_t) = 0; 48 | size_t write(const char *str) { 49 | if (str == NULL) return 0; 50 | return write((const uint8_t *)str, strlen(str)); 51 | } 52 | virtual size_t write(const uint8_t *buffer, size_t size); 53 | size_t write(const char *buffer, size_t size) { 54 | return write((const uint8_t *)buffer, size); 55 | } 56 | 57 | // default to zero, meaning "a single write may block" 58 | // should be overridden by subclasses with buffering 59 | virtual int availableForWrite() { return 0; } 60 | 61 | size_t print(const __FlashStringHelper *); 62 | size_t print(const String &); 63 | size_t print(const char[]); 64 | size_t print(char); 65 | size_t print(unsigned char, int = DEC); 66 | size_t print(int, int = DEC); 67 | size_t print(unsigned int, int = DEC); 68 | size_t print(long, int = DEC); 69 | size_t print(unsigned long, int = DEC); 70 | size_t print(long long, int = DEC); 71 | size_t print(unsigned long long, int = DEC); 72 | size_t print(double, int = 2); 73 | size_t print(const Printable&); 74 | 75 | size_t println(const __FlashStringHelper *); 76 | size_t println(const String &s); 77 | size_t println(const char[]); 78 | size_t println(char); 79 | size_t println(unsigned char, int = DEC); 80 | size_t println(int, int = DEC); 81 | size_t println(unsigned int, int = DEC); 82 | size_t println(long, int = DEC); 83 | size_t println(unsigned long, int = DEC); 84 | size_t println(long long, int = DEC); 85 | size_t println(unsigned long long, int = DEC); 86 | size_t println(double, int = 2); 87 | size_t println(const Printable&); 88 | size_t println(void); 89 | 90 | size_t printf(const char * format, ...); 91 | 92 | size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 93 | size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) 94 | { 95 | return printBuffer((uint8_t const*) buffer, size, delim, byteline); 96 | } 97 | 98 | size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 99 | size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) 100 | { 101 | return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); 102 | } 103 | 104 | virtual void flush() { /* Empty implementation for backward compatibility */ } 105 | }; 106 | 107 | 108 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = { 31 | // D0 .. D13 32 | 5, // D0 is P0.05 (UART RX) 33 | 6, // D1 is P0.06 (UART TX) 34 | 7, // D2 is P0.07 35 | 31, // D3 is P0.31 36 | 18, // D4 is P0.18 (LED Blue) 37 | 99, // D5 (NC) 38 | 9, // D6 is P0.09 NFC1 39 | 10, // D7 is P0.10 (Button) NFC2 40 | 99, // D8 (NC) 41 | 8, // D9 is P0.08 42 | 11, // D10 is P0.11 CS 43 | 13, // D11 is P0.13 MOSI 44 | 12, // D12 is P0.12 MISO 45 | 14, // D13 is P0.14 SCK 46 | //I2C 47 | 2, // D14 is P0.2 (SDA) 48 | 3, // D15 is P0.3 (SCL) 49 | // D16 .. D21 (aka A0 .. A5) 50 | 3, // D16 is P0.03 (A0) 51 | 2, // D17 is P0.02 (A1) 52 | 4, // D18 is P0.04 (A2) 53 | 30, // D19 is P0.30 (A3) SW2 54 | 29, // D20 is P0.29 (A4) 55 | 28, // D21 is P0.28 (A5) 56 | 9, // P0.09 NFC 57 | 10, // P0.10 NFC 58 | 16, // SW1 (LED Green) 59 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.5/cores/nRF5/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include // for size_t 23 | 24 | #include "WString.h" 25 | #include "Printable.h" 26 | 27 | #define DEC 10 28 | #define HEX 16 29 | #define OCT 8 30 | #define BIN 2 31 | 32 | class Print 33 | { 34 | private: 35 | int write_error; 36 | size_t printNumber(unsigned long, uint8_t); 37 | size_t printULLNumber(unsigned long long, uint8_t); 38 | size_t printFloat(double, int); 39 | protected: 40 | void setWriteError(int err = 1) { write_error = err; } 41 | public: 42 | Print() : write_error(0) {} 43 | 44 | int getWriteError() { return write_error; } 45 | void clearWriteError() { setWriteError(0); } 46 | 47 | virtual size_t write(uint8_t) = 0; 48 | size_t write(const char *str) { 49 | if (str == NULL) return 0; 50 | return write((const uint8_t *)str, strlen(str)); 51 | } 52 | virtual size_t write(const uint8_t *buffer, size_t size); 53 | size_t write(const char *buffer, size_t size) { 54 | return write((const uint8_t *)buffer, size); 55 | } 56 | 57 | // default to zero, meaning "a single write may block" 58 | // should be overridden by subclasses with buffering 59 | virtual int availableForWrite() { return 0; } 60 | 61 | size_t print(const __FlashStringHelper *); 62 | size_t print(const String &); 63 | size_t print(const char[]); 64 | size_t print(char); 65 | size_t print(unsigned char, int = DEC); 66 | size_t print(int, int = DEC); 67 | size_t print(unsigned int, int = DEC); 68 | size_t print(long, int = DEC); 69 | size_t print(unsigned long, int = DEC); 70 | size_t print(long long, int = DEC); 71 | size_t print(unsigned long long, int = DEC); 72 | size_t print(double, int = 2); 73 | size_t print(const Printable&); 74 | 75 | size_t println(const __FlashStringHelper *); 76 | size_t println(const String &s); 77 | size_t println(const char[]); 78 | size_t println(char); 79 | size_t println(unsigned char, int = DEC); 80 | size_t println(int, int = DEC); 81 | size_t println(unsigned int, int = DEC); 82 | size_t println(long, int = DEC); 83 | size_t println(unsigned long, int = DEC); 84 | size_t println(long long, int = DEC); 85 | size_t println(unsigned long long, int = DEC); 86 | size_t println(double, int = 2); 87 | size_t println(const Printable&); 88 | size_t println(void); 89 | 90 | size_t printf(const char * format, ...); 91 | 92 | size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 93 | size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) 94 | { 95 | return printBuffer((uint8_t const*) buffer, size, delim, byteline); 96 | } 97 | 98 | size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 99 | size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) 100 | { 101 | return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); 102 | } 103 | 104 | virtual void flush() { /* Empty implementation for backward compatibility */ } 105 | }; 106 | 107 | 108 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = { 31 | // D0 .. D13 32 | 5, // D0 is P0.05 (UART RX) 33 | 6, // D1 is P0.06 (UART TX) 34 | 7, // D2 is P0.07 35 | 31, // D3 is P0.31 36 | 18, // D4 is P0.18 (LED Blue) 37 | 99, // D5 (NC) 38 | 9, // D6 is P0.09 NFC1 39 | 10, // D7 is P0.10 (Button) NFC2 40 | 99, // D8 (NC) 41 | 8, // D9 is P0.08 42 | 11, // D10 is P0.11 CS 43 | 13, // D11 is P0.13 MOSI 44 | 12, // D12 is P0.12 MISO 45 | 14, // D13 is P0.14 SCK 46 | //I2C 47 | 2, // D14 is P0.2 (SDA) 48 | 3, // D15 is P0.3 (SCL) 49 | // D16 .. D21 (aka A0 .. A5) 50 | 3, // D16 is P0.03 (A0) 51 | 2, // D17 is P0.02 (A1) 52 | 4, // D18 is P0.04 (A2) 53 | 30, // D19 is P0.30 (A3) SW2 54 | 29, // D20 is P0.29 (A4) 55 | 28, // D21 is P0.28 (A5) 56 | 9, // P0.09 NFC 57 | 10, // P0.10 NFC 58 | 16, // SW1 (LED Green) 59 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.21.0/cores/nRF5/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include // for size_t 23 | 24 | #include "WString.h" 25 | #include "Printable.h" 26 | 27 | #define DEC 10 28 | #define HEX 16 29 | #define OCT 8 30 | #define BIN 2 31 | 32 | class Print 33 | { 34 | private: 35 | int write_error; 36 | size_t printNumber(unsigned long, uint8_t); 37 | size_t printULLNumber(unsigned long long, uint8_t); 38 | size_t printFloat(double, int); 39 | protected: 40 | void setWriteError(int err = 1) { write_error = err; } 41 | public: 42 | Print() : write_error(0) {} 43 | 44 | int getWriteError() { return write_error; } 45 | void clearWriteError() { setWriteError(0); } 46 | 47 | virtual size_t write(uint8_t) = 0; 48 | size_t write(const char *str) { 49 | if (str == NULL) return 0; 50 | return write((const uint8_t *)str, strlen(str)); 51 | } 52 | virtual size_t write(const uint8_t *buffer, size_t size); 53 | size_t write(const char *buffer, size_t size) { 54 | return write((const uint8_t *)buffer, size); 55 | } 56 | 57 | // default to zero, meaning "a single write may block" 58 | // should be overridden by subclasses with buffering 59 | virtual int availableForWrite() { return 0; } 60 | 61 | size_t print(const __FlashStringHelper *); 62 | size_t print(const String &); 63 | size_t print(const char[]); 64 | size_t print(char); 65 | size_t print(unsigned char, int = DEC); 66 | size_t print(int, int = DEC); 67 | size_t print(unsigned int, int = DEC); 68 | size_t print(long, int = DEC); 69 | size_t print(unsigned long, int = DEC); 70 | size_t print(long long, int = DEC); 71 | size_t print(unsigned long long, int = DEC); 72 | size_t print(double, int = 2); 73 | size_t print(const Printable&); 74 | 75 | size_t println(const __FlashStringHelper *); 76 | size_t println(const String &s); 77 | size_t println(const char[]); 78 | size_t println(char); 79 | size_t println(unsigned char, int = DEC); 80 | size_t println(int, int = DEC); 81 | size_t println(unsigned int, int = DEC); 82 | size_t println(long, int = DEC); 83 | size_t println(unsigned long, int = DEC); 84 | size_t println(long long, int = DEC); 85 | size_t println(unsigned long long, int = DEC); 86 | size_t println(double, int = 2); 87 | size_t println(const Printable&); 88 | size_t println(void); 89 | 90 | size_t printf(const char * format, ...); 91 | 92 | size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 93 | size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) 94 | { 95 | return printBuffer((uint8_t const*) buffer, size, delim, byteline); 96 | } 97 | 98 | size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 99 | size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) 100 | { 101 | return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); 102 | } 103 | 104 | virtual void flush() { /* Empty implementation for backward compatibility */ } 105 | }; 106 | 107 | 108 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = { 31 | // D0 .. D13 32 | 5, // D0 is P0.05 (UART RX) 33 | 6, // D1 is P0.06 (UART TX) 34 | 7, // D2 is P0.07 35 | 31, // D3 is P0.31 36 | 18, // D4 is P0.18 (LED Blue) 37 | 99, // D5 (NC) 38 | 9, // D6 is P0.09 NFC1 39 | 10, // D7 is P0.10 (Button) NFC2 40 | 99, // D8 (NC) 41 | 8, // D9 is P0.08 42 | 11, // D10 is P0.11 CS 43 | 13, // D11 is P0.13 MOSI 44 | 12, // D12 is P0.12 MISO 45 | 14, // D13 is P0.14 SCK 46 | //I2C 47 | 2, // D14 is P0.2 (SDA) 48 | 3, // D15 is P0.3 (SCL) 49 | // D16 .. D21 (aka A0 .. A5) 50 | 3, // D16 is P0.03 (A0) 51 | 2, // D17 is P0.02 (A1) 52 | 4, // D18 is P0.04 (A2) 53 | 30, // D19 is P0.30 (A3) SW2 54 | 29, // D20 is P0.29 (A4) 55 | 28, // D21 is P0.28 (A5) 56 | 9, // P0.09 NFC 57 | 10, // P0.10 NFC 58 | 16, // SW1 (LED Green) 59 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = 31 | { 32 | // D0 .. D13 33 | 5, // D0 is P0.05 (UART RX) 34 | 6, // D1 is P0.06 (UART TX) 35 | 7, // D2 is P0.07 36 | 31, // D3 is P0.31 37 | 18, // D4 is P0.18 (LED Blue) 38 | 99, // D5 (NC) 39 | 9, // D6 is P0.09 NFC1 40 | 10, // D7 is P0.10 (Button) NFC2 41 | 99, // D8 (NC) 42 | 8, // D9 is P0.08 43 | 11, // D10 is P0.11 CS 44 | 13, // D11 is P0.13 MOSI 45 | 12, // D12 is P0.12 MISO 46 | 14, // D13 is P0.14 SCK 47 | //I2C 48 | 2, // D14 is P0.2 (SDA) 49 | 3, // D15 is P0.3 (SCL) 50 | // D16 .. D21 (aka A0 .. A5) 51 | 3, // D16 is P0.03 (A0) 52 | 2, // D17 is P0.02 (A1) 53 | 4, // D18 is P0.04 (A2) 54 | 30, // D19 is P0.30 (A3) SW2 55 | 29, // D20 is P0.29 (A4) 56 | 28, // D21 is P0.28 (A5) 57 | 9, // P0.09 NFC 58 | 10, // P0.10 NFC 59 | 16, // SW1 (LED Green) 60 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = 31 | { 32 | // D0 .. D13 33 | 5, // D0 is P0.05 (UART RX) 34 | 6, // D1 is P0.06 (UART TX) 35 | 7, // D2 is P0.07 36 | 31, // D3 is P0.31 37 | 18, // D4 is P0.18 (LED Blue) 38 | 99, // D5 (NC) 39 | 9, // D6 is P0.09 NFC1 40 | 10, // D7 is P0.10 (Button) NFC2 41 | 99, // D8 (NC) 42 | 8, // D9 is P0.08 43 | 11, // D10 is P0.11 CS 44 | 13, // D11 is P0.13 MOSI 45 | 12, // D12 is P0.12 MISO 46 | 14, // D13 is P0.14 SCK 47 | //I2C 48 | 2, // D14 is P0.2 (SDA) 49 | 3, // D15 is P0.3 (SCL) 50 | // D16 .. D21 (aka A0 .. A5) 51 | 3, // D16 is P0.03 (A0) 52 | 2, // D17 is P0.02 (A1) 53 | 4, // D18 is P0.04 (A2) 54 | 30, // D19 is P0.30 (A3) SW2 55 | 29, // D20 is P0.29 (A4) 56 | 28, // D21 is P0.28 (A5) 57 | 9, // P0.09 NFC 58 | 10, // P0.10 NFC 59 | 16, // SW1 (LED Green) 60 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = 31 | { 32 | // D0 .. D13 33 | 5, // D0 is P0.05 (UART RX) 34 | 6, // D1 is P0.06 (UART TX) 35 | 7, // D2 is P0.07 36 | 31, // D3 is P0.31 37 | 18, // D4 is P0.18 (LED Blue) 38 | 99, // D5 (NC) 39 | 9, // D6 is P0.09 NFC1 40 | 10, // D7 is P0.10 (Button) NFC2 41 | 99, // D8 (NC) 42 | 8, // D9 is P0.08 43 | 11, // D10 is P0.11 CS 44 | 13, // D11 is P0.13 MOSI 45 | 12, // D12 is P0.12 MISO 46 | 14, // D13 is P0.14 SCK 47 | //I2C 48 | 2, // D14 is P0.2 (SDA) 49 | 3, // D15 is P0.3 (SCL) 50 | // D16 .. D21 (aka A0 .. A5) 51 | 3, // D16 is P0.03 (A0) 52 | 2, // D17 is P0.02 (A1) 53 | 4, // D18 is P0.04 (A2) 54 | 30, // D19 is P0.30 (A3) SW2 55 | 29, // D20 is P0.29 (A4) 56 | 28, // D21 is P0.28 (A5) 57 | 9, // P0.09 NFC 58 | 10, // P0.10 NFC 59 | 16, // SW1 (LED Green) 60 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = 31 | { 32 | // D0 .. D13 33 | 5, // D0 is P0.05 (UART RX) 34 | 6, // D1 is P0.06 (UART TX) 35 | 7, // D2 is P0.07 36 | 31, // D3 is P0.31 37 | 18, // D4 is P0.18 (LED Blue) 38 | 99, // D5 (NC) 39 | 9, // D6 is P0.09 NFC1 40 | 10, // D7 is P0.10 (Button) NFC2 41 | 99, // D8 (NC) 42 | 8, // D9 is P0.08 43 | 11, // D10 is P0.11 CS 44 | 13, // D11 is P0.13 MOSI 45 | 12, // D12 is P0.12 MISO 46 | 14, // D13 is P0.14 SCK 47 | //I2C 48 | 2, // D14 is P0.2 (SDA) 49 | 3, // D15 is P0.3 (SCL) 50 | // D16 .. D21 (aka A0 .. A5) 51 | 3, // D16 is P0.03 (A0) 52 | 2, // D17 is P0.02 (A1) 53 | 4, // D18 is P0.04 (A2) 54 | 30, // D19 is P0.30 (A3) SW2 55 | 29, // D20 is P0.29 (A4) 56 | 28, // D21 is P0.28 (A5) 57 | 9, // P0.09 NFC 58 | 10, // P0.10 NFC 59 | 16, // SW1 (LED Green) 60 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = 31 | { 32 | // D0 .. D13 33 | 5, // D0 is P0.05 (UART RX) 34 | 6, // D1 is P0.06 (UART TX) 35 | 7, // D2 is P0.07 36 | 31, // D3 is P0.31 37 | 18, // D4 is P0.18 (LED Blue) 38 | 99, // D5 (NC) 39 | 9, // D6 is P0.09 NFC1 40 | 10, // D7 is P0.10 (Button) NFC2 41 | 99, // D8 (NC) 42 | 8, // D9 is P0.08 43 | 11, // D10 is P0.11 CS 44 | 13, // D11 is P0.13 MOSI 45 | 12, // D12 is P0.12 MISO 46 | 14, // D13 is P0.14 SCK 47 | //I2C 48 | 2, // D14 is P0.2 (SDA) 49 | 3, // D15 is P0.3 (SCL) 50 | // D16 .. D21 (aka A0 .. A5) 51 | 3, // D16 is P0.03 (A0) 52 | 2, // D17 is P0.02 (A1) 53 | 4, // D18 is P0.04 (A2) 54 | 30, // D19 is P0.30 (A3) SW2 55 | 29, // D20 is P0.29 (A4) 56 | 28, // D21 is P0.28 (A5) 57 | 9, // P0.09 NFC 58 | 10, // P0.10 NFC 59 | 16, // SW1 (LED Green) 60 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/sparkfun_nrf52840_mini/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "variant.h" 22 | #include "wiring_constants.h" 23 | #include "wiring_digital.h" 24 | #include "nrf.h" 25 | 26 | const uint32_t g_ADigitalPinMap[] = 27 | { 28 | // P0 29 | 0, 1, 2, 3, 4, 5, 6, 7, 30 | 8, 9, 10, 11, 12, 13, 14, 15, 31 | 16, 17, 18, 19, 20, 21, 22, 23, 32 | 24, 25, 26, 27, 28, 29, 30, 31, 33 | 34 | // P1 35 | 32, 33, 34, 35, 36, 37, 38, 39, 36 | 40, 41, 42, 43, 44, 45, 46, 47, 37 | 48, 49, 50, 51, 52, 53, 54, 55, 38 | 56, 57, 58, 59, 60, 61, 62, 63 39 | }; 40 | void initVariant() 41 | { 42 | // LED1 & LED2 43 | pinMode(PIN_LED1, OUTPUT); 44 | ledOff(PIN_LED1); 45 | 46 | pinMode(PIN_LED2, OUTPUT); 47 | ledOff(PIN_LED2); 48 | } 49 | 50 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = 31 | { 32 | // D0 .. D13 33 | 5, // D0 is P0.05 (UART RX) 34 | 6, // D1 is P0.06 (UART TX) 35 | 7, // D2 is P0.07 36 | 31, // D3 is P0.31 37 | 18, // D4 is P0.18 (LED Blue) 38 | 99, // D5 (NC) 39 | 9, // D6 is P0.09 NFC1 40 | 10, // D7 is P0.10 (Button) NFC2 41 | 99, // D8 (NC) 42 | 8, // D9 is P0.08 43 | 11, // D10 is P0.11 CS 44 | 13, // D11 is P0.13 MOSI 45 | 12, // D12 is P0.12 MISO 46 | 14, // D13 is P0.14 SCK 47 | //I2C 48 | 2, // D14 is P0.2 (SDA) 49 | 3, // D15 is P0.3 (SCL) 50 | // D16 .. D21 (aka A0 .. A5) 51 | 3, // D16 is P0.03 (A0) 52 | 2, // D17 is P0.02 (A1) 53 | 4, // D18 is P0.04 (A2) 54 | 30, // D19 is P0.30 (A3) SW2 55 | 29, // D20 is P0.29 (A4) 56 | 28, // D21 is P0.28 (A5) 57 | 9, // P0.09 NFC 58 | 10, // P0.10 NFC 59 | 16, // SW1 (LED Green) 60 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/sparkfun_nrf52840_mini/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "variant.h" 22 | #include "wiring_constants.h" 23 | #include "wiring_digital.h" 24 | #include "nrf.h" 25 | 26 | const uint32_t g_ADigitalPinMap[] = 27 | { 28 | // P0 29 | 0, 1, 2, 3, 4, 5, 6, 7, 30 | 8, 9, 10, 11, 12, 13, 14, 15, 31 | 16, 17, 18, 19, 20, 21, 22, 23, 32 | 24, 25, 26, 27, 28, 29, 30, 31, 33 | 34 | // P1 35 | 32, 33, 34, 35, 36, 37, 38, 39, 36 | 40, 41, 42, 43, 44, 45, 46, 47, 37 | 48, 49, 50, 51, 52, 53, 54, 55, 38 | 56, 57, 58, 59, 60, 61, 62, 63 39 | }; 40 | void initVariant() 41 | { 42 | // LED1 & LED2 43 | pinMode(PIN_LED1, OUTPUT); 44 | ledOff(PIN_LED1); 45 | 46 | pinMode(PIN_LED2, OUTPUT); 47 | ledOff(PIN_LED2); 48 | } 49 | 50 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = 31 | { 32 | // D0 .. D13 33 | 5, // D0 is P0.05 (UART RX) 34 | 6, // D1 is P0.06 (UART TX) 35 | 7, // D2 is P0.07 36 | 31, // D3 is P0.31 37 | 18, // D4 is P0.18 (LED Blue) 38 | 99, // D5 (NC) 39 | 9, // D6 is P0.09 NFC1 40 | 10, // D7 is P0.10 (Button) NFC2 41 | 99, // D8 (NC) 42 | 8, // D9 is P0.08 43 | 11, // D10 is P0.11 CS 44 | 13, // D11 is P0.13 MOSI 45 | 12, // D12 is P0.12 MISO 46 | 14, // D13 is P0.14 SCK 47 | //I2C 48 | 2, // D14 is P0.2 (SDA) 49 | 3, // D15 is P0.3 (SCL) 50 | // D16 .. D21 (aka A0 .. A5) 51 | 3, // D16 is P0.03 (A0) 52 | 2, // D17 is P0.02 (A1) 53 | 4, // D18 is P0.04 (A2) 54 | 30, // D19 is P0.30 (A3) SW2 55 | 29, // D20 is P0.29 (A4) 56 | 28, // D21 is P0.28 (A5) 57 | 9, // P0.09 NFC 58 | 10, // P0.10 NFC 59 | 16, // SW1 (LED Green) 60 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/sparkfun_nrf52840_mini/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "variant.h" 22 | #include "wiring_constants.h" 23 | #include "wiring_digital.h" 24 | #include "nrf.h" 25 | 26 | const uint32_t g_ADigitalPinMap[] = 27 | { 28 | // P0 29 | 0, 1, 2, 3, 4, 5, 6, 7, 30 | 8, 9, 10, 11, 12, 13, 14, 15, 31 | 16, 17, 18, 19, 20, 21, 22, 23, 32 | 24, 25, 26, 27, 28, 29, 30, 31, 33 | 34 | // P1 35 | 32, 33, 34, 35, 36, 37, 38, 39, 36 | 40, 41, 42, 43, 44, 45, 46, 47, 37 | 48, 49, 50, 51, 52, 53, 54, 55, 38 | 56, 57, 58, 59, 60, 61, 62, 63 39 | }; 40 | void initVariant() 41 | { 42 | // LED1 & LED2 43 | pinMode(PIN_LED1, OUTPUT); 44 | ledOff(PIN_LED1); 45 | 46 | pinMode(PIN_LED2, OUTPUT); 47 | ledOff(PIN_LED2); 48 | } 49 | 50 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = 31 | { 32 | // D0 .. D13 33 | 5, // D0 is P0.05 (UART RX) 34 | 6, // D1 is P0.06 (UART TX) 35 | 7, // D2 is P0.07 36 | 31, // D3 is P0.31 37 | 18, // D4 is P0.18 (LED Blue) 38 | 99, // D5 (NC) 39 | 9, // D6 is P0.09 NFC1 40 | 10, // D7 is P0.10 (Button) NFC2 41 | 99, // D8 (NC) 42 | 8, // D9 is P0.08 43 | 11, // D10 is P0.11 CS 44 | 13, // D11 is P0.13 MOSI 45 | 12, // D12 is P0.12 MISO 46 | 14, // D13 is P0.14 SCK 47 | //I2C 48 | 2, // D14 is P0.2 (SDA) 49 | 3, // D15 is P0.3 (SCL) 50 | // D16 .. D21 (aka A0 .. A5) 51 | 3, // D16 is P0.03 (A0) 52 | 2, // D17 is P0.02 (A1) 53 | 4, // D18 is P0.04 (A2) 54 | 30, // D19 is P0.30 (A3) SW2 55 | 29, // D20 is P0.29 (A4) 56 | 28, // D21 is P0.28 (A5) 57 | 9, // P0.09 NFC 58 | 10, // P0.10 NFC 59 | 16, // SW1 (LED Green) 60 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/sparkfun_nrf52840_mini/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "variant.h" 22 | #include "wiring_constants.h" 23 | #include "wiring_digital.h" 24 | #include "nrf.h" 25 | 26 | const uint32_t g_ADigitalPinMap[] = 27 | { 28 | // P0 29 | 0, 1, 2, 3, 4, 5, 6, 7, 30 | 8, 9, 10, 11, 12, 13, 14, 15, 31 | 16, 17, 18, 19, 20, 21, 22, 23, 32 | 24, 25, 26, 27, 28, 29, 30, 31, 33 | 34 | // P1 35 | 32, 33, 34, 35, 36, 37, 38, 39, 36 | 40, 41, 42, 43, 44, 45, 46, 47, 37 | 48, 49, 50, 51, 52, 53, 54, 55, 38 | 56, 57, 58, 59, 60, 61, 62, 63 39 | }; 40 | void initVariant() 41 | { 42 | // LED1 & LED2 43 | pinMode(PIN_LED1, OUTPUT); 44 | ledOff(PIN_LED1); 45 | 46 | pinMode(PIN_LED2, OUTPUT); 47 | ledOff(PIN_LED2); 48 | } 49 | 50 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/samd/1.5.14/cores/arduino/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include // for size_t 23 | 24 | #include "WString.h" 25 | #include "Printable.h" 26 | 27 | #define DEC 10 28 | #define HEX 16 29 | #define OCT 8 30 | #define BIN 2 31 | 32 | class Print 33 | { 34 | private: 35 | int write_error; 36 | size_t printNumber(unsigned long, uint8_t); 37 | size_t printULLNumber(unsigned long long, uint8_t); 38 | size_t printFloat(double, int); 39 | protected: 40 | void setWriteError(int err = 1) { write_error = err; } 41 | public: 42 | Print() : write_error(0) {} 43 | 44 | int getWriteError() { return write_error; } 45 | void clearWriteError() { setWriteError(0); } 46 | 47 | virtual size_t write(uint8_t) = 0; 48 | size_t write(const char *str) { 49 | if (str == NULL) return 0; 50 | return write((const uint8_t *)str, strlen(str)); 51 | } 52 | virtual size_t write(const uint8_t *buffer, size_t size); 53 | size_t write(const char *buffer, size_t size) { 54 | return write((const uint8_t *)buffer, size); 55 | } 56 | 57 | // default to zero, meaning "a single write may block" 58 | // should be overridden by subclasses with buffering 59 | virtual int availableForWrite() { return 0; } 60 | 61 | size_t print(const __FlashStringHelper *); 62 | size_t print(const String &); 63 | size_t print(const char[]); 64 | size_t print(char); 65 | size_t print(unsigned char, int = DEC); 66 | size_t print(int, int = DEC); 67 | size_t print(unsigned int, int = DEC); 68 | size_t print(long, int = DEC); 69 | size_t print(unsigned long, int = DEC); 70 | size_t print(long long, int = DEC); 71 | size_t print(unsigned long long, int = DEC); 72 | size_t print(double, int = 2); 73 | size_t print(const Printable&); 74 | 75 | size_t println(const __FlashStringHelper *); 76 | size_t println(const String &s); 77 | size_t println(const char[]); 78 | size_t println(char); 79 | size_t println(unsigned char, int = DEC); 80 | size_t println(int, int = DEC); 81 | size_t println(unsigned int, int = DEC); 82 | size_t println(long, int = DEC); 83 | size_t println(unsigned long, int = DEC); 84 | size_t println(long long, int = DEC); 85 | size_t println(unsigned long long, int = DEC); 86 | size_t println(double, int = 2); 87 | size_t println(const Printable&); 88 | size_t println(void); 89 | 90 | size_t printf(const char * format, ...); 91 | 92 | size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 93 | size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) 94 | { 95 | return printBuffer((uint8_t const*) buffer, size, delim, byteline); 96 | } 97 | 98 | size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 99 | size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) 100 | { 101 | return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); 102 | } 103 | 104 | virtual void flush() { /* Empty implementation for backward compatibility */ } 105 | }; 106 | 107 | 108 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/samd/1.6.0/cores/arduino/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include // for size_t 23 | 24 | #include "WString.h" 25 | #include "Printable.h" 26 | 27 | #define DEC 10 28 | #define HEX 16 29 | #define OCT 8 30 | #define BIN 2 31 | 32 | class Print 33 | { 34 | private: 35 | int write_error; 36 | size_t printNumber(unsigned long, uint8_t); 37 | size_t printULLNumber(unsigned long long, uint8_t); 38 | size_t printFloat(double, int); 39 | protected: 40 | void setWriteError(int err = 1) { write_error = err; } 41 | public: 42 | Print() : write_error(0) {} 43 | 44 | int getWriteError() { return write_error; } 45 | void clearWriteError() { setWriteError(0); } 46 | 47 | virtual size_t write(uint8_t) = 0; 48 | size_t write(const char *str) { 49 | if (str == NULL) return 0; 50 | return write((const uint8_t *)str, strlen(str)); 51 | } 52 | virtual size_t write(const uint8_t *buffer, size_t size); 53 | size_t write(const char *buffer, size_t size) { 54 | return write((const uint8_t *)buffer, size); 55 | } 56 | 57 | // default to zero, meaning "a single write may block" 58 | // should be overridden by subclasses with buffering 59 | virtual int availableForWrite() { return 0; } 60 | 61 | size_t print(const __FlashStringHelper *); 62 | size_t print(const String &); 63 | size_t print(const char[]); 64 | size_t print(char); 65 | size_t print(unsigned char, int = DEC); 66 | size_t print(int, int = DEC); 67 | size_t print(unsigned int, int = DEC); 68 | size_t print(long, int = DEC); 69 | size_t print(unsigned long, int = DEC); 70 | size_t print(long long, int = DEC); 71 | size_t print(unsigned long long, int = DEC); 72 | size_t print(double, int = 2); 73 | size_t print(const Printable&); 74 | 75 | size_t println(const __FlashStringHelper *); 76 | size_t println(const String &s); 77 | size_t println(const char[]); 78 | size_t println(char); 79 | size_t println(unsigned char, int = DEC); 80 | size_t println(int, int = DEC); 81 | size_t println(unsigned int, int = DEC); 82 | size_t println(long, int = DEC); 83 | size_t println(unsigned long, int = DEC); 84 | size_t println(long long, int = DEC); 85 | size_t println(unsigned long long, int = DEC); 86 | size_t println(double, int = 2); 87 | size_t println(const Printable&); 88 | size_t println(void); 89 | 90 | size_t printf(const char * format, ...); 91 | 92 | size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 93 | size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) 94 | { 95 | return printBuffer((uint8_t const*) buffer, size, delim, byteline); 96 | } 97 | 98 | size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 99 | size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) 100 | { 101 | return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); 102 | } 103 | 104 | virtual void flush() { /* Empty implementation for backward compatibility */ } 105 | }; 106 | 107 | 108 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/samd/1.6.3/cores/arduino/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include // for size_t 23 | 24 | #include "WString.h" 25 | #include "Printable.h" 26 | 27 | #define DEC 10 28 | #define HEX 16 29 | #define OCT 8 30 | #define BIN 2 31 | 32 | class Print 33 | { 34 | private: 35 | int write_error; 36 | size_t printNumber(unsigned long, uint8_t); 37 | size_t printULLNumber(unsigned long long, uint8_t); 38 | size_t printFloat(double, int); 39 | protected: 40 | void setWriteError(int err = 1) { write_error = err; } 41 | public: 42 | Print() : write_error(0) {} 43 | 44 | int getWriteError() { return write_error; } 45 | void clearWriteError() { setWriteError(0); } 46 | 47 | virtual size_t write(uint8_t) = 0; 48 | size_t write(const char *str) { 49 | if (str == NULL) return 0; 50 | return write((const uint8_t *)str, strlen(str)); 51 | } 52 | virtual size_t write(const uint8_t *buffer, size_t size); 53 | size_t write(const char *buffer, size_t size) { 54 | return write((const uint8_t *)buffer, size); 55 | } 56 | 57 | // default to zero, meaning "a single write may block" 58 | // should be overridden by subclasses with buffering 59 | virtual int availableForWrite() { return 0; } 60 | 61 | size_t print(const __FlashStringHelper *); 62 | size_t print(const String &); 63 | size_t print(const char[]); 64 | size_t print(char); 65 | size_t print(unsigned char, int = DEC); 66 | size_t print(int, int = DEC); 67 | size_t print(unsigned int, int = DEC); 68 | size_t print(long, int = DEC); 69 | size_t print(unsigned long, int = DEC); 70 | size_t print(long long, int = DEC); 71 | size_t print(unsigned long long, int = DEC); 72 | size_t print(double, int = 2); 73 | size_t print(const Printable&); 74 | 75 | size_t println(const __FlashStringHelper *); 76 | size_t println(const String &s); 77 | size_t println(const char[]); 78 | size_t println(char); 79 | size_t println(unsigned char, int = DEC); 80 | size_t println(int, int = DEC); 81 | size_t println(unsigned int, int = DEC); 82 | size_t println(long, int = DEC); 83 | size_t println(unsigned long, int = DEC); 84 | size_t println(long long, int = DEC); 85 | size_t println(unsigned long long, int = DEC); 86 | size_t println(double, int = 2); 87 | size_t println(const Printable&); 88 | size_t println(void); 89 | 90 | size_t printf(const char * format, ...); 91 | 92 | size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 93 | size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) 94 | { 95 | return printBuffer((uint8_t const*) buffer, size, delim, byteline); 96 | } 97 | 98 | size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 99 | size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) 100 | { 101 | return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); 102 | } 103 | 104 | virtual void flush() { /* Empty implementation for backward compatibility */ } 105 | }; 106 | 107 | 108 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/samd/1.6.4/cores/arduino/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include // for size_t 23 | 24 | #include "WString.h" 25 | #include "Printable.h" 26 | 27 | #define DEC 10 28 | #define HEX 16 29 | #define OCT 8 30 | #define BIN 2 31 | 32 | class Print 33 | { 34 | private: 35 | int write_error; 36 | size_t printNumber(unsigned long, uint8_t); 37 | size_t printULLNumber(unsigned long long, uint8_t); 38 | size_t printFloat(double, int); 39 | protected: 40 | void setWriteError(int err = 1) { write_error = err; } 41 | public: 42 | Print() : write_error(0) {} 43 | 44 | int getWriteError() { return write_error; } 45 | void clearWriteError() { setWriteError(0); } 46 | 47 | virtual size_t write(uint8_t) = 0; 48 | size_t write(const char *str) { 49 | if (str == NULL) return 0; 50 | return write((const uint8_t *)str, strlen(str)); 51 | } 52 | virtual size_t write(const uint8_t *buffer, size_t size); 53 | size_t write(const char *buffer, size_t size) { 54 | return write((const uint8_t *)buffer, size); 55 | } 56 | 57 | // default to zero, meaning "a single write may block" 58 | // should be overridden by subclasses with buffering 59 | virtual int availableForWrite() { return 0; } 60 | 61 | size_t print(const __FlashStringHelper *); 62 | size_t print(const String &); 63 | size_t print(const char[]); 64 | size_t print(char); 65 | size_t print(unsigned char, int = DEC); 66 | size_t print(int, int = DEC); 67 | size_t print(unsigned int, int = DEC); 68 | size_t print(long, int = DEC); 69 | size_t print(unsigned long, int = DEC); 70 | size_t print(long long, int = DEC); 71 | size_t print(unsigned long long, int = DEC); 72 | size_t print(double, int = 2); 73 | size_t print(const Printable&); 74 | 75 | size_t println(const __FlashStringHelper *); 76 | size_t println(const String &s); 77 | size_t println(const char[]); 78 | size_t println(char); 79 | size_t println(unsigned char, int = DEC); 80 | size_t println(int, int = DEC); 81 | size_t println(unsigned int, int = DEC); 82 | size_t println(long, int = DEC); 83 | size_t println(unsigned long, int = DEC); 84 | size_t println(long long, int = DEC); 85 | size_t println(unsigned long long, int = DEC); 86 | size_t println(double, int = 2); 87 | size_t println(const Printable&); 88 | size_t println(void); 89 | 90 | size_t printf(const char * format, ...); 91 | 92 | size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 93 | size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) 94 | { 95 | return printBuffer((uint8_t const*) buffer, size, delim, byteline); 96 | } 97 | 98 | size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 99 | size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) 100 | { 101 | return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); 102 | } 103 | 104 | virtual void flush() { /* Empty implementation for backward compatibility */ } 105 | }; 106 | 107 | 108 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/samd/1.6.5/cores/arduino/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include // for size_t 23 | 24 | #include "WString.h" 25 | #include "Printable.h" 26 | 27 | #define DEC 10 28 | #define HEX 16 29 | #define OCT 8 30 | #define BIN 2 31 | 32 | class Print 33 | { 34 | private: 35 | int write_error; 36 | size_t printNumber(unsigned long, uint8_t); 37 | size_t printULLNumber(unsigned long long, uint8_t); 38 | size_t printFloat(double, int); 39 | protected: 40 | void setWriteError(int err = 1) { write_error = err; } 41 | public: 42 | Print() : write_error(0) {} 43 | 44 | int getWriteError() { return write_error; } 45 | void clearWriteError() { setWriteError(0); } 46 | 47 | virtual size_t write(uint8_t) = 0; 48 | size_t write(const char *str) { 49 | if (str == NULL) return 0; 50 | return write((const uint8_t *)str, strlen(str)); 51 | } 52 | virtual size_t write(const uint8_t *buffer, size_t size); 53 | size_t write(const char *buffer, size_t size) { 54 | return write((const uint8_t *)buffer, size); 55 | } 56 | 57 | // default to zero, meaning "a single write may block" 58 | // should be overridden by subclasses with buffering 59 | virtual int availableForWrite() { return 0; } 60 | 61 | size_t print(const __FlashStringHelper *); 62 | size_t print(const String &); 63 | size_t print(const char[]); 64 | size_t print(char); 65 | size_t print(unsigned char, int = DEC); 66 | size_t print(int, int = DEC); 67 | size_t print(unsigned int, int = DEC); 68 | size_t print(long, int = DEC); 69 | size_t print(unsigned long, int = DEC); 70 | size_t print(long long, int = DEC); 71 | size_t print(unsigned long long, int = DEC); 72 | size_t print(double, int = 2); 73 | size_t print(const Printable&); 74 | 75 | size_t println(const __FlashStringHelper *); 76 | size_t println(const String &s); 77 | size_t println(const char[]); 78 | size_t println(char); 79 | size_t println(unsigned char, int = DEC); 80 | size_t println(int, int = DEC); 81 | size_t println(unsigned int, int = DEC); 82 | size_t println(long, int = DEC); 83 | size_t println(unsigned long, int = DEC); 84 | size_t println(long long, int = DEC); 85 | size_t println(unsigned long long, int = DEC); 86 | size_t println(double, int = 2); 87 | size_t println(const Printable&); 88 | size_t println(void); 89 | 90 | size_t printf(const char * format, ...); 91 | 92 | size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 93 | size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) 94 | { 95 | return printBuffer((uint8_t const*) buffer, size, delim, byteline); 96 | } 97 | 98 | size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 99 | size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) 100 | { 101 | return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); 102 | } 103 | 104 | virtual void flush() { /* Empty implementation for backward compatibility */ } 105 | }; 106 | 107 | 108 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/samd/1.6.6/cores/arduino/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include // for size_t 23 | 24 | #include "WString.h" 25 | #include "Printable.h" 26 | 27 | #define DEC 10 28 | #define HEX 16 29 | #define OCT 8 30 | #define BIN 2 31 | 32 | class Print 33 | { 34 | private: 35 | int write_error; 36 | size_t printNumber(unsigned long, uint8_t); 37 | size_t printULLNumber(unsigned long long, uint8_t); 38 | size_t printFloat(double, int); 39 | protected: 40 | void setWriteError(int err = 1) { write_error = err; } 41 | public: 42 | Print() : write_error(0) {} 43 | 44 | int getWriteError() { return write_error; } 45 | void clearWriteError() { setWriteError(0); } 46 | 47 | virtual size_t write(uint8_t) = 0; 48 | size_t write(const char *str) { 49 | if (str == NULL) return 0; 50 | return write((const uint8_t *)str, strlen(str)); 51 | } 52 | virtual size_t write(const uint8_t *buffer, size_t size); 53 | size_t write(const char *buffer, size_t size) { 54 | return write((const uint8_t *)buffer, size); 55 | } 56 | 57 | // default to zero, meaning "a single write may block" 58 | // should be overridden by subclasses with buffering 59 | virtual int availableForWrite() { return 0; } 60 | 61 | size_t print(const __FlashStringHelper *); 62 | size_t print(const String &); 63 | size_t print(const char[]); 64 | size_t print(char); 65 | size_t print(unsigned char, int = DEC); 66 | size_t print(int, int = DEC); 67 | size_t print(unsigned int, int = DEC); 68 | size_t print(long, int = DEC); 69 | size_t print(unsigned long, int = DEC); 70 | size_t print(long long, int = DEC); 71 | size_t print(unsigned long long, int = DEC); 72 | size_t print(double, int = 2); 73 | size_t print(const Printable&); 74 | 75 | size_t println(const __FlashStringHelper *); 76 | size_t println(const String &s); 77 | size_t println(const char[]); 78 | size_t println(char); 79 | size_t println(unsigned char, int = DEC); 80 | size_t println(int, int = DEC); 81 | size_t println(unsigned int, int = DEC); 82 | size_t println(long, int = DEC); 83 | size_t println(unsigned long, int = DEC); 84 | size_t println(long long, int = DEC); 85 | size_t println(unsigned long long, int = DEC); 86 | size_t println(double, int = 2); 87 | size_t println(const Printable&); 88 | size_t println(void); 89 | 90 | size_t printf(const char * format, ...); 91 | 92 | size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 93 | size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) 94 | { 95 | return printBuffer((uint8_t const*) buffer, size, delim, byteline); 96 | } 97 | 98 | size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 99 | size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) 100 | { 101 | return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); 102 | } 103 | 104 | virtual void flush() { /* Empty implementation for backward compatibility */ } 105 | }; 106 | 107 | 108 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/samd/1.6.7/cores/arduino/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include // for size_t 23 | 24 | #include "WString.h" 25 | #include "Printable.h" 26 | 27 | #define DEC 10 28 | #define HEX 16 29 | #define OCT 8 30 | #define BIN 2 31 | 32 | class Print 33 | { 34 | private: 35 | int write_error; 36 | size_t printNumber(unsigned long, uint8_t); 37 | size_t printULLNumber(unsigned long long, uint8_t); 38 | size_t printFloat(double, int); 39 | protected: 40 | void setWriteError(int err = 1) { write_error = err; } 41 | public: 42 | Print() : write_error(0) {} 43 | 44 | int getWriteError() { return write_error; } 45 | void clearWriteError() { setWriteError(0); } 46 | 47 | virtual size_t write(uint8_t) = 0; 48 | size_t write(const char *str) { 49 | if (str == NULL) return 0; 50 | return write((const uint8_t *)str, strlen(str)); 51 | } 52 | virtual size_t write(const uint8_t *buffer, size_t size); 53 | size_t write(const char *buffer, size_t size) { 54 | return write((const uint8_t *)buffer, size); 55 | } 56 | 57 | // default to zero, meaning "a single write may block" 58 | // should be overridden by subclasses with buffering 59 | virtual int availableForWrite() { return 0; } 60 | 61 | size_t print(const __FlashStringHelper *); 62 | size_t print(const String &); 63 | size_t print(const char[]); 64 | size_t print(char); 65 | size_t print(unsigned char, int = DEC); 66 | size_t print(int, int = DEC); 67 | size_t print(unsigned int, int = DEC); 68 | size_t print(long, int = DEC); 69 | size_t print(unsigned long, int = DEC); 70 | size_t print(long long, int = DEC); 71 | size_t print(unsigned long long, int = DEC); 72 | size_t print(double, int = 2); 73 | size_t print(const Printable&); 74 | 75 | size_t println(const __FlashStringHelper *); 76 | size_t println(const String &s); 77 | size_t println(const char[]); 78 | size_t println(char); 79 | size_t println(unsigned char, int = DEC); 80 | size_t println(int, int = DEC); 81 | size_t println(unsigned int, int = DEC); 82 | size_t println(long, int = DEC); 83 | size_t println(unsigned long, int = DEC); 84 | size_t println(long long, int = DEC); 85 | size_t println(unsigned long long, int = DEC); 86 | size_t println(double, int = 2); 87 | size_t println(const Printable&); 88 | size_t println(void); 89 | 90 | size_t printf(const char * format, ...); 91 | 92 | size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 93 | size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) 94 | { 95 | return printBuffer((uint8_t const*) buffer, size, delim, byteline); 96 | } 97 | 98 | size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 99 | size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) 100 | { 101 | return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); 102 | } 103 | 104 | virtual void flush() { /* Empty implementation for backward compatibility */ } 105 | }; 106 | 107 | 108 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/samd/1.6.8/cores/arduino/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include // for size_t 23 | 24 | #include "WString.h" 25 | #include "Printable.h" 26 | 27 | #define DEC 10 28 | #define HEX 16 29 | #define OCT 8 30 | #define BIN 2 31 | 32 | class Print 33 | { 34 | private: 35 | int write_error; 36 | size_t printNumber(unsigned long, uint8_t); 37 | size_t printULLNumber(unsigned long long, uint8_t); 38 | size_t printFloat(double, int); 39 | protected: 40 | void setWriteError(int err = 1) { write_error = err; } 41 | public: 42 | Print() : write_error(0) {} 43 | 44 | int getWriteError() { return write_error; } 45 | void clearWriteError() { setWriteError(0); } 46 | 47 | virtual size_t write(uint8_t) = 0; 48 | size_t write(const char *str) { 49 | if (str == NULL) return 0; 50 | return write((const uint8_t *)str, strlen(str)); 51 | } 52 | virtual size_t write(const uint8_t *buffer, size_t size); 53 | size_t write(const char *buffer, size_t size) { 54 | return write((const uint8_t *)buffer, size); 55 | } 56 | 57 | // default to zero, meaning "a single write may block" 58 | // should be overridden by subclasses with buffering 59 | virtual int availableForWrite() { return 0; } 60 | 61 | size_t print(const __FlashStringHelper *); 62 | size_t print(const String &); 63 | size_t print(const char[]); 64 | size_t print(char); 65 | size_t print(unsigned char, int = DEC); 66 | size_t print(int, int = DEC); 67 | size_t print(unsigned int, int = DEC); 68 | size_t print(long, int = DEC); 69 | size_t print(unsigned long, int = DEC); 70 | size_t print(long long, int = DEC); 71 | size_t print(unsigned long long, int = DEC); 72 | size_t print(double, int = 2); 73 | size_t print(const Printable&); 74 | 75 | size_t println(const __FlashStringHelper *); 76 | size_t println(const String &s); 77 | size_t println(const char[]); 78 | size_t println(char); 79 | size_t println(unsigned char, int = DEC); 80 | size_t println(int, int = DEC); 81 | size_t println(unsigned int, int = DEC); 82 | size_t println(long, int = DEC); 83 | size_t println(unsigned long, int = DEC); 84 | size_t println(long long, int = DEC); 85 | size_t println(unsigned long long, int = DEC); 86 | size_t println(double, int = 2); 87 | size_t println(const Printable&); 88 | size_t println(void); 89 | 90 | size_t printf(const char * format, ...); 91 | 92 | size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 93 | size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) 94 | { 95 | return printBuffer((uint8_t const*) buffer, size, delim, byteline); 96 | } 97 | 98 | size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 99 | size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) 100 | { 101 | return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); 102 | } 103 | 104 | virtual void flush() { /* Empty implementation for backward compatibility */ } 105 | }; 106 | 107 | 108 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/samd/1.7.0/cores/arduino/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include // for size_t 23 | 24 | #include "WString.h" 25 | #include "Printable.h" 26 | 27 | #define DEC 10 28 | #define HEX 16 29 | #define OCT 8 30 | #define BIN 2 31 | 32 | class Print 33 | { 34 | private: 35 | int write_error; 36 | size_t printNumber(unsigned long, uint8_t); 37 | size_t printULLNumber(unsigned long long, uint8_t); 38 | size_t printFloat(double, int); 39 | protected: 40 | void setWriteError(int err = 1) { write_error = err; } 41 | public: 42 | Print() : write_error(0) {} 43 | 44 | int getWriteError() { return write_error; } 45 | void clearWriteError() { setWriteError(0); } 46 | 47 | virtual size_t write(uint8_t) = 0; 48 | size_t write(const char *str) { 49 | if (str == NULL) return 0; 50 | return write((const uint8_t *)str, strlen(str)); 51 | } 52 | virtual size_t write(const uint8_t *buffer, size_t size); 53 | size_t write(const char *buffer, size_t size) { 54 | return write((const uint8_t *)buffer, size); 55 | } 56 | 57 | // default to zero, meaning "a single write may block" 58 | // should be overridden by subclasses with buffering 59 | virtual int availableForWrite() { return 0; } 60 | 61 | size_t print(const __FlashStringHelper *); 62 | size_t print(const String &); 63 | size_t print(const char[]); 64 | size_t print(char); 65 | size_t print(unsigned char, int = DEC); 66 | size_t print(int, int = DEC); 67 | size_t print(unsigned int, int = DEC); 68 | size_t print(long, int = DEC); 69 | size_t print(unsigned long, int = DEC); 70 | size_t print(long long, int = DEC); 71 | size_t print(unsigned long long, int = DEC); 72 | size_t print(double, int = 2); 73 | size_t print(const Printable&); 74 | 75 | size_t println(const __FlashStringHelper *); 76 | size_t println(const String &s); 77 | size_t println(const char[]); 78 | size_t println(char); 79 | size_t println(unsigned char, int = DEC); 80 | size_t println(int, int = DEC); 81 | size_t println(unsigned int, int = DEC); 82 | size_t println(long, int = DEC); 83 | size_t println(unsigned long, int = DEC); 84 | size_t println(long long, int = DEC); 85 | size_t println(unsigned long long, int = DEC); 86 | size_t println(double, int = 2); 87 | size_t println(const Printable&); 88 | size_t println(void); 89 | 90 | size_t printf(const char * format, ...); 91 | 92 | size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 93 | size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) 94 | { 95 | return printBuffer((uint8_t const*) buffer, size, delim, byteline); 96 | } 97 | 98 | size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 99 | size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) 100 | { 101 | return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); 102 | } 103 | 104 | virtual void flush() { /* Empty implementation for backward compatibility */ } 105 | }; 106 | 107 | 108 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/samd/1.7.1/cores/arduino/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include // for size_t 23 | 24 | #include "WString.h" 25 | #include "Printable.h" 26 | 27 | #define DEC 10 28 | #define HEX 16 29 | #define OCT 8 30 | #define BIN 2 31 | 32 | class Print 33 | { 34 | private: 35 | int write_error; 36 | size_t printNumber(unsigned long, uint8_t); 37 | size_t printULLNumber(unsigned long long, uint8_t); 38 | size_t printFloat(double, int); 39 | protected: 40 | void setWriteError(int err = 1) { write_error = err; } 41 | public: 42 | Print() : write_error(0) {} 43 | 44 | int getWriteError() { return write_error; } 45 | void clearWriteError() { setWriteError(0); } 46 | 47 | virtual size_t write(uint8_t) = 0; 48 | size_t write(const char *str) { 49 | if (str == NULL) return 0; 50 | return write((const uint8_t *)str, strlen(str)); 51 | } 52 | virtual size_t write(const uint8_t *buffer, size_t size); 53 | size_t write(const char *buffer, size_t size) { 54 | return write((const uint8_t *)buffer, size); 55 | } 56 | 57 | // default to zero, meaning "a single write may block" 58 | // should be overridden by subclasses with buffering 59 | virtual int availableForWrite() { return 0; } 60 | 61 | size_t print(const __FlashStringHelper *); 62 | size_t print(const String &); 63 | size_t print(const char[]); 64 | size_t print(char); 65 | size_t print(unsigned char, int = DEC); 66 | size_t print(int, int = DEC); 67 | size_t print(unsigned int, int = DEC); 68 | size_t print(long, int = DEC); 69 | size_t print(unsigned long, int = DEC); 70 | size_t print(long long, int = DEC); 71 | size_t print(unsigned long long, int = DEC); 72 | size_t print(double, int = 2); 73 | size_t print(const Printable&); 74 | 75 | size_t println(const __FlashStringHelper *); 76 | size_t println(const String &s); 77 | size_t println(const char[]); 78 | size_t println(char); 79 | size_t println(unsigned char, int = DEC); 80 | size_t println(int, int = DEC); 81 | size_t println(unsigned int, int = DEC); 82 | size_t println(long, int = DEC); 83 | size_t println(unsigned long, int = DEC); 84 | size_t println(long long, int = DEC); 85 | size_t println(unsigned long long, int = DEC); 86 | size_t println(double, int = 2); 87 | size_t println(const Printable&); 88 | size_t println(void); 89 | 90 | size_t printf(const char * format, ...); 91 | 92 | size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 93 | size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) 94 | { 95 | return printBuffer((uint8_t const*) buffer, size, delim, byteline); 96 | } 97 | 98 | size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 99 | size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) 100 | { 101 | return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); 102 | } 103 | 104 | virtual void flush() { /* Empty implementation for backward compatibility */ } 105 | }; 106 | 107 | 108 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/samd/1.7.2/cores/arduino/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Arduino LLC. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include // for size_t 23 | 24 | #include "WString.h" 25 | #include "Printable.h" 26 | 27 | #define DEC 10 28 | #define HEX 16 29 | #define OCT 8 30 | #define BIN 2 31 | 32 | class Print 33 | { 34 | private: 35 | int write_error; 36 | size_t printNumber(unsigned long, uint8_t); 37 | size_t printULLNumber(unsigned long long, uint8_t); 38 | size_t printFloat(double, int); 39 | protected: 40 | void setWriteError(int err = 1) { write_error = err; } 41 | public: 42 | Print() : write_error(0) {} 43 | 44 | int getWriteError() { return write_error; } 45 | void clearWriteError() { setWriteError(0); } 46 | 47 | virtual size_t write(uint8_t) = 0; 48 | size_t write(const char *str) { 49 | if (str == NULL) return 0; 50 | return write((const uint8_t *)str, strlen(str)); 51 | } 52 | virtual size_t write(const uint8_t *buffer, size_t size); 53 | size_t write(const char *buffer, size_t size) { 54 | return write((const uint8_t *)buffer, size); 55 | } 56 | 57 | // default to zero, meaning "a single write may block" 58 | // should be overridden by subclasses with buffering 59 | virtual int availableForWrite() { return 0; } 60 | 61 | size_t print(const __FlashStringHelper *); 62 | size_t print(const String &); 63 | size_t print(const char[]); 64 | size_t print(char); 65 | size_t print(unsigned char, int = DEC); 66 | size_t print(int, int = DEC); 67 | size_t print(unsigned int, int = DEC); 68 | size_t print(long, int = DEC); 69 | size_t print(unsigned long, int = DEC); 70 | size_t print(long long, int = DEC); 71 | size_t print(unsigned long long, int = DEC); 72 | size_t print(double, int = 2); 73 | size_t print(const Printable&); 74 | 75 | size_t println(const __FlashStringHelper *); 76 | size_t println(const String &s); 77 | size_t println(const char[]); 78 | size_t println(char); 79 | size_t println(unsigned char, int = DEC); 80 | size_t println(int, int = DEC); 81 | size_t println(unsigned int, int = DEC); 82 | size_t println(long, int = DEC); 83 | size_t println(unsigned long, int = DEC); 84 | size_t println(long long, int = DEC); 85 | size_t println(unsigned long long, int = DEC); 86 | size_t println(double, int = 2); 87 | size_t println(const Printable&); 88 | size_t println(void); 89 | 90 | size_t printf(const char * format, ...); 91 | 92 | size_t printBuffer(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 93 | size_t printBuffer(char const buffer[], int size, char delim=' ', int byteline = 0) 94 | { 95 | return printBuffer((uint8_t const*) buffer, size, delim, byteline); 96 | } 97 | 98 | size_t printBufferReverse(uint8_t const buffer[], int len, char delim=' ', int byteline = 0); 99 | size_t printBufferReverse(char const buffer[], int size, char delim=' ', int byteline = 0) 100 | { 101 | return printBufferReverse((uint8_t const*) buffer, size, delim, byteline); 102 | } 103 | 104 | virtual void flush() { /* Empty implementation for backward compatibility */ } 105 | }; 106 | 107 | 108 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/2.7.2/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/2.8.0/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/3.0.0/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/3.0.1/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/3.1.1/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/3.3.0/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/3.4.1/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/rp2040/hardware/rp2040/1.3.1/cores/rp2040/Arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Arduino header for the Raspberry Pi Pico RP2040 3 | 4 | Copyright (c) 2021 Earle F. Philhower, III 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef Arduino_h 22 | #define Arduino_h 23 | 24 | #include 25 | #include 26 | #include 27 | // Wacky deprecated AVR compatibilty functions 28 | #include "stdlib_noniso.h" 29 | 30 | #include "api/ArduinoAPI.h" 31 | #include 32 | 33 | 34 | // Required for the port*Register macros 35 | #include "hardware/gpio.h" 36 | 37 | #include "debug_internal.h" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif // __cplusplus 42 | 43 | // For compatibility to many platforms and libraries 44 | #define clockCyclesPerMicrosecond() ( F_CPU / 1000000L ) 45 | #define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() ) 46 | #define microsecondsToClockCycles(a) ( (a) * clockCyclesPerMicrosecond() ) 47 | 48 | // Disable/reenable all interrupts. Safely handles nested disables 49 | void interrupts(); 50 | void noInterrupts(); 51 | 52 | // GPIO change/value interrupts 53 | void attachInterrupt(pin_size_t pin, voidFuncPtr callback, PinStatus mode); 54 | void detachInterrupt(pin_size_t pin); 55 | 56 | // AVR compatibilty macros...naughty and accesses the HW directly 57 | #define digitalPinToPort(pin) (0) 58 | #define digitalPinToBitMask(pin) (1UL << (pin)) 59 | #define digitalPinToTimer(pin) (0) 60 | #define digitalPinToInterrupt(pin) (pin) 61 | #define NOT_AN_INTERRUPT (-1) 62 | #define portOutputRegister(port) ((volatile uint32_t*) sio_hw->gpio_out) 63 | #define portInputRegister(port) ((volatile uint32_t*) sio_hw->gpio_in) 64 | #define portModeRegister(port) ((volatile uint32_t*) sio_hw->gpio_oe) 65 | 66 | // IO config 67 | void pinMode(pin_size_t pinNumber, PinMode pinMode); 68 | 69 | // SIO (GPIO) 70 | void digitalWrite(pin_size_t pinNumber, PinStatus status); 71 | PinStatus digitalRead(pin_size_t pinNumber); 72 | 73 | // ADC 74 | int analogRead(pin_size_t pinNumber); 75 | float analogReadTemp(); // Returns core temp in Centigrade 76 | 77 | // PWM 78 | void analogWrite(pin_size_t pinNumber, int value); 79 | void analogWriteFreq(uint32_t freq); 80 | void analogWriteRange(uint32_t range); 81 | void analogWriteResolution(int res); 82 | 83 | // Timing 84 | void delay(unsigned long); 85 | void delayMicroseconds(unsigned int us); 86 | unsigned long millis(); 87 | 88 | #ifdef __cplusplus 89 | } // extern "C" 90 | #endif 91 | 92 | // Ancient AVR defines 93 | #define HAVE_HWSERIAL0 94 | #define HAVE_HWSERIAL1 95 | #define HAVE_HWSERIAL2 96 | 97 | #ifdef __cplusplus 98 | #include "SerialUSB.h" 99 | #include "SerialUART.h" 100 | #include "RP2040.h" 101 | #include "Bootsel.h" 102 | 103 | // Template which will evaluate at *compile time* to a single 32b number 104 | // with the specified bits set. 105 | template 106 | constexpr uint32_t __bitset(const int (&a)[N], size_t i = 0U) 107 | { 108 | return i < N ? (1L << a[i]) | __bitset(a, i + 1) : 0; 109 | } 110 | #endif 111 | 112 | 113 | // ARM toolchain doesn't provide itoa etc, provide them 114 | #include "api/itoa.h" 115 | 116 | #endif // Arduino_h 117 | -------------------------------------------------------------------------------- /Packages_Patches/rp2040/hardware/rp2040/1.4.0/cores/rp2040/Arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Arduino header for the Raspberry Pi Pico RP2040 3 | 4 | Copyright (c) 2021 Earle F. Philhower, III 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef Arduino_h 22 | #define Arduino_h 23 | 24 | #include 25 | #include 26 | #include 27 | // Wacky deprecated AVR compatibilty functions 28 | #include "stdlib_noniso.h" 29 | 30 | #include "api/ArduinoAPI.h" 31 | #include 32 | 33 | 34 | // Required for the port*Register macros 35 | #include "hardware/gpio.h" 36 | 37 | #include "debug_internal.h" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif // __cplusplus 42 | 43 | // For compatibility to many platforms and libraries 44 | #define clockCyclesPerMicrosecond() ( F_CPU / 1000000L ) 45 | #define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() ) 46 | #define microsecondsToClockCycles(a) ( (a) * clockCyclesPerMicrosecond() ) 47 | 48 | // Disable/reenable all interrupts. Safely handles nested disables 49 | void interrupts(); 50 | void noInterrupts(); 51 | 52 | // GPIO change/value interrupts 53 | void attachInterrupt(pin_size_t pin, voidFuncPtr callback, PinStatus mode); 54 | void detachInterrupt(pin_size_t pin); 55 | 56 | // AVR compatibilty macros...naughty and accesses the HW directly 57 | #define digitalPinToPort(pin) (0) 58 | #define digitalPinToBitMask(pin) (1UL << (pin)) 59 | #define digitalPinToTimer(pin) (0) 60 | #define digitalPinToInterrupt(pin) (pin) 61 | #define NOT_AN_INTERRUPT (-1) 62 | #define portOutputRegister(port) ((volatile uint32_t*) sio_hw->gpio_out) 63 | #define portInputRegister(port) ((volatile uint32_t*) sio_hw->gpio_in) 64 | #define portModeRegister(port) ((volatile uint32_t*) sio_hw->gpio_oe) 65 | 66 | // IO config 67 | void pinMode(pin_size_t pinNumber, PinMode pinMode); 68 | 69 | // SIO (GPIO) 70 | void digitalWrite(pin_size_t pinNumber, PinStatus status); 71 | PinStatus digitalRead(pin_size_t pinNumber); 72 | 73 | // ADC 74 | int analogRead(pin_size_t pinNumber); 75 | float analogReadTemp(); // Returns core temp in Centigrade 76 | 77 | // PWM 78 | void analogWrite(pin_size_t pinNumber, int value); 79 | void analogWriteFreq(uint32_t freq); 80 | void analogWriteRange(uint32_t range); 81 | void analogWriteResolution(int res); 82 | 83 | // Timing 84 | void delay(unsigned long); 85 | void delayMicroseconds(unsigned int us); 86 | unsigned long millis(); 87 | 88 | #ifdef __cplusplus 89 | } // extern "C" 90 | #endif 91 | 92 | // Ancient AVR defines 93 | #define HAVE_HWSERIAL0 94 | #define HAVE_HWSERIAL1 95 | #define HAVE_HWSERIAL2 96 | 97 | #ifdef __cplusplus 98 | #include "SerialUSB.h" 99 | #include "SerialUART.h" 100 | #include "RP2040.h" 101 | #include "Bootsel.h" 102 | 103 | // Template which will evaluate at *compile time* to a single 32b number 104 | // with the specified bits set. 105 | template 106 | constexpr uint32_t __bitset(const int (&a)[N], size_t i = 0U) 107 | { 108 | return i < N ? (1L << a[i]) | __bitset(a, i + 1) : 0; 109 | } 110 | #endif 111 | 112 | 113 | // ARM toolchain doesn't provide itoa etc, provide them 114 | #include "api/itoa.h" 115 | 116 | #endif // Arduino_h 117 | -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | ## WiFiMulti_Generic Library 2 | 3 | [![arduino-library-badge](https://www.ardu-badge.com/badge/WiFiMulti_Generic.svg?)](https://www.ardu-badge.com/WiFiMulti_Generic) 4 | [![GitHub release](https://img.shields.io/github/release/khoih-prog/WiFiMulti_Generic.svg)](https://github.com/khoih-prog/WiFiMulti_Generic/releases) 5 | [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing) 6 | [![GitHub issues](https://img.shields.io/github/issues/khoih-prog/WiFiMulti_Generic.svg)](http://github.com/khoih-prog/WiFiMulti_Generic/issues) 7 | 8 | 9 | Donate to my libraries using BuyMeACoffee 10 | 11 | 12 | --- 13 | --- 14 | 15 | ## Table of Contents 16 | 17 | 18 | * [Changelog](#changelog) 19 | * [Releases v1.2.2](#releases-v122) 20 | * [Releases v1.2.1](#releases-v121) 21 | * [Releases v1.2.0](#releases-v120) 22 | * [Releases v1.1.1](#releases-v111) 23 | * [Releases v1.1.0](#releases-v110) 24 | * [Releases v1.0.0](#releases-v100) 25 | 26 | --- 27 | --- 28 | 29 | ## Changelog 30 | 31 | #### Releases v1.2.2 32 | 33 | 1. Better workaround for RP2040W WiFi.status() bug using `ping()` to local gateway. Check [WiFi.status() wrongly reports WL_CONNECTED even when WiFi is lost and RSSI is always 0 dBm #762](https://github.com/earlephilhower/arduino-pico/issues/762) 34 | 35 | #### Releases v1.2.1 36 | 37 | 1. Workaround for RP2040W WiFi.status() bug. Check [WiFi.status() wrongly reports WL_CONNECTED even when WiFi is lost and RSSI is always 0 dBm #762](https://github.com/earlephilhower/arduino-pico/issues/762) 38 | 2. Add example [WiFiMulti_RP2040W](examples/WiFiMulti_RP2040W) 39 | 40 | #### Releases v1.2.0 41 | 42 | 1. Add support to RASPBERRY_PI_PICO_W using CYW43439 WiFi 43 | 2. Update `Packages_Patches` 44 | 45 | #### Releases v1.1.1 46 | 47 | 1. Fix bug 48 | 2. Update `Packages_Patches` 49 | 50 | #### Releases v1.1.0 51 | 52 | 1. Add support to 53 | 54 | - **Portenta_H7 using Murata WiFi** 55 | - **RTL8720DN using built-in 2.4GHz or 5GHz WiFi** with Realtek `AmebaD` core 56 | - Arduino SAMD using `WiFi101` (MKR1000, MKR1010, etc.) 57 | - Seeed XIAO RP2020, SAMD using `WiFi101`, `WiFiNINA_Generic` or `WiFiEspAT` 58 | - Arduino megaAVR boards with Arduino core (UNO WiFi Rev2 using `WiFi101`, Nano Every using `WiFi101`, `WiFiNINA_Generic` or `WiFiEspAT`) 59 | - CO2 Ampel SAMD board using `WiFi101`, `WiFiNINA_Generic` or `WiFiEspAT` 60 | - STM32 boards with `STM32duino Maple` core using `WiFi101`, `WiFiNINA_Generic` or `WiFiEspAT` 61 | - Sparkfun SAMD board using `WiFi101`, `WiFiNINA_Generic` or `WiFiEspAT` 62 | - Industruino SAMD using `WiFi101`, `WiFiNINA_Generic` or `WiFiEspAT` 63 | - Tlera Corp STM32WB boards (Firefly-WB55RG, Nucleo-WB55RG, etc.) using `WiFi101`, `WiFiNINA_Generic` or `WiFiEspAT` 64 | - Maixduino boards using `WiFi101`, `WiFiNINA_Generic` or `WiFiEspAT` 65 | - Arduino, Sparkfun, Adafruit, etc. AVR boards (Mega, 32U4, etc.). To use `LibraryPatches` for `ArduinoSTL` library 66 | 67 | 2. Update example [WiFiMulti](examples/WiFiMulti) to handle more complex cases. 68 | 69 | 70 | #### Releases v1.0.0 71 | 72 | 1. Initial coding to support **ESP32, ESP8266, WiFiNINA and ESP8266_AT and ESP32_AT WiFi** for many boards (nRF52, SAMD, Teensy, RP2040, SAM-DUE, ESP32, ESP8266, etc.) 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /examples/WiFiMulti_RP2040W/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For any WiFi shields, such as ESP32, ESP8266, Portenta_H7, WiFiNINA W101, W102, W13x, or custom, such as ESP8266/ESP32-AT, etc 4 | 5 | WiFiMulti_Generic is a library to adapt the ESP32/ESP8266 WiFiMulti feature to other WiFi modules 6 | 7 | Based on and modified from WiFiMulti of ESP32 core: https://github.com/espressif/arduino-esp32 8 | Based on and modified from WiFiMulti of ESP8266 core: https://github.com/esp8266/Arduino 9 | 10 | Built by Khoi Hoang https://github.com/khoih-prog/WiFiMulti_Generic 11 | 12 | License under GPL-3.0 13 | ***************************************************************************************************************************************/ 14 | 15 | #ifndef defines_h 16 | #define defines_h 17 | 18 | #if !( defined(ARDUINO_RASPBERRY_PI_PICO_W) ) 19 | #error For RASPBERRY_PI_PICO_W only 20 | #endif 21 | 22 | #define DEBUG_WIFI_MULTI_GENERIC_PORT Serial 23 | 24 | // Debug Level from 0 to 4 25 | #define _WIFIMULTI_LOGLEVEL_ 3 26 | 27 | #define _WIFI_LOGLEVEL_ 1 28 | 29 | #define USE_WIFI_NINA false 30 | #define USE_WIFI101 false 31 | #define USE_WIFI_CUSTOM false 32 | 33 | //#include "WiFi.h" 34 | 35 | #if defined(WIFI_USE_RP2040) 36 | #undef WIFI_USE_RP2040 37 | #endif 38 | 39 | #define WIFI_USE_RP2040 true 40 | 41 | #warning RP2040 board selected 42 | 43 | #include 44 | 45 | char your_ssid[] = "HueNet1"; // your network SSID (name) 46 | char your_pass[] = "jenniqqs"; // your network password 47 | char your_ssid1[] = "HueNet2"; // your network SSID (name) 48 | char your_pass1[] = "jenniqqs"; // your network password 49 | 50 | //char your_ssid[] = "YOUR_SSID"; // your network SSID (name) 51 | //char your_pass[] = "12345678"; // your network password 52 | //char your_ssid1[] = "YOUR_SSID"; // your network SSID (name) 53 | //char your_pass1[] = "12345678"; // your network password 54 | 55 | #endif //defines_h 56 | -------------------------------------------------------------------------------- /library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "WiFiMulti_Generic", 3 | "version": "1.2.2", 4 | "keywords": "WiFi, WiFiMulti, WiFi-Multi, Arduino, ESP32, ESP8266, WiFiNINA, WiFiNINA-Generic, ESP8266-AT, ESP32-AT, RP2040, Nano-33-IoT, Nano-RP2040-Connect, SAMD, Teensy, Portenta, nRF52, SAM-DUE, AT-Command, mbed", 5 | "description": "Simple MultiWiFi library to adapt ESP32/ESP8266 MultiWiFi of WiFi libraries to all other WiFi modules and libraries. Currently supporting ESP32, ESP8266, Teensy, SAM DUE, SAMD21, SAMD51, STM32F/L/H/G/WB/MP1, nRF52, RP2040-based (Nano-RP2040-Connect, RASPBERRY_PI_PICO, RASPBERRY_PI_PICO_W, etc.) boards using WiFi, such as WiFiNINA, WiFi101, CYW43439, U-Blox W101, W102, ESP8266/ESP32-AT modules/shields, with functions similar to those of ESP8266/ESP32 MultiWiFi of WiFi libraries", 6 | "authors": 7 | { 8 | "name": "Khoi Hoang", 9 | "url": "https://github.com/khoih-prog", 10 | "maintainer": true 11 | }, 12 | "repository": 13 | { 14 | "type": "git", 15 | "url": "https://github.com/khoih-prog/WiFiMulti_Generic" 16 | }, 17 | "homepage": "https://github.com/khoih-prog/WiFiMulti_Generic", 18 | "export": { 19 | "exclude": [ 20 | "linux", 21 | "extras", 22 | "tests" 23 | ] 24 | }, 25 | "dependencies": 26 | [ 27 | { 28 | "owner": "khoih-prog", 29 | "name": "WiFiNINA_Generic", 30 | "version": ">=1.8.15-1", 31 | "platforms": ["*"] 32 | }, 33 | { 34 | "owner": "khoih-prog", 35 | "name": "Functional-Vlpp", 36 | "version": ">=1.0.2", 37 | "platforms": ["*"] 38 | }, 39 | { 40 | "owner": "khoih-prog", 41 | "name": "ESP_AT_Lib", 42 | "version": ">=1.4.1", 43 | "platforms": ["*"] 44 | }, 45 | { 46 | "owner": "khoih-prog", 47 | "name": "WiFi101_Generic", 48 | "version": ">=1.0.0", 49 | "platforms": ["*"] 50 | }, 51 | { 52 | "owner": "jandrassy", 53 | "name": "WiFiEspAT", 54 | "version": ">=1.4.1", 55 | "platforms": ["*"] 56 | }, 57 | { 58 | "owner": "mike-matera", 59 | "name": "ArduinoSTL", 60 | "version": ">=1.3.3", 61 | "platforms": ["avr", "megaavr"] 62 | } 63 | ], 64 | "license": "LGPL-3.0", 65 | "frameworks": "*", 66 | "platforms": "*", 67 | "examples": "examples/*/*/*.ino", 68 | "headers": "WiFiMulti_Generic.h" 69 | } 70 | -------------------------------------------------------------------------------- /library.properties: -------------------------------------------------------------------------------- 1 | name=WiFiMulti_Generic 2 | version=1.2.2 3 | author=Khoi Hoang 4 | license=GPLv3 5 | maintainer=Khoi Hoang 6 | sentence=Simple MultiWiFi library to adapt ESP32/ESP8266 MultiWiFi of WiFi libraries to all other WiFi modules and libraries. 7 | paragraph=Currently supporting ESP32, ESP8266, Teensy, Portenta_H7, megaAVR, AVR, RTL8720DN, SAM DUE, SAMD21, SAMD51, STM32F/L/H/G/WB/MP1, nRF52, RP2040-based (Nano-RP2040-Connect, RASPBERRY_PI_PICO, RASPBERRY_PI_PICO_W, etc.) boards using WiFi, such as WiFiNINA, WiFi101, CYW43439, U-Blox W101, W102, ESP8266/ESP32-AT modules/shields, with functions similar to those of ESP8266/ESP32 MultiWiFi of WiFi libraries. 8 | category=Communication 9 | url=https://github.com/khoih-prog/WiFiMulti_Generic 10 | architectures=* 11 | depends=Functional-Vlpp, WiFiNINA_Generic, WiFiEspAT, ArduinoSTL, ESP_AT_Lib 12 | includes=WiFiMulti_Generic.h 13 | -------------------------------------------------------------------------------- /src/ESP32/WiFiMulti_Generic.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************************************************************************** 2 | WiFiMulti_Generic.hpp 3 | For any WiFi shields, such as ESP32, ESP8266, Portenta_H7, WiFiNINA W101, W102, W13x, or custom, such as ESP8266/ESP32-AT, etc 4 | 5 | WiFiMulti_Generic is a library to adapt the ESP32/ESP8266 WiFiMulti feature to other WiFi modules 6 | 7 | Based on and modified from WiFiMulti of ESP32 core: https://github.com/espressif/arduino-esp32 8 | Based on and modified from WiFiMulti of ESP8266 core: https://github.com/esp8266/Arduino 9 | 10 | Built by Khoi Hoang https://github.com/khoih-prog/WiFiMulti_Generic 11 | 12 | License under GPL-3.0 13 | 14 | This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License 15 | as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version. 16 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 18 | You should have received a copy of the GNU General Public License along with this program. If not, see 19 | 20 | Original author: 21 | @file ESP8266WiFiMulti.h 22 | @date 16.05.2015 23 | @author Markus Sattler 24 | Copyright (c) 2015 Markus Sattler. All rights reserved. 25 | This file is part of the esp32 core for Arduino environment. 26 | 27 | Version: 1.2.2 28 | 29 | Version Modified By Date Comments 30 | ------- ----------- ---------- ----------- 31 | 1.0.0 K Hoang 15/02/2020 Initial coding for ESP32, ESP8266, WiFiNINA and ESP_AT modules 32 | 1.1.0 K Hoang 16/02/2020 Add support to WiFi101 and many more boards (PortentaH7, megaAVR, Sparkfun SAMD, etc.) 33 | 1.1.1 K Hoang 26/04/2020 Fix bug 34 | 1.2.0 K Hoang 12/08/2022 Add support to RASPBERRY_PI_PICO_W using CYW4343 WiFi 35 | 1.2.1 K Hoang 16/08/2022 Workaround for RP2040W WiFi.status() bug 36 | 1.2.2 K Hoang 16/08/2022 Better workaround for RP2040W WiFi.status() bug using ping() to local gateway 37 | ***************************************************************************************************************************************/ 38 | 39 | #pragma once 40 | 41 | #ifndef _WIFIMULTI_GENERIC_HPP_ 42 | #define _WIFIMULTI_GENERIC_HPP_ 43 | 44 | #include 45 | 46 | #include "WiFiMulti_Generic_Debug.h" 47 | 48 | typedef struct 49 | { 50 | char * ssid; 51 | char * passphrase; 52 | } WifiAPlist_t; 53 | 54 | class WiFiMulti_Generic 55 | { 56 | public: 57 | WiFiMulti_Generic(); 58 | ~WiFiMulti_Generic(); 59 | 60 | bool addAP(const char* ssid, const char *passphrase = NULL); 61 | 62 | uint8_t run(const uint32_t& connectTimeout = 5000); 63 | 64 | private: 65 | std::vector APlist; 66 | }; 67 | #endif /* _WIFIMULTI_GENERIC_HPP_ */ 68 | -------------------------------------------------------------------------------- /src/ESP8266/ESP8266WiFiMulti.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************************************************************************** 2 | ESP8266WiFiMulti.hpp 3 | For any WiFi shields, such as ESP32, ESP8266, Portenta_H7, WiFiNINA W101, W102, W13x, or custom, such as ESP8266/ESP32-AT, etc 4 | 5 | WiFiMulti_Generic is a library to adapt the ESP32/ESP8266 WiFiMulti feature to other WiFi modules 6 | 7 | Based on and modified from WiFiMulti of ESP32 core: https://github.com/espressif/arduino-esp32 8 | Based on and modified from WiFiMulti of ESP8266 core: https://github.com/esp8266/Arduino 9 | 10 | Built by Khoi Hoang https://github.com/khoih-prog/WiFiMulti_Generic 11 | 12 | License under GPL-3.0 13 | 14 | This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License 15 | as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version. 16 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 18 | You should have received a copy of the GNU General Public License along with this program. If not, see 19 | 20 | Original author: 21 | @file ESP8266WiFiMulti.h 22 | @date 16.05.2015 23 | @author Markus Sattler 24 | Copyright (c) 2015 Markus Sattler. All rights reserved. 25 | This file is part of the esp8266 core for Arduino environment. 26 | 27 | Version: 1.2.2 28 | 29 | Version Modified By Date Comments 30 | ------- ----------- ---------- ----------- 31 | 1.0.0 K Hoang 15/02/2020 Initial coding for ESP32, ESP8266, WiFiNINA and ESP_AT modules 32 | 1.1.0 K Hoang 16/02/2020 Add support to WiFi101 and many more boards (PortentaH7, megaAVR, Sparkfun SAMD, etc.) 33 | 1.1.1 K Hoang 26/04/2020 Fix bug 34 | 1.2.0 K Hoang 12/08/2022 Add support to RASPBERRY_PI_PICO_W using CYW4343 WiFi 35 | 1.2.1 K Hoang 16/08/2022 Workaround for RP2040W WiFi.status() bug 36 | 1.2.2 K Hoang 16/08/2022 Better workaround for RP2040W WiFi.status() bug using ping() to local gateway 37 | ***************************************************************************************************************************************/ 38 | 39 | #pragma once 40 | 41 | #ifndef _ESP8266_WIFIMULTI_GENERIC_HPP_ 42 | #define _ESP8266_WIFIMULTI_GENERIC_HPP_ 43 | 44 | #include "ESP8266WiFi.h" 45 | 46 | #include 47 | 48 | #include "WiFiMulti_Generic_Debug.h" 49 | 50 | //! Default WiFi connection timeout in ms 51 | #ifndef WIFI_CONNECT_TIMEOUT_MS 52 | #define WIFI_CONNECT_TIMEOUT_MS 5000 53 | #endif 54 | 55 | //! Default WiFi scan timeout in ms 56 | #ifndef WIFI_SCAN_TIMEOUT_MS 57 | #define WIFI_SCAN_TIMEOUT_MS 5000 58 | #endif 59 | 60 | struct WifiAPEntry 61 | { 62 | char *ssid; 63 | char *passphrase; 64 | }; 65 | 66 | typedef std::vector WifiAPlist; 67 | 68 | class WiFiMulti_Generic 69 | { 70 | public: 71 | WiFiMulti_Generic(); 72 | ~WiFiMulti_Generic(); 73 | 74 | bool addAP(const char *ssid, const char *passphrase = NULL); 75 | bool existsAP(const char *ssid, const char *passphrase = NULL); 76 | 77 | wl_status_t run(const uint32_t& connectTimeoutMs = WIFI_CONNECT_TIMEOUT_MS); 78 | 79 | void cleanAPlist(); 80 | 81 | private: 82 | WifiAPlist _APlist; 83 | bool _firstRun; 84 | 85 | bool APlistAdd(const char *ssid, const char *passphrase = NULL); 86 | bool APlistExists(const char *ssid, const char *passphrase = NULL); 87 | void APlistClean(); 88 | 89 | wl_status_t connectWiFiMulti(const uint32_t& connectTimeoutMs); 90 | int8_t startScan(); 91 | void printWiFiScan(); 92 | }; 93 | 94 | #endif // _ESP8266_WIFIMULTI_GENERIC_HPP_ 95 | -------------------------------------------------------------------------------- /src/PortentaH7/PortentaH7_WiFiMulti_Generic.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************************************************************************** 2 | PortentaH7_WiFiMulti_Generic.hpp 3 | For any WiFi shields, such as ESP32, ESP8266, Portenta_H7, WiFiNINA W101, W102, W13x, or custom, such as ESP8266/ESP32-AT, etc 4 | 5 | WiFiMulti_Generic is a library to adapt the ESP32/ESP8266 WiFiMulti feature to other WiFi modules 6 | 7 | Based on and modified from WiFiMulti of ESP32 core: https://github.com/espressif/arduino-esp32 8 | Based on and modified from WiFiMulti of ESP8266 core: https://github.com/esp8266/Arduino 9 | 10 | Built by Khoi Hoang https://github.com/khoih-prog/WiFiMulti_Generic 11 | 12 | License under GPL-3.0 13 | 14 | This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License 15 | as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version. 16 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 18 | You should have received a copy of the GNU General Public License along with this program. If not, see 19 | 20 | Original author: 21 | @file ESP8266WiFiMulti.h 22 | @date 16.05.2015 23 | @author Markus Sattler 24 | Copyright (c) 2015 Markus Sattler. All rights reserved. 25 | This file is part of the esp8266 core for Arduino environment. 26 | 27 | Version: 1.2.2 28 | 29 | Version Modified By Date Comments 30 | ------- ----------- ---------- ----------- 31 | 1.0.0 K Hoang 15/02/2020 Initial coding for ESP32, ESP8266, WiFiNINA and ESP_AT modules 32 | 1.1.0 K Hoang 16/02/2020 Add support to WiFi101 and many more boards (PortentaH7, megaAVR, Sparkfun SAMD, etc.) 33 | 1.1.1 K Hoang 26/04/2020 Fix bug 34 | 1.2.0 K Hoang 12/08/2022 Add support to RASPBERRY_PI_PICO_W using CYW4343 WiFi 35 | 1.2.1 K Hoang 16/08/2022 Workaround for RP2040W WiFi.status() bug 36 | 1.2.2 K Hoang 16/08/2022 Better workaround for RP2040W WiFi.status() bug using ping() to local gateway 37 | ***************************************************************************************************************************************/ 38 | 39 | #pragma once 40 | 41 | #ifndef _PORTENTAH7_WIFIMULTI_GENERIC_HPP_ 42 | #define _PORTENTAH7_WIFIMULTI_GENERIC_HPP_ 43 | 44 | #include 45 | 46 | #include "WiFiMulti_Generic_Debug.h" 47 | 48 | typedef struct 49 | { 50 | char * ssid; 51 | char * passphrase; 52 | } WifiAPlist_t; 53 | 54 | class WiFiMulti_Generic 55 | { 56 | public: 57 | WiFiMulti_Generic(); 58 | ~WiFiMulti_Generic(); 59 | 60 | bool addAP(const char* ssid, const char *passphrase = NULL); 61 | 62 | uint8_t run(const uint32_t& connectTimeout = 5000); 63 | 64 | private: 65 | std::vector APlist; 66 | }; 67 | #endif /* _PORTENTAH7_WIFIMULTI_GENERIC_HPP_ */ 68 | -------------------------------------------------------------------------------- /src/RP2040W/RP2040W_WiFiMulti_Generic.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************************************************************************** 2 | RP2040W_WiFiMulti_Generic.hpp 3 | For any WiFi shields, such as ESP32, ESP8266, Portenta_H7, WiFiNINA W101, W102, W13x, or custom, such as ESP8266/ESP32-AT, etc 4 | 5 | WiFiMulti_Generic is a library to adapt the ESP32/ESP8266 WiFiMulti feature to other WiFi modules 6 | 7 | Based on and modified from WiFiMulti of ESP32 core: https://github.com/espressif/arduino-esp32 8 | Based on and modified from WiFiMulti of ESP8266 core: https://github.com/esp8266/Arduino 9 | 10 | Built by Khoi Hoang https://github.com/khoih-prog/WiFiMulti_Generic 11 | 12 | License under GPL-3.0 13 | 14 | This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License 15 | as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version. 16 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 18 | You should have received a copy of the GNU General Public License along with this program. If not, see 19 | 20 | Original author: 21 | @file ESP8266WiFiMulti.h 22 | @date 16.05.2015 23 | @author Markus Sattler 24 | Copyright (c) 2015 Markus Sattler. All rights reserved. 25 | This file is part of the esp8266 core for Arduino environment. 26 | 27 | Version: 1.2.2 28 | 29 | Version Modified By Date Comments 30 | ------- ----------- ---------- ----------- 31 | 1.0.0 K Hoang 15/02/2020 Initial coding for ESP32, ESP8266, WiFiNINA and ESP_AT modules 32 | 1.1.0 K Hoang 16/02/2020 Add support to WiFi101 and many more boards (PortentaH7, megaAVR, Sparkfun SAMD, etc.) 33 | 1.1.1 K Hoang 26/04/2020 Fix bug 34 | 1.2.0 K Hoang 12/08/2022 Add support to RASPBERRY_PI_PICO_W using CYW4343 WiFi 35 | 1.2.1 K Hoang 16/08/2022 Workaround for RP2040W WiFi.status() bug 36 | 1.2.2 K Hoang 16/08/2022 Better workaround for RP2040W WiFi.status() bug using ping() to local gateway 37 | ***************************************************************************************************************************************/ 38 | 39 | #pragma once 40 | 41 | #ifndef _RP2040W_WIFIMULTI_GENERIC_HPP_ 42 | #define _RP2040W_WIFIMULTI_GENERIC_HPP_ 43 | 44 | #include 45 | 46 | #include "WiFiMulti_Generic_Debug.h" 47 | 48 | typedef struct 49 | { 50 | char * ssid; 51 | char * passphrase; 52 | } WifiAPlist_t; 53 | 54 | class WiFiMulti_Generic 55 | { 56 | public: 57 | WiFiMulti_Generic(); 58 | ~WiFiMulti_Generic(); 59 | 60 | bool addAP(const char* ssid, const char *passphrase = NULL); 61 | 62 | uint8_t run(const uint32_t& connectTimeout = 5000); 63 | 64 | private: 65 | std::vector APlist; 66 | }; 67 | #endif /* _RP2040W_WIFIMULTI_GENERIC_HPP_ */ 68 | -------------------------------------------------------------------------------- /src/RTL8720/RTL8720_WiFiMulti_Generic.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************************************************************************** 2 | PortentaH7_WiFiMulti_Generic.hpp 3 | For any WiFi shields, such as ESP32, ESP8266, Portenta_H7, WiFiNINA W101, W102, W13x, or custom, such as ESP8266/ESP32-AT, etc 4 | 5 | WiFiMulti_Generic is a library to adapt the ESP32/ESP8266 WiFiMulti feature to other WiFi modules 6 | 7 | Based on and modified from WiFiMulti of ESP32 core: https://github.com/espressif/arduino-esp32 8 | Based on and modified from WiFiMulti of ESP8266 core: https://github.com/esp8266/Arduino 9 | 10 | Built by Khoi Hoang https://github.com/khoih-prog/WiFiMulti_Generic 11 | 12 | License under GPL-3.0 13 | 14 | This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License 15 | as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version. 16 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 18 | You should have received a copy of the GNU General Public License along with this program. If not, see 19 | 20 | Original author: 21 | @file ESP8266WiFiMulti.h 22 | @date 16.05.2015 23 | @author Markus Sattler 24 | Copyright (c) 2015 Markus Sattler. All rights reserved. 25 | This file is part of the esp8266 core for Arduino environment. 26 | 27 | Version: 1.2.2 28 | 29 | Version Modified By Date Comments 30 | ------- ----------- ---------- ----------- 31 | 1.0.0 K Hoang 15/02/2020 Initial coding for ESP32, ESP8266, WiFiNINA and ESP_AT modules 32 | 1.1.0 K Hoang 16/02/2020 Add support to WiFi101 and many more boards (PortentaH7, megaAVR, Sparkfun SAMD, etc.) 33 | 1.1.1 K Hoang 26/04/2020 Fix bug 34 | 1.2.0 K Hoang 12/08/2022 Add support to RASPBERRY_PI_PICO_W using CYW4343 WiFi 35 | 1.2.1 K Hoang 16/08/2022 Workaround for RP2040W WiFi.status() bug 36 | 1.2.2 K Hoang 16/08/2022 Better workaround for RP2040W WiFi.status() bug using ping() to local gateway 37 | ***************************************************************************************************************************************/ 38 | 39 | #pragma once 40 | 41 | #ifndef _PORTENTAH7_WIFIMULTI_GENERIC_HPP_ 42 | #define _PORTENTAH7_WIFIMULTI_GENERIC_HPP_ 43 | 44 | #include 45 | 46 | #include "WiFiMulti_Generic_Debug.h" 47 | 48 | typedef struct 49 | { 50 | char * ssid; 51 | char * passphrase; 52 | } WifiAPlist_t; 53 | 54 | class WiFiMulti_Generic 55 | { 56 | public: 57 | WiFiMulti_Generic(); 58 | ~WiFiMulti_Generic(); 59 | 60 | bool addAP(const char* ssid, const char *passphrase = NULL); 61 | 62 | uint8_t run(const uint32_t& connectTimeout = 5000); 63 | 64 | private: 65 | std::vector APlist; 66 | }; 67 | #endif /* _PORTENTAH7_WIFIMULTI_GENERIC_HPP_ */ 68 | -------------------------------------------------------------------------------- /src/WiFi101/WiFi101_WiFiMulti_Generic.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************************************************************************** 2 | WiFi101_WiFiMulti_Generic.hpp 3 | For any WiFi shields, such as ESP32, ESP8266, Portenta_H7, WiFiNINA W101, W102, W13x, or custom, such as ESP8266/ESP32-AT, etc 4 | 5 | WiFiMulti_Generic is a library to adapt the ESP32/ESP8266 WiFiMulti feature to other WiFi modules 6 | 7 | Based on and modified from WiFiMulti of ESP32 core: https://github.com/espressif/arduino-esp32 8 | Based on and modified from WiFiMulti of ESP8266 core: https://github.com/esp8266/Arduino 9 | 10 | Built by Khoi Hoang https://github.com/khoih-prog/WiFiMulti_Generic 11 | 12 | License under GPL-3.0 13 | 14 | This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License 15 | as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version. 16 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 18 | You should have received a copy of the GNU General Public License along with this program. If not, see 19 | 20 | Original author: 21 | @file ESP8266WiFiMulti.h 22 | @date 16.05.2015 23 | @author Markus Sattler 24 | Copyright (c) 2015 Markus Sattler. All rights reserved. 25 | This file is part of the esp8266 core for Arduino environment. 26 | 27 | Version: 1.2.2 28 | 29 | Version Modified By Date Comments 30 | ------- ----------- ---------- ----------- 31 | 1.0.0 K Hoang 15/02/2020 Initial coding for ESP32, ESP8266, WiFiNINA and ESP_AT modules 32 | 1.1.0 K Hoang 16/02/2020 Add support to WiFi101 and many more boards (PortentaH7, megaAVR, Sparkfun SAMD, etc.) 33 | 1.1.1 K Hoang 26/04/2020 Fix bug 34 | 1.2.0 K Hoang 12/08/2022 Add support to RASPBERRY_PI_PICO_W using CYW4343 WiFi 35 | 1.2.1 K Hoang 16/08/2022 Workaround for RP2040W WiFi.status() bug 36 | 1.2.2 K Hoang 16/08/2022 Better workaround for RP2040W WiFi.status() bug using ping() to local gateway 37 | ***************************************************************************************************************************************/ 38 | 39 | #pragma once 40 | 41 | #ifndef _WIFI101_WIFIMULTI_GENERIC_HPP_ 42 | #define _WIFI101_WIFIMULTI_GENERIC_HPP_ 43 | 44 | #if ( defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) ) 45 | #warning Requiring ArduinoSTL library. Not using 46 | #include "ArduinoSTL.h" // https://github.com/mike-matera/ArduinoSTL 47 | #else 48 | #warning Not requiring ArduinoSTL library. using 49 | #include 50 | #endif 51 | 52 | #include "WiFiMulti_Generic_Debug.h" 53 | 54 | typedef struct 55 | { 56 | char * ssid; 57 | char * passphrase; 58 | } WifiAPlist_t; 59 | 60 | class WiFiMulti_Generic 61 | { 62 | public: 63 | WiFiMulti_Generic(); 64 | ~WiFiMulti_Generic(); 65 | 66 | bool addAP(const char* ssid, const char *passphrase = NULL); 67 | 68 | uint8_t run(const uint32_t& connectTimeout = 5000); 69 | 70 | private: 71 | std::vector APlist; 72 | }; 73 | #endif /* _WIFI101_WIFIMULTI_GENERIC_HPP_ */ 74 | -------------------------------------------------------------------------------- /src/WiFiNINA/NINA_WiFiMulti_Generic.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************************************************************************** 2 | NINA_WiFiMulti_Generic.hpp 3 | For any WiFi shields, such as ESP32, ESP8266, Portenta_H7, WiFiNINA W101, W102, W13x, or custom, such as ESP8266/ESP32-AT, etc 4 | 5 | WiFiMulti_Generic is a library to adapt the ESP32/ESP8266 WiFiMulti feature to other WiFi modules 6 | 7 | Based on and modified from WiFiMulti of ESP32 core: https://github.com/espressif/arduino-esp32 8 | Based on and modified from WiFiMulti of ESP8266 core: https://github.com/esp8266/Arduino 9 | 10 | Built by Khoi Hoang https://github.com/khoih-prog/WiFiMulti_Generic 11 | 12 | License under GPL-3.0 13 | 14 | This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License 15 | as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version. 16 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 18 | You should have received a copy of the GNU General Public License along with this program. If not, see 19 | 20 | Original author: 21 | @file ESP8266WiFiMulti.h 22 | @date 16.05.2015 23 | @author Markus Sattler 24 | Copyright (c) 2015 Markus Sattler. All rights reserved. 25 | This file is part of the esp8266 core for Arduino environment. 26 | 27 | Version: 1.2.2 28 | 29 | Version Modified By Date Comments 30 | ------- ----------- ---------- ----------- 31 | 1.0.0 K Hoang 15/02/2020 Initial coding for ESP32, ESP8266, WiFiNINA and ESP_AT modules 32 | 1.1.0 K Hoang 16/02/2020 Add support to WiFi101 and many more boards (PortentaH7, megaAVR, Sparkfun SAMD, etc.) 33 | 1.1.1 K Hoang 26/04/2020 Fix bug 34 | 1.2.0 K Hoang 12/08/2022 Add support to RASPBERRY_PI_PICO_W using CYW4343 WiFi 35 | 1.2.1 K Hoang 16/08/2022 Workaround for RP2040W WiFi.status() bug 36 | 1.2.2 K Hoang 16/08/2022 Better workaround for RP2040W WiFi.status() bug using ping() to local gateway 37 | ***************************************************************************************************************************************/ 38 | 39 | #pragma once 40 | 41 | #ifndef _NINA_WIFIMULTI_GENERIC_HPP_ 42 | #define _NINA_WIFIMULTI_GENERIC_HPP_ 43 | 44 | #include 45 | 46 | #include "WiFiMulti_Generic_Debug.h" 47 | 48 | typedef struct 49 | { 50 | char * ssid; 51 | char * passphrase; 52 | } WifiAPlist_t; 53 | 54 | class WiFiMulti_Generic 55 | { 56 | public: 57 | WiFiMulti_Generic(); 58 | ~WiFiMulti_Generic(); 59 | 60 | bool addAP(const char* ssid, const char *passphrase = NULL); 61 | 62 | uint8_t run(const uint32_t& connectTimeout = 5000); 63 | 64 | private: 65 | std::vector APlist; 66 | }; 67 | #endif /* _NINA_WIFIMULTI_GENERIC_HPP_ */ 68 | -------------------------------------------------------------------------------- /utils/astyle_library.conf: -------------------------------------------------------------------------------- 1 | # Code formatting rules for Arduino libraries, modified from for KH libraries: 2 | # 3 | # https://github.com/arduino/Arduino/blob/master/build/shared/examples_formatter.conf 4 | # 5 | 6 | # astyle --style=allman -s2 -t2 -C -S -xW -Y -M120 -f -p -xg -H -xb -c --xC120 -xL *.h *.cpp *.ino 7 | 8 | --mode=c 9 | --lineend=linux 10 | --style=allman 11 | 12 | # -r or -R 13 | #--recursive 14 | 15 | # -c => Converts tabs into spaces 16 | convert-tabs 17 | 18 | # -s2 => 2 spaces indentation 19 | --indent=spaces=2 20 | 21 | # -t2 => tab =2 spaces 22 | #--indent=tab=2 23 | 24 | # -C 25 | --indent-classes 26 | 27 | # -S 28 | --indent-switches 29 | 30 | # -xW 31 | --indent-preproc-block 32 | 33 | # -Y => indent classes, switches (and cases), comments starting at column 1 34 | --indent-col1-comments 35 | 36 | # -M120 => maximum of 120 spaces to indent a continuation line 37 | --max-continuation-indent=120 38 | 39 | # -xC120 => max‑code‑length will break a line if the code exceeds # characters 40 | --max-code-length=120 41 | 42 | # -f => 43 | --break-blocks 44 | 45 | # -p => put a space around operators 46 | --pad-oper 47 | 48 | # -xg => Insert space padding after commas 49 | --pad-comma 50 | 51 | # -H => put a space after if/for/while 52 | pad-header 53 | 54 | # -xb => Break one line headers (e.g. if/for/while) 55 | --break-one-line-headers 56 | 57 | # -c => Converts tabs into spaces 58 | #--convert-tabs 59 | 60 | # if you like one-liners, keep them 61 | #keep-one-line-statements 62 | 63 | # -xV 64 | --attach-closing-while 65 | 66 | #unpad-paren 67 | 68 | # -xp 69 | remove-comment-prefix 70 | 71 | -------------------------------------------------------------------------------- /utils/restyle.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for dir in . ; do 4 | find $dir -type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.ino" \) -exec astyle --suffix=none --options=./utils/astyle_library.conf \{\} \; 5 | done 6 | 7 | --------------------------------------------------------------------------------