denko 0.13.2 → 0.13.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build_megaavr.yml +1 -1
- data/CHANGELOG.md +40 -0
- data/DEPS_CLI.md +5 -0
- data/DEPS_IDE.md +5 -0
- data/HARDWARE.md +20 -12
- data/README.md +1 -1
- data/benchmarks/i2c_ssd1306_refresh.rb +7 -2
- data/examples/pulse_io/buzzer.rb +0 -40
- data/lib/denko/board/led_array.rb +3 -6
- data/lib/denko/message.rb +1 -1
- data/lib/denko/version.rb +1 -1
- data/src/denko_wifi.ino +38 -3
- data/src/lib/Denko.cpp +0 -9
- data/src/lib/Denko.h +1 -2
- data/src/lib/DenkoDefines.h +14 -6
- data/src/lib/DenkoLEDArray.cpp +4 -10
- data/target.yml +1 -35
- data/test/analog_io/input_test.rb +3 -3
- data/test/analog_io/output_test.rb +1 -1
- data/test/analog_io/potentiometer_test.rb +2 -2
- data/test/behaviors/bus_peripheral_addressed.rb +1 -1
- data/test/behaviors/bus_peripheral_test.rb +1 -1
- data/test/behaviors/callbacks_test.rb +4 -4
- data/test/behaviors/component_test.rb +2 -2
- data/test/behaviors/listener_test.rb +3 -3
- data/test/behaviors/poller_test.rb +3 -3
- data/test/behaviors/reader_test.rb +4 -4
- data/test/behaviors/subcomponents_test.rb +1 -1
- data/test/behaviors/threaded_test.rb +7 -7
- data/test/board/board_test.rb +8 -8
- data/test/board/core_test.rb +12 -12
- data/test/board/eeprom_test.rb +2 -2
- data/test/board/i2c_test.rb +5 -5
- data/test/board/infrared_test.rb +1 -1
- data/test/board/message_test.rb +1 -1
- data/test/board/one_wire_test.rb +4 -4
- data/test/board/pulse_test.rb +2 -2
- data/test/board/servo_test.rb +3 -3
- data/test/board/spi_test.rb +3 -3
- data/test/board/tone_test.rb +2 -2
- data/test/connection/serial_test.rb +13 -13
- data/test/digital_io/input_test.rb +7 -7
- data/test/digital_io/output_test.rb +5 -5
- data/test/digital_io/rotary_encoder_test.rb +4 -4
- data/test/display/hd44780_test.rb +1 -1
- data/test/eeprom/built_in_test.rb +1 -1
- data/test/i2c/bus_test.rb +5 -5
- data/test/i2c/peripheral_test.rb +4 -4
- data/test/led/base_test.rb +2 -2
- data/test/led/rgb_test.rb +6 -6
- data/test/led/seven_segment_test.rb +8 -8
- data/test/motor/servo_test.rb +6 -6
- data/test/motor/stepper_test.rb +5 -5
- data/test/one_wire/bus_test.rb +9 -9
- data/test/one_wire/peripheral_test.rb +17 -17
- data/test/pulse_io/buzzer_test.rb +4 -4
- data/test/pulse_io/ir_transmitter_test.rb +2 -2
- data/test/pulse_io/pwm_output_test.rb +4 -4
- data/test/rtc/ds3231_test.rb +4 -4
- data/test/sensor/dht_test.rb +3 -3
- data/test/sensor/ds18b20_test.rb +9 -9
- data/test/spi/bus_test.rb +4 -4
- data/test/spi/input_register_test.rb +8 -8
- data/test/spi/output_register_test.rb +4 -4
- data/test/uart/bitbang_test.rb +3 -3
- metadata +2 -357
- data/vendor/board-maps/.gitignore +0 -56
- data/vendor/board-maps/.gitmodules +0 -24
- data/vendor/board-maps/BoardMap.h +0 -1392
- data/vendor/board-maps/README.md +0 -52
- data/vendor/board-maps/lib/boards_parser.rb +0 -66
- data/vendor/board-maps/lib/header_parser.rb +0 -189
- data/vendor/board-maps/run.rb +0 -57
- data/vendor/board-maps/yaml/0XCB_HELIOS.yml +0 -48
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S2.yml +0 -25
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S2_REVTFT.yml +0 -25
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S2_TFT.yml +0 -27
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S3.yml +0 -34
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S3_NOPSRAM.yml +0 -34
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S3_REVTFT.yml +0 -25
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S3_TFT.yml +0 -27
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32_V2.yml +0 -34
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040.yml +0 -48
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_CAN.yml +0 -48
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_DVI.yml +0 -48
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_PROP_MAKER.yml +0 -48
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_RFM.yml +0 -48
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_SCORPIO.yml +0 -48
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_THINKINK.yml +0 -48
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_USB_HOST.yml +0 -48
- data/vendor/board-maps/yaml/ADAFRUIT_ITSYBITSY_ESP32.yml +0 -24
- data/vendor/board-maps/yaml/ADAFRUIT_ITSYBITSY_RP2040.yml +0 -48
- data/vendor/board-maps/yaml/ADAFRUIT_KB2040_RP2040.yml +0 -48
- data/vendor/board-maps/yaml/ADAFRUIT_MACROPAD_RP2040.yml +0 -48
- data/vendor/board-maps/yaml/ADAFRUIT_MATRIXPORTAL_ESP32S3.yml +0 -16
- data/vendor/board-maps/yaml/ADAFRUIT_QTPY_ESP32C3.yml +0 -12
- data/vendor/board-maps/yaml/ADAFRUIT_QTPY_ESP32S2.yml +0 -22
- data/vendor/board-maps/yaml/ADAFRUIT_QTPY_ESP32S3_N4R2.yml +0 -20
- data/vendor/board-maps/yaml/ADAFRUIT_QTPY_ESP32S3_NOPSRAM.yml +0 -20
- data/vendor/board-maps/yaml/ADAFRUIT_QTPY_ESP32_PICO.yml +0 -28
- data/vendor/board-maps/yaml/ADAFRUIT_QTPY_RP2040.yml +0 -48
- data/vendor/board-maps/yaml/ADAFRUIT_STEMMAFRIEND_RP2040.yml +0 -48
- data/vendor/board-maps/yaml/ADAFRUIT_TRINKEYQT_RP2040.yml +0 -48
- data/vendor/board-maps/yaml/ALKS.yml +0 -34
- data/vendor/board-maps/yaml/AMPERKA_WIFI_SLOT.yml +0 -16
- data/vendor/board-maps/yaml/ARTRONSHOP_RP2_NANO.yml +0 -32
- data/vendor/board-maps/yaml/AVR_ADK.yml +0 -24
- data/vendor/board-maps/yaml/AVR_BT.yml +0 -16
- data/vendor/board-maps/yaml/AVR_CIRCUITPLAY.yml +0 -14
- data/vendor/board-maps/yaml/AVR_DUEMILANOVE.yml +0 -16
- data/vendor/board-maps/yaml/AVR_ESPLORA.yml +0 -20
- data/vendor/board-maps/yaml/AVR_ETHERNET.yml +0 -16
- data/vendor/board-maps/yaml/AVR_FIO.yml +0 -16
- data/vendor/board-maps/yaml/AVR_GEMMA.yml +0 -6
- data/vendor/board-maps/yaml/AVR_INDUSTRIAL101.yml +0 -20
- data/vendor/board-maps/yaml/AVR_LEONARDO.yml +0 -20
- data/vendor/board-maps/yaml/AVR_LEONARDO_ETH.yml +0 -20
- data/vendor/board-maps/yaml/AVR_LILYPAD.yml +0 -16
- data/vendor/board-maps/yaml/AVR_LILYPAD_USB.yml +0 -20
- data/vendor/board-maps/yaml/AVR_LININO_ONE.yml +0 -20
- data/vendor/board-maps/yaml/AVR_MEGA.yml +0 -24
- data/vendor/board-maps/yaml/AVR_MEGA2560.yml +0 -24
- data/vendor/board-maps/yaml/AVR_MICRO.yml +0 -20
- data/vendor/board-maps/yaml/AVR_MINI.yml +0 -16
- data/vendor/board-maps/yaml/AVR_NANO.yml +0 -16
- data/vendor/board-maps/yaml/AVR_NANO_EVERY.yml +0 -22
- data/vendor/board-maps/yaml/AVR_NG.yml +0 -16
- data/vendor/board-maps/yaml/AVR_PRO.yml +0 -16
- data/vendor/board-maps/yaml/AVR_ROBOT_CONTROL.yml +0 -22
- data/vendor/board-maps/yaml/AVR_ROBOT_MOTOR.yml +0 -19
- data/vendor/board-maps/yaml/AVR_UNO.yml +0 -16
- data/vendor/board-maps/yaml/AVR_UNO_WIFI_DEV_ED.yml +0 -16
- data/vendor/board-maps/yaml/AVR_UNO_WIFI_REV2.yml +0 -22
- data/vendor/board-maps/yaml/AVR_YUN.yml +0 -20
- data/vendor/board-maps/yaml/AVR_YUNMINI.yml +0 -20
- data/vendor/board-maps/yaml/AirM2M_CORE_ESP32C3.yml +0 -14
- data/vendor/board-maps/yaml/BEE_DATA_LOGGER.yml +0 -39
- data/vendor/board-maps/yaml/BPI_BIT.yml +0 -9
- data/vendor/board-maps/yaml/BPI_LEAF_S3.yml +0 -41
- data/vendor/board-maps/yaml/BRIDGETEK_IDM2040-7A.yml +0 -48
- data/vendor/board-maps/yaml/BeeMotionS3.yml +0 -45
- data/vendor/board-maps/yaml/Bee_Motion.yml +0 -30
- data/vendor/board-maps/yaml/Bee_Motion_Mini.yml +0 -1
- data/vendor/board-maps/yaml/Bee_S3.yml +0 -38
- data/vendor/board-maps/yaml/CHALLENGER_2040_LORA_RP2040.yml +0 -39
- data/vendor/board-maps/yaml/CHALLENGER_2040_LTE_RP2040.yml +0 -38
- data/vendor/board-maps/yaml/CHALLENGER_2040_NFC_RP2040.yml +0 -32
- data/vendor/board-maps/yaml/CHALLENGER_2040_SDRTC_RP2040.yml +0 -36
- data/vendor/board-maps/yaml/CHALLENGER_2040_SUBGHZ_RP2040.yml +0 -39
- data/vendor/board-maps/yaml/CHALLENGER_2040_UWB_RP2040.yml +0 -39
- data/vendor/board-maps/yaml/CHALLENGER_2040_WIFI6_BLE_RP2040.yml +0 -42
- data/vendor/board-maps/yaml/CHALLENGER_2040_WIFI_BLE_RP2040.yml +0 -42
- data/vendor/board-maps/yaml/CHALLENGER_2040_WIFI_RP2040.yml +0 -38
- data/vendor/board-maps/yaml/CHALLENGER_NB_2040_WIFI_RP2040.yml +0 -38
- data/vendor/board-maps/yaml/CRABIK_SLOT_ESP32_S3.yml +0 -19
- data/vendor/board-maps/yaml/CYTRON_MAKER_FEATHER_AIOT_S3.yml +0 -29
- data/vendor/board-maps/yaml/CYTRON_MAKER_NANO_RP2040.yml +0 -48
- data/vendor/board-maps/yaml/CYTRON_MAKER_PI_RP2040.yml +0 -48
- data/vendor/board-maps/yaml/CoreESP32.yml +0 -53
- data/vendor/board-maps/yaml/D1_MINI32.yml +0 -45
- data/vendor/board-maps/yaml/D1_UNO32.yml +0 -28
- data/vendor/board-maps/yaml/DATANOISETV_PICOADK.yml +0 -48
- data/vendor/board-maps/yaml/DENKY.yml +0 -35
- data/vendor/board-maps/yaml/DENKY_PICOV3.yml +0 -35
- data/vendor/board-maps/yaml/DENKY_WROOM32.yml +0 -35
- data/vendor/board-maps/yaml/DEPARTMENT_OF_ALCHEMY_MINIMAIN_ESP32S2.yml +0 -26
- data/vendor/board-maps/yaml/DFROBOT_BEETLE_ESP32_C3.yml +0 -14
- data/vendor/board-maps/yaml/DFROBOT_BEETLE_RP2040.yml +0 -48
- data/vendor/board-maps/yaml/DFROBOT_FIREBEETLE_2_ESP32E.yml +0 -49
- data/vendor/board-maps/yaml/DFROBOT_FIREBEETLE_2_ESP32S3.yml +0 -38
- data/vendor/board-maps/yaml/DFROBOT_ROMEO_ESP32S3.yml +0 -7
- data/vendor/board-maps/yaml/DPU_ESP32.yml +0 -35
- data/vendor/board-maps/yaml/DYDK.yml +0 -38
- data/vendor/board-maps/yaml/DYDK1A.yml +0 -37
- data/vendor/board-maps/yaml/DYDK1Av2.yml +0 -45
- data/vendor/board-maps/yaml/DYG.yml +0 -20
- data/vendor/board-maps/yaml/DYM.yml +0 -40
- data/vendor/board-maps/yaml/DYMv2.yml +0 -39
- data/vendor/board-maps/yaml/D_Duino_32.yml +0 -37
- data/vendor/board-maps/yaml/ELECTRONICCATS_HUNTERCAT_NFC.yml +0 -44
- data/vendor/board-maps/yaml/ESP320.yml +0 -8
- data/vendor/board-maps/yaml/ESP32C3_DEV.yml +0 -14
- data/vendor/board-maps/yaml/ESP32C3_M1_I_KIT.yml +0 -13
- data/vendor/board-maps/yaml/ESP32S2_DEV.yml +0 -43
- data/vendor/board-maps/yaml/ESP32S2_THING_PLUS.yml +0 -44
- data/vendor/board-maps/yaml/ESP32S2_USB.yml +0 -43
- data/vendor/board-maps/yaml/ESP32S3_CAM_LCD.yml +0 -7
- data/vendor/board-maps/yaml/ESP32S3_DEV.yml +0 -38
- data/vendor/board-maps/yaml/ESP32_DEV.yml +0 -35
- data/vendor/board-maps/yaml/ESP32_DEVKIT_LIPO.yml +0 -35
- data/vendor/board-maps/yaml/ESP32_EVB.yml +0 -7
- data/vendor/board-maps/yaml/ESP32_GATEWAY.yml +0 -13
- data/vendor/board-maps/yaml/ESP32_GATEWAY_C.yml +0 -13
- data/vendor/board-maps/yaml/ESP32_GATEWAY_E.yml +0 -13
- data/vendor/board-maps/yaml/ESP32_GATEWAY_F.yml +0 -13
- data/vendor/board-maps/yaml/ESP32_IOT_REDBOARD.yml +0 -36
- data/vendor/board-maps/yaml/ESP32_MICROMOD.yml +0 -24
- data/vendor/board-maps/yaml/ESP32_PICO.yml +0 -35
- data/vendor/board-maps/yaml/ESP32_POE.yml +0 -7
- data/vendor/board-maps/yaml/ESP32_POE_ISO.yml +0 -7
- data/vendor/board-maps/yaml/ESP32_S3_BOX.yml +0 -19
- data/vendor/board-maps/yaml/ESP32_S3_USB_OTG.yml +0 -11
- data/vendor/board-maps/yaml/ESP32_THING.yml +0 -36
- data/vendor/board-maps/yaml/ESP32_THING_PLUS.yml +0 -33
- data/vendor/board-maps/yaml/ESP32_THING_PLUS_C.yml +0 -33
- data/vendor/board-maps/yaml/ESP32_WROOM_DA.yml +0 -35
- data/vendor/board-maps/yaml/ESP32_WROVER_KIT.yml +0 -35
- data/vendor/board-maps/yaml/ESP8266_ADAFRUIT_HUZZAH.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_AGRUMINO_LEMON_V4.yml +0 -8
- data/vendor/board-maps/yaml/ESP8266_ARDUINO_PRIMO.yml +0 -7
- data/vendor/board-maps/yaml/ESP8266_ARDUINO_STAR_OTTO.yml +0 -7
- data/vendor/board-maps/yaml/ESP8266_ARDUINO_UNOWIFI.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_ESP01.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_ESP07.yml +0 -20
- data/vendor/board-maps/yaml/ESP8266_ESP12.yml +0 -20
- data/vendor/board-maps/yaml/ESP8266_ESP13.yml +0 -17
- data/vendor/board-maps/yaml/ESP8266_ESP210.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_ESPECTRO_CORE.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_ESPINO_ESP12.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_ESPINO_ESP13.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_ESPRESSO_LITE_V1.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_ESPRESSO_LITE_V2.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_GENERIC.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_INVENT_ONE.yml +0 -22
- data/vendor/board-maps/yaml/ESP8266_NODEMCU_ESP12.yml +0 -20
- data/vendor/board-maps/yaml/ESP8266_NODEMCU_ESP12E.yml +0 -20
- data/vendor/board-maps/yaml/ESP8266_OAK.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_PHOENIX_V1.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_PHOENIX_V2.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_SCHIRMILABS_EDUINO_WIFI.yml +0 -25
- data/vendor/board-maps/yaml/ESP8266_SONOFF_BASIC.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_SONOFF_S20.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_SONOFF_SV.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_SONOFF_TH.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_THING.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_THING_DEV.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_WEMOS_D1MINI.yml +0 -18
- data/vendor/board-maps/yaml/ESP8266_WEMOS_D1MINILITE.yml +0 -18
- data/vendor/board-maps/yaml/ESP8266_WEMOS_D1MINIPRO.yml +0 -18
- data/vendor/board-maps/yaml/ESP8266_WEMOS_D1R1.yml +0 -25
- data/vendor/board-maps/yaml/ESP8266_WEMOS_D1WROOM02.yml +0 -18
- data/vendor/board-maps/yaml/ESP8266_WIO_LINK.yml +0 -9
- data/vendor/board-maps/yaml/ESP8266_XINABOX_CW01.yml +0 -9
- data/vendor/board-maps/yaml/ESPECTRO32.yml +0 -36
- data/vendor/board-maps/yaml/ESPea32.yml +0 -36
- data/vendor/board-maps/yaml/ESPino32.yml +0 -36
- data/vendor/board-maps/yaml/ET-Board.yml +0 -26
- data/vendor/board-maps/yaml/EXTREMEELEXTRONICS_RC2040.yml +0 -46
- data/vendor/board-maps/yaml/Edgebox-ESP-100.yml +0 -7
- data/vendor/board-maps/yaml/FEATHERS2.yml +0 -43
- data/vendor/board-maps/yaml/FEATHERS2NEO.yml +0 -31
- data/vendor/board-maps/yaml/FEATHERS3.yml +0 -32
- data/vendor/board-maps/yaml/FEATHER_ESP32.yml +0 -32
- data/vendor/board-maps/yaml/FLYBOARD2040_CORE.yml +0 -48
- data/vendor/board-maps/yaml/FRANZININHO_WIFI.yml +0 -43
- data/vendor/board-maps/yaml/FRANZININHO_WIFI_MSC.yml +0 -43
- data/vendor/board-maps/yaml/FROG_ESP32.yml +0 -35
- data/vendor/board-maps/yaml/FUNHOUSE_ESP32S2.yml +0 -22
- data/vendor/board-maps/yaml/GEN4_IOD.yml +0 -9
- data/vendor/board-maps/yaml/GENERIC_RP2040.yml +0 -48
- data/vendor/board-maps/yaml/HEALTHYPI_4.yml +0 -36
- data/vendor/board-maps/yaml/HONEYLEMON.yml +0 -36
- data/vendor/board-maps/yaml/HORNBILL_ESP32_DEV.yml +0 -36
- data/vendor/board-maps/yaml/HORNBILL_ESP32_MINIMA.yml +0 -19
- data/vendor/board-maps/yaml/ILABS_2040_RPICO32_RP2040.yml +0 -47
- data/vendor/board-maps/yaml/IMBRIOS_LOGSENS_V1P1.yml +0 -23
- data/vendor/board-maps/yaml/INTOROBOT_ESP32_DEV.yml +0 -34
- data/vendor/board-maps/yaml/LILYGO_T_DISPLAY_S3.yml +0 -32
- data/vendor/board-maps/yaml/LOLIN32.yml +0 -36
- data/vendor/board-maps/yaml/LOLIN32_LITE.yml +0 -36
- data/vendor/board-maps/yaml/LOLIN_C3_MINI.yml +0 -14
- data/vendor/board-maps/yaml/LOLIN_D32.yml +0 -36
- data/vendor/board-maps/yaml/LOLIN_D32_PRO.yml +0 -36
- data/vendor/board-maps/yaml/LOLIN_S2_MINI.yml +0 -44
- data/vendor/board-maps/yaml/LOLIN_S2_PICO.yml +0 -44
- data/vendor/board-maps/yaml/LOLIN_S3.yml +0 -40
- data/vendor/board-maps/yaml/LOLIN_S3_MINI.yml +0 -40
- data/vendor/board-maps/yaml/LOLIN_S3_PRO.yml +0 -40
- data/vendor/board-maps/yaml/Lion_Bit_Dev_Board.yml +0 -18
- data/vendor/board-maps/yaml/LoPy.yml +0 -37
- data/vendor/board-maps/yaml/LoPy4.yml +0 -37
- data/vendor/board-maps/yaml/M5STACK_CORES3.yml +0 -8
- data/vendor/board-maps/yaml/M5STACK_Core2.yml +0 -9
- data/vendor/board-maps/yaml/M5STACK_FIRE.yml +0 -10
- data/vendor/board-maps/yaml/M5Stack-Timer-CAM.yml +0 -10
- data/vendor/board-maps/yaml/M5Stack_ATOM.yml +0 -10
- data/vendor/board-maps/yaml/M5Stack_ATOMS3.yml +0 -7
- data/vendor/board-maps/yaml/M5Stack_CoreInk.yml +0 -9
- data/vendor/board-maps/yaml/M5Stack_Core_ESP32.yml +0 -10
- data/vendor/board-maps/yaml/M5Stack_Station.yml +0 -10
- data/vendor/board-maps/yaml/M5Stick_C.yml +0 -10
- data/vendor/board-maps/yaml/MAGTAG29_ESP32S2.yml +0 -31
- data/vendor/board-maps/yaml/MELOPERO_COOKIE_RP2040.yml +0 -48
- data/vendor/board-maps/yaml/MELOPERO_SHAKE_RP2040.yml +0 -48
- data/vendor/board-maps/yaml/METRO_ESP32S2.yml +0 -44
- data/vendor/board-maps/yaml/MGBOT_IOTIK32A.yml +0 -36
- data/vendor/board-maps/yaml/MGBOT_IOTIK32B.yml +0 -36
- data/vendor/board-maps/yaml/MH_ET_LIVE_ESP32DEVKIT.yml +0 -36
- data/vendor/board-maps/yaml/MH_ET_LIVE_ESP32MINIKIT.yml +0 -36
- data/vendor/board-maps/yaml/MICROS2.yml +0 -44
- data/vendor/board-maps/yaml/MINIMA.yml +0 -15
- data/vendor/board-maps/yaml/MOD_WIFI_ESP8266.yml +0 -9
- data/vendor/board-maps/yaml/Metro.yml +0 -8
- data/vendor/board-maps/yaml/NANO32.yml +0 -36
- data/vendor/board-maps/yaml/NANO_RP2040_CONNECT.yml +0 -35
- data/vendor/board-maps/yaml/NEBULAS3.yml +0 -33
- data/vendor/board-maps/yaml/NEKOSYSTEMS_BL2040_MINI.yml +0 -48
- data/vendor/board-maps/yaml/NULLBITS_BIT_C_PRO.yml +0 -48
- data/vendor/board-maps/yaml/Node32s.yml +0 -36
- data/vendor/board-maps/yaml/NodeMCU_32S.yml +0 -36
- data/vendor/board-maps/yaml/ODROID_ESP32.yml +0 -10
- data/vendor/board-maps/yaml/ONEHORSE_ESP32_DEV.yml +0 -34
- data/vendor/board-maps/yaml/OROCA_EDUBOT.yml +0 -33
- data/vendor/board-maps/yaml/PIMORONI_PGA2040.yml +0 -48
- data/vendor/board-maps/yaml/PIMORONI_PLASMA2040.yml +0 -29
- data/vendor/board-maps/yaml/PORTENTA_C33.yml +0 -28
- data/vendor/board-maps/yaml/PROS3.yml +0 -33
- data/vendor/board-maps/yaml/PYCOM_GPY.yml +0 -37
- data/vendor/board-maps/yaml/Piranha.yml +0 -22
- data/vendor/board-maps/yaml/Pocket32.yml +0 -36
- data/vendor/board-maps/yaml/QUANTUM.yml +0 -35
- data/vendor/board-maps/yaml/RASPBERRY_PI_PICO.yml +0 -48
- data/vendor/board-maps/yaml/RASPBERRY_PI_PICO_W.yml +0 -48
- data/vendor/board-maps/yaml/REDPILL_ESP32S3.yml +0 -42
- data/vendor/board-maps/yaml/RMP.yml +0 -43
- data/vendor/board-maps/yaml/SAMD_CIRCUITPLAYGROUND_EXPRESS.yml +0 -11
- data/vendor/board-maps/yaml/SAMD_MKR1000.yml +0 -20
- data/vendor/board-maps/yaml/SAMD_MKRFox1200.yml +0 -19
- data/vendor/board-maps/yaml/SAMD_MKRGSM1400.yml +0 -15
- data/vendor/board-maps/yaml/SAMD_MKRNB1500.yml +0 -15
- data/vendor/board-maps/yaml/SAMD_MKRVIDOR4000.yml +0 -19
- data/vendor/board-maps/yaml/SAMD_MKRWAN1300.yml +0 -18
- data/vendor/board-maps/yaml/SAMD_MKRWAN1310.yml +0 -18
- data/vendor/board-maps/yaml/SAMD_MKRWIFI1010.yml +0 -19
- data/vendor/board-maps/yaml/SAMD_MKRZERO.yml +0 -19
- data/vendor/board-maps/yaml/SAMD_NANO_33_IOT.yml +0 -13
- data/vendor/board-maps/yaml/SAMD_TIAN.yml +0 -15
- data/vendor/board-maps/yaml/SAMD_ZERO.yml +0 -14
- data/vendor/board-maps/yaml/SAM_DUE.yml +0 -28
- data/vendor/board-maps/yaml/SAM_ZERO.yml +0 -15
- data/vendor/board-maps/yaml/SEEED_INDICATOR_RP2040.yml +0 -47
- data/vendor/board-maps/yaml/SEEED_XIAO_RP2040.yml +0 -29
- data/vendor/board-maps/yaml/SOLDERPARTY_RP2040_STAMP.yml +0 -48
- data/vendor/board-maps/yaml/SONOFF_DUALR3.yml +0 -35
- data/vendor/board-maps/yaml/SPARKFUN_PROMICRO_RP2040.yml +0 -48
- data/vendor/board-maps/yaml/SPARKFUN_THINGPLUS_RP2040.yml +0 -48
- data/vendor/board-maps/yaml/STAMP_S3.yml +0 -4
- data/vendor/board-maps/yaml/TAMC_TERMOD_S3.yml +0 -41
- data/vendor/board-maps/yaml/TBEAM_USE_RADIO_SX1262.yml +0 -28
- data/vendor/board-maps/yaml/TBEAM_USE_RADIO_SX1268.yml +0 -28
- data/vendor/board-maps/yaml/TBEAM_USE_RADIO_SX1276.yml +0 -28
- data/vendor/board-maps/yaml/TBEAM_USE_RADIO_SX1278.yml +0 -28
- data/vendor/board-maps/yaml/TBEAM_USE_RADIO_SX1280.yml +0 -28
- data/vendor/board-maps/yaml/TBeam.yml +0 -28
- data/vendor/board-maps/yaml/TINYPICO.yml +0 -35
- data/vendor/board-maps/yaml/TINYS2.yml +0 -43
- data/vendor/board-maps/yaml/TINYS3.yml +0 -25
- data/vendor/board-maps/yaml/TTGO-T-OI-PLUS_DEV.yml +0 -11
- data/vendor/board-maps/yaml/TTGO_LoRa32_V1.yml +0 -38
- data/vendor/board-maps/yaml/TTGO_LoRa32_V2.yml +0 -38
- data/vendor/board-maps/yaml/TTGO_LoRa32_v21new.yml +0 -38
- data/vendor/board-maps/yaml/TTGO_T1.yml +0 -36
- data/vendor/board-maps/yaml/TTGO_T7_V13_Mini32.yml +0 -36
- data/vendor/board-maps/yaml/TTGO_T7_V14_Mini32.yml +0 -36
- data/vendor/board-maps/yaml/TWATCH_2020_V1.yml +0 -9
- data/vendor/board-maps/yaml/TWATCH_2020_V2.yml +0 -9
- data/vendor/board-maps/yaml/TWATCH_2020_V3.yml +0 -9
- data/vendor/board-maps/yaml/TWATCH_BASE.yml +0 -9
- data/vendor/board-maps/yaml/TWatch.yml +0 -9
- data/vendor/board-maps/yaml/Trueverit_ESP32_Universal_IoT_Driver.yml +0 -18
- data/vendor/board-maps/yaml/Trueverit_ESP32_Universal_IoT_Driver_MK_II.yml +0 -18
- data/vendor/board-maps/yaml/UBLOX_NINA_W10.yml +0 -57
- data/vendor/board-maps/yaml/UBLOX_NORA_W10.yml +0 -43
- data/vendor/board-maps/yaml/UNOWIFIR4.yml +0 -17
- data/vendor/board-maps/yaml/UPESY_RP2040_DEVKIT.yml +0 -48
- data/vendor/board-maps/yaml/VALTRACK_V4_MFW_ESP32_C3.yml +0 -23
- data/vendor/board-maps/yaml/VALTRACK_V4_VTS_ESP32_C3.yml +0 -23
- data/vendor/board-maps/yaml/VIYALAB_MIZU_RP2040.yml +0 -48
- data/vendor/board-maps/yaml/WATCHY.yml +0 -7
- data/vendor/board-maps/yaml/WATCHY_V10.yml +0 -7
- data/vendor/board-maps/yaml/WATCHY_V15.yml +0 -7
- data/vendor/board-maps/yaml/WATCHY_V20.yml +0 -7
- data/vendor/board-maps/yaml/WAVESHARE_RP2040_LCD_0_96.yml +0 -47
- data/vendor/board-maps/yaml/WAVESHARE_RP2040_LCD_1_28.yml +0 -47
- data/vendor/board-maps/yaml/WAVESHARE_RP2040_ONE.yml +0 -47
- data/vendor/board-maps/yaml/WAVESHARE_RP2040_PLUS.yml +0 -48
- data/vendor/board-maps/yaml/WAVESHARE_RP2040_ZERO.yml +0 -47
- data/vendor/board-maps/yaml/WESP32.yml +0 -17
- data/vendor/board-maps/yaml/WIDORA_AIR.yml +0 -34
- data/vendor/board-maps/yaml/WIFIDUINO_ESP8266.yml +0 -23
- data/vendor/board-maps/yaml/WIFINFO.yml +0 -20
- data/vendor/board-maps/yaml/WIPY3.yml +0 -37
- data/vendor/board-maps/yaml/WIZNET_5100S_EVB_PICO.yml +0 -48
- data/vendor/board-maps/yaml/WIZNET_5500_EVB_PICO.yml +0 -48
- data/vendor/board-maps/yaml/WIZNET_WIZFI360_EVB_PICO.yml +0 -48
- data/vendor/board-maps/yaml/WT32_ETH01.yml +0 -8
- data/vendor/board-maps/yaml/WiFiduino32S3.yml +0 -27
- data/vendor/board-maps/yaml/WiFiduinoV2.yml +0 -27
- data/vendor/board-maps/yaml/Wifiduino32.yml +0 -40
- data/vendor/board-maps/yaml/XIAO_ESP32C3.yml +0 -22
- data/vendor/board-maps/yaml/XIAO_ESP32S3.yml +0 -37
- data/vendor/board-maps/yaml/YD_RP2040.yml +0 -48
- data/vendor/board-maps/yaml/atmegazero_esp32s2.yml +0 -30
- data/vendor/board-maps/yaml/connaxio_espoir.yml +0 -24
- data/vendor/board-maps/yaml/esp32vn_iot_uno.yml +0 -31
- data/vendor/board-maps/yaml/fm_devkit.yml +0 -15
- data/vendor/board-maps/yaml/heltec_wifi_32_lora_V3.yml +0 -41
- data/vendor/board-maps/yaml/heltec_wifi_kit_32.yml +0 -38
- data/vendor/board-maps/yaml/heltec_wifi_kit_32_V3.yml +0 -42
- data/vendor/board-maps/yaml/heltec_wifi_lora_32.yml +0 -36
- data/vendor/board-maps/yaml/heltec_wifi_lora_32_V2.yml +0 -36
- data/vendor/board-maps/yaml/heltec_wireless_stick.yml +0 -36
- data/vendor/board-maps/yaml/heltec_wireless_stick_LITE.yml +0 -36
- data/vendor/board-maps/yaml/openkb.yml +0 -37
- data/vendor/board-maps/yaml/roboheart_hercules.yml +0 -26
- data/vendor/board-maps/yaml/sensesiot_weizen.yml +0 -35
- data/vendor/board-maps/yaml/uPesy_WROOM.yml +0 -36
- data/vendor/board-maps/yaml/uPesy_WROVER.yml +0 -36
- data/vendor/board-maps/yaml/unphone8.yml +0 -42
- data/vendor/board-maps/yaml/unphone9.yml +0 -42
- data/vendor/board-maps/yaml/wifi_kit_8.yml +0 -15
data/vendor/board-maps/README.md
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
# Arduino Board Maps in YAML Format
|
2
|
-
|
3
|
-
The aim of this script is to map common identifiers used in the [Arduino](https://github.com/arduino) IDE to their integer pin numbers. For example, on many Arduino boards, the analog input pin labeled `A0` maps to an integer pin number of `14`, but this isn't always the case. With the large variety of boards the Arduino IDE supports, it's difficult to keep track of mappings manually.
|
4
|
-
|
5
|
-
### How to identify the board?
|
6
|
-
|
7
|
-
Along with the maps inside the `yaml` folder, there is `BoardMap.h`. Include that in a sketch, and it will `#define BOARD_MAP`, based on your board selection in Arduino. The value of `BOARD_MAP` is the filename for that board's map, minus the `.yml` extension.
|
8
|
-
|
9
|
-
### Why map the pins?
|
10
|
-
|
11
|
-
If the sketch tells a remote machine its `BOARD_MAP`, the map can be loaded from its file. From there, the remote machine uses it to translate between pin identifiers and integers, before sending instructions to the board, or receiving messages from it.
|
12
|
-
|
13
|
-
This is the exact use case this was deisgned for, in support of the [denko](https://github.com/denko-rb/denko) Ruby gem. It allows more intuitive pin referencing in Ruby, while simplifying the Arduino sketch so it only handles pins as integers.
|
14
|
-
|
15
|
-
## Supported Arduino Cores
|
16
|
-
|
17
|
-
- [avr](https://github.com/arduino/ArduinoCore-avr)
|
18
|
-
- [megaavr](https://github.com/arduino/ArduinoCore-megaavr)
|
19
|
-
- [sam](https://github.com/arduino/ArduinoCore-sam)
|
20
|
-
- [samd](https://github.com/arduino/ArduinoCore-samd)
|
21
|
-
- [renesas](https://github.com/arduino/ArduinoCore-renesas)
|
22
|
-
- [esp8266](https://github.com/esp8266/Arduino)
|
23
|
-
- [esp32](https://github.com/espressif/arduino-esp32)
|
24
|
-
- [rp2040](https://github.com/earlephilhower/arduino-pico)
|
25
|
-
|
26
|
-
## Mappings
|
27
|
-
|
28
|
-
- `A0` analog input pins (sequential on AVR, disordered on others)
|
29
|
-
- `DAC0` digital-to-analog-pins
|
30
|
-
- `D0` pins (some on RP2040. Many on ESP8266 where DX doesn't map to GPIOX)
|
31
|
-
- `T0` pins (capacitive touch pins on ESP32)
|
32
|
-
- `SCL`, `SDA`, `SCLX`, `SDAX`, default and numbered hardware I2C pins
|
33
|
-
- `MOSI`, `MISO`, `SCK`, `SS`, `MOSIX`, `MISOX`, `SCKX`, `SSX`, default and numbered hardware SPI pins
|
34
|
-
- `LED_BUILTIN` which is usually defined for the on-board LED
|
35
|
-
|
36
|
-
TODO: Add UART and CAN?
|
37
|
-
|
38
|
-
## Usage
|
39
|
-
|
40
|
-
Clone or download this repo. Use `BoardMap.h` and all the files inside `yaml` as descibed above.
|
41
|
-
|
42
|
-
Each map is a flat dictionary where each key (an identifier) maps to one integer.
|
43
|
-
|
44
|
-
**Note:** All keys are prefixed with `:`, so they automatically translate to Ruby symbols when loaded.
|
45
|
-
|
46
|
-
## Development
|
47
|
-
|
48
|
-
Be warned. This is mostly a hack that runs a bunch of regex matches on `boards.txt` and header files from each Arduino core. :man_shrugging:
|
49
|
-
|
50
|
-
- Clone this repo.
|
51
|
-
- Clone the submodules inside the `core` folder with `git submodule init` and `git submodule update`. No need for recursion, but will still be close to 4GB.
|
52
|
-
- Make changes and `ruby run.rb` to udpate `BoardMap.h` and all the YAML files.
|
@@ -1,66 +0,0 @@
|
|
1
|
-
class BoardsParser
|
2
|
-
#
|
3
|
-
# This catches the following styles of edge cases (only seen in ESP8266 core so far):
|
4
|
-
#
|
5
|
-
# 1) Main board defines a variant (header) folder, sub-models define none, so they all use the main folder:
|
6
|
-
# sonoff.build.board=ESP8266_SONOFF_SV
|
7
|
-
# sonoff.build.variant=itead
|
8
|
-
# sonoff.menu.BoardModel.sonoffBasic.build.board=ESP8266_SONOFF_BASIC
|
9
|
-
# sonoff.menu.BoardModel.sonoffS20.build.board=ESP8266_SONOFF_S20
|
10
|
-
# sonoff.menu.BoardModel.sonoffSV.build.board=ESP8266_SONOFF_SV
|
11
|
-
# sonoff.menu.BoardModel.sonoffTH.build.board=ESP8266_SONOFF_TH
|
12
|
-
#
|
13
|
-
# 2) Main board is defined. Sub-models each define their own variant (header) folder:
|
14
|
-
# arduino-esp8266.build.board=ESP8266_ARDUINO
|
15
|
-
# arduino-esp8266.menu.BoardModel.primo.build.board=ESP8266_ARDUINO_PRIMO
|
16
|
-
# arduino-esp8266.menu.BoardModel.primo.build.variant=arduino_spi
|
17
|
-
# arduino-esp8266.menu.BoardModel.starottodeved.build.board=ESP8266_ARDUINO_STAR_OTTO
|
18
|
-
# arduino-esp8266.menu.BoardModel.starottodeved.build.variant=arduino_uart
|
19
|
-
# arduino-esp8266.menu.BoardModel.unowifideved.build.board=ESP8266_ARDUINO_UNOWIFI
|
20
|
-
# arduino-esp8266.menu.BoardModel.unowifideved.build.variant=arduino_uart
|
21
|
-
#
|
22
|
-
# If both of these are ever combined in the same variant, this parser WILL fail.
|
23
|
-
#
|
24
|
-
def self.parse(core_root_path)
|
25
|
-
boards = {}
|
26
|
-
board_identifier = nil
|
27
|
-
header_folder = nil
|
28
|
-
|
29
|
-
File.readlines("#{core_root_path}/boards.txt").each do |line|
|
30
|
-
# Lines matching this define a board or board sub-model.
|
31
|
-
match = line.match(/build.board=(.*)\s*\z/)
|
32
|
-
if match
|
33
|
-
board_identifier = "ARDUINO_#{match[1]}"
|
34
|
-
|
35
|
-
# If there's a board and header set, add it to the hash.
|
36
|
-
# Will catch when a sub-model with different name reuses the main board header.
|
37
|
-
if board_identifier && header_folder
|
38
|
-
boards[board_identifier] = header_folder
|
39
|
-
end
|
40
|
-
next
|
41
|
-
end
|
42
|
-
|
43
|
-
# Lines matching this give the folder name for the board's header file.
|
44
|
-
match = line.match(/build.variant=(.*)\s*\z/)
|
45
|
-
if match
|
46
|
-
header_folder = "#{core_root_path}/variants/#{match[1]}"
|
47
|
-
|
48
|
-
# If there's a board and header set, add it to the hash.
|
49
|
-
# Will catch when sub-models use different headers.
|
50
|
-
if board_identifier && header_folder
|
51
|
-
boards[board_identifier] = header_folder
|
52
|
-
end
|
53
|
-
next
|
54
|
-
end
|
55
|
-
|
56
|
-
# Reset state if end of board section reached.
|
57
|
-
match = line.match(/######/)
|
58
|
-
if match
|
59
|
-
board_identifier = nil
|
60
|
-
header_folder = nil
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
return boards
|
65
|
-
end
|
66
|
-
end
|
@@ -1,189 +0,0 @@
|
|
1
|
-
class HeaderParser
|
2
|
-
attr_reader :map
|
3
|
-
|
4
|
-
def initialize(folder)
|
5
|
-
# Empty hash to fill and return with the pin map.
|
6
|
-
@map = {}
|
7
|
-
@folder = folder
|
8
|
-
|
9
|
-
# Gotta try all .h files since there's no naming consistency...
|
10
|
-
# No idea if this puts them in the right order, but it shouldn't matter.
|
11
|
-
header_files = Dir["#{@folder}/*.h"]
|
12
|
-
header_files.each do |path|
|
13
|
-
parse_file(path)
|
14
|
-
end
|
15
|
-
|
16
|
-
clean_map
|
17
|
-
end
|
18
|
-
|
19
|
-
def parse_file(path)
|
20
|
-
begin
|
21
|
-
file = File.open(path)
|
22
|
-
rescue => exception
|
23
|
-
# Fail silently if file not found. Some of these headers include standard libs...
|
24
|
-
return
|
25
|
-
end
|
26
|
-
|
27
|
-
file.each_line do |line|
|
28
|
-
# Reject comments.
|
29
|
-
next if line.match /\A\/\//
|
30
|
-
|
31
|
-
# Reject anything to do with QSPI.
|
32
|
-
next if line.match /QSPI/
|
33
|
-
|
34
|
-
# Reject lines that end with pin-style identifiers, instead of numbers.
|
35
|
-
next if line.match /(PIN_)*(A|D|DAC|T)(\d+)\s*;*\s*\z/
|
36
|
-
next if line.match /(PIN_SPI_|PIN_WIRE_)*(SDA|SCL|SS|MOSI|MISO|SCK)\s*;*\s*\z/
|
37
|
-
|
38
|
-
# Recursively parse included headers...smh
|
39
|
-
included = line.match /\A\s*#include\s*("|<)(.*)("|>)/
|
40
|
-
if included
|
41
|
-
path = File.expand_path(included[2], @folder)
|
42
|
-
parse_file(path)
|
43
|
-
end
|
44
|
-
|
45
|
-
# Match RP2040 analog overrides and store them with prefixed keys like :_A0
|
46
|
-
# Will substitute them later in #clean_map
|
47
|
-
rp2040_analog = line.match /__PIN(_A\d+)\s+\(?(\d+)\w*\)?/
|
48
|
-
if rp2040_analog
|
49
|
-
@map[rp2040_analog[1].to_sym] = rp2040_analog[2].to_i
|
50
|
-
next
|
51
|
-
end
|
52
|
-
|
53
|
-
#
|
54
|
-
# Match analog input pins declared like:
|
55
|
-
# #define PIN_A0 (14ul)
|
56
|
-
# #define PIN_A0 14
|
57
|
-
# #define A0 14
|
58
|
-
#
|
59
|
-
pin = line.match /(PIN_)*(A\d+)\s+\(?(\d+)\w*\)?/
|
60
|
-
if pin
|
61
|
-
@map[pin[2].to_sym] = pin[3].to_i
|
62
|
-
next
|
63
|
-
end
|
64
|
-
|
65
|
-
#
|
66
|
-
# Strict matcher for DAC pins in Arduino SAMD core:
|
67
|
-
# #define DAC A0
|
68
|
-
# #define DAC1 14
|
69
|
-
#
|
70
|
-
pin = line.match /(PIN_)(DAC\d+)\s+\(?(\d+)\w*\)?/
|
71
|
-
if pin
|
72
|
-
@map[pin[2].to_sym] = pin[3].to_i
|
73
|
-
next
|
74
|
-
end
|
75
|
-
|
76
|
-
#
|
77
|
-
# Match I2C/SPI pins declared like: (first seen in UNO R4)
|
78
|
-
# #define WIRE_SDA_PIN 20
|
79
|
-
# #define WIRE_SCL1_PIN 20
|
80
|
-
#
|
81
|
-
pin = line.match /(WIRE(\d*)_(SCL_|SDA_)PIN)\s*\(?(\d+)\w*\)?/
|
82
|
-
if pin
|
83
|
-
@map[pin[1].gsub("_PIN", "").to_sym] = pin[4].to_i
|
84
|
-
next
|
85
|
-
end
|
86
|
-
|
87
|
-
#
|
88
|
-
# Match I2C/SPI pins declared like:
|
89
|
-
# #define PIN_WIRE_SDA (20ul)
|
90
|
-
# #define PIN_SPI0_MOSI (51)
|
91
|
-
# #define PIN_WIRE2_SDA 20
|
92
|
-
# #define WIRE1_SDA 21
|
93
|
-
#
|
94
|
-
pin = line.match /(PIN_)*((WIRE|SPI)\d*_\w+)\s*\(?(\d+)\w*\)?/
|
95
|
-
if pin
|
96
|
-
@map[pin[2].to_sym] = pin[4].to_i
|
97
|
-
next
|
98
|
-
end
|
99
|
-
|
100
|
-
# This mostly affectes SAM3X, ESP32 and ESP8266.
|
101
|
-
#
|
102
|
-
# Match custom labeled D* pins (eg. ESP8266) declared like:
|
103
|
-
# static const uint D4 = (2)
|
104
|
-
#
|
105
|
-
# Match analog pins declared like:
|
106
|
-
# static const uint8_t A0 = 14
|
107
|
-
#
|
108
|
-
# Match DAC pins declared like:
|
109
|
-
# static const uint8_t DAC1 = 25
|
110
|
-
#
|
111
|
-
# Match capacitive touch pins declared like:
|
112
|
-
# static const uint8_t T0 = 4
|
113
|
-
#
|
114
|
-
pin = line.match /((A|D|DAC|T)\d+)\s*=\s*\(?(\d+)\w*\)?/
|
115
|
-
if pin
|
116
|
-
@map[pin[1].to_sym] = pin[3].to_i
|
117
|
-
next
|
118
|
-
end
|
119
|
-
|
120
|
-
#
|
121
|
-
# Match I2C/SPI pins declared like:
|
122
|
-
# static const uint8_t SDA = 21
|
123
|
-
#
|
124
|
-
pin = line.match /(SDA|SCL|SS|MOSI|MISO|SCK)\s*=\s*\(?(\d+)\w*\)?/
|
125
|
-
if pin
|
126
|
-
@map[pin[1].to_sym] = pin[2].to_i
|
127
|
-
next
|
128
|
-
end
|
129
|
-
|
130
|
-
#
|
131
|
-
# Match LED_BUILTIN declared like:
|
132
|
-
# #define LED_BUILTIN 13
|
133
|
-
# #define PIN_LED 2
|
134
|
-
# #define PIN_LED13 13
|
135
|
-
#
|
136
|
-
led = line.match /(PIN_LED|LED_BUILTIN)(_13)*\s+\(?(\d+)\w*\)?/
|
137
|
-
if led
|
138
|
-
@map[:LED_BUILTIN] = led[3].to_i unless line.match /2812/
|
139
|
-
next
|
140
|
-
end
|
141
|
-
|
142
|
-
#
|
143
|
-
# Match LED_BUILTIN declared like:
|
144
|
-
# static const uint8_t LED_BUILTIN = 2
|
145
|
-
# static const uint8_t LED_BUILTIN13 = 13
|
146
|
-
# static const uint8_t PIN_LED = 4
|
147
|
-
#
|
148
|
-
led = line.match /(PIN_LED|LED_BUILTIN)(_13)*\s*=\s*\(?(\d+)\w*\)?/
|
149
|
-
if led
|
150
|
-
@map[:LED_BUILTIN] = led[3].to_i unless line.match /2812/
|
151
|
-
next
|
152
|
-
end
|
153
|
-
end
|
154
|
-
end
|
155
|
-
|
156
|
-
def clean_map
|
157
|
-
# Updated references to merge with the map after.
|
158
|
-
map_updates = {}
|
159
|
-
|
160
|
-
@map.each do |key, value|
|
161
|
-
# One board double defines SPI_SS and SPI_CS.
|
162
|
-
@map.delete(key) if key.to_s.match /CS/
|
163
|
-
|
164
|
-
# Filter out some stuff we shouldn't be catching.
|
165
|
-
if key.to_s.match /(HOWMANY|PIN_DEFINED|INTERFACES_COUNT|CHANNELS_NUM|PAD)/
|
166
|
-
@map.delete(key)
|
167
|
-
next
|
168
|
-
end
|
169
|
-
|
170
|
-
# Fix RP2040 analog pin overrides.
|
171
|
-
if key.to_s.match /_A\d+/
|
172
|
-
new_key = key.to_s.gsub("_", "")
|
173
|
-
map_updates[new_key.to_sym] = value
|
174
|
-
@map.delete(key)
|
175
|
-
end
|
176
|
-
|
177
|
-
# Standardize SPI / WIRE styling.
|
178
|
-
spi_match = key.to_s.match /(SPI|WIRE)(\d*)_(\w+)/
|
179
|
-
if spi_match
|
180
|
-
new_key = "#{spi_match[3]}#{spi_match[2]}"
|
181
|
-
map_updates[new_key.to_sym] = value
|
182
|
-
@map.delete(key)
|
183
|
-
next
|
184
|
-
end
|
185
|
-
end
|
186
|
-
|
187
|
-
@map = @map.merge(map_updates)
|
188
|
-
end
|
189
|
-
end
|
data/vendor/board-maps/run.rb
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
require_relative "lib/boards_parser"
|
2
|
-
require_relative "lib/header_parser"
|
3
|
-
|
4
|
-
CORES = ["avr", "esp32", "esp8266", "megaavr", "rp2040", "sam3x", "samd", "ra4m1"]
|
5
|
-
|
6
|
-
# This will end up containing a map for each board identified. Each key
|
7
|
-
# is a board's identifier and the value is its pin map as a hash.
|
8
|
-
board_maps = {}
|
9
|
-
|
10
|
-
CORES.each do |core|
|
11
|
-
core_root = "#{Dir.pwd}/cores/#{core}"
|
12
|
-
|
13
|
-
# Get a hash that maps each board to its variant folder.
|
14
|
-
board_headers = BoardsParser.parse(core_root)
|
15
|
-
|
16
|
-
# For each board, parse its header and add it to the hash of maps.
|
17
|
-
board_headers.each do |board, header_folder|
|
18
|
-
# No idea what this is, but doesn't seem to be a real board.
|
19
|
-
next if board.match /muxto/i
|
20
|
-
|
21
|
-
parser = HeaderParser.new(header_folder)
|
22
|
-
board_maps[board] = parser.map
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
# Manually set DAC pins for Arduino branded RA4M1 boards.
|
27
|
-
# Should handle with different matchers for each core, but this works for now.
|
28
|
-
board_maps["ARDUINO_MINIMA"][:DAC] = 14
|
29
|
-
board_maps["ARDUINO_UNOWIFIR4"][:DAC] = 14
|
30
|
-
board_maps["ARDUINO_PORTENTA_C33"][:DAC] = 21
|
31
|
-
board_maps["ARDUINO_PORTENTA_C33"][:DAC1] = 20
|
32
|
-
|
33
|
-
# Remove chars from board identifier that won't work in a filename.
|
34
|
-
def board_to_filename(board_identifier)
|
35
|
-
board_identifier.gsub(":", "_").gsub(",", "_").gsub(/\AARDUINO_/, "")
|
36
|
-
end
|
37
|
-
|
38
|
-
# Define every board name in BoardMap.h
|
39
|
-
File.open("#{Dir.pwd}/BoardMap.h", "w") do |file|
|
40
|
-
board_maps.each_key do |board_identifier|
|
41
|
-
file.write "#ifdef #{board_identifier}\n"
|
42
|
-
file.write " #define BOARD_MAP \"#{board_to_filename(board_identifier)}\"\n"
|
43
|
-
file.write "#endif\n"
|
44
|
-
file.write "\n"
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
# Generate a YAML file for each board.
|
49
|
-
require 'yaml'
|
50
|
-
board_maps.each do |board_identifier, map|
|
51
|
-
filename = board_to_filename(board_identifier)
|
52
|
-
File.open("#{Dir.pwd}/yaml/#{filename}.yml", "w") do |file|
|
53
|
-
file.write(map.to_yaml)
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
puts "Parsed #{board_maps.count} boards."
|
@@ -1,48 +0,0 @@
|
|
1
|
-
---
|
2
|
-
:LED_BUILTIN: 17
|
3
|
-
:D0: 0
|
4
|
-
:D1: 1
|
5
|
-
:D2: 2
|
6
|
-
:D3: 3
|
7
|
-
:D4: 4
|
8
|
-
:D5: 5
|
9
|
-
:D6: 6
|
10
|
-
:D7: 7
|
11
|
-
:D8: 8
|
12
|
-
:D9: 9
|
13
|
-
:D10: 10
|
14
|
-
:D11: 11
|
15
|
-
:D12: 12
|
16
|
-
:D13: 13
|
17
|
-
:D14: 14
|
18
|
-
:D15: 15
|
19
|
-
:D16: 16
|
20
|
-
:D17: 17
|
21
|
-
:D18: 18
|
22
|
-
:D19: 19
|
23
|
-
:D20: 20
|
24
|
-
:D21: 21
|
25
|
-
:D22: 22
|
26
|
-
:D23: 23
|
27
|
-
:D24: 24
|
28
|
-
:D25: 25
|
29
|
-
:D26: 26
|
30
|
-
:D27: 27
|
31
|
-
:D28: 28
|
32
|
-
:D29: 29
|
33
|
-
:A0: 26
|
34
|
-
:A1: 27
|
35
|
-
:A2: 28
|
36
|
-
:A3: 29
|
37
|
-
:MISO0: 20
|
38
|
-
:MOSI0: 23
|
39
|
-
:SCK0: 22
|
40
|
-
:SS0: 21
|
41
|
-
:MISO1: 31
|
42
|
-
:MOSI1: 31
|
43
|
-
:SCK1: 31
|
44
|
-
:SS1: 31
|
45
|
-
:SDA0: 31
|
46
|
-
:SCL0: 31
|
47
|
-
:SDA1: 2
|
48
|
-
:SCL1: 3
|
@@ -1,25 +0,0 @@
|
|
1
|
-
---
|
2
|
-
:LED_BUILTIN: 13
|
3
|
-
:SDA: 3
|
4
|
-
:SCL: 4
|
5
|
-
:SS: 42
|
6
|
-
:MOSI: 35
|
7
|
-
:SCK: 36
|
8
|
-
:MISO: 37
|
9
|
-
:A0: 18
|
10
|
-
:A1: 17
|
11
|
-
:A2: 16
|
12
|
-
:A3: 15
|
13
|
-
:A4: 14
|
14
|
-
:A5: 8
|
15
|
-
:T5: 5
|
16
|
-
:T6: 6
|
17
|
-
:T8: 8
|
18
|
-
:T9: 9
|
19
|
-
:T10: 10
|
20
|
-
:T11: 11
|
21
|
-
:T12: 12
|
22
|
-
:T13: 13
|
23
|
-
:T14: 14
|
24
|
-
:DAC1: 17
|
25
|
-
:DAC2: 18
|
@@ -1,25 +0,0 @@
|
|
1
|
-
---
|
2
|
-
:LED_BUILTIN: 13
|
3
|
-
:SDA: 3
|
4
|
-
:SCL: 4
|
5
|
-
:SS: 42
|
6
|
-
:MOSI: 35
|
7
|
-
:SCK: 36
|
8
|
-
:MISO: 37
|
9
|
-
:A0: 18
|
10
|
-
:A1: 17
|
11
|
-
:A2: 16
|
12
|
-
:A3: 15
|
13
|
-
:A4: 14
|
14
|
-
:A5: 8
|
15
|
-
:T5: 5
|
16
|
-
:T6: 6
|
17
|
-
:T8: 8
|
18
|
-
:T9: 9
|
19
|
-
:T10: 10
|
20
|
-
:T11: 11
|
21
|
-
:T12: 12
|
22
|
-
:T13: 13
|
23
|
-
:T14: 14
|
24
|
-
:DAC1: 17
|
25
|
-
:DAC2: 18
|
@@ -1,27 +0,0 @@
|
|
1
|
-
---
|
2
|
-
:LED_BUILTIN: 13
|
3
|
-
:SDA: 42
|
4
|
-
:SCL: 41
|
5
|
-
:SS: 7
|
6
|
-
:MOSI: 35
|
7
|
-
:SCK: 36
|
8
|
-
:MISO: 37
|
9
|
-
:A0: 18
|
10
|
-
:A1: 17
|
11
|
-
:A2: 16
|
12
|
-
:A3: 15
|
13
|
-
:A4: 14
|
14
|
-
:A5: 8
|
15
|
-
:T1: 1
|
16
|
-
:T2: 2
|
17
|
-
:T5: 5
|
18
|
-
:T6: 6
|
19
|
-
:T8: 8
|
20
|
-
:T9: 9
|
21
|
-
:T10: 10
|
22
|
-
:T11: 11
|
23
|
-
:T12: 12
|
24
|
-
:T13: 13
|
25
|
-
:T14: 14
|
26
|
-
:DAC1: 17
|
27
|
-
:DAC2: 18
|
@@ -1,34 +0,0 @@
|
|
1
|
-
---
|
2
|
-
:LED_BUILTIN: 13
|
3
|
-
:SDA: 3
|
4
|
-
:SCL: 4
|
5
|
-
:SS: 42
|
6
|
-
:MOSI: 35
|
7
|
-
:SCK: 36
|
8
|
-
:MISO: 37
|
9
|
-
:A0: 18
|
10
|
-
:A1: 17
|
11
|
-
:A2: 16
|
12
|
-
:A3: 15
|
13
|
-
:A4: 14
|
14
|
-
:A5: 8
|
15
|
-
:A6: 3
|
16
|
-
:A7: 4
|
17
|
-
:A8: 5
|
18
|
-
:A9: 6
|
19
|
-
:A10: 9
|
20
|
-
:A11: 10
|
21
|
-
:A12: 11
|
22
|
-
:A13: 12
|
23
|
-
:A14: 13
|
24
|
-
:T3: 3
|
25
|
-
:T4: 4
|
26
|
-
:T5: 5
|
27
|
-
:T6: 6
|
28
|
-
:T8: 8
|
29
|
-
:T9: 9
|
30
|
-
:T10: 10
|
31
|
-
:T11: 11
|
32
|
-
:T12: 12
|
33
|
-
:T13: 13
|
34
|
-
:T14: 14
|
@@ -1,34 +0,0 @@
|
|
1
|
-
---
|
2
|
-
:LED_BUILTIN: 13
|
3
|
-
:SDA: 3
|
4
|
-
:SCL: 4
|
5
|
-
:SS: 42
|
6
|
-
:MOSI: 35
|
7
|
-
:SCK: 36
|
8
|
-
:MISO: 37
|
9
|
-
:A0: 18
|
10
|
-
:A1: 17
|
11
|
-
:A2: 16
|
12
|
-
:A3: 15
|
13
|
-
:A4: 14
|
14
|
-
:A5: 8
|
15
|
-
:A6: 3
|
16
|
-
:A7: 4
|
17
|
-
:A8: 5
|
18
|
-
:A9: 6
|
19
|
-
:A10: 9
|
20
|
-
:A11: 10
|
21
|
-
:A12: 11
|
22
|
-
:A13: 12
|
23
|
-
:A14: 13
|
24
|
-
:T3: 3
|
25
|
-
:T4: 4
|
26
|
-
:T5: 5
|
27
|
-
:T6: 6
|
28
|
-
:T8: 8
|
29
|
-
:T9: 9
|
30
|
-
:T10: 10
|
31
|
-
:T11: 11
|
32
|
-
:T12: 12
|
33
|
-
:T13: 13
|
34
|
-
:T14: 14
|
@@ -1,25 +0,0 @@
|
|
1
|
-
---
|
2
|
-
:LED_BUILTIN: 13
|
3
|
-
:SDA: 3
|
4
|
-
:SCL: 4
|
5
|
-
:SS: 42
|
6
|
-
:MOSI: 35
|
7
|
-
:SCK: 36
|
8
|
-
:MISO: 37
|
9
|
-
:A0: 18
|
10
|
-
:A1: 17
|
11
|
-
:A2: 16
|
12
|
-
:A3: 15
|
13
|
-
:A4: 14
|
14
|
-
:A5: 8
|
15
|
-
:T5: 5
|
16
|
-
:T6: 6
|
17
|
-
:T8: 8
|
18
|
-
:T9: 9
|
19
|
-
:T10: 10
|
20
|
-
:T11: 11
|
21
|
-
:T12: 12
|
22
|
-
:T13: 13
|
23
|
-
:T14: 14
|
24
|
-
:DAC1: 17
|
25
|
-
:DAC2: 18
|
@@ -1,27 +0,0 @@
|
|
1
|
-
---
|
2
|
-
:LED_BUILTIN: 13
|
3
|
-
:SDA: 42
|
4
|
-
:SCL: 41
|
5
|
-
:SS: 7
|
6
|
-
:MOSI: 35
|
7
|
-
:SCK: 36
|
8
|
-
:MISO: 37
|
9
|
-
:A0: 18
|
10
|
-
:A1: 17
|
11
|
-
:A2: 16
|
12
|
-
:A3: 15
|
13
|
-
:A4: 14
|
14
|
-
:A5: 8
|
15
|
-
:T1: 1
|
16
|
-
:T2: 2
|
17
|
-
:T5: 5
|
18
|
-
:T6: 6
|
19
|
-
:T8: 8
|
20
|
-
:T9: 9
|
21
|
-
:T10: 10
|
22
|
-
:T11: 11
|
23
|
-
:T12: 12
|
24
|
-
:T13: 13
|
25
|
-
:T14: 14
|
26
|
-
:DAC1: 17
|
27
|
-
:DAC2: 18
|
@@ -1,34 +0,0 @@
|
|
1
|
-
---
|
2
|
-
:LED_BUILTIN: 13
|
3
|
-
:SDA: 22
|
4
|
-
:SCL: 20
|
5
|
-
:SS: 33
|
6
|
-
:MOSI: 19
|
7
|
-
:MISO: 21
|
8
|
-
:SCK: 5
|
9
|
-
:A0: 26
|
10
|
-
:A1: 25
|
11
|
-
:A2: 34
|
12
|
-
:A3: 39
|
13
|
-
:A4: 36
|
14
|
-
:A5: 4
|
15
|
-
:A6: 14
|
16
|
-
:A7: 32
|
17
|
-
:A8: 15
|
18
|
-
:A9: 33
|
19
|
-
:A10: 27
|
20
|
-
:A11: 12
|
21
|
-
:A12: 13
|
22
|
-
:A13: 35
|
23
|
-
:T0: 4
|
24
|
-
:T1: 0
|
25
|
-
:T2: 2
|
26
|
-
:T3: 15
|
27
|
-
:T4: 13
|
28
|
-
:T5: 12
|
29
|
-
:T6: 14
|
30
|
-
:T7: 27
|
31
|
-
:T8: 33
|
32
|
-
:T9: 32
|
33
|
-
:DAC1: 25
|
34
|
-
:DAC2: 26
|
@@ -1,48 +0,0 @@
|
|
1
|
-
---
|
2
|
-
:LED_BUILTIN: 13
|
3
|
-
:D0: 0
|
4
|
-
:D1: 1
|
5
|
-
:D2: 2
|
6
|
-
:D3: 3
|
7
|
-
:D4: 4
|
8
|
-
:D5: 5
|
9
|
-
:D6: 6
|
10
|
-
:D7: 7
|
11
|
-
:D8: 8
|
12
|
-
:D9: 9
|
13
|
-
:D10: 10
|
14
|
-
:D11: 11
|
15
|
-
:D12: 12
|
16
|
-
:D13: 13
|
17
|
-
:D14: 14
|
18
|
-
:D15: 15
|
19
|
-
:D16: 16
|
20
|
-
:D17: 17
|
21
|
-
:D18: 18
|
22
|
-
:D19: 19
|
23
|
-
:D20: 20
|
24
|
-
:D21: 21
|
25
|
-
:D22: 22
|
26
|
-
:D23: 23
|
27
|
-
:D24: 24
|
28
|
-
:D25: 25
|
29
|
-
:D26: 26
|
30
|
-
:D27: 27
|
31
|
-
:D28: 28
|
32
|
-
:D29: 29
|
33
|
-
:A0: 26
|
34
|
-
:A1: 27
|
35
|
-
:A2: 28
|
36
|
-
:A3: 29
|
37
|
-
:MISO0: 20
|
38
|
-
:MOSI0: 19
|
39
|
-
:SCK0: 18
|
40
|
-
:SS0: 17
|
41
|
-
:MISO1: 31
|
42
|
-
:MOSI1: 31
|
43
|
-
:SCK1: 31
|
44
|
-
:SS1: 31
|
45
|
-
:SDA0: 2
|
46
|
-
:SCL0: 3
|
47
|
-
:SDA1: 24
|
48
|
-
:SCL1: 25
|