denko 0.13.5 → 0.14.0
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_avr.yml → build_atmega_avr.yml} +18 -18
- data/.github/workflows/{build_megaavr.yml → build_atmega_megaavr.yml} +18 -18
- data/.github/workflows/{build_sam3x.yml → build_atsam3x.yml} +17 -17
- data/.github/workflows/{build_samd.yml → build_atsamd21.yml} +18 -18
- data/.github/workflows/build_esp32.yml +17 -17
- data/.github/workflows/build_esp32c3.yml +57 -0
- data/.github/workflows/build_esp32c6.yml +57 -0
- data/.github/workflows/build_esp32h2.yml +56 -0
- data/.github/workflows/build_esp32s2.yml +57 -0
- data/.github/workflows/build_esp32s3.yml +57 -0
- data/.github/workflows/build_esp8266.yml +15 -15
- data/.github/workflows/build_ra4m1.yml +16 -16
- data/.github/workflows/build_rp2040.yml +17 -16
- data/.github/workflows/ruby.yml +20 -20
- data/CHANGELOG.md +195 -11
- data/DEPS_CLI.md +9 -9
- data/DEPS_IDE.md +17 -18
- data/HARDWARE.md +50 -51
- data/README.md +61 -53
- data/Rakefile +1 -1
- data/benchmarks/analog_listen.rb +49 -0
- data/benchmarks/digital_write.rb +28 -0
- data/benchmarks/i2c_ssd1306_refresh.rb +13 -6
- data/build +1 -1
- data/denko.gemspec +5 -2
- data/examples/advanced/{m5_env.rb → m5_env3.rb} +12 -14
- data/examples/advanced/rotary_encoder_mac_volume.rb +18 -13
- data/examples/advanced/ssd1306_time_temp_rh.rb +8 -13
- data/examples/analog_io/ads1100.rb +48 -0
- data/examples/analog_io/ads1115.rb +2 -2
- data/examples/analog_io/ads1118.rb +3 -11
- data/examples/analog_io/input.rb +17 -16
- data/examples/analog_io/input_smoothing.rb +27 -0
- data/examples/analog_io/potentiometer.rb +31 -0
- data/examples/connection/binary_echo.rb +34 -0
- data/examples/connection/tcp.rb +12 -27
- data/examples/digital_io/button.rb +7 -3
- data/examples/digital_io/relay.rb +17 -0
- data/examples/digital_io/rotary_encoder.rb +21 -11
- data/examples/display/hd44780.rb +13 -5
- data/examples/display/ssd1306.rb +20 -17
- data/examples/display/ssd1306_s2_pico.rb +2 -2
- data/examples/i2c/search.rb +10 -26
- data/examples/led/apa102_bounce.rb +3 -4
- data/examples/led/apa102_fade.rb +44 -0
- data/examples/led/builtin_blink.rb +3 -1
- data/examples/led/builtin_fade.rb +19 -0
- data/examples/led/rgb_led.rb +31 -0
- data/examples/led/seven_segment_char_echo.rb +4 -2
- data/examples/led/ws2812_bounce.rb +5 -7
- data/examples/led/ws2812_builtin_blink.rb +3 -2
- data/examples/led/ws2812_fade.rb +43 -0
- data/examples/motor/l298.rb +10 -8
- data/examples/motor/servo.rb +4 -3
- data/examples/motor/stepper.rb +13 -13
- data/examples/one_wire/search.rb +32 -0
- data/examples/pulse_io/buzzer.rb +8 -3
- data/examples/pulse_io/ir_output.rb +51 -0
- data/examples/pulse_io/pwm_output.rb +30 -0
- data/examples/rtc/ds3231.rb +18 -35
- data/examples/sensor/aht10.rb +4 -6
- data/examples/sensor/aht20.rb +4 -6
- data/examples/sensor/bme280.rb +4 -4
- data/examples/sensor/bmp180.rb +9 -5
- data/examples/sensor/dht.rb +20 -15
- data/examples/sensor/ds18b20.rb +20 -21
- data/examples/sensor/generic_pir.rb +4 -2
- data/examples/sensor/hcsr04.rb +5 -2
- data/examples/sensor/htu21d.rb +9 -20
- data/examples/sensor/htu31d.rb +7 -9
- data/examples/sensor/neat_tph_readings.rb +15 -9
- data/examples/sensor/qmp6988.rb +5 -7
- data/examples/sensor/rcwl9620.rb +3 -3
- data/examples/sensor/sht3x.rb +4 -6
- data/examples/spi/bitbang_loopback.rb +46 -0
- data/examples/spi/input_register.rb +9 -19
- data/examples/spi/output_register.rb +9 -17
- data/examples/spi/ssd_through_registers.rb +28 -0
- data/examples/spi/two_registers.rb +18 -24
- data/examples/uart/bit_bang_demo.rb +25 -0
- data/examples/uart/board_passthrough.rb +19 -13
- data/examples/uart/hardware_loopback.rb +1 -1
- data/lib/denko/analog_io/ads1100.rb +127 -0
- data/lib/denko/analog_io/ads1115.rb +8 -25
- data/lib/denko/analog_io/ads1118.rb +10 -25
- data/lib/denko/analog_io/ads111x.rb +25 -11
- data/lib/denko/analog_io/input.rb +29 -55
- data/lib/denko/analog_io/input_helper.rb +42 -0
- data/lib/denko/analog_io/output.rb +5 -5
- data/lib/denko/analog_io/potentiometer.rb +6 -8
- data/lib/denko/analog_io.rb +2 -1
- data/lib/denko/behaviors/board_proxy.rb +13 -1
- data/lib/denko/behaviors/bus_controller.rb +1 -0
- data/lib/denko/behaviors/bus_controller_addressed.rb +1 -0
- data/lib/denko/behaviors/bus_peripheral.rb +3 -4
- data/lib/denko/behaviors/bus_peripheral_addressed.rb +8 -6
- data/lib/denko/behaviors/callbacks.rb +9 -7
- data/lib/denko/behaviors/component.rb +16 -14
- data/lib/denko/behaviors/input_pin.rb +14 -15
- data/lib/denko/behaviors/lifecycle.rb +51 -0
- data/lib/denko/behaviors/multi_pin.rb +22 -18
- data/lib/denko/behaviors/output_pin.rb +9 -4
- data/lib/denko/behaviors/single_pin.rb +1 -0
- data/lib/denko/behaviors/state.rb +15 -9
- data/lib/denko/behaviors/subcomponents.rb +72 -12
- data/lib/denko/behaviors.rb +2 -1
- data/lib/denko/board/core.rb +36 -18
- data/lib/denko/board/i2c.rb +14 -14
- data/lib/denko/board/i2c_bit_bang.rb +49 -0
- data/lib/denko/board/infrared.rb +6 -6
- data/lib/denko/board/led_array.rb +6 -5
- data/lib/denko/board/spi.rb +15 -10
- data/lib/denko/board/spi_bit_bang.rb +9 -7
- data/lib/denko/board.rb +35 -33
- data/lib/denko/connection/binary_echo.rb +17 -0
- data/lib/denko/connection/flow_control.rb +11 -15
- data/lib/denko/connection/handshake.rb +2 -0
- data/lib/denko/digital_io/button.rb +4 -0
- data/lib/denko/digital_io/c_bit_bang.rb +15 -0
- data/lib/denko/digital_io/input.rb +4 -5
- data/lib/denko/digital_io/output.rb +7 -6
- data/lib/denko/digital_io/relay.rb +2 -0
- data/lib/denko/digital_io/rotary_encoder.rb +78 -60
- data/lib/denko/digital_io.rb +1 -0
- data/lib/denko/display/hd44780.rb +136 -93
- data/lib/denko/display/sh1106.rb +42 -0
- data/lib/denko/display/ssd1306.rb +105 -45
- data/lib/denko/display.rb +1 -0
- data/lib/denko/eeprom/built_in.rb +19 -16
- data/lib/denko/i2c/bit_bang.rb +31 -0
- data/lib/denko/i2c/bus.rb +8 -36
- data/lib/denko/i2c/bus_common.rb +45 -0
- data/lib/denko/i2c/peripheral.rb +28 -19
- data/lib/denko/i2c.rb +2 -0
- data/lib/denko/led/apa102.rb +43 -29
- data/lib/denko/led/base.rb +8 -2
- data/lib/denko/led/rgb.rb +5 -7
- data/lib/denko/led/seven_segment.rb +24 -9
- data/lib/denko/led/ws2812.rb +10 -7
- data/lib/denko/message.rb +5 -0
- data/lib/denko/motor/l298.rb +11 -10
- data/lib/denko/motor/servo.rb +22 -10
- data/lib/denko/motor/stepper.rb +11 -14
- data/lib/denko/mutex_stub.rb +7 -0
- data/lib/denko/one_wire/bus.rb +9 -5
- data/lib/denko/one_wire/peripheral.rb +0 -3
- data/lib/denko/pulse_io/buzzer.rb +9 -3
- data/lib/denko/pulse_io/{ir_transmitter.rb → ir_output.rb} +9 -4
- data/lib/denko/pulse_io/pwm_output.rb +69 -15
- data/lib/denko/pulse_io.rb +3 -3
- data/lib/denko/rtc/ds3231.rb +11 -13
- data/lib/denko/sensor/aht.rb +22 -21
- data/lib/denko/sensor/bme280.rb +60 -63
- data/lib/denko/sensor/bmp180.rb +41 -38
- data/lib/denko/sensor/dht.rb +22 -5
- data/lib/denko/sensor/ds18b20.rb +40 -34
- data/lib/denko/sensor/hcsr04.rb +7 -5
- data/lib/denko/sensor/helper.rb +37 -0
- data/lib/denko/sensor/htu21d.rb +44 -55
- data/lib/denko/sensor/htu31d.rb +32 -33
- data/lib/denko/sensor/qmp6988.rb +25 -23
- data/lib/denko/sensor/rcwl9620.rb +2 -5
- data/lib/denko/sensor/sht3x.rb +23 -21
- data/lib/denko/sensor.rb +1 -2
- data/lib/denko/spi/base_register.rb +22 -22
- data/lib/denko/spi/bit_bang.rb +17 -51
- data/lib/denko/spi/bus.rb +15 -29
- data/lib/denko/spi/bus_common.rb +36 -0
- data/lib/denko/spi/input_register.rb +36 -30
- data/lib/denko/spi/output_register.rb +25 -40
- data/lib/denko/spi/peripheral.rb +93 -24
- data/lib/denko/spi.rb +6 -1
- data/lib/denko/uart/bit_bang.rb +5 -3
- data/lib/denko/uart/hardware.rb +9 -8
- data/lib/denko/version.rb +1 -1
- data/lib/denko.rb +10 -0
- data/lib/denko_cli/generator.rb +2 -2
- data/lib/denko_cli/packages.rb +8 -10
- data/lib/denko_cli/targets.rb +8 -8
- data/lib/denko_cli/targets.txt +4 -4
- data/lib/denko_cli/usage.txt +1 -1
- data/src/denko_ethernet.ino +0 -14
- data/src/denko_serial.ino +0 -14
- data/src/denko_wifi.ino +6 -15
- data/src/lib/Denko.cpp +39 -3
- data/src/lib/Denko.h +42 -26
- data/src/lib/DenkoCoreIO.cpp +60 -103
- data/src/lib/DenkoDefines.h +36 -31
- data/src/lib/DenkoI2C.cpp +54 -45
- data/src/lib/DenkoI2CBB.cpp +238 -0
- data/src/lib/DenkoIROut.cpp +12 -7
- data/src/lib/DenkoLEDArray.cpp +36 -13
- data/src/lib/DenkoSPI.cpp +6 -5
- data/src/lib/DenkoSPIBB.cpp +7 -6
- data/target.yml +37 -2
- data/test/analog_io/potentiometer_test.rb +10 -10
- data/test/behaviors/board_proxy_test.rb +1 -1
- data/test/behaviors/callbacks_test.rb +11 -3
- data/test/behaviors/component_test.rb +17 -9
- data/test/behaviors/input_pin_test.rb +14 -9
- data/test/behaviors/multi_pin_test.rb +14 -4
- data/test/behaviors/output_pin_test.rb +11 -8
- data/test/behaviors/poller_test.rb +1 -0
- data/test/behaviors/reader_test.rb +3 -2
- data/test/behaviors/subcomponents_test.rb +22 -2
- data/test/board/core_test.rb +15 -11
- data/test/board/i2c_test.rb +39 -33
- data/test/board/infrared_test.rb +1 -1
- data/test/board/message_test.rb +17 -11
- data/test/board/spi_test.rb +21 -21
- data/test/digital_io/button_test.rb +15 -0
- data/test/digital_io/relay_test.rb +18 -0
- data/test/digital_io/rotary_encoder_test.rb +80 -60
- data/test/eeprom/built_in_test.rb +9 -9
- data/test/i2c/bus_test.rb +30 -14
- data/test/i2c/peripheral_test.rb +36 -17
- data/test/led/base_test.rb +2 -1
- data/test/led/rgb_test.rb +6 -6
- data/test/led/seven_segment_test.rb +7 -7
- data/test/motor/servo_test.rb +1 -1
- data/test/motor/stepper_test.rb +2 -2
- data/test/one_wire/bus_test.rb +1 -0
- data/test/pulse_io/buzzer_test.rb +7 -4
- data/test/pulse_io/{ir_transmitter_test.rb → ir_output_test.rb} +10 -10
- data/test/pulse_io/pwm_output_test.rb +74 -18
- data/test/rtc/ds3231_test.rb +11 -13
- data/test/sensor/dht_test.rb +1 -1
- data/test/sensor/ds18b20_test.rb +4 -8
- data/test/spi/bus_test.rb +7 -7
- data/test/spi/input_register_test.rb +15 -15
- data/test/spi/output_register_test.rb +10 -28
- data/test/spi/peripheral_multi_pin_test.rb +53 -0
- data/test/spi/peripheral_single_pin_test.rb +48 -0
- data/test/test_helper.rb +36 -33
- data/tutorial/02-button/button.rb +5 -4
- data/tutorial/03-potentiometer/potentiometer.rb +9 -5
- data/tutorial/04-pwm_led/pwm_led.rb +14 -16
- data/tutorial/05-rgb_led/rgb_led.rb +6 -6
- data/tutorial/05-rgb_led/rgb_mapping.rb +11 -11
- data/vendor/board-maps/.gitignore +56 -0
- data/vendor/board-maps/.gitmodules +24 -0
- data/vendor/board-maps/BoardMap.h +1852 -0
- data/vendor/board-maps/README.md +52 -0
- data/vendor/board-maps/lib/boards_parser.rb +66 -0
- data/vendor/board-maps/lib/header_parser.rb +199 -0
- data/vendor/board-maps/run.rb +57 -0
- data/vendor/board-maps/yaml/0XCB_HELIOS.yml +48 -0
- data/vendor/board-maps/yaml/ADAFRUIT_CAMERA_ESP32S3.yml +11 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32C6.yml +15 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S2.yml +25 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S2_REVTFT.yml +25 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S2_TFT.yml +27 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S3.yml +34 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S3_NOPSRAM.yml +34 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S3_REVTFT.yml +25 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32S3_TFT.yml +27 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_ESP32_V2.yml +34 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_ADALOGGER.yml +44 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_CAN.yml +48 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_DVI.yml +48 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_PROP_MAKER.yml +48 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_RFM.yml +48 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_SCORPIO.yml +48 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_THINKINK.yml +48 -0
- data/vendor/board-maps/yaml/ADAFRUIT_FEATHER_RP2040_USB_HOST.yml +48 -0
- data/vendor/board-maps/yaml/ADAFRUIT_ITSYBITSY_ESP32.yml +24 -0
- data/vendor/board-maps/yaml/ADAFRUIT_ITSYBITSY_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/ADAFRUIT_KB2040_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/ADAFRUIT_MACROPAD_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/ADAFRUIT_MATRIXPORTAL_ESP32S3.yml +16 -0
- data/vendor/board-maps/yaml/ADAFRUIT_METRO_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/ADAFRUIT_QTPY_ESP32C3.yml +13 -0
- data/vendor/board-maps/yaml/ADAFRUIT_QTPY_ESP32S2.yml +23 -0
- data/vendor/board-maps/yaml/ADAFRUIT_QTPY_ESP32S3_N4R2.yml +21 -0
- data/vendor/board-maps/yaml/ADAFRUIT_QTPY_ESP32S3_NOPSRAM.yml +21 -0
- data/vendor/board-maps/yaml/ADAFRUIT_QTPY_ESP32_PICO.yml +29 -0
- data/vendor/board-maps/yaml/ADAFRUIT_QTPY_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/ADAFRUIT_STEMMAFRIEND_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/ADAFRUIT_TRINKEYQT_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/ALKS.yml +34 -0
- data/vendor/board-maps/yaml/AMKEN_BB.yml +48 -0
- data/vendor/board-maps/yaml/AMKEN_ES.yml +48 -0
- data/vendor/board-maps/yaml/AMKEN_REVELOP.yml +48 -0
- data/vendor/board-maps/yaml/AMKEN_REVELOP_PLUS.yml +48 -0
- data/vendor/board-maps/yaml/AMPERKA_WIFI_SLOT.yml +16 -0
- data/vendor/board-maps/yaml/ARTRONSHOP_RP2_NANO.yml +32 -0
- data/vendor/board-maps/yaml/ASL_CAN_X2.yml +41 -0
- data/vendor/board-maps/yaml/ATD143_S3.yml +41 -0
- data/vendor/board-maps/yaml/AVENTEN_S3_SYNC.yml +38 -0
- data/vendor/board-maps/yaml/AVR_ADK.yml +24 -0
- data/vendor/board-maps/yaml/AVR_BT.yml +16 -0
- data/vendor/board-maps/yaml/AVR_CIRCUITPLAY.yml +14 -0
- data/vendor/board-maps/yaml/AVR_DUEMILANOVE.yml +16 -0
- data/vendor/board-maps/yaml/AVR_ESPLORA.yml +20 -0
- data/vendor/board-maps/yaml/AVR_ETHERNET.yml +16 -0
- data/vendor/board-maps/yaml/AVR_FIO.yml +16 -0
- data/vendor/board-maps/yaml/AVR_GEMMA.yml +6 -0
- data/vendor/board-maps/yaml/AVR_INDUSTRIAL101.yml +20 -0
- data/vendor/board-maps/yaml/AVR_LEONARDO.yml +20 -0
- data/vendor/board-maps/yaml/AVR_LEONARDO_ETH.yml +20 -0
- data/vendor/board-maps/yaml/AVR_LILYPAD.yml +16 -0
- data/vendor/board-maps/yaml/AVR_LILYPAD_USB.yml +20 -0
- data/vendor/board-maps/yaml/AVR_LININO_ONE.yml +20 -0
- data/vendor/board-maps/yaml/AVR_MEGA.yml +24 -0
- data/vendor/board-maps/yaml/AVR_MEGA2560.yml +24 -0
- data/vendor/board-maps/yaml/AVR_MICRO.yml +20 -0
- data/vendor/board-maps/yaml/AVR_MINI.yml +16 -0
- data/vendor/board-maps/yaml/AVR_NANO.yml +16 -0
- data/vendor/board-maps/yaml/AVR_NANO_EVERY.yml +22 -0
- data/vendor/board-maps/yaml/AVR_NG.yml +16 -0
- data/vendor/board-maps/yaml/AVR_PRO.yml +16 -0
- data/vendor/board-maps/yaml/AVR_ROBOT_CONTROL.yml +22 -0
- data/vendor/board-maps/yaml/AVR_ROBOT_MOTOR.yml +19 -0
- data/vendor/board-maps/yaml/AVR_UNO.yml +16 -0
- data/vendor/board-maps/yaml/AVR_UNO_WIFI_DEV_ED.yml +16 -0
- data/vendor/board-maps/yaml/AVR_UNO_WIFI_REV2.yml +22 -0
- data/vendor/board-maps/yaml/AVR_YUN.yml +20 -0
- data/vendor/board-maps/yaml/AVR_YUNMINI.yml +20 -0
- data/vendor/board-maps/yaml/AirM2M_CORE_ESP32C3.yml +14 -0
- data/vendor/board-maps/yaml/BEE_DATA_LOGGER.yml +39 -0
- data/vendor/board-maps/yaml/BLING.yml +25 -0
- data/vendor/board-maps/yaml/BPI_BIT.yml +9 -0
- data/vendor/board-maps/yaml/BPI_LEAF_S3.yml +42 -0
- data/vendor/board-maps/yaml/BRIDGETEK_IDM2040_43A.yml +48 -0
- data/vendor/board-maps/yaml/BRIDGETEK_IDM2040_7A.yml +48 -0
- data/vendor/board-maps/yaml/BeeMotionS3.yml +45 -0
- data/vendor/board-maps/yaml/Bee_Motion.yml +30 -0
- data/vendor/board-maps/yaml/Bee_Motion_Mini.yml +13 -0
- data/vendor/board-maps/yaml/Bee_S3.yml +38 -0
- data/vendor/board-maps/yaml/Breadstick_Raspberry.yml +31 -0
- data/vendor/board-maps/yaml/CHALLENGER_2040_LORA_RP2040.yml +39 -0
- data/vendor/board-maps/yaml/CHALLENGER_2040_LTE_RP2040.yml +38 -0
- data/vendor/board-maps/yaml/CHALLENGER_2040_NFC_RP2040.yml +32 -0
- data/vendor/board-maps/yaml/CHALLENGER_2040_SDRTC_RP2040.yml +36 -0
- data/vendor/board-maps/yaml/CHALLENGER_2040_SUBGHZ_RP2040.yml +39 -0
- data/vendor/board-maps/yaml/CHALLENGER_2040_UWB_RP2040.yml +39 -0
- data/vendor/board-maps/yaml/CHALLENGER_2040_WIFI6_BLE_RP2040.yml +42 -0
- data/vendor/board-maps/yaml/CHALLENGER_2040_WIFI_BLE_RP2040.yml +42 -0
- data/vendor/board-maps/yaml/CHALLENGER_2040_WIFI_RP2040.yml +38 -0
- data/vendor/board-maps/yaml/CHALLENGER_NB_2040_WIFI_RP2040.yml +38 -0
- data/vendor/board-maps/yaml/CONNECTIVITY_2040_LTE_WIFI_BLE_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/CRABIK_SLOT_ESP32_S3.yml +19 -0
- data/vendor/board-maps/yaml/CYTRON_MAKER_FEATHER_AIOT_S3.yml +29 -0
- data/vendor/board-maps/yaml/CYTRON_MAKER_NANO_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/CYTRON_MAKER_PI_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/CYTRON_MAKER_UNO_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/CoreESP32.yml +53 -0
- data/vendor/board-maps/yaml/D1_MINI32.yml +45 -0
- data/vendor/board-maps/yaml/D1_UNO32.yml +28 -0
- data/vendor/board-maps/yaml/DATANOISETV_PICOADK.yml +48 -0
- data/vendor/board-maps/yaml/DEGZ_SUIBO_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/DENKY.yml +35 -0
- data/vendor/board-maps/yaml/DENKY_PICOV3.yml +35 -0
- data/vendor/board-maps/yaml/DENKY_WROOM32.yml +35 -0
- data/vendor/board-maps/yaml/DEPARTMENT_OF_ALCHEMY_MINIMAIN_ESP32S2.yml +26 -0
- data/vendor/board-maps/yaml/DFROBOT_BEETLE_ESP32C6.yml +8 -0
- data/vendor/board-maps/yaml/DFROBOT_BEETLE_ESP32_C3.yml +14 -0
- data/vendor/board-maps/yaml/DFROBOT_BEETLE_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/DFROBOT_FIREBEETLE_2_ESP32C6.yml +20 -0
- data/vendor/board-maps/yaml/DFROBOT_FIREBEETLE_2_ESP32E.yml +49 -0
- data/vendor/board-maps/yaml/DFROBOT_FIREBEETLE_2_ESP32S3.yml +38 -0
- data/vendor/board-maps/yaml/DFROBOT_FIREBEETLE_ESP32.yml +46 -0
- data/vendor/board-maps/yaml/DFROBOT_ROMEO_ESP32S3.yml +7 -0
- data/vendor/board-maps/yaml/DPTECHNICS_WALTER.yml +39 -0
- data/vendor/board-maps/yaml/DPU_ESP32.yml +35 -0
- data/vendor/board-maps/yaml/DYDK.yml +38 -0
- data/vendor/board-maps/yaml/DYDK1A.yml +37 -0
- data/vendor/board-maps/yaml/DYDK1Av2.yml +45 -0
- data/vendor/board-maps/yaml/DYG.yml +20 -0
- data/vendor/board-maps/yaml/DYM.yml +40 -0
- data/vendor/board-maps/yaml/DYMv2.yml +39 -0
- data/vendor/board-maps/yaml/D_Duino_32.yml +37 -0
- data/vendor/board-maps/yaml/ELECROW_CROWPANEL_7.yml +8 -0
- data/vendor/board-maps/yaml/ELECTRONICCATS_HUNTERCAT_NFC.yml +44 -0
- data/vendor/board-maps/yaml/ESP320.yml +8 -0
- data/vendor/board-maps/yaml/ESP32C2_DEV.yml +12 -0
- data/vendor/board-maps/yaml/ESP32C3_DEV.yml +14 -0
- data/vendor/board-maps/yaml/ESP32C3_DEVKIT_LIPO.yml +14 -0
- data/vendor/board-maps/yaml/ESP32C3_M1_I_KIT.yml +13 -0
- data/vendor/board-maps/yaml/ESP32C6_DEV.yml +15 -0
- data/vendor/board-maps/yaml/ESP32C6_EVB.yml +15 -0
- data/vendor/board-maps/yaml/ESP32C6_QWIIC_POCKET.yml +15 -0
- data/vendor/board-maps/yaml/ESP32C6_THING_PLUS.yml +15 -0
- data/vendor/board-maps/yaml/ESP32H2_DEV.yml +13 -0
- data/vendor/board-maps/yaml/ESP32H2_DEVKIT_LIPO.yml +13 -0
- data/vendor/board-maps/yaml/ESP32S2_DEV.yml +44 -0
- data/vendor/board-maps/yaml/ESP32S2_DEVKIT_LIPO.yml +44 -0
- data/vendor/board-maps/yaml/ESP32S2_DEVKIT_LIPO_USB.yml +44 -0
- data/vendor/board-maps/yaml/ESP32S2_THING_PLUS.yml +44 -0
- data/vendor/board-maps/yaml/ESP32S2_USB.yml +43 -0
- data/vendor/board-maps/yaml/ESP32S3_CAM_LCD.yml +7 -0
- data/vendor/board-maps/yaml/ESP32S3_DEV.yml +38 -0
- data/vendor/board-maps/yaml/ESP32S3_DEVKIT_LIPO.yml +42 -0
- data/vendor/board-maps/yaml/ESP32S3_POWERFEATHER.yml +22 -0
- data/vendor/board-maps/yaml/ESP32_DEV.yml +35 -0
- data/vendor/board-maps/yaml/ESP32_DEVKIT_LIPO.yml +35 -0
- data/vendor/board-maps/yaml/ESP32_EVB.yml +7 -0
- data/vendor/board-maps/yaml/ESP32_GATEWAY.yml +13 -0
- data/vendor/board-maps/yaml/ESP32_GATEWAY_C.yml +13 -0
- data/vendor/board-maps/yaml/ESP32_GATEWAY_E.yml +13 -0
- data/vendor/board-maps/yaml/ESP32_GATEWAY_F.yml +13 -0
- data/vendor/board-maps/yaml/ESP32_IOT_REDBOARD.yml +36 -0
- data/vendor/board-maps/yaml/ESP32_MICROMOD.yml +24 -0
- data/vendor/board-maps/yaml/ESP32_PICO.yml +35 -0
- data/vendor/board-maps/yaml/ESP32_POE.yml +7 -0
- data/vendor/board-maps/yaml/ESP32_POE_ISO.yml +7 -0
- data/vendor/board-maps/yaml/ESP32_S3R8N16.yml +3 -0
- data/vendor/board-maps/yaml/ESP32_S3_BOX.yml +19 -0
- data/vendor/board-maps/yaml/ESP32_S3_USB_OTG.yml +11 -0
- data/vendor/board-maps/yaml/ESP32_SBC_FABGL.yml +35 -0
- data/vendor/board-maps/yaml/ESP32_THING.yml +36 -0
- data/vendor/board-maps/yaml/ESP32_THING_PLUS.yml +33 -0
- data/vendor/board-maps/yaml/ESP32_THING_PLUS_C.yml +33 -0
- data/vendor/board-maps/yaml/ESP32_WROOM_DA.yml +35 -0
- data/vendor/board-maps/yaml/ESP32_WROVER_KIT.yml +35 -0
- data/vendor/board-maps/yaml/ESP8266_ADAFRUIT_HUZZAH.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_AGRUMINO_LEMON_V4.yml +8 -0
- data/vendor/board-maps/yaml/ESP8266_ARDUINO_PRIMO.yml +7 -0
- data/vendor/board-maps/yaml/ESP8266_ARDUINO_STAR_OTTO.yml +7 -0
- data/vendor/board-maps/yaml/ESP8266_ARDUINO_UNOWIFI.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_ESP01.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_ESP07.yml +20 -0
- data/vendor/board-maps/yaml/ESP8266_ESP12.yml +20 -0
- data/vendor/board-maps/yaml/ESP8266_ESP13.yml +17 -0
- data/vendor/board-maps/yaml/ESP8266_ESP210.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_ESPECTRO_CORE.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_ESPINO_ESP12.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_ESPINO_ESP13.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_ESPRESSO_LITE_V1.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_ESPRESSO_LITE_V2.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_GENERIC.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_INVENT_ONE.yml +22 -0
- data/vendor/board-maps/yaml/ESP8266_NODEMCU_ESP12.yml +20 -0
- data/vendor/board-maps/yaml/ESP8266_NODEMCU_ESP12E.yml +20 -0
- data/vendor/board-maps/yaml/ESP8266_OAK.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_PHOENIX_V1.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_PHOENIX_V2.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_SCHIRMILABS_EDUINO_WIFI.yml +25 -0
- data/vendor/board-maps/yaml/ESP8266_SONOFF_BASIC.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_SONOFF_S20.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_SONOFF_SV.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_SONOFF_TH.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_THING.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_THING_DEV.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_WEMOS_D1MINI.yml +18 -0
- data/vendor/board-maps/yaml/ESP8266_WEMOS_D1MINILITE.yml +18 -0
- data/vendor/board-maps/yaml/ESP8266_WEMOS_D1MINIPRO.yml +18 -0
- data/vendor/board-maps/yaml/ESP8266_WEMOS_D1R1.yml +25 -0
- data/vendor/board-maps/yaml/ESP8266_WEMOS_D1WROOM02.yml +18 -0
- data/vendor/board-maps/yaml/ESP8266_WIO_LINK.yml +9 -0
- data/vendor/board-maps/yaml/ESP8266_XINABOX_CW01.yml +9 -0
- data/vendor/board-maps/yaml/ESPECTRO32.yml +36 -0
- data/vendor/board-maps/yaml/ESPea32.yml +36 -0
- data/vendor/board-maps/yaml/ESPino32.yml +36 -0
- data/vendor/board-maps/yaml/ET-Board.yml +26 -0
- data/vendor/board-maps/yaml/EVN_ALPHA.yml +48 -0
- data/vendor/board-maps/yaml/EXTREMEELEXTRONICS_RC2040.yml +46 -0
- data/vendor/board-maps/yaml/Edgebox-ESP-100.yml +7 -0
- data/vendor/board-maps/yaml/FEATHERS2.yml +43 -0
- data/vendor/board-maps/yaml/FEATHERS2NEO.yml +31 -0
- data/vendor/board-maps/yaml/FEATHERS3.yml +32 -0
- data/vendor/board-maps/yaml/FEATHERS3NEO.yml +32 -0
- data/vendor/board-maps/yaml/FEATHER_ESP32.yml +32 -0
- data/vendor/board-maps/yaml/FLYBOARD2040_CORE.yml +48 -0
- data/vendor/board-maps/yaml/FRANZININHO_WIFI.yml +43 -0
- data/vendor/board-maps/yaml/FRANZININHO_WIFI_MSC.yml +43 -0
- data/vendor/board-maps/yaml/FROG_ESP32.yml +35 -0
- data/vendor/board-maps/yaml/FUNHOUSE_ESP32S2.yml +22 -0
- data/vendor/board-maps/yaml/GEEKBLE_ESP32C3.yml +14 -0
- data/vendor/board-maps/yaml/GEN4_IOD.yml +9 -0
- data/vendor/board-maps/yaml/GENERIC_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/HEALTHYPI_4.yml +36 -0
- data/vendor/board-maps/yaml/HELTEC_CAPSULE_SENSOR_V3.yml +43 -0
- data/vendor/board-maps/yaml/HELTEC_WIFI_LORA_32_V3.yml +42 -0
- data/vendor/board-maps/yaml/HELTEC_WIRELESS_BRIDGE.yml +8 -0
- data/vendor/board-maps/yaml/HELTEC_WIRELESS_MINI_SHELL.yml +13 -0
- data/vendor/board-maps/yaml/HELTEC_WIRELESS_PAPER.yml +42 -0
- data/vendor/board-maps/yaml/HELTEC_WIRELESS_SHELL_V3.yml +42 -0
- data/vendor/board-maps/yaml/HELTEC_WIRELESS_STICK_LITE_V3.yml +30 -0
- data/vendor/board-maps/yaml/HELTEC_WIRELESS_STICK_V3.yml +41 -0
- data/vendor/board-maps/yaml/HELTEC_WIRELESS_TRACKER.yml +41 -0
- data/vendor/board-maps/yaml/HONEYLEMON.yml +36 -0
- data/vendor/board-maps/yaml/HORNBILL_ESP32_DEV.yml +36 -0
- data/vendor/board-maps/yaml/HORNBILL_ESP32_MINIMA.yml +19 -0
- data/vendor/board-maps/yaml/HT_DE01.yml +42 -0
- data/vendor/board-maps/yaml/ILABS_2040_RPICO32_RP2040.yml +47 -0
- data/vendor/board-maps/yaml/IMBRIOS_LOGSENS_V1P1.yml +23 -0
- data/vendor/board-maps/yaml/INTOROBOT_ESP32_DEV.yml +34 -0
- data/vendor/board-maps/yaml/IOXESP32.yml +36 -0
- data/vendor/board-maps/yaml/IOXESP32PS.yml +36 -0
- data/vendor/board-maps/yaml/LILYGO_T3S3_LR1121.yml +9 -0
- data/vendor/board-maps/yaml/LILYGO_T3S3_SX1262.yml +9 -0
- data/vendor/board-maps/yaml/LILYGO_T3S3_SX1276.yml +9 -0
- data/vendor/board-maps/yaml/LILYGO_T3S3_SX1278.yml +9 -0
- data/vendor/board-maps/yaml/LILYGO_T3S3_SX1280.yml +9 -0
- data/vendor/board-maps/yaml/LILYGO_T3S3_SX1280PA.yml +8 -0
- data/vendor/board-maps/yaml/LILYGO_T_DISPLAY.yml +35 -0
- data/vendor/board-maps/yaml/LILYGO_T_DISPLAY_S3.yml +32 -0
- data/vendor/board-maps/yaml/LILYGO_T_ETH_LITE.yml +21 -0
- data/vendor/board-maps/yaml/LIONBITS3_DEV.yml +34 -0
- data/vendor/board-maps/yaml/LOLIN32.yml +36 -0
- data/vendor/board-maps/yaml/LOLIN32_LITE.yml +36 -0
- data/vendor/board-maps/yaml/LOLIN_C3_MINI.yml +14 -0
- data/vendor/board-maps/yaml/LOLIN_C3_PICO.yml +14 -0
- data/vendor/board-maps/yaml/LOLIN_D32.yml +36 -0
- data/vendor/board-maps/yaml/LOLIN_D32_PRO.yml +36 -0
- data/vendor/board-maps/yaml/LOLIN_S2_MINI.yml +44 -0
- data/vendor/board-maps/yaml/LOLIN_S2_PICO.yml +44 -0
- data/vendor/board-maps/yaml/LOLIN_S3.yml +40 -0
- data/vendor/board-maps/yaml/LOLIN_S3_MINI.yml +40 -0
- data/vendor/board-maps/yaml/LOLIN_S3_MINI_PRO.yml +40 -0
- data/vendor/board-maps/yaml/LOLIN_S3_PRO.yml +40 -0
- data/vendor/board-maps/yaml/Lion_Bit_Dev_Board.yml +16 -0
- data/vendor/board-maps/yaml/LoPy.yml +38 -0
- data/vendor/board-maps/yaml/LoPy4.yml +38 -0
- data/vendor/board-maps/yaml/M5STACK_CAPSULE.yml +8 -0
- data/vendor/board-maps/yaml/M5STACK_CARDPUTER.yml +8 -0
- data/vendor/board-maps/yaml/M5STACK_CORE.yml +10 -0
- data/vendor/board-maps/yaml/M5STACK_CORES3.yml +8 -0
- data/vendor/board-maps/yaml/M5STACK_Core2.yml +9 -0
- data/vendor/board-maps/yaml/M5STACK_DIAL.yml +8 -0
- data/vendor/board-maps/yaml/M5STACK_FIRE.yml +9 -0
- data/vendor/board-maps/yaml/M5STACK_NANOC6.yml +17 -0
- data/vendor/board-maps/yaml/M5STACK_PAPER.yml +9 -0
- data/vendor/board-maps/yaml/M5STACK_POE_CAM.yml +5 -0
- data/vendor/board-maps/yaml/M5STACK_STAMP_C3.yml +13 -0
- data/vendor/board-maps/yaml/M5STACK_STAMP_PICO.yml +7 -0
- data/vendor/board-maps/yaml/M5STACK_STAMP_S3.yml +4 -0
- data/vendor/board-maps/yaml/M5STACK_STICKC.yml +9 -0
- data/vendor/board-maps/yaml/M5STACK_STICKC_PLUS.yml +9 -0
- data/vendor/board-maps/yaml/M5STACK_STICKC_PLUS2.yml +9 -0
- data/vendor/board-maps/yaml/M5STACK_TIMER_CAM.yml +10 -0
- data/vendor/board-maps/yaml/M5STACK_TOUGH.yml +9 -0
- data/vendor/board-maps/yaml/M5STACK_UNIT_CAM.yml +10 -0
- data/vendor/board-maps/yaml/M5STACK_UNIT_CAMS3.yml +4 -0
- data/vendor/board-maps/yaml/M5Stack_ATOM.yml +9 -0
- data/vendor/board-maps/yaml/M5Stack_ATOMS3.yml +7 -0
- data/vendor/board-maps/yaml/M5Stack_CoreInk.yml +9 -0
- data/vendor/board-maps/yaml/M5Stack_Station.yml +10 -0
- data/vendor/board-maps/yaml/MAGTAG29_ESP32S2.yml +31 -0
- data/vendor/board-maps/yaml/MAKERGO_C3_SUPERMINI.yml +14 -0
- data/vendor/board-maps/yaml/MARBLE_PICO.yml +48 -0
- data/vendor/board-maps/yaml/MELOPERO_COOKIE_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/MELOPERO_SHAKE_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/METEHOCA_AKANA_R1.yml +46 -0
- data/vendor/board-maps/yaml/METRO_ESP32S2.yml +44 -0
- data/vendor/board-maps/yaml/METRO_ESP32S3.yml +42 -0
- data/vendor/board-maps/yaml/MGBOT_IOTIK32A.yml +36 -0
- data/vendor/board-maps/yaml/MGBOT_IOTIK32B.yml +36 -0
- data/vendor/board-maps/yaml/MH_ET_LIVE_ESP32DEVKIT.yml +36 -0
- data/vendor/board-maps/yaml/MH_ET_LIVE_ESP32MINIKIT.yml +36 -0
- data/vendor/board-maps/yaml/MICROS2.yml +44 -0
- data/vendor/board-maps/yaml/MINIMA.yml +15 -0
- data/vendor/board-maps/yaml/MOD_WIFI_ESP8266.yml +9 -0
- data/vendor/board-maps/yaml/Metro.yml +8 -0
- data/vendor/board-maps/yaml/NAMINO_ARANCIO.yml +3 -0
- data/vendor/board-maps/yaml/NAMINO_BIANCO.yml +13 -0
- data/vendor/board-maps/yaml/NAMINO_ROSSO.yml +3 -0
- data/vendor/board-maps/yaml/NANO32.yml +36 -0
- data/vendor/board-maps/yaml/NANOS3.yml +25 -0
- data/vendor/board-maps/yaml/NANO_ESP32.yml +18 -0
- data/vendor/board-maps/yaml/NANO_RP2040_CONNECT.yml +35 -0
- data/vendor/board-maps/yaml/NEBULAS3.yml +32 -0
- data/vendor/board-maps/yaml/NEKOSYSTEMS_BL2040_MINI.yml +48 -0
- data/vendor/board-maps/yaml/NEWSAN_ARCHI.yml +48 -0
- data/vendor/board-maps/yaml/NOLOGO_ESP32C3_SUPER_MINI.yml +14 -0
- data/vendor/board-maps/yaml/NOLOGO_ESP32S3_PICO.yml +12 -0
- data/vendor/board-maps/yaml/NULLBITS_BIT_C_PRO.yml +48 -0
- data/vendor/board-maps/yaml/Node32s.yml +36 -0
- data/vendor/board-maps/yaml/NodeMCU_32S.yml +36 -0
- data/vendor/board-maps/yaml/ODROID_ESP32.yml +10 -0
- data/vendor/board-maps/yaml/OLIMEX_RP2040_PICO30_16MB.yml +48 -0
- data/vendor/board-maps/yaml/OLIMEX_RP2040_PICO30_2MB.yml +48 -0
- data/vendor/board-maps/yaml/ONEHORSE_ESP32_DEV.yml +34 -0
- data/vendor/board-maps/yaml/OPTA_ANALOG.yml +7 -0
- data/vendor/board-maps/yaml/OPTA_DIGITAL.yml +5 -0
- data/vendor/board-maps/yaml/OROCA_EDUBOT.yml +33 -0
- data/vendor/board-maps/yaml/PIMORONI_PGA2040.yml +48 -0
- data/vendor/board-maps/yaml/PIMORONI_PLASMA2040.yml +29 -0
- data/vendor/board-maps/yaml/PIMORONI_TINY2040.yml +44 -0
- data/vendor/board-maps/yaml/PINTRONIX_PINMAX.yml +42 -0
- data/vendor/board-maps/yaml/PORTENTA_C33.yml +28 -0
- data/vendor/board-maps/yaml/PROS3.yml +33 -0
- data/vendor/board-maps/yaml/PYCOM_GPY.yml +38 -0
- data/vendor/board-maps/yaml/Piranha.yml +22 -0
- data/vendor/board-maps/yaml/Pocket32.yml +36 -0
- data/vendor/board-maps/yaml/QUALIA_S3_RGB666.yml +15 -0
- data/vendor/board-maps/yaml/QUANTUM.yml +35 -0
- data/vendor/board-maps/yaml/RAKWIRELESS_RAK11300.yml +47 -0
- data/vendor/board-maps/yaml/RASPBERRY_PI_PICO.yml +48 -0
- data/vendor/board-maps/yaml/RASPBERRY_PI_PICO_W.yml +48 -0
- data/vendor/board-maps/yaml/REDPILL_ESP32S3.yml +41 -0
- data/vendor/board-maps/yaml/REDSCORP_RP2040_EINS.yml +35 -0
- data/vendor/board-maps/yaml/REDSCORP_RP2040_PROMINI.yml +35 -0
- data/vendor/board-maps/yaml/SAMD_CIRCUITPLAYGROUND_EXPRESS.yml +11 -0
- data/vendor/board-maps/yaml/SAMD_MKR1000.yml +20 -0
- data/vendor/board-maps/yaml/SAMD_MKRFox1200.yml +19 -0
- data/vendor/board-maps/yaml/SAMD_MKRGSM1400.yml +15 -0
- data/vendor/board-maps/yaml/SAMD_MKRNB1500.yml +15 -0
- data/vendor/board-maps/yaml/SAMD_MKRVIDOR4000.yml +19 -0
- data/vendor/board-maps/yaml/SAMD_MKRWAN1300.yml +18 -0
- data/vendor/board-maps/yaml/SAMD_MKRWAN1310.yml +18 -0
- data/vendor/board-maps/yaml/SAMD_MKRWIFI1010.yml +19 -0
- data/vendor/board-maps/yaml/SAMD_MKRZERO.yml +19 -0
- data/vendor/board-maps/yaml/SAMD_NANO_33_IOT.yml +13 -0
- data/vendor/board-maps/yaml/SAMD_TIAN.yml +15 -0
- data/vendor/board-maps/yaml/SAMD_ZERO.yml +14 -0
- data/vendor/board-maps/yaml/SAM_DUE.yml +28 -0
- data/vendor/board-maps/yaml/SAM_ZERO.yml +15 -0
- data/vendor/board-maps/yaml/SEA_PICRO.yml +48 -0
- data/vendor/board-maps/yaml/SEEED_INDICATOR_RP2040.yml +47 -0
- data/vendor/board-maps/yaml/SEEED_XIAO_RP2040.yml +29 -0
- data/vendor/board-maps/yaml/SENSEBOX_MCU_ESP32S2.yml +12 -0
- data/vendor/board-maps/yaml/SILICOGNITION_RP2040_SHIM.yml +30 -0
- data/vendor/board-maps/yaml/SOLDERPARTY_RP2040_STAMP.yml +48 -0
- data/vendor/board-maps/yaml/SONOFF_DUALR3.yml +35 -0
- data/vendor/board-maps/yaml/SPARKFUN_MICROMOD_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/SPARKFUN_PROMICRO_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/SPARKFUN_PRO_MICRO_ESP32C3.yml +24 -0
- data/vendor/board-maps/yaml/SPARKFUN_THINGPLUS_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/TAMC_TERMOD_S3.yml +41 -0
- data/vendor/board-maps/yaml/TBEAM_USE_RADIO_SX1262.yml +28 -0
- data/vendor/board-maps/yaml/TBEAM_USE_RADIO_SX1268.yml +28 -0
- data/vendor/board-maps/yaml/TBEAM_USE_RADIO_SX1276.yml +28 -0
- data/vendor/board-maps/yaml/TBEAM_USE_RADIO_SX1278.yml +28 -0
- data/vendor/board-maps/yaml/TBEAM_USE_RADIO_SX1280.yml +28 -0
- data/vendor/board-maps/yaml/TBeam.yml +28 -0
- data/vendor/board-maps/yaml/THINGPULSE_EPULSE_FEATHER.yml +31 -0
- data/vendor/board-maps/yaml/THINGPULSE_EPULSE_FEATHER_C6.yml +15 -0
- data/vendor/board-maps/yaml/TINYC6.yml +25 -0
- data/vendor/board-maps/yaml/TINYPICO.yml +35 -0
- data/vendor/board-maps/yaml/TINYS2.yml +43 -0
- data/vendor/board-maps/yaml/TINYS3.yml +25 -0
- data/vendor/board-maps/yaml/TTGO-T-OI-PLUS_DEV.yml +11 -0
- data/vendor/board-maps/yaml/TTGO_LoRa32_V1.yml +38 -0
- data/vendor/board-maps/yaml/TTGO_LoRa32_V2.yml +38 -0
- data/vendor/board-maps/yaml/TTGO_LoRa32_v21new.yml +38 -0
- data/vendor/board-maps/yaml/TTGO_T1.yml +36 -0
- data/vendor/board-maps/yaml/TTGO_T7_V13_Mini32.yml +36 -0
- data/vendor/board-maps/yaml/TTGO_T7_V14_Mini32.yml +36 -0
- data/vendor/board-maps/yaml/TWATCH_2020_V1.yml +9 -0
- data/vendor/board-maps/yaml/TWATCH_2020_V2.yml +9 -0
- data/vendor/board-maps/yaml/TWATCH_2020_V3.yml +9 -0
- data/vendor/board-maps/yaml/TWATCH_BASE.yml +9 -0
- data/vendor/board-maps/yaml/TWatch.yml +9 -0
- data/vendor/board-maps/yaml/Trueverit_ESP32_Universal_IoT_Driver.yml +18 -0
- data/vendor/board-maps/yaml/Trueverit_ESP32_Universal_IoT_Driver_MK_II.yml +18 -0
- data/vendor/board-maps/yaml/UBLOX_NINA_W10.yml +57 -0
- data/vendor/board-maps/yaml/UBLOX_NORA_W10.yml +43 -0
- data/vendor/board-maps/yaml/UNOWIFIR4.yml +17 -0
- data/vendor/board-maps/yaml/UPESY_EDU_ESP32.yml +28 -0
- data/vendor/board-maps/yaml/UPESY_ESP32C3_BASIC.yml +13 -0
- data/vendor/board-maps/yaml/UPESY_ESP32C3_MINI.yml +12 -0
- data/vendor/board-maps/yaml/UPESY_ESP32S3_BASIC.yml +42 -0
- data/vendor/board-maps/yaml/UPESY_RP2040_DEVKIT.yml +48 -0
- data/vendor/board-maps/yaml/VALTRACK_V4_MFW_ESP32_C3.yml +23 -0
- data/vendor/board-maps/yaml/VALTRACK_V4_VTS_ESP32_C3.yml +23 -0
- data/vendor/board-maps/yaml/VIRALINK_GATE32_01.yml +6 -0
- data/vendor/board-maps/yaml/VIRALINK_GATE32_11.yml +7 -0
- data/vendor/board-maps/yaml/VIYALAB_MIZU_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/WATCHY.yml +7 -0
- data/vendor/board-maps/yaml/WATCHY_V10.yml +7 -0
- data/vendor/board-maps/yaml/WATCHY_V15.yml +7 -0
- data/vendor/board-maps/yaml/WATCHY_V20.yml +7 -0
- data/vendor/board-maps/yaml/WAVESHARE_ESP32S3_TOUCH_LCD_128.yml +8 -0
- data/vendor/board-maps/yaml/WAVESHARE_RP2040_LCD_0_96.yml +47 -0
- data/vendor/board-maps/yaml/WAVESHARE_RP2040_LCD_1_28.yml +47 -0
- data/vendor/board-maps/yaml/WAVESHARE_RP2040_MATRIX.yml +48 -0
- data/vendor/board-maps/yaml/WAVESHARE_RP2040_ONE.yml +48 -0
- data/vendor/board-maps/yaml/WAVESHARE_RP2040_PIZERO.yml +47 -0
- data/vendor/board-maps/yaml/WAVESHARE_RP2040_PLUS.yml +48 -0
- data/vendor/board-maps/yaml/WAVESHARE_RP2040_ZERO.yml +48 -0
- data/vendor/board-maps/yaml/WEACT_STUDIO_ESP32C3.yml +14 -0
- data/vendor/board-maps/yaml/WESP32.yml +17 -0
- data/vendor/board-maps/yaml/WIDORA_AIR.yml +34 -0
- data/vendor/board-maps/yaml/WIFIDUINO_ESP8266.yml +23 -0
- data/vendor/board-maps/yaml/WIFINFO.yml +20 -0
- data/vendor/board-maps/yaml/WIPY3.yml +38 -0
- data/vendor/board-maps/yaml/WIZNET_5100S_EVB_PICO.yml +48 -0
- data/vendor/board-maps/yaml/WIZNET_5500_EVB_PICO.yml +48 -0
- data/vendor/board-maps/yaml/WIZNET_WIZFI360_EVB_PICO.yml +48 -0
- data/vendor/board-maps/yaml/WT32_ETH01.yml +8 -0
- data/vendor/board-maps/yaml/WT32_SC01_PLUS.yml +7 -0
- data/vendor/board-maps/yaml/WiFiduino32S3.yml +27 -0
- data/vendor/board-maps/yaml/WiFiduinoV2.yml +28 -0
- data/vendor/board-maps/yaml/Wifiduino32.yml +40 -0
- data/vendor/board-maps/yaml/XIAO_ESP32C3.yml +21 -0
- data/vendor/board-maps/yaml/XIAO_ESP32C6.yml +22 -0
- data/vendor/board-maps/yaml/XIAO_ESP32S3.yml +37 -0
- data/vendor/board-maps/yaml/YD_RP2040.yml +48 -0
- data/vendor/board-maps/yaml/atmegazero_esp32s2.yml +30 -0
- data/vendor/board-maps/yaml/connaxio_espoir.yml +24 -0
- data/vendor/board-maps/yaml/esp32vn_iot_uno.yml +31 -0
- data/vendor/board-maps/yaml/fm_devkit.yml +15 -0
- data/vendor/board-maps/yaml/heltec_wifi_kit_32.yml +38 -0
- data/vendor/board-maps/yaml/heltec_wifi_kit_32_V3.yml +42 -0
- data/vendor/board-maps/yaml/heltec_wifi_lora_32.yml +36 -0
- data/vendor/board-maps/yaml/heltec_wifi_lora_32_V2.yml +36 -0
- data/vendor/board-maps/yaml/heltec_wireless_stick.yml +36 -0
- data/vendor/board-maps/yaml/heltec_wireless_stick_LITE.yml +36 -0
- data/vendor/board-maps/yaml/openkb.yml +37 -0
- data/vendor/board-maps/yaml/roboheart_hercules.yml +26 -0
- data/vendor/board-maps/yaml/sensesiot_weizen.yml +35 -0
- data/vendor/board-maps/yaml/uPesy_WROOM.yml +36 -0
- data/vendor/board-maps/yaml/uPesy_WROVER.yml +36 -0
- data/vendor/board-maps/yaml/unphone8.yml +42 -0
- data/vendor/board-maps/yaml/unphone9.yml +50 -0
- data/vendor/board-maps/yaml/wifi_kit_8.yml +15 -0
- metadata +541 -22
- data/examples/led/apa102_breathe.rb +0 -45
- data/examples/pulse_io/ir_transmitter.rb +0 -55
- data/examples/spi/ssd_through_register.rb +0 -40
- data/examples/uart/bit_bang_read.rb +0 -16
- data/examples/uart/bit_bang_write.rb +0 -16
- data/lib/denko/analog_io/sensor.rb +0 -6
- data/lib/denko/sensor/virtual.rb +0 -42
- data/src/lib/DenkoIROutESP.cpp +0 -26
@@ -8,12 +8,34 @@ class PWMOutTest < Minitest::Test
|
|
8
8
|
def part
|
9
9
|
@part ||= Denko::PulseIO::PWMOutput.new(board: board, pin: 14)
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
|
+
def part2
|
13
|
+
@part2 ||= Denko::PulseIO::PWMOutput.new(board: board, pin: 6, frequency: 1000, resolution: 12)
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_initialize_stores_settings
|
17
|
+
assert_equal 12, part2.resolution
|
18
|
+
assert_equal 1000, part2.frequency
|
19
|
+
assert_equal (2**12-1), part2.pwm_high
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_duty
|
23
|
+
mock = Minitest::Mock.new
|
24
|
+
mock.expect :call, nil, [14, 0]
|
25
|
+
mock.expect :call, nil, [14, 128]
|
26
|
+
mock.expect :call, nil, [14, 255]
|
27
|
+
board.stub(:pwm_write, mock) do
|
28
|
+
part.duty = 0
|
29
|
+
part.duty = 50
|
30
|
+
part.duty = 100
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
12
34
|
def test_pwm_write
|
13
35
|
enable_mock = Minitest::Mock.new.expect :call, nil
|
14
36
|
write_mock = Minitest::Mock.new
|
15
37
|
write_mock.expect :call, nil, [14, 128]
|
16
|
-
|
38
|
+
|
17
39
|
board.stub(:pwm_write, write_mock) do
|
18
40
|
part.stub(:pwm_enable, enable_mock) do
|
19
41
|
assert_equal :output, part.mode
|
@@ -21,7 +43,7 @@ class PWMOutTest < Minitest::Test
|
|
21
43
|
assert_equal 128, part.state
|
22
44
|
end
|
23
45
|
end
|
24
|
-
|
46
|
+
|
25
47
|
part.pwm_write(64)
|
26
48
|
assert_equal 64, part.state
|
27
49
|
assert_equal :output_pwm, part.mode
|
@@ -30,35 +52,68 @@ class PWMOutTest < Minitest::Test
|
|
30
52
|
enable_mock.verify
|
31
53
|
end
|
32
54
|
|
33
|
-
def
|
55
|
+
def test_write_uses_board_pwm_write_always
|
56
|
+
mock = Minitest::Mock.new.expect :call, nil, [14, 128]
|
57
|
+
board.stub(:pwm_write, mock) do
|
58
|
+
part.write(128)
|
59
|
+
end
|
60
|
+
mock.verify
|
61
|
+
end
|
62
|
+
|
63
|
+
def test_pwm_enable
|
64
|
+
part
|
34
65
|
mock = Minitest::Mock.new
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
66
|
+
if (RUBY_VERSION.split(".")[0].to_i < 3)
|
67
|
+
mock.expect :call, nil, [14, :output_pwm], {frequency: 1000, resolution: 8}
|
68
|
+
else
|
69
|
+
mock.expect :call, nil, [14, :output_pwm, {frequency: 1000, resolution: 8}]
|
70
|
+
end
|
71
|
+
|
72
|
+
board.stub(:set_pin_mode, mock) do
|
73
|
+
part.pwm_enable
|
40
74
|
end
|
41
75
|
mock.verify
|
76
|
+
assert_equal :output_pwm, part.mode
|
77
|
+
assert_equal true, part.pwm_enabled
|
42
78
|
end
|
43
79
|
|
44
|
-
def
|
45
|
-
|
46
|
-
|
47
|
-
|
80
|
+
def test_pwm_enable_uses_stored_settings
|
81
|
+
part2
|
82
|
+
mock = Minitest::Mock.new
|
83
|
+
if (RUBY_VERSION.split(".")[0].to_i < 3)
|
84
|
+
mock.expect :call, nil, [6, :output_pwm], {frequency: 1000, resolution: 12}
|
85
|
+
else
|
86
|
+
mock.expect :call, nil, [6, :output_pwm, {frequency: 1000, resolution: 12}]
|
87
|
+
end
|
88
|
+
|
89
|
+
board.stub(:set_pin_mode, mock) do
|
90
|
+
part2.pwm_enable
|
48
91
|
end
|
49
92
|
mock.verify
|
93
|
+
assert_equal :output_pwm, part2.mode
|
94
|
+
assert_equal true, part2.pwm_enabled
|
50
95
|
end
|
51
|
-
|
52
|
-
def
|
96
|
+
|
97
|
+
def test_pwm_enable_uses_arg_settings
|
53
98
|
part
|
54
|
-
mock = Minitest::Mock.new
|
99
|
+
mock = Minitest::Mock.new
|
100
|
+
if (RUBY_VERSION.split(".")[0].to_i < 3)
|
101
|
+
mock.expect :call, nil, [14, :output_pwm], {frequency: 500, resolution: 14}
|
102
|
+
else
|
103
|
+
mock.expect :call, nil, [14, :output_pwm, {frequency: 500, resolution: 14}]
|
104
|
+
end
|
105
|
+
|
55
106
|
board.stub(:set_pin_mode, mock) do
|
56
|
-
part.pwm_enable
|
107
|
+
part.pwm_enable(frequency: 500, resolution: 14)
|
57
108
|
end
|
58
109
|
mock.verify
|
59
110
|
assert_equal :output_pwm, part.mode
|
111
|
+
assert_equal true, part.pwm_enabled
|
112
|
+
assert_equal 14, part.resolution
|
113
|
+
assert_equal 500, part.frequency
|
114
|
+
assert_equal (2**14-1), part.pwm_high
|
60
115
|
end
|
61
|
-
|
116
|
+
|
62
117
|
def test_pwm_disable
|
63
118
|
part.pwm_enable
|
64
119
|
mock = Minitest::Mock.new
|
@@ -68,5 +123,6 @@ class PWMOutTest < Minitest::Test
|
|
68
123
|
end
|
69
124
|
mock.verify
|
70
125
|
assert_equal :output, part.mode
|
126
|
+
assert_equal false, part.pwm_enabled
|
71
127
|
end
|
72
128
|
end
|
data/test/rtc/ds3231_test.rb
CHANGED
@@ -6,45 +6,43 @@ class DS3231Test < Minitest::Test
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def bus
|
9
|
-
|
10
|
-
@bus = Denko::I2C::Bus.new(board: board, pin:5)
|
11
|
-
@bus
|
9
|
+
@bus ||= Denko::I2C::Bus.new(board: board)
|
12
10
|
end
|
13
|
-
|
11
|
+
|
14
12
|
def part
|
15
|
-
@part ||= Denko::RTC::DS3231.new(bus: bus
|
13
|
+
@part ||= Denko::RTC::DS3231.new(bus: bus)
|
16
14
|
end
|
17
|
-
|
15
|
+
|
18
16
|
def test_time_to_bcd
|
19
17
|
time = Time.new(2000, 1, 1, 0, 0, 0.0)
|
20
18
|
bytes = part.time_to_bcd(time)
|
21
19
|
assert_equal bytes, [0, 0, 0, 6, 1, 1, 48]
|
22
20
|
end
|
23
|
-
|
21
|
+
|
24
22
|
def test_bcd_to_time
|
25
23
|
bytes = [0, 0, 0, 6, 1, 1, 48]
|
26
24
|
time = part.bcd_to_time(bytes)
|
27
25
|
assert_equal time, Time.new(2000, 1, 1, 0, 0, 0.0)
|
28
26
|
end
|
29
|
-
|
27
|
+
|
30
28
|
def test_time=
|
31
|
-
mock = Minitest::Mock.new.expect :call, nil, [[0,
|
29
|
+
mock = Minitest::Mock.new.expect :call, nil, [[0, 0, 0, 0, 6, 1, 1, 48]]
|
32
30
|
part.stub(:i2c_write, mock) do
|
33
31
|
part.time = Time.new(2000, 1, 1, 0, 0, 0.0)
|
34
32
|
end
|
35
33
|
mock.verify
|
36
34
|
end
|
37
|
-
|
35
|
+
|
38
36
|
def test_read
|
39
|
-
board.
|
40
|
-
|
37
|
+
board.inject_read_for_i2c(0, "104-0,0,0,6,1,1,48")
|
38
|
+
|
41
39
|
mock = Minitest::Mock.new.expect :call, nil, [part.address, 0x00, 7, 100000, false]
|
42
40
|
bus.stub(:_read, mock) do
|
43
41
|
part.time
|
44
42
|
end
|
45
43
|
mock.verify
|
46
44
|
end
|
47
|
-
|
45
|
+
|
48
46
|
def test_pre_callback_filter
|
49
47
|
mock = Minitest::Mock.new.expect :call, nil, [Time.new(2000, 1, 1, 0, 0, 0.0)]
|
50
48
|
part.stub(:update_state, mock) do
|
data/test/sensor/dht_test.rb
CHANGED
@@ -55,7 +55,7 @@ class DHTTest < Minitest::Test
|
|
55
55
|
|
56
56
|
# It should calculate output correctly.
|
57
57
|
result = part.decode(GOOD_ARRAY)
|
58
|
-
assert_equal result, {
|
58
|
+
assert_equal result, {temperature: 29.5, humidity: 66.9}
|
59
59
|
end
|
60
60
|
|
61
61
|
def test_crc
|
data/test/sensor/ds18b20_test.rb
CHANGED
@@ -17,14 +17,10 @@ class DS18B20Test < Minitest::Test
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def test_decode_temperatures
|
20
|
-
assert_equal
|
21
|
-
|
22
|
-
assert_equal
|
23
|
-
|
24
|
-
assert_equal({ celsius: -10.125, fahrenheit: 13.775 },
|
25
|
-
part.decode_temperature([0b0101_1110,0b1111_1111]))
|
26
|
-
assert_equal({ celsius: -55, fahrenheit: -67 },
|
27
|
-
part.decode_temperature([0b1001_0000,0b1111_1100]))
|
20
|
+
assert_equal 125, part.decode_temperature([0b1101_0000,0b0000_0111])
|
21
|
+
assert_equal 0, part.decode_temperature([0b0000_0000,0b0000_0000])
|
22
|
+
assert_equal -10.125, part.decode_temperature([0b0101_1110,0b1111_1111])
|
23
|
+
assert_equal -55, part.decode_temperature([0b1001_0000,0b1111_1100])
|
28
24
|
end
|
29
25
|
|
30
26
|
def test_decode_resolution
|
data/test/spi/bus_test.rb
CHANGED
@@ -4,7 +4,7 @@ class TempSpiPeripheral
|
|
4
4
|
def initialize(pin)
|
5
5
|
@pin = pin
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
8
|
attr_reader :pin
|
9
9
|
end
|
10
10
|
|
@@ -14,28 +14,28 @@ class SPIBusTest < Minitest::Test
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def part
|
17
|
-
@bus ||= Denko::SPI::Bus.new(board: board)
|
17
|
+
@bus ||= Denko::SPI::Bus.new(board: board, index: 5)
|
18
18
|
end
|
19
19
|
|
20
20
|
PIN = 9
|
21
21
|
OPTIONS = { read: 2, frequency: 800000, mode: 2, bit_order: :lsbfirst }
|
22
22
|
|
23
23
|
def test_transfer
|
24
|
-
mock = Minitest::Mock.new.expect :call, nil, [PIN], **OPTIONS
|
24
|
+
mock = Minitest::Mock.new.expect :call, nil, [5, PIN], **OPTIONS
|
25
25
|
board.stub(:spi_transfer, mock) do
|
26
26
|
part.transfer(PIN, **OPTIONS)
|
27
27
|
end
|
28
28
|
mock.verify
|
29
29
|
end
|
30
|
-
|
30
|
+
|
31
31
|
def test_listen
|
32
|
-
mock = Minitest::Mock.new.expect :call, nil, [PIN], **OPTIONS
|
32
|
+
mock = Minitest::Mock.new.expect :call, nil, [5, PIN], **OPTIONS
|
33
33
|
board.stub(:spi_listen, mock) do
|
34
34
|
part.listen(PIN, **OPTIONS)
|
35
35
|
end
|
36
36
|
mock.verify
|
37
37
|
end
|
38
|
-
|
38
|
+
|
39
39
|
def test_stop
|
40
40
|
mock = Minitest::Mock.new.expect :call, nil, [PIN]
|
41
41
|
board.stub(:spi_stop, mock) do
|
@@ -70,7 +70,7 @@ class SPIBusTest < Minitest::Test
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def test_no_select_pin
|
73
|
-
part.add_component TempSpiPeripheral.new(
|
73
|
+
part.add_component TempSpiPeripheral.new(nil)
|
74
74
|
assert_empty part.components
|
75
75
|
end
|
76
76
|
end
|
@@ -16,14 +16,14 @@ class InputRegisterTest < Minitest::Test
|
|
16
16
|
def part
|
17
17
|
@part ||= Denko::SPI::InputRegister.new(options)
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
def button
|
21
21
|
@button ||= Denko::DigitalIO::Button.new(board: part, pin: 0)
|
22
22
|
end
|
23
23
|
|
24
24
|
def test_state_setup
|
25
|
-
assert_equal
|
26
|
-
assert_equal
|
25
|
+
assert_equal Array.new(16) { false }, part.reading_pins
|
26
|
+
assert_equal Array.new(16) { false }, part.listening_pins
|
27
27
|
refute_nil part.callbacks[:board_proxy]
|
28
28
|
end
|
29
29
|
|
@@ -34,7 +34,7 @@ class InputRegisterTest < Minitest::Test
|
|
34
34
|
end
|
35
35
|
mock.verify
|
36
36
|
end
|
37
|
-
|
37
|
+
|
38
38
|
def test_listen
|
39
39
|
mock = Minitest::Mock.new.expect :call, nil, [9], read: 2, frequency: 800000, mode: 2, bit_order: :lsbfirst
|
40
40
|
bus.stub(:listen, mock) do
|
@@ -42,7 +42,7 @@ class InputRegisterTest < Minitest::Test
|
|
42
42
|
end
|
43
43
|
mock.verify
|
44
44
|
end
|
45
|
-
|
45
|
+
|
46
46
|
def test_stop
|
47
47
|
mock = Minitest::Mock.new.expect :call, nil, [9]
|
48
48
|
bus.stub(:stop, mock) do
|
@@ -50,7 +50,7 @@ class InputRegisterTest < Minitest::Test
|
|
50
50
|
end
|
51
51
|
mock.verify
|
52
52
|
end
|
53
|
-
|
53
|
+
|
54
54
|
def test_updates_child_components
|
55
55
|
button
|
56
56
|
part.update("1")
|
@@ -58,7 +58,7 @@ class InputRegisterTest < Minitest::Test
|
|
58
58
|
part.update("0")
|
59
59
|
assert button.low?
|
60
60
|
end
|
61
|
-
|
61
|
+
|
62
62
|
def test_bit_array_conversion_and_state_update
|
63
63
|
part.update("127")
|
64
64
|
assert_equal [1,1,1,1,1,1,1,0], part.state
|
@@ -67,7 +67,7 @@ class InputRegisterTest < Minitest::Test
|
|
67
67
|
new_part.update("127,128")
|
68
68
|
assert_equal [1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1], new_part.state
|
69
69
|
end
|
70
|
-
|
70
|
+
|
71
71
|
def test_callbacks_get_bit_array
|
72
72
|
mock = Minitest::Mock.new.expect :call, nil, [[1,1,1,1,1,1,1,0]]
|
73
73
|
part.add_callback do |data|
|
@@ -76,11 +76,11 @@ class InputRegisterTest < Minitest::Test
|
|
76
76
|
part.update("127")
|
77
77
|
mock.verify
|
78
78
|
end
|
79
|
-
|
79
|
+
|
80
80
|
def test_read_proxy
|
81
81
|
# Stop automatic listening first.
|
82
82
|
button.stop
|
83
|
-
|
83
|
+
|
84
84
|
# Give #read some value so it stops blocking.
|
85
85
|
Thread.new do
|
86
86
|
sleep(0.01) while !part.callbacks[:force_update]
|
@@ -101,12 +101,12 @@ class InputRegisterTest < Minitest::Test
|
|
101
101
|
part.stub(:listen, mock) do
|
102
102
|
# Tells the register to start listening when it initializees.
|
103
103
|
button
|
104
|
-
|
104
|
+
|
105
105
|
# Should not make a second listen call to the board.
|
106
106
|
Denko::DigitalIO::Button.new(board: part, pin: 1)
|
107
107
|
end
|
108
108
|
mock.verify
|
109
|
-
|
109
|
+
|
110
110
|
expected_array = Array.new(options[:bytes] * 8) { false }
|
111
111
|
expected_array[0] = true
|
112
112
|
expected_array[1] = true
|
@@ -114,17 +114,17 @@ class InputRegisterTest < Minitest::Test
|
|
114
114
|
# Should be listening to the lowest 2 bits now.
|
115
115
|
assert_equal expected_array, part.instance_variable_get(:@listening_pins)
|
116
116
|
end
|
117
|
-
|
117
|
+
|
118
118
|
def test_stop_listener_proxy
|
119
119
|
button
|
120
|
-
|
120
|
+
|
121
121
|
# Calling stop on a child part, when only it is listening, should call stop on the register too.
|
122
122
|
mock = Minitest::Mock.new.expect :call, nil
|
123
123
|
part.stub(:stop, mock) do
|
124
124
|
button.stop
|
125
125
|
end
|
126
126
|
mock.verify
|
127
|
-
|
127
|
+
|
128
128
|
# Check listener tracking is correct.
|
129
129
|
assert_equal Array.new(options[:bytes] * 8) { false }, part.instance_variable_get(:@listening_pins)
|
130
130
|
refute part.any_listening
|
@@ -16,7 +16,7 @@ class OutputRegisterTest < Minitest::Test
|
|
16
16
|
def part
|
17
17
|
@part ||= Denko::SPI::OutputRegister.new(options)
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
def led
|
21
21
|
@led ||= Denko::LED.new(board: part, pin: 0)
|
22
22
|
end
|
@@ -26,53 +26,42 @@ class OutputRegisterTest < Minitest::Test
|
|
26
26
|
mock = Minitest::Mock.new.expect :call, nil, [9], write: [255,127], frequency: 800000, mode: 2, bit_order: :lsbfirst
|
27
27
|
bus.stub(:transfer, mock) do
|
28
28
|
arr = Array.new(16) { 1 }; arr[7] = 0
|
29
|
-
part.instance_variable_set(:@state, arr)
|
29
|
+
part.instance_variable_set(:@state, arr)
|
30
30
|
part.write
|
31
31
|
end
|
32
32
|
mock.verify
|
33
33
|
end
|
34
|
-
|
35
|
-
def test_state_setup
|
36
|
-
assert_equal part.instance_variable_get(:@write_delay), 0.001
|
37
|
-
assert_equal part.instance_variable_get(:@buffer_writes), true
|
38
|
-
end
|
39
|
-
|
40
|
-
def test_write_buffering_control
|
41
|
-
new_part = Denko::SPI::OutputRegister.new(options.merge(buffer_writes: false, write_delay: 0.5))
|
42
|
-
assert_equal new_part.instance_variable_get(:@write_delay), 0.5
|
43
|
-
assert_equal new_part.instance_variable_get(:@buffer_writes), false
|
44
|
-
end
|
45
|
-
|
34
|
+
|
46
35
|
def test_updates_and_writes_state_for_children
|
47
36
|
led
|
48
|
-
|
37
|
+
|
49
38
|
mock = Minitest::Mock.new.expect :call, nil, [9], write: [0, 1], frequency: 800000, mode: 2, bit_order: :lsbfirst
|
50
39
|
bus.stub(:transfer, mock) do
|
51
40
|
led.on
|
52
41
|
sleep 0.050
|
53
42
|
end
|
54
43
|
mock.verify
|
55
|
-
|
44
|
+
|
56
45
|
expected_state = Array.new(options[:bytes] * 8) { |i| 0 }
|
57
46
|
expected_state[0] = 1
|
58
47
|
|
59
48
|
assert_equal expected_state, part.state
|
60
49
|
end
|
61
|
-
|
50
|
+
|
62
51
|
def test_implements_digital_read_for_children
|
63
52
|
led
|
64
|
-
|
53
|
+
|
65
54
|
mock = Minitest::Mock.new.expect :call, nil, [0]
|
66
55
|
part.stub(:digital_read, mock) do
|
67
56
|
led.board.digital_read(led.pin)
|
68
57
|
end
|
69
58
|
mock.verify
|
70
59
|
end
|
71
|
-
|
60
|
+
|
72
61
|
def test_bit_and_byte_orders_correct
|
73
62
|
part.instance_variable_set(:@bytes, 2)
|
74
63
|
bit_array = "0101010100001111".split("")
|
75
|
-
|
64
|
+
|
76
65
|
mock = Minitest::Mock.new.expect :call, nil, [9], write: [0b11110000, 0b10101010], frequency: 800000, mode: 2, bit_order: :lsbfirst
|
77
66
|
bus.stub(:transfer, mock) do
|
78
67
|
part.instance_variable_set(:@state, bit_array)
|
@@ -80,14 +69,7 @@ class OutputRegisterTest < Minitest::Test
|
|
80
69
|
sleep 0.002
|
81
70
|
end
|
82
71
|
mock.verify
|
83
|
-
|
72
|
+
|
84
73
|
assert_equal part.state, bit_array
|
85
74
|
end
|
86
|
-
|
87
|
-
def test_disable_buffering
|
88
|
-
part.instance_variable_set(:@buffer_writes, false)
|
89
|
-
part.instance_variable_set(:@write_delay, 1)
|
90
|
-
led.on
|
91
|
-
assert_nil part.thread
|
92
|
-
end
|
93
75
|
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require_relative '../test_helper'
|
2
|
+
|
3
|
+
class SPITesterMulti
|
4
|
+
include Denko::SPI::Peripheral::MultiPin
|
5
|
+
|
6
|
+
def initialize_pins(options={})
|
7
|
+
super(options)
|
8
|
+
proxy_pin :other_pin, Denko::DigitalIO::Output, board: bus.board
|
9
|
+
end
|
10
|
+
|
11
|
+
def some_callback(data)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class SPIPeripheralMultiPinTest < Minitest::Test
|
16
|
+
def board
|
17
|
+
@board ||= BoardMock.new
|
18
|
+
end
|
19
|
+
|
20
|
+
def bus
|
21
|
+
@bus ||= Denko::SPI::Bus.new(board: board)
|
22
|
+
end
|
23
|
+
|
24
|
+
def options
|
25
|
+
{ bus: bus, pins: {select: 9, other_pin: 10}, spi_frequency: 800000, spi_mode: 2, spi_bit_order: :lsbfirst}
|
26
|
+
end
|
27
|
+
|
28
|
+
def part
|
29
|
+
@part ||= SPITesterMulti.new(options)
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_string_data_converts_to_bytes_for_callbacks
|
33
|
+
part.on_data do |bytes|
|
34
|
+
part.some_callback(bytes)
|
35
|
+
end
|
36
|
+
mock = Minitest::Mock.new.expect :call, nil, [[127,255]]
|
37
|
+
part.stub(:some_callback, mock) do
|
38
|
+
board.update("#{part.select.pin}:127,255")
|
39
|
+
end
|
40
|
+
mock.verify
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_array_data_reaches_callbacks
|
44
|
+
part.on_data do |bytes|
|
45
|
+
part.some_callback(bytes)
|
46
|
+
end
|
47
|
+
mock = Minitest::Mock.new.expect :call, nil, [[127,255]]
|
48
|
+
part.stub(:some_callback, mock) do
|
49
|
+
part.select.update([127,255])
|
50
|
+
end
|
51
|
+
mock.verify
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require_relative '../test_helper'
|
2
|
+
|
3
|
+
class SPITester
|
4
|
+
include Denko::SPI::Peripheral::SinglePin
|
5
|
+
|
6
|
+
def some_callback(data)
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
class SPIPeripheralSinglePinTest < Minitest::Test
|
11
|
+
def board
|
12
|
+
@board ||= BoardMock.new
|
13
|
+
end
|
14
|
+
|
15
|
+
def bus
|
16
|
+
@bus ||= Denko::SPI::Bus.new(board: board)
|
17
|
+
end
|
18
|
+
|
19
|
+
def options
|
20
|
+
{ bus: bus, pin: 9, spi_frequency: 800000, spi_mode: 2, spi_bit_order: :lsbfirst}
|
21
|
+
end
|
22
|
+
|
23
|
+
def part
|
24
|
+
@part ||= SPITester.new(options)
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_string_data_converts_to_bytes_for_callbacks
|
28
|
+
part.on_data do |bytes|
|
29
|
+
part.some_callback(bytes)
|
30
|
+
end
|
31
|
+
mock = Minitest::Mock.new.expect :call, nil, [[127,255]]
|
32
|
+
part.stub(:some_callback, mock) do
|
33
|
+
board.update("#{part.pin}:127,255")
|
34
|
+
end
|
35
|
+
mock.verify
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_array_data_reaches_callbacks
|
39
|
+
part.on_data do |bytes|
|
40
|
+
part.some_callback(bytes)
|
41
|
+
end
|
42
|
+
mock = Minitest::Mock.new.expect :call, nil, [[127,255]]
|
43
|
+
part.stub(:some_callback, mock) do
|
44
|
+
part.update([127,255])
|
45
|
+
end
|
46
|
+
mock.verify
|
47
|
+
end
|
48
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -18,7 +18,6 @@ Denko::AnalogIO::ADS1118
|
|
18
18
|
Denko::AnalogIO::Input
|
19
19
|
Denko::AnalogIO::Output
|
20
20
|
Denko::AnalogIO::Potentiometer
|
21
|
-
Denko::AnalogIO::Sensor
|
22
21
|
|
23
22
|
# Behaviors
|
24
23
|
# Not needed, since every behavior will be included by at least one class.
|
@@ -68,15 +67,13 @@ Denko::OneWire::Helper
|
|
68
67
|
|
69
68
|
# Pulse IO
|
70
69
|
Denko::PulseIO::Buzzer
|
71
|
-
Denko::PulseIO::
|
70
|
+
Denko::PulseIO::IROutput
|
72
71
|
Denko::PulseIO::PWMOutput
|
73
72
|
|
74
73
|
# RTC
|
75
74
|
Denko::RTC::DS3231
|
76
75
|
|
77
76
|
# Sensor
|
78
|
-
Denko::Sensor::Temperature
|
79
|
-
Denko::Sensor::Humidity
|
80
77
|
Denko::Sensor::BME280
|
81
78
|
Denko::Sensor::BMP280
|
82
79
|
Denko::Sensor::DHT
|
@@ -155,13 +152,6 @@ class BoardMock < Denko::Board
|
|
155
152
|
|
156
153
|
WAITING_ON_READ_KEYS = [:read, :bus_controller, :board_proxy, :force_udpate]
|
157
154
|
|
158
|
-
def component_exists_for_pin(pin)
|
159
|
-
self.components.each do |component|
|
160
|
-
return component if component.pin == pin
|
161
|
-
end
|
162
|
-
false
|
163
|
-
end
|
164
|
-
|
165
155
|
def waiting_on_read(component)
|
166
156
|
WAITING_ON_READ_KEYS.each do |key|
|
167
157
|
return true if component.callbacks[key]
|
@@ -169,6 +159,16 @@ class BoardMock < Denko::Board
|
|
169
159
|
false
|
170
160
|
end
|
171
161
|
|
162
|
+
def single_pin_component_exists(pin)
|
163
|
+
return single_pin_components[pin]
|
164
|
+
false
|
165
|
+
end
|
166
|
+
|
167
|
+
def hw_i2c_exists(index)
|
168
|
+
return hw_i2c_comps[index]
|
169
|
+
false
|
170
|
+
end
|
171
|
+
|
172
172
|
#
|
173
173
|
# Inject a message into the Board instance as if it were coming from the phsyical board.
|
174
174
|
# Use this to mock input data for the blocking #read pattern in the Reader behavior.
|
@@ -179,36 +179,39 @@ class BoardMock < Denko::Board
|
|
179
179
|
component = false
|
180
180
|
while !component
|
181
181
|
sleep(0.001)
|
182
|
-
component =
|
182
|
+
component = single_pin_component_exists(pin)
|
183
183
|
end
|
184
|
+
inject_read(component, "#{pin}:#{message}")
|
185
|
+
end
|
186
|
+
end
|
184
187
|
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
self.update("#{pin}:#{message}")
|
188
|
+
def inject_read_for_i2c(index, message)
|
189
|
+
Thread.new do
|
190
|
+
# Wait for a component to be added.
|
191
|
+
component = false
|
192
|
+
while !component
|
193
|
+
sleep(0.001)
|
194
|
+
component = hw_i2c_exists(index)
|
193
195
|
end
|
196
|
+
inject_read(component, "I2C#{index}:#{message}")
|
194
197
|
end
|
195
198
|
end
|
196
199
|
|
197
|
-
#
|
198
|
-
# Inject a message into the Board instance as if it were coming from the phsyical board.
|
199
|
-
# Use this to mock input data for the blocking #read pattern in the Reader behavior.
|
200
|
-
#
|
201
200
|
def inject_read_for_component(component, pin, message)
|
202
201
|
Thread.new do
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
202
|
+
inject_read(component, "#{pin}:#{message}")
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
def inject_read(component, string)
|
207
|
+
# Wait for the component to have a "WAITING_ON_READ" callback.
|
208
|
+
sleep(0.001) while !component.callback_mutex
|
209
|
+
sleep(0.001) while !component.callbacks
|
210
|
+
sleep(0.001) while !waiting_on_read(component)
|
211
|
+
|
212
|
+
# Then inject the message.
|
213
|
+
@read_injection_mutex.synchronize do
|
214
|
+
self.update(string)
|
212
215
|
end
|
213
216
|
end
|
214
217
|
end
|