mirror of https://github.com/arendst/Tasmota.git
Merge pull request #13118 from s-hadinger/berry_gpio_dac
Support for ESP32/ESP32S2 DAC gpio via Berry
This commit is contained in:
commit
575e55204d
|
@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file.
|
|||
- Support for ESP32S2 GPIOs
|
||||
- ESP32 add GPIO 6/7/8/11 to template and remove GPIO 28-31 (remapping so backwards compatible)
|
||||
- Crash recorder ``Status 12`` for ESP32/ESP32S2/ESP32C3, supporting Esp-idf 3.3/4.4
|
||||
- Support for ESP32/ESP32S2 DAC gpio via Berry
|
||||
|
||||
### Changed
|
||||
- M5 Stack Core2 uses UNIVERSAL_DISPLAY with enabled LVGL as default now
|
||||
|
|
|
@ -12,293 +12,11 @@
|
|||
extern int gp_pin_mode(bvm *vm);
|
||||
extern int gp_digital_write(bvm *vm);
|
||||
extern int gp_digital_read(bvm *vm);
|
||||
extern int gp_dac_voltage(bvm *vm);
|
||||
|
||||
extern int gp_pin_used(bvm *vm);
|
||||
extern int gp_pin(bvm *vm);
|
||||
|
||||
#if !BE_USE_PRECOMPILED_OBJECT
|
||||
be_native_module_attr_table(gpio) {
|
||||
// HIGH/LOW
|
||||
be_native_module_int("LOW", 0),
|
||||
be_native_module_int("HIGH", 1),
|
||||
// GPIO states
|
||||
be_native_module_int("INPUT", 1),
|
||||
be_native_module_int("OUTPUT", 2),
|
||||
be_native_module_int("PULLUP", 4),
|
||||
be_native_module_int("INPUT_PULLUP", 5),
|
||||
be_native_module_int("PULLDOWN", 8),
|
||||
be_native_module_int("INPUT_PULLDOWN", 9),
|
||||
be_native_module_int("OPEN_DRAIN", 16),
|
||||
be_native_module_int("OUTPUT_OPEN_DRAIN", 18),
|
||||
// Interrupt trigger
|
||||
be_native_module_int("RISING", 1),
|
||||
be_native_module_int("FALLING", 2),
|
||||
be_native_module_int("CHANGE", 4),
|
||||
// Tasmota GPIOs
|
||||
be_native_module_int("NONE", 0),
|
||||
be_native_module_int("KEY1", 1),
|
||||
be_native_module_int("KEY1_NP", 2),
|
||||
be_native_module_int("KEY1_INV", 3),
|
||||
be_native_module_int("KEY1_INV_NP", 4),
|
||||
be_native_module_int("SWT1", 5),
|
||||
be_native_module_int("SWT1_NP", 6),
|
||||
be_native_module_int("REL1", 7),
|
||||
be_native_module_int("REL1_INV", 8),
|
||||
be_native_module_int("LED1", 9),
|
||||
be_native_module_int("LED1_INV", 10),
|
||||
be_native_module_int("CNTR1", 11),
|
||||
be_native_module_int("CNTR1_NP", 12),
|
||||
be_native_module_int("PWM1", 13),
|
||||
be_native_module_int("PWM1_INV", 14),
|
||||
be_native_module_int("BUZZER", 15),
|
||||
be_native_module_int("BUZZER_INV", 16),
|
||||
be_native_module_int("LEDLNK", 17),
|
||||
be_native_module_int("LEDLNK_INV", 18),
|
||||
be_native_module_int("I2C_SCL", 19),
|
||||
be_native_module_int("I2C_SDA", 20),
|
||||
be_native_module_int("SPI_MISO", 21),
|
||||
be_native_module_int("SPI_MOSI", 22),
|
||||
be_native_module_int("SPI_CLK", 23),
|
||||
be_native_module_int("SPI_CS", 24),
|
||||
be_native_module_int("SPI_DC", 25),
|
||||
be_native_module_int("SSPI_MISO", 26),
|
||||
be_native_module_int("SSPI_MOSI", 27),
|
||||
be_native_module_int("SSPI_SCLK", 28),
|
||||
be_native_module_int("SSPI_CS", 29),
|
||||
be_native_module_int("SSPI_DC", 30),
|
||||
be_native_module_int("BACKLIGHT", 31),
|
||||
be_native_module_int("OLED_RESET", 32),
|
||||
be_native_module_int("IRSEND", 33),
|
||||
be_native_module_int("IRRECV", 34),
|
||||
be_native_module_int("RFSEND", 35),
|
||||
be_native_module_int("RFRECV", 36),
|
||||
be_native_module_int("DHT11", 37),
|
||||
be_native_module_int("DHT22", 38),
|
||||
be_native_module_int("SI7021", 39),
|
||||
be_native_module_int("DHT11_OUT", 40),
|
||||
be_native_module_int("DSB", 41),
|
||||
be_native_module_int("DSB_OUT", 42),
|
||||
be_native_module_int("WS2812", 43),
|
||||
be_native_module_int("MHZ_TXD", 44),
|
||||
be_native_module_int("MHZ_RXD", 45),
|
||||
be_native_module_int("PZEM0XX_TX", 46),
|
||||
be_native_module_int("PZEM004_RX", 47),
|
||||
be_native_module_int("PZEM016_RX", 48),
|
||||
be_native_module_int("PZEM017_RX", 49),
|
||||
be_native_module_int("SAIR_TX", 50),
|
||||
be_native_module_int("SAIR_RX", 51),
|
||||
be_native_module_int("PMS5003_TX", 52),
|
||||
be_native_module_int("PMS5003_RX", 53),
|
||||
be_native_module_int("SDS0X1_TX", 54),
|
||||
be_native_module_int("SDS0X1_RX", 55),
|
||||
be_native_module_int("SBR_TX", 56),
|
||||
be_native_module_int("SBR_RX", 57),
|
||||
be_native_module_int("SR04_TRIG", 58),
|
||||
be_native_module_int("SR04_ECHO", 59),
|
||||
be_native_module_int("SDM120_TX", 60),
|
||||
be_native_module_int("SDM120_RX", 61),
|
||||
be_native_module_int("SDM630_TX", 62),
|
||||
be_native_module_int("SDM630_RX", 63),
|
||||
be_native_module_int("TM1638CLK", 64),
|
||||
be_native_module_int("TM1638DIO", 65),
|
||||
be_native_module_int("TM1638STB", 66),
|
||||
be_native_module_int("MP3_DFR562", 67),
|
||||
be_native_module_int("HX711_SCK", 68),
|
||||
be_native_module_int("HX711_DAT", 69),
|
||||
be_native_module_int("TX2X_TXD_BLACK", 70),
|
||||
be_native_module_int("TUYA_TX", 71),
|
||||
be_native_module_int("TUYA_RX", 72),
|
||||
be_native_module_int("MGC3130_XFER", 73),
|
||||
be_native_module_int("MGC3130_RESET", 74),
|
||||
be_native_module_int("RF_SENSOR", 75),
|
||||
be_native_module_int("AZ_TXD", 76),
|
||||
be_native_module_int("AZ_RXD", 77),
|
||||
be_native_module_int("MAX31855CS", 78),
|
||||
be_native_module_int("MAX31855CLK", 79),
|
||||
be_native_module_int("MAX31855DO", 80),
|
||||
be_native_module_int("NRG_SEL", 81),
|
||||
be_native_module_int("NRG_SEL_INV", 82),
|
||||
be_native_module_int("NRG_CF1", 83),
|
||||
be_native_module_int("HLW_CF", 84),
|
||||
be_native_module_int("HJL_CF", 85),
|
||||
be_native_module_int("MCP39F5_TX", 86),
|
||||
be_native_module_int("MCP39F5_RX", 87),
|
||||
be_native_module_int("MCP39F5_RST", 88),
|
||||
be_native_module_int("PN532_TXD", 89),
|
||||
be_native_module_int("PN532_RXD", 90),
|
||||
be_native_module_int("SM16716_CLK", 91),
|
||||
be_native_module_int("SM16716_DAT", 92),
|
||||
be_native_module_int("SM16716_SEL", 93),
|
||||
be_native_module_int("DI", 94),
|
||||
be_native_module_int("DCKI", 95),
|
||||
be_native_module_int("CSE7766_TX", 96),
|
||||
be_native_module_int("CSE7766_RX", 97),
|
||||
be_native_module_int("ARIRFRCV", 98),
|
||||
be_native_module_int("ARIRFSEL", 99),
|
||||
be_native_module_int("TXD", 100),
|
||||
be_native_module_int("RXD", 101),
|
||||
be_native_module_int("ROT1A", 102),
|
||||
be_native_module_int("ROT1B", 103),
|
||||
be_native_module_int("ADC_JOY", 104),
|
||||
be_native_module_int("SSPI_MAX31865_CS1", 105),
|
||||
be_native_module_int("HRE_CLOCK", 106),
|
||||
be_native_module_int("HRE_DATA", 107),
|
||||
be_native_module_int("ADE7953_IRQ", 108),
|
||||
be_native_module_int("SOLAXX1_TX", 109),
|
||||
be_native_module_int("SOLAXX1_RX", 110),
|
||||
be_native_module_int("ZIGBEE_TX", 111),
|
||||
be_native_module_int("ZIGBEE_RX", 112),
|
||||
be_native_module_int("RDM6300_RX", 113),
|
||||
be_native_module_int("IBEACON_TX", 114),
|
||||
be_native_module_int("IBEACON_RX", 115),
|
||||
be_native_module_int("A4988_DIR", 116),
|
||||
be_native_module_int("A4988_STP", 117),
|
||||
be_native_module_int("A4988_ENA", 118),
|
||||
be_native_module_int("A4988_MS1", 119),
|
||||
be_native_module_int("OUTPUT_HI", 120),
|
||||
be_native_module_int("OUTPUT_LO", 121),
|
||||
be_native_module_int("DDS2382_TX", 122),
|
||||
be_native_module_int("DDS2382_RX", 123),
|
||||
be_native_module_int("DDSU666_TX", 124),
|
||||
be_native_module_int("DDSU666_RX", 125),
|
||||
be_native_module_int("SM2135_CLK", 126),
|
||||
be_native_module_int("SM2135_DAT", 127),
|
||||
be_native_module_int("DEEPSLEEP", 128),
|
||||
be_native_module_int("EXS_ENABLE", 129),
|
||||
be_native_module_int("TASMOTACLIENT_TXD", 130),
|
||||
be_native_module_int("TASMOTACLIENT_RXD", 131),
|
||||
be_native_module_int("TASMOTACLIENT_RST", 132),
|
||||
be_native_module_int("TASMOTACLIENT_RST_INV", 133),
|
||||
be_native_module_int("HPMA_RX", 134),
|
||||
be_native_module_int("HPMA_TX", 135),
|
||||
be_native_module_int("GPS_RX", 136),
|
||||
be_native_module_int("GPS_TX", 137),
|
||||
be_native_module_int("HM10_RX", 138),
|
||||
be_native_module_int("HM10_TX", 139),
|
||||
be_native_module_int("LE01MR_RX", 140),
|
||||
be_native_module_int("LE01MR_TX", 141),
|
||||
be_native_module_int("CC1101_GDO0", 142),
|
||||
be_native_module_int("CC1101_GDO2", 143),
|
||||
be_native_module_int("HRXL_RX", 144),
|
||||
be_native_module_int("ELECTRIQ_MOODL_TX", 145),
|
||||
be_native_module_int("AS3935", 146),
|
||||
be_native_module_int("ADC_INPUT", 147),
|
||||
be_native_module_int("ADC_TEMP", 148),
|
||||
be_native_module_int("ADC_LIGHT", 149),
|
||||
be_native_module_int("ADC_BUTTON", 150),
|
||||
be_native_module_int("ADC_BUTTON_INV", 151),
|
||||
be_native_module_int("ADC_RANGE", 152),
|
||||
be_native_module_int("ADC_CT_POWER", 153),
|
||||
be_native_module_int("WEBCAM_PWDN", 154),
|
||||
be_native_module_int("WEBCAM_RESET", 155),
|
||||
be_native_module_int("WEBCAM_XCLK", 156),
|
||||
be_native_module_int("WEBCAM_SIOD", 157),
|
||||
be_native_module_int("WEBCAM_SIOC", 158),
|
||||
be_native_module_int("WEBCAM_DATA", 159),
|
||||
be_native_module_int("WEBCAM_VSYNC", 160),
|
||||
be_native_module_int("WEBCAM_HREF", 161),
|
||||
be_native_module_int("WEBCAM_PCLK", 162),
|
||||
be_native_module_int("WEBCAM_PSCLK", 163),
|
||||
be_native_module_int("WEBCAM_HSD", 164),
|
||||
be_native_module_int("WEBCAM_PSRCS", 165),
|
||||
be_native_module_int("BOILER_OT_RX", 166),
|
||||
be_native_module_int("BOILER_OT_TX", 167),
|
||||
be_native_module_int("WINDMETER_SPEED", 168),
|
||||
be_native_module_int("KEY1_TC", 169),
|
||||
be_native_module_int("BL0940_RX", 170),
|
||||
be_native_module_int("TCP_TX", 171),
|
||||
be_native_module_int("TCP_RX", 172),
|
||||
be_native_module_int("ETH_PHY_POWER", 173),
|
||||
be_native_module_int("ETH_PHY_MDC", 174),
|
||||
be_native_module_int("ETH_PHY_MDIO", 175),
|
||||
be_native_module_int("TELEINFO_RX", 176),
|
||||
be_native_module_int("TELEINFO_ENABLE", 177),
|
||||
be_native_module_int("LMT01", 178),
|
||||
be_native_module_int("IEM3000_TX", 179),
|
||||
be_native_module_int("IEM3000_RX", 180),
|
||||
be_native_module_int("ZIGBEE_RST", 181),
|
||||
be_native_module_int("DYP_RX", 182),
|
||||
be_native_module_int("MIEL_HVAC_TX", 183),
|
||||
be_native_module_int("MIEL_HVAC_RX", 184),
|
||||
be_native_module_int("WE517_TX", 185),
|
||||
be_native_module_int("WE517_RX", 186),
|
||||
be_native_module_int("AS608_TX", 187),
|
||||
be_native_module_int("AS608_RX", 188),
|
||||
be_native_module_int("SHELLY_DIMMER_BOOT0", 189),
|
||||
be_native_module_int("SHELLY_DIMMER_RST_INV", 190),
|
||||
be_native_module_int("RC522_RST", 191),
|
||||
be_native_module_int("P9813_CLK", 192),
|
||||
be_native_module_int("P9813_DAT", 193),
|
||||
be_native_module_int("OPTION_A", 194),
|
||||
be_native_module_int("FTC532", 195),
|
||||
be_native_module_int("RC522_CS", 196),
|
||||
be_native_module_int("NRF24_CS", 197),
|
||||
be_native_module_int("NRF24_DC", 198),
|
||||
be_native_module_int("ILI9341_CS", 199),
|
||||
be_native_module_int("ILI9341_DC", 200),
|
||||
be_native_module_int("ILI9488_CS", 201),
|
||||
be_native_module_int("EPAPER29_CS", 202),
|
||||
be_native_module_int("EPAPER42_CS", 203),
|
||||
be_native_module_int("SSD1351_CS", 204),
|
||||
be_native_module_int("RA8876_CS", 205),
|
||||
be_native_module_int("ST7789_CS", 206),
|
||||
be_native_module_int("ST7789_DC", 207),
|
||||
be_native_module_int("SSD1331_CS", 208),
|
||||
be_native_module_int("SSD1331_DC", 209),
|
||||
be_native_module_int("SDCARD_CS", 210),
|
||||
be_native_module_int("ROT1A_NP", 211),
|
||||
be_native_module_int("ROT1B_NP", 212),
|
||||
be_native_module_int("ADC_PH", 213),
|
||||
be_native_module_int("BS814_CLK", 214),
|
||||
be_native_module_int("BS814_DAT", 215),
|
||||
be_native_module_int("WIEGAND_D0", 216),
|
||||
be_native_module_int("WIEGAND_D1", 217),
|
||||
be_native_module_int("NEOPOOL_TX", 218),
|
||||
be_native_module_int("NEOPOOL_RX", 219),
|
||||
be_native_module_int("SDM72_TX", 220),
|
||||
be_native_module_int("SDM72_RX", 221),
|
||||
be_native_module_int("TM1637CLK", 222),
|
||||
be_native_module_int("TM1637DIO", 223),
|
||||
be_native_module_int("PROJECTOR_CTRL_TX", 224),
|
||||
be_native_module_int("PROJECTOR_CTRL_RX", 225),
|
||||
be_native_module_int("SSD1351_DC", 226),
|
||||
be_native_module_int("XPT2046_CS", 227),
|
||||
be_native_module_int("CSE7761_TX", 228),
|
||||
be_native_module_int("CSE7761_RX", 229),
|
||||
be_native_module_int("VL53L0X_XSHUT1", 230),
|
||||
be_native_module_int("MAX7219CLK", 231),
|
||||
be_native_module_int("MAX7219DIN", 232),
|
||||
be_native_module_int("MAX7219CS", 233),
|
||||
be_native_module_int("TFMINIPLUS_TX", 234),
|
||||
be_native_module_int("TFMINIPLUS_RX", 235),
|
||||
be_native_module_int("ZEROCROSS", 236),
|
||||
be_native_module_int("HALLEFFECT", 237),
|
||||
be_native_module_int("EPD_DATA", 238),
|
||||
be_native_module_int("INPUT", 239),
|
||||
be_native_module_int("KEY1_PD", 240),
|
||||
be_native_module_int("KEY1_INV_PD", 241),
|
||||
be_native_module_int("SWT1_PD", 242),
|
||||
be_native_module_int("I2S_OUT_DATA", 243),
|
||||
be_native_module_int("I2S_OUT_CLK", 244),
|
||||
be_native_module_int("I2S_OUT_SLCT", 245),
|
||||
be_native_module_int("I2S_IN_DATA", 246),
|
||||
be_native_module_int("I2S_IN_CLK", 247),
|
||||
be_native_module_int("I2S_IN_SLCT", 248),
|
||||
be_native_module_int("INTERRUPT", 249),
|
||||
|
||||
be_native_module_int("SENSOR_END", 250),
|
||||
|
||||
be_native_module_function("pin_mode", gp_pin_mode),
|
||||
be_native_module_function("digital_write", gp_digital_write),
|
||||
be_native_module_function("digital_read", gp_digital_read),
|
||||
|
||||
be_native_module_function("pin_used", gp_pin_used),
|
||||
be_native_module_function("pin", gp_pin),
|
||||
|
||||
};
|
||||
|
||||
be_define_native_module(gpio, NULL);
|
||||
#else
|
||||
/* @const_object_info_begin
|
||||
module gpio (scope: global) {
|
||||
LOW, int(0)
|
||||
|
@ -312,6 +30,7 @@ module gpio (scope: global) {
|
|||
INPUT_PULLDOWN, int(9)
|
||||
OPEN_DRAIN, int(16)
|
||||
OUTPUT_OPEN_DRAIN, int(18)
|
||||
DAC, int(-1)
|
||||
|
||||
RISING, int(1)
|
||||
FALLING, int(2)
|
||||
|
@ -573,10 +292,10 @@ module gpio (scope: global) {
|
|||
pin_mode, func(gp_pin_mode)
|
||||
digital_write, func(gp_digital_write)
|
||||
digital_read, func(gp_digital_read)
|
||||
dac_voltage, func(gp_dac_voltage)
|
||||
|
||||
pin_used, func(gp_pin_used)
|
||||
pin, func(gp_pin)
|
||||
}
|
||||
@const_object_info_end */
|
||||
#include "../generate/be_fixed_gpio.h"
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,279 +1,281 @@
|
|||
#include "be_constobj.h"
|
||||
|
||||
static be_define_const_map_slots(m_libgpio_map) {
|
||||
{ be_const_key(ADC_BUTTON, -1), be_const_int(150) },
|
||||
{ be_const_key(ZIGBEE_RST, -1), be_const_int(181) },
|
||||
{ be_const_key(SPI_CLK, 231), be_const_int(23) },
|
||||
{ be_const_key(MHZ_RXD, -1), be_const_int(45) },
|
||||
{ be_const_key(SDM72_RX, -1), be_const_int(221) },
|
||||
{ be_const_key(A4988_MS1, -1), be_const_int(119) },
|
||||
{ be_const_key(DEEPSLEEP, -1), be_const_int(128) },
|
||||
{ be_const_key(WIEGAND_D1, 192), be_const_int(217) },
|
||||
{ be_const_key(WEBCAM_HSD, -1), be_const_int(164) },
|
||||
{ be_const_key(TM1637DIO, -1), be_const_int(223) },
|
||||
{ be_const_key(KEY1_INV_NP, 252), be_const_int(4) },
|
||||
{ be_const_key(IBEACON_RX, -1), be_const_int(115) },
|
||||
{ be_const_key(OUTPUT_LO, 243), be_const_int(121) },
|
||||
{ be_const_key(RISING, 87), be_const_int(1) },
|
||||
{ be_const_key(WEBCAM_PWDN, 10), be_const_int(154) },
|
||||
{ be_const_key(BOILER_OT_TX, 32), be_const_int(167) },
|
||||
{ be_const_key(CNTR1_NP, -1), be_const_int(12) },
|
||||
{ be_const_key(MAX7219DIN, -1), be_const_int(232) },
|
||||
{ be_const_key(I2C_SDA, 42), be_const_int(20) },
|
||||
{ be_const_key(DCKI, 188), be_const_int(95) },
|
||||
{ be_const_key(I2S_IN_CLK, -1), be_const_int(247) },
|
||||
{ be_const_key(CHANGE, -1), be_const_int(4) },
|
||||
{ be_const_key(pin_used, -1), be_const_func(gp_pin_used) },
|
||||
{ be_const_key(HALLEFFECT, -1), be_const_int(237) },
|
||||
{ be_const_key(ADC_TEMP, 112), be_const_int(148) },
|
||||
{ be_const_key(SSPI_MOSI, 254), be_const_int(27) },
|
||||
{ be_const_key(TASMOTACLIENT_RST, -1), be_const_int(132) },
|
||||
{ be_const_key(ZIGBEE_RX, -1), be_const_int(112) },
|
||||
{ be_const_key(ROT1B_NP, 107), be_const_int(212) },
|
||||
{ be_const_key(SSD1351_CS, 149), be_const_int(204) },
|
||||
{ be_const_key(MAX7219CLK, -1), be_const_int(231) },
|
||||
{ be_const_key(SSD1331_DC, -1), be_const_int(209) },
|
||||
{ be_const_key(SR04_TRIG, -1), be_const_int(58) },
|
||||
{ be_const_key(TCP_RX, 187), be_const_int(172) },
|
||||
{ be_const_key(SM16716_DAT, 91), be_const_int(92) },
|
||||
{ be_const_key(OLED_RESET, 264), be_const_int(32) },
|
||||
{ be_const_key(RDM6300_RX, -1), be_const_int(113) },
|
||||
{ be_const_key(LOW, -1), be_const_int(0) },
|
||||
{ be_const_key(ADC_BUTTON_INV, 79), be_const_int(151) },
|
||||
{ be_const_key(SM16716_CLK, 76), be_const_int(91) },
|
||||
{ be_const_key(SSPI_DC, -1), be_const_int(30) },
|
||||
{ be_const_key(TFMINIPLUS_RX, -1), be_const_int(235) },
|
||||
{ be_const_key(TM1638CLK, -1), be_const_int(64) },
|
||||
{ be_const_key(BL0940_RX, -1), be_const_int(170) },
|
||||
{ be_const_key(WEBCAM_PSCLK, -1), be_const_int(163) },
|
||||
{ be_const_key(RFRECV, -1), be_const_int(36) },
|
||||
{ be_const_key(GPS_RX, 124), be_const_int(136) },
|
||||
{ be_const_key(DSB_OUT, -1), be_const_int(42) },
|
||||
{ be_const_key(HPMA_TX, -1), be_const_int(135) },
|
||||
{ be_const_key(SHELLY_DIMMER_RST_INV, -1), be_const_int(190) },
|
||||
{ be_const_key(SDM72_TX, -1), be_const_int(220) },
|
||||
{ be_const_key(HJL_CF, -1), be_const_int(85) },
|
||||
{ be_const_key(IEM3000_RX, 24), be_const_int(180) },
|
||||
{ be_const_key(KEY1_NP, -1), be_const_int(2) },
|
||||
{ be_const_key(DDS2382_RX, -1), be_const_int(123) },
|
||||
{ be_const_key(INPUT_PULLDOWN, -1), be_const_int(9) },
|
||||
{ be_const_key(SSPI_MISO, -1), be_const_int(26) },
|
||||
{ be_const_key(DDS2382_TX, -1), be_const_int(122) },
|
||||
{ be_const_key(SDM630_RX, -1), be_const_int(63) },
|
||||
{ be_const_key(SDS0X1_TX, 63), be_const_int(54) },
|
||||
{ be_const_key(HPMA_RX, -1), be_const_int(134) },
|
||||
{ be_const_key(DYP_RX, -1), be_const_int(182) },
|
||||
{ be_const_key(NRG_CF1, 138), be_const_int(83) },
|
||||
{ be_const_key(REL1_INV, 169), be_const_int(8) },
|
||||
{ be_const_key(MCP39F5_RST, 131), be_const_int(88) },
|
||||
{ be_const_key(I2S_OUT_SLCT, 170), be_const_int(245) },
|
||||
{ be_const_key(ADE7953_IRQ, -1), be_const_int(108) },
|
||||
{ be_const_key(REL1, -1), be_const_int(7) },
|
||||
{ be_const_key(SOLAXX1_TX, 154), be_const_int(109) },
|
||||
{ be_const_key(CSE7766_RX, -1), be_const_int(97) },
|
||||
{ be_const_key(PROJECTOR_CTRL_TX, 29), be_const_int(224) },
|
||||
{ be_const_key(PULLUP, -1), be_const_int(4) },
|
||||
{ be_const_key(SPI_DC, 90), be_const_int(25) },
|
||||
{ be_const_key(IBEACON_TX, -1), be_const_int(114) },
|
||||
{ be_const_key(IEM3000_TX, 157), be_const_int(179) },
|
||||
{ be_const_key(WEBCAM_PSRCS, -1), be_const_int(165) },
|
||||
{ be_const_key(ELECTRIQ_MOODL_TX, -1), be_const_int(145) },
|
||||
{ be_const_key(LED1_INV, -1), be_const_int(10) },
|
||||
{ be_const_key(TASMOTACLIENT_RXD, 109), be_const_int(131) },
|
||||
{ be_const_key(PN532_RXD, -1), be_const_int(90) },
|
||||
{ be_const_key(ROT1A, 197), be_const_int(102) },
|
||||
{ be_const_key(SENSOR_END, 167), be_const_int(250) },
|
||||
{ be_const_key(DHT11_OUT, -1), be_const_int(40) },
|
||||
{ be_const_key(HM10_TX, 199), be_const_int(139) },
|
||||
{ be_const_key(DHT22, 6), be_const_int(38) },
|
||||
{ be_const_key(ARIRFRCV, 226), be_const_int(98) },
|
||||
{ be_const_key(WEBCAM_HREF, 183), be_const_int(161) },
|
||||
{ be_const_key(SM16716_CLK, 168), be_const_int(91) },
|
||||
{ be_const_key(ZIGBEE_RST, 264), be_const_int(181) },
|
||||
{ be_const_key(KEY1_INV_NP, 223), be_const_int(4) },
|
||||
{ be_const_key(KEY1_TC, 81), be_const_int(169) },
|
||||
{ be_const_key(PROJECTOR_CTRL_RX, -1), be_const_int(225) },
|
||||
{ be_const_key(EPAPER29_CS, -1), be_const_int(202) },
|
||||
{ be_const_key(VL53L0X_XSHUT1, -1), be_const_int(230) },
|
||||
{ be_const_key(DDSU666_RX, 22), be_const_int(125) },
|
||||
{ be_const_key(SSPI_CS, -1), be_const_int(29) },
|
||||
{ be_const_key(BACKLIGHT, 60), be_const_int(31) },
|
||||
{ be_const_key(CC1101_GDO0, 225), be_const_int(142) },
|
||||
{ be_const_key(INTERRUPT, -1), be_const_int(249) },
|
||||
{ be_const_key(MP3_DFR562, -1), be_const_int(67) },
|
||||
{ be_const_key(ROT1A_NP, -1), be_const_int(211) },
|
||||
{ be_const_key(PZEM017_RX, -1), be_const_int(49) },
|
||||
{ be_const_key(RC522_CS, 81), be_const_int(196) },
|
||||
{ be_const_key(TASMOTACLIENT_RST_INV, -1), be_const_int(133) },
|
||||
{ be_const_key(ETH_PHY_MDIO, -1), be_const_int(175) },
|
||||
{ be_const_key(WE517_RX, -1), be_const_int(186) },
|
||||
{ be_const_key(LMT01, -1), be_const_int(178) },
|
||||
{ be_const_key(ILI9488_CS, -1), be_const_int(201) },
|
||||
{ be_const_key(I2C_SCL, 0), be_const_int(19) },
|
||||
{ be_const_key(TM1638STB, -1), be_const_int(66) },
|
||||
{ be_const_key(ETH_PHY_MDC, -1), be_const_int(174) },
|
||||
{ be_const_key(WE517_TX, 96), be_const_int(185) },
|
||||
{ be_const_key(IRSEND, -1), be_const_int(33) },
|
||||
{ be_const_key(I2S_OUT_CLK, -1), be_const_int(244) },
|
||||
{ be_const_key(SPI_CS, -1), be_const_int(24) },
|
||||
{ be_const_key(SWT1, -1), be_const_int(5) },
|
||||
{ be_const_key(HM10_RX, -1), be_const_int(138) },
|
||||
{ be_const_key(WEBCAM_HREF, -1), be_const_int(161) },
|
||||
{ be_const_key(OPEN_DRAIN, -1), be_const_int(16) },
|
||||
{ be_const_key(AS608_TX, -1), be_const_int(187) },
|
||||
{ be_const_key(SSPI_SCLK, -1), be_const_int(28) },
|
||||
{ be_const_key(A4988_DIR, -1), be_const_int(116) },
|
||||
{ be_const_key(SHELLY_DIMMER_BOOT0, -1), be_const_int(189) },
|
||||
{ be_const_key(I2S_OUT_DATA, -1), be_const_int(243) },
|
||||
{ be_const_key(MIEL_HVAC_TX, -1), be_const_int(183) },
|
||||
{ be_const_key(WEBCAM_SIOC, 41), be_const_int(158) },
|
||||
{ be_const_key(RF_SENSOR, 57), be_const_int(75) },
|
||||
{ be_const_key(AZ_TXD, -1), be_const_int(76) },
|
||||
{ be_const_key(A4988_ENA, -1), be_const_int(118) },
|
||||
{ be_const_key(DHT22, -1), be_const_int(38) },
|
||||
{ be_const_key(TASMOTACLIENT_TXD, -1), be_const_int(130) },
|
||||
{ be_const_key(TELEINFO_ENABLE, 62), be_const_int(177) },
|
||||
{ be_const_key(NRF24_CS, -1), be_const_int(197) },
|
||||
{ be_const_key(HRE_CLOCK, -1), be_const_int(106) },
|
||||
{ be_const_key(NEOPOOL_RX, 158), be_const_int(219) },
|
||||
{ be_const_key(HIGH, 237), be_const_int(1) },
|
||||
{ be_const_key(HLW_CF, 53), be_const_int(84) },
|
||||
{ be_const_key(AZ_RXD, -1), be_const_int(77) },
|
||||
{ be_const_key(HM10_TX, 167), be_const_int(139) },
|
||||
{ be_const_key(LEDLNK, 155), be_const_int(17) },
|
||||
{ be_const_key(PWM1, -1), be_const_int(13) },
|
||||
{ be_const_key(BS814_CLK, -1), be_const_int(214) },
|
||||
{ be_const_key(TFMINIPLUS_TX, 99), be_const_int(234) },
|
||||
{ be_const_key(WEBCAM_PCLK, -1), be_const_int(162) },
|
||||
{ be_const_key(DSB, -1), be_const_int(41) },
|
||||
{ be_const_key(NONE, -1), be_const_int(0) },
|
||||
{ be_const_key(pin, 19), be_const_func(gp_pin) },
|
||||
{ be_const_key(PN532_TXD, -1), be_const_int(89) },
|
||||
{ be_const_key(SENSOR_END, 222), be_const_int(250) },
|
||||
{ be_const_key(SM2135_CLK, -1), be_const_int(126) },
|
||||
{ be_const_key(TX2X_TXD_BLACK, -1), be_const_int(70) },
|
||||
{ be_const_key(ZEROCROSS, -1), be_const_int(236) },
|
||||
{ be_const_key(ADC_INPUT, -1), be_const_int(147) },
|
||||
{ be_const_key(RC522_RST, -1), be_const_int(191) },
|
||||
{ be_const_key(TFMINIPLUS_RX, -1), be_const_int(235) },
|
||||
{ be_const_key(SSD1331_CS, -1), be_const_int(208) },
|
||||
{ be_const_key(BS814_DAT, -1), be_const_int(215) },
|
||||
{ be_const_key(PULLDOWN, -1), be_const_int(8) },
|
||||
{ be_const_key(I2S_IN_SLCT, 105), be_const_int(248) },
|
||||
{ be_const_key(OPTION_A, -1), be_const_int(194) },
|
||||
{ be_const_key(MP3_DFR562, 162), be_const_int(67) },
|
||||
{ be_const_key(WEBCAM_VSYNC, 140), be_const_int(160) },
|
||||
{ be_const_key(CNTR1, 246), be_const_int(11) },
|
||||
{ be_const_key(ROT1B_NP, -1), be_const_int(212) },
|
||||
{ be_const_key(ELECTRIQ_MOODL_TX, -1), be_const_int(145) },
|
||||
{ be_const_key(TASMOTACLIENT_RXD, -1), be_const_int(131) },
|
||||
{ be_const_key(NONE, -1), be_const_int(0) },
|
||||
{ be_const_key(RF_SENSOR, -1), be_const_int(75) },
|
||||
{ be_const_key(MAX31855CS, -1), be_const_int(78) },
|
||||
{ be_const_key(SPI_MOSI, 233), be_const_int(22) },
|
||||
{ be_const_key(I2S_OUT_DATA, -1), be_const_int(243) },
|
||||
{ be_const_key(HPMA_TX, 108), be_const_int(135) },
|
||||
{ be_const_key(TASMOTACLIENT_RST_INV, 156), be_const_int(133) },
|
||||
{ be_const_key(IEM3000_RX, -1), be_const_int(180) },
|
||||
{ be_const_key(BS814_DAT, 196), be_const_int(215) },
|
||||
{ be_const_key(OUTPUT_LO, -1), be_const_int(121) },
|
||||
{ be_const_key(SSD1351_CS, 236), be_const_int(204) },
|
||||
{ be_const_key(TM1637DIO, -1), be_const_int(223) },
|
||||
{ be_const_key(INTERRUPT, 240), be_const_int(249) },
|
||||
{ be_const_key(PN532_RXD, 195), be_const_int(90) },
|
||||
{ be_const_key(SM2135_CLK, -1), be_const_int(126) },
|
||||
{ be_const_key(DI, -1), be_const_int(94) },
|
||||
{ be_const_key(PZEM004_RX, -1), be_const_int(47) },
|
||||
{ be_const_key(SDCARD_CS, -1), be_const_int(210) },
|
||||
{ be_const_key(ZIGBEE_TX, 94), be_const_int(111) },
|
||||
{ be_const_key(ST7789_DC, 50), be_const_int(207) },
|
||||
{ be_const_key(P9813_DAT, 214), be_const_int(193) },
|
||||
{ be_const_key(EXS_ENABLE, 56), be_const_int(129) },
|
||||
{ be_const_key(SSPI_MAX31865_CS1, 147), be_const_int(105) },
|
||||
{ be_const_key(PMS5003_RX, -1), be_const_int(53) },
|
||||
{ be_const_key(pin_mode, -1), be_const_func(gp_pin_mode) },
|
||||
{ be_const_key(SAIR_TX, 4), be_const_int(50) },
|
||||
{ be_const_key(CSE7761_RX, 102), be_const_int(229) },
|
||||
{ be_const_key(SBR_RX, 47), be_const_int(57) },
|
||||
{ be_const_key(SOLAXX1_RX, -1), be_const_int(110) },
|
||||
{ be_const_key(KEY1, 5), be_const_int(1) },
|
||||
{ be_const_key(GPS_TX, 227), be_const_int(137) },
|
||||
{ be_const_key(EPD_DATA, -1), be_const_int(238) },
|
||||
{ be_const_key(WS2812, -1), be_const_int(43) },
|
||||
{ be_const_key(PZEM0XX_TX, -1), be_const_int(46) },
|
||||
{ be_const_key(WINDMETER_SPEED, -1), be_const_int(168) },
|
||||
{ be_const_key(TUYA_RX, 199), be_const_int(72) },
|
||||
{ be_const_key(NRG_SEL, -1), be_const_int(81) },
|
||||
{ be_const_key(PZEM016_RX, 13), be_const_int(48) },
|
||||
{ be_const_key(KEY1_PD, -1), be_const_int(240) },
|
||||
{ be_const_key(LE01MR_RX, -1), be_const_int(140) },
|
||||
{ be_const_key(ADC_PH, -1), be_const_int(213) },
|
||||
{ be_const_key(SDM120_TX, -1), be_const_int(60) },
|
||||
{ be_const_key(HX711_DAT, -1), be_const_int(69) },
|
||||
{ be_const_key(CNTR1, 132), be_const_int(11) },
|
||||
{ be_const_key(PWM1_INV, 184), be_const_int(14) },
|
||||
{ be_const_key(RFSEND, 182), be_const_int(35) },
|
||||
{ be_const_key(RXD, 194), be_const_int(101) },
|
||||
{ be_const_key(SDM120_RX, -1), be_const_int(61) },
|
||||
{ be_const_key(SWT1_NP, -1), be_const_int(6) },
|
||||
{ be_const_key(TM1638CLK, 87), be_const_int(64) },
|
||||
{ be_const_key(DSB_OUT, 65), be_const_int(42) },
|
||||
{ be_const_key(I2S_OUT_SLCT, -1), be_const_int(245) },
|
||||
{ be_const_key(RDM6300_RX, -1), be_const_int(113) },
|
||||
{ be_const_key(TUYA_RX, 59), be_const_int(72) },
|
||||
{ be_const_key(WIEGAND_D1, -1), be_const_int(217) },
|
||||
{ be_const_key(EPAPER42_CS, 133), be_const_int(203) },
|
||||
{ be_const_key(INPUT_PULLDOWN, -1), be_const_int(9) },
|
||||
{ be_const_key(A4988_DIR, 75), be_const_int(116) },
|
||||
{ be_const_key(NEOPOOL_RX, -1), be_const_int(219) },
|
||||
{ be_const_key(PZEM016_RX, 36), be_const_int(48) },
|
||||
{ be_const_key(digital_write, 225), be_const_func(gp_digital_write) },
|
||||
{ be_const_key(NRG_CF1, -1), be_const_int(83) },
|
||||
{ be_const_key(FTC532, -1), be_const_int(195) },
|
||||
{ be_const_key(DDS2382_TX, -1), be_const_int(122) },
|
||||
{ be_const_key(WEBCAM_RESET, 230), be_const_int(155) },
|
||||
{ be_const_key(TELEINFO_ENABLE, 42), be_const_int(177) },
|
||||
{ be_const_key(IRRECV, 89), be_const_int(34) },
|
||||
{ be_const_key(SDM120_RX, 148), be_const_int(61) },
|
||||
{ be_const_key(PMS5003_TX, -1), be_const_int(52) },
|
||||
{ be_const_key(CC1101_GDO2, -1), be_const_int(143) },
|
||||
{ be_const_key(HPMA_RX, 238), be_const_int(134) },
|
||||
{ be_const_key(MAX7219CS, -1), be_const_int(233) },
|
||||
{ be_const_key(CSE7766_RX, 46), be_const_int(97) },
|
||||
{ be_const_key(RISING, 103), be_const_int(1) },
|
||||
{ be_const_key(SPI_MISO, -1), be_const_int(21) },
|
||||
{ be_const_key(RFRECV, -1), be_const_int(36) },
|
||||
{ be_const_key(SHELLY_DIMMER_RST_INV, 228), be_const_int(190) },
|
||||
{ be_const_key(TASMOTACLIENT_RST, -1), be_const_int(132) },
|
||||
{ be_const_key(PULLDOWN, 189), be_const_int(8) },
|
||||
{ be_const_key(SSPI_CS, -1), be_const_int(29) },
|
||||
{ be_const_key(TUYA_TX, -1), be_const_int(71) },
|
||||
{ be_const_key(LED1_INV, 0), be_const_int(10) },
|
||||
{ be_const_key(digital_read, -1), be_const_func(gp_digital_read) },
|
||||
{ be_const_key(CSE7766_TX, 215), be_const_int(96) },
|
||||
{ be_const_key(DCKI, -1), be_const_int(95) },
|
||||
{ be_const_key(ILI9341_CS, -1), be_const_int(199) },
|
||||
{ be_const_key(pin_used, -1), be_const_func(gp_pin_used) },
|
||||
{ be_const_key(ADC_RANGE, 237), be_const_int(152) },
|
||||
{ be_const_key(PZEM0XX_TX, 31), be_const_int(46) },
|
||||
{ be_const_key(ROT1A_NP, -1), be_const_int(211) },
|
||||
{ be_const_key(ROT1A, 202), be_const_int(102) },
|
||||
{ be_const_key(HALLEFFECT, -1), be_const_int(237) },
|
||||
{ be_const_key(OPEN_DRAIN, -1), be_const_int(16) },
|
||||
{ be_const_key(TM1638DIO, 220), be_const_int(65) },
|
||||
{ be_const_key(IEM3000_TX, -1), be_const_int(179) },
|
||||
{ be_const_key(MAX7219DIN, 118), be_const_int(232) },
|
||||
{ be_const_key(A4988_ENA, -1), be_const_int(118) },
|
||||
{ be_const_key(MHZ_TXD, 23), be_const_int(44) },
|
||||
{ be_const_key(WEBCAM_PWDN, -1), be_const_int(154) },
|
||||
{ be_const_key(SDS0X1_RX, -1), be_const_int(55) },
|
||||
{ be_const_key(SPI_CS, -1), be_const_int(24) },
|
||||
{ be_const_key(BS814_CLK, -1), be_const_int(214) },
|
||||
{ be_const_key(CSE7761_RX, -1), be_const_int(229) },
|
||||
{ be_const_key(ADC_JOY, -1), be_const_int(104) },
|
||||
{ be_const_key(OPTION_A, 171), be_const_int(194) },
|
||||
{ be_const_key(RFSEND, -1), be_const_int(35) },
|
||||
{ be_const_key(HRE_DATA, 135), be_const_int(107) },
|
||||
{ be_const_key(BOILER_OT_TX, 221), be_const_int(167) },
|
||||
{ be_const_key(ETH_PHY_MDC, 30), be_const_int(174) },
|
||||
{ be_const_key(LED1, 11), be_const_int(9) },
|
||||
{ be_const_key(DDSU666_RX, 64), be_const_int(125) },
|
||||
{ be_const_key(MAX31855CLK, -1), be_const_int(79) },
|
||||
{ be_const_key(RA8876_CS, -1), be_const_int(205) },
|
||||
{ be_const_key(AZ_TXD, -1), be_const_int(76) },
|
||||
{ be_const_key(SBR_TX, -1), be_const_int(56) },
|
||||
{ be_const_key(REL1_INV, 212), be_const_int(8) },
|
||||
{ be_const_key(CC1101_GDO0, -1), be_const_int(142) },
|
||||
{ be_const_key(AZ_RXD, 149), be_const_int(77) },
|
||||
{ be_const_key(EPAPER29_CS, 229), be_const_int(202) },
|
||||
{ be_const_key(P9813_DAT, 177), be_const_int(193) },
|
||||
{ be_const_key(PWM1, -1), be_const_int(13) },
|
||||
{ be_const_key(INPUT, -1), be_const_int(239) },
|
||||
{ be_const_key(PN532_TXD, -1), be_const_int(89) },
|
||||
{ be_const_key(I2S_IN_DATA, -1), be_const_int(246) },
|
||||
{ be_const_key(SOLAXX1_TX, -1), be_const_int(109) },
|
||||
{ be_const_key(LEDLNK_INV, 208), be_const_int(18) },
|
||||
{ be_const_key(ADC_LIGHT, -1), be_const_int(149) },
|
||||
{ be_const_key(SDS0X1_TX, 92), be_const_int(54) },
|
||||
{ be_const_key(ADC_PH, 1), be_const_int(213) },
|
||||
{ be_const_key(WEBCAM_XCLK, 267), be_const_int(156) },
|
||||
{ be_const_key(ADC_BUTTON_INV, -1), be_const_int(151) },
|
||||
{ be_const_key(IBEACON_TX, 13), be_const_int(114) },
|
||||
{ be_const_key(SWT1_NP, -1), be_const_int(6) },
|
||||
{ be_const_key(SDCARD_CS, 62), be_const_int(210) },
|
||||
{ be_const_key(KEY1_PD, -1), be_const_int(240) },
|
||||
{ be_const_key(BUZZER, 69), be_const_int(15) },
|
||||
{ be_const_key(SM2135_DAT, -1), be_const_int(127) },
|
||||
{ be_const_key(CNTR1_NP, -1), be_const_int(12) },
|
||||
{ be_const_key(NRF24_CS, 49), be_const_int(197) },
|
||||
{ be_const_key(DYP_RX, -1), be_const_int(182) },
|
||||
{ be_const_key(IRSEND, -1), be_const_int(33) },
|
||||
{ be_const_key(WEBCAM_SIOC, 258), be_const_int(158) },
|
||||
{ be_const_key(MAX7219CLK, 56), be_const_int(231) },
|
||||
{ be_const_key(WIEGAND_D0, 165), be_const_int(216) },
|
||||
{ be_const_key(ZIGBEE_RX, -1), be_const_int(112) },
|
||||
{ be_const_key(CHANGE, 33), be_const_int(4) },
|
||||
{ be_const_key(AS608_RX, -1), be_const_int(188) },
|
||||
{ be_const_key(TCP_RX, -1), be_const_int(172) },
|
||||
{ be_const_key(PZEM017_RX, -1), be_const_int(49) },
|
||||
{ be_const_key(NRF24_DC, -1), be_const_int(198) },
|
||||
{ be_const_key(BACKLIGHT, 35), be_const_int(31) },
|
||||
{ be_const_key(SSPI_MOSI, -1), be_const_int(27) },
|
||||
{ be_const_key(MAX31855DO, -1), be_const_int(80) },
|
||||
{ be_const_key(LE01MR_RX, -1), be_const_int(140) },
|
||||
{ be_const_key(I2S_IN_SLCT, -1), be_const_int(248) },
|
||||
{ be_const_key(ETH_PHY_POWER, -1), be_const_int(173) },
|
||||
{ be_const_key(ADE7953_IRQ, 29), be_const_int(108) },
|
||||
{ be_const_key(SSPI_MISO, -1), be_const_int(26) },
|
||||
{ be_const_key(WINDMETER_SPEED, 79), be_const_int(168) },
|
||||
{ be_const_key(IBEACON_RX, -1), be_const_int(115) },
|
||||
{ be_const_key(TX2X_TXD_BLACK, 8), be_const_int(70) },
|
||||
{ be_const_key(TM1637CLK, 102), be_const_int(222) },
|
||||
{ be_const_key(KEY1_INV, -1), be_const_int(3) },
|
||||
{ be_const_key(BOILER_OT_RX, -1), be_const_int(166) },
|
||||
{ be_const_key(DDSU666_TX, -1), be_const_int(124) },
|
||||
{ be_const_key(MHZ_TXD, -1), be_const_int(44) },
|
||||
{ be_const_key(OUTPUT_HI, -1), be_const_int(120) },
|
||||
{ be_const_key(WEBCAM_DATA, -1), be_const_int(159) },
|
||||
{ be_const_key(DDS2382_RX, -1), be_const_int(123) },
|
||||
{ be_const_key(EXS_ENABLE, 53), be_const_int(129) },
|
||||
{ be_const_key(AS608_TX, -1), be_const_int(187) },
|
||||
{ be_const_key(OLED_RESET, 100), be_const_int(32) },
|
||||
{ be_const_key(AS3935, -1), be_const_int(146) },
|
||||
{ be_const_key(LMT01, -1), be_const_int(178) },
|
||||
{ be_const_key(ADC_INPUT, -1), be_const_int(147) },
|
||||
{ be_const_key(SDM72_TX, 235), be_const_int(220) },
|
||||
{ be_const_key(ADC_TEMP, -1), be_const_int(148) },
|
||||
{ be_const_key(LEDLNK, 7), be_const_int(17) },
|
||||
{ be_const_key(DAC, -1), be_const_int(-1) },
|
||||
{ be_const_key(SAIR_RX, -1), be_const_int(51) },
|
||||
{ be_const_key(SOLAXX1_RX, -1), be_const_int(110) },
|
||||
{ be_const_key(WEBCAM_PCLK, -1), be_const_int(162) },
|
||||
{ be_const_key(KEY1_NP, 14), be_const_int(2) },
|
||||
{ be_const_key(TFMINIPLUS_TX, -1), be_const_int(234) },
|
||||
{ be_const_key(SR04_TRIG, -1), be_const_int(58) },
|
||||
{ be_const_key(A4988_STP, 182), be_const_int(117) },
|
||||
{ be_const_key(TASMOTACLIENT_TXD, -1), be_const_int(130) },
|
||||
{ be_const_key(HX711_DAT, 207), be_const_int(69) },
|
||||
{ be_const_key(HM10_RX, -1), be_const_int(138) },
|
||||
{ be_const_key(ARIRFSEL, 249), be_const_int(99) },
|
||||
{ be_const_key(MIEL_HVAC_TX, 141), be_const_int(183) },
|
||||
{ be_const_key(NRG_SEL, -1), be_const_int(81) },
|
||||
{ be_const_key(DEEPSLEEP, 132), be_const_int(128) },
|
||||
{ be_const_key(CSE7761_TX, -1), be_const_int(228) },
|
||||
{ be_const_key(WS2812, 18), be_const_int(43) },
|
||||
{ be_const_key(WE517_RX, 188), be_const_int(186) },
|
||||
{ be_const_key(PROJECTOR_CTRL_TX, -1), be_const_int(224) },
|
||||
{ be_const_key(SI7021, 242), be_const_int(39) },
|
||||
{ be_const_key(SM16716_SEL, -1), be_const_int(93) },
|
||||
{ be_const_key(KEY1_INV_PD, -1), be_const_int(241) },
|
||||
{ be_const_key(BOILER_OT_RX, 9), be_const_int(166) },
|
||||
{ be_const_key(WEBCAM_SIOD, 78), be_const_int(157) },
|
||||
{ be_const_key(SI7021, -1), be_const_int(39) },
|
||||
{ be_const_key(MIEL_HVAC_RX, -1), be_const_int(184) },
|
||||
{ be_const_key(P9813_CLK, -1), be_const_int(192) },
|
||||
{ be_const_key(NRG_SEL_INV, 232), be_const_int(82) },
|
||||
{ be_const_key(INPUT, 85), be_const_int(239) },
|
||||
{ be_const_key(AS608_RX, -1), be_const_int(188) },
|
||||
{ be_const_key(SR04_ECHO, -1), be_const_int(59) },
|
||||
{ be_const_key(CSE7761_TX, -1), be_const_int(228) },
|
||||
{ be_const_key(digital_write, -1), be_const_func(gp_digital_write) },
|
||||
{ be_const_key(MAX31855DO, -1), be_const_int(80) },
|
||||
{ be_const_key(CC1101_GDO2, -1), be_const_int(143) },
|
||||
{ be_const_key(ETH_PHY_POWER, -1), be_const_int(173) },
|
||||
{ be_const_key(ILI9341_CS, -1), be_const_int(199) },
|
||||
{ be_const_key(SPI_CLK, -1), be_const_int(23) },
|
||||
{ be_const_key(ZEROCROSS, -1), be_const_int(236) },
|
||||
{ be_const_key(OUTPUT_OPEN_DRAIN, -1), be_const_int(18) },
|
||||
{ be_const_key(TM1637CLK, -1), be_const_int(222) },
|
||||
{ be_const_key(SPI_MISO, 176), be_const_int(21) },
|
||||
{ be_const_key(KEY1_INV, -1), be_const_int(3) },
|
||||
{ be_const_key(PMS5003_TX, 75), be_const_int(52) },
|
||||
{ be_const_key(A4988_STP, -1), be_const_int(117) },
|
||||
{ be_const_key(WEBCAM_VSYNC, -1), be_const_int(160) },
|
||||
{ be_const_key(SWT1_PD, -1), be_const_int(242) },
|
||||
{ be_const_key(AS3935, -1), be_const_int(146) },
|
||||
{ be_const_key(CSE7766_TX, 100), be_const_int(96) },
|
||||
{ be_const_key(NEOPOOL_TX, 148), be_const_int(218) },
|
||||
{ be_const_key(ADC_RANGE, 72), be_const_int(152) },
|
||||
{ be_const_key(ILI9341_DC, -1), be_const_int(200) },
|
||||
{ be_const_key(DHT11, -1), be_const_int(37) },
|
||||
{ be_const_key(SM2135_DAT, 238), be_const_int(127) },
|
||||
{ be_const_key(MCP39F5_RX, 211), be_const_int(87) },
|
||||
{ be_const_key(HX711_SCK, 7), be_const_int(68) },
|
||||
{ be_const_key(SAIR_RX, -1), be_const_int(51) },
|
||||
{ be_const_key(SDS0X1_RX, -1), be_const_int(55) },
|
||||
{ be_const_key(ARIRFSEL, 266), be_const_int(99) },
|
||||
{ be_const_key(WEBCAM_RESET, -1), be_const_int(155) },
|
||||
{ be_const_key(BUZZER_INV, -1), be_const_int(16) },
|
||||
{ be_const_key(DHT11_OUT, -1), be_const_int(40) },
|
||||
{ be_const_key(FALLING, -1), be_const_int(2) },
|
||||
{ be_const_key(MAX7219CS, -1), be_const_int(233) },
|
||||
{ be_const_key(ARIRFRCV, -1), be_const_int(98) },
|
||||
{ be_const_key(ADC_CT_POWER, -1), be_const_int(153) },
|
||||
{ be_const_key(HRXL_RX, -1), be_const_int(144) },
|
||||
{ be_const_key(WEBCAM_DATA, 58), be_const_int(159) },
|
||||
{ be_const_key(TUYA_TX, -1), be_const_int(71) },
|
||||
{ be_const_key(SPI_MOSI, -1), be_const_int(22) },
|
||||
{ be_const_key(WIEGAND_D0, 33), be_const_int(216) },
|
||||
{ be_const_key(digital_read, 137), be_const_func(gp_digital_read) },
|
||||
{ be_const_key(ROT1B, -1), be_const_int(103) },
|
||||
{ be_const_key(FTC532, -1), be_const_int(195) },
|
||||
{ be_const_key(HRE_DATA, 35), be_const_int(107) },
|
||||
{ be_const_key(I2S_IN_DATA, -1), be_const_int(246) },
|
||||
{ be_const_key(TCP_TX, 26), be_const_int(171) },
|
||||
{ be_const_key(ST7789_CS, -1), be_const_int(206) },
|
||||
{ be_const_key(ADC_JOY, -1), be_const_int(104) },
|
||||
{ be_const_key(OUTPUT, 229), be_const_int(2) },
|
||||
{ be_const_key(NRF24_DC, -1), be_const_int(198) },
|
||||
{ be_const_key(IRRECV, 27), be_const_int(34) },
|
||||
{ be_const_key(MCP39F5_TX, 230), be_const_int(86) },
|
||||
{ be_const_key(TELEINFO_RX, 52), be_const_int(176) },
|
||||
{ be_const_key(SSD1351_DC, -1), be_const_int(226) },
|
||||
{ be_const_key(TM1638DIO, -1), be_const_int(65) },
|
||||
{ be_const_key(TXD, 139), be_const_int(100) },
|
||||
{ be_const_key(XPT2046_CS, -1), be_const_int(227) },
|
||||
{ be_const_key(LED1, 212), be_const_int(9) },
|
||||
{ be_const_key(LEDLNK_INV, -1), be_const_int(18) },
|
||||
{ be_const_key(SBR_TX, -1), be_const_int(56) },
|
||||
{ be_const_key(RA8876_CS, -1), be_const_int(205) },
|
||||
{ be_const_key(KEY1_TC, 180), be_const_int(169) },
|
||||
{ be_const_key(INPUT_PULLUP, -1), be_const_int(5) },
|
||||
{ be_const_key(EPAPER42_CS, -1), be_const_int(203) },
|
||||
{ be_const_key(BUZZER, -1), be_const_int(15) },
|
||||
{ be_const_key(WEBCAM_XCLK, -1), be_const_int(156) },
|
||||
{ be_const_key(ADC_LIGHT, 134), be_const_int(149) },
|
||||
{ be_const_key(SDM630_TX, 69), be_const_int(62) },
|
||||
{ be_const_key(MGC3130_XFER, 260), be_const_int(73) },
|
||||
{ be_const_key(MGC3130_RESET, 219), be_const_int(74) },
|
||||
{ be_const_key(MAX31855CS, -1), be_const_int(78) },
|
||||
{ be_const_key(REL1, -1), be_const_int(7) },
|
||||
{ be_const_key(NRG_SEL_INV, -1), be_const_int(82) },
|
||||
{ be_const_key(RC522_CS, -1), be_const_int(196) },
|
||||
{ be_const_key(ADC_BUTTON, -1), be_const_int(150) },
|
||||
{ be_const_key(SAIR_TX, -1), be_const_int(50) },
|
||||
{ be_const_key(OUTPUT_HI, 105), be_const_int(120) },
|
||||
{ be_const_key(LE01MR_TX, -1), be_const_int(141) },
|
||||
{ be_const_key(ILI9341_DC, 22), be_const_int(200) },
|
||||
{ be_const_key(SR04_ECHO, 263), be_const_int(59) },
|
||||
{ be_const_key(HJL_CF, 241), be_const_int(85) },
|
||||
{ be_const_key(I2S_OUT_CLK, -1), be_const_int(244) },
|
||||
{ be_const_key(MIEL_HVAC_RX, 12), be_const_int(184) },
|
||||
{ be_const_key(GPS_RX, 247), be_const_int(136) },
|
||||
{ be_const_key(pin_mode, -1), be_const_func(gp_pin_mode) },
|
||||
{ be_const_key(P9813_CLK, -1), be_const_int(192) },
|
||||
{ be_const_key(ZIGBEE_TX, 262), be_const_int(111) },
|
||||
{ be_const_key(dac_voltage, -1), be_const_func(gp_dac_voltage) },
|
||||
{ be_const_key(INPUT_PULLUP, -1), be_const_int(5) },
|
||||
{ be_const_key(SDM120_TX, -1), be_const_int(60) },
|
||||
{ be_const_key(HRXL_RX, -1), be_const_int(144) },
|
||||
{ be_const_key(pin, -1), be_const_func(gp_pin) },
|
||||
{ be_const_key(HRE_CLOCK, -1), be_const_int(106) },
|
||||
{ be_const_key(DHT11, -1), be_const_int(37) },
|
||||
{ be_const_key(PWM1_INV, 109), be_const_int(14) },
|
||||
{ be_const_key(A4988_MS1, 94), be_const_int(119) },
|
||||
{ be_const_key(SBR_RX, -1), be_const_int(57) },
|
||||
{ be_const_key(SWT1_PD, -1), be_const_int(242) },
|
||||
{ be_const_key(FALLING, 5), be_const_int(2) },
|
||||
{ be_const_key(PULLUP, -1), be_const_int(4) },
|
||||
{ be_const_key(TELEINFO_RX, -1), be_const_int(176) },
|
||||
{ be_const_key(MCP39F5_RX, -1), be_const_int(87) },
|
||||
{ be_const_key(ETH_PHY_MDIO, -1), be_const_int(175) },
|
||||
{ be_const_key(BL0940_RX, -1), be_const_int(170) },
|
||||
{ be_const_key(NEOPOOL_TX, 248), be_const_int(218) },
|
||||
{ be_const_key(VL53L0X_XSHUT1, -1), be_const_int(230) },
|
||||
{ be_const_key(MCP39F5_RST, 203), be_const_int(88) },
|
||||
{ be_const_key(HLW_CF, 231), be_const_int(84) },
|
||||
{ be_const_key(WEBCAM_PSRCS, -1), be_const_int(165) },
|
||||
{ be_const_key(SSD1331_DC, -1), be_const_int(209) },
|
||||
{ be_const_key(ST7789_CS, -1), be_const_int(206) },
|
||||
{ be_const_key(SDM72_RX, 66), be_const_int(221) },
|
||||
{ be_const_key(SSD1351_DC, -1), be_const_int(226) },
|
||||
{ be_const_key(SSPI_SCLK, -1), be_const_int(28) },
|
||||
{ be_const_key(I2S_IN_CLK, -1), be_const_int(247) },
|
||||
{ be_const_key(SM16716_DAT, -1), be_const_int(92) },
|
||||
{ be_const_key(I2C_SDA, -1), be_const_int(20) },
|
||||
{ be_const_key(PZEM004_RX, -1), be_const_int(47) },
|
||||
{ be_const_key(TCP_TX, -1), be_const_int(171) },
|
||||
{ be_const_key(SDM630_RX, -1), be_const_int(63) },
|
||||
{ be_const_key(SWT1, -1), be_const_int(5) },
|
||||
{ be_const_key(ROT1B, -1), be_const_int(103) },
|
||||
{ be_const_key(I2C_SCL, -1), be_const_int(19) },
|
||||
{ be_const_key(RXD, -1), be_const_int(101) },
|
||||
{ be_const_key(DSB, 261), be_const_int(41) },
|
||||
{ be_const_key(MCP39F5_TX, 252), be_const_int(86) },
|
||||
{ be_const_key(HIGH, 266), be_const_int(1) },
|
||||
{ be_const_key(RC522_RST, -1), be_const_int(191) },
|
||||
{ be_const_key(SSPI_DC, -1), be_const_int(30) },
|
||||
{ be_const_key(LOW, -1), be_const_int(0) },
|
||||
{ be_const_key(BUZZER_INV, -1), be_const_int(16) },
|
||||
{ be_const_key(XPT2046_CS, -1), be_const_int(227) },
|
||||
{ be_const_key(WEBCAM_HSD, -1), be_const_int(164) },
|
||||
{ be_const_key(TM1638STB, -1), be_const_int(66) },
|
||||
{ be_const_key(PMS5003_RX, -1), be_const_int(53) },
|
||||
{ be_const_key(SPI_DC, -1), be_const_int(25) },
|
||||
{ be_const_key(MHZ_RXD, -1), be_const_int(45) },
|
||||
{ be_const_key(ILI9488_CS, 119), be_const_int(201) },
|
||||
{ be_const_key(HX711_SCK, 57), be_const_int(68) },
|
||||
{ be_const_key(SDM630_TX, 227), be_const_int(62) },
|
||||
{ be_const_key(SHELLY_DIMMER_BOOT0, -1), be_const_int(189) },
|
||||
{ be_const_key(EPD_DATA, -1), be_const_int(238) },
|
||||
{ be_const_key(WE517_TX, -1), be_const_int(185) },
|
||||
{ be_const_key(TXD, 234), be_const_int(100) },
|
||||
{ be_const_key(OUTPUT, -1), be_const_int(2) },
|
||||
{ be_const_key(SSPI_MAX31865_CS1, -1), be_const_int(105) },
|
||||
{ be_const_key(WEBCAM_PSCLK, -1), be_const_int(163) },
|
||||
{ be_const_key(WEBCAM_SIOD, -1), be_const_int(157) },
|
||||
{ be_const_key(MGC3130_RESET, -1), be_const_int(74) },
|
||||
{ be_const_key(KEY1, -1), be_const_int(1) },
|
||||
{ be_const_key(MGC3130_XFER, -1), be_const_int(73) },
|
||||
{ be_const_key(ST7789_DC, 245), be_const_int(207) },
|
||||
{ be_const_key(GPS_TX, 123), be_const_int(137) },
|
||||
{ be_const_key(ADC_CT_POWER, 58), be_const_int(153) },
|
||||
};
|
||||
|
||||
static be_define_const_map(
|
||||
m_libgpio_map,
|
||||
268
|
||||
270
|
||||
);
|
||||
|
||||
static be_define_const_module(
|
||||
|
|
|
@ -65,6 +65,20 @@ extern "C" {
|
|||
if (v > 0xFF) { return 0xFF; }
|
||||
return v;
|
||||
}
|
||||
|
||||
// variant of be_raise with string format
|
||||
[[ noreturn ]] void be_raisef(bvm *vm, const char *except, const char *msg, ...) {
|
||||
// To save stack space support logging for max text length of 128 characters
|
||||
char log_data[128];
|
||||
|
||||
va_list arg;
|
||||
va_start(arg, msg);
|
||||
uint32_t len = ext_vsnprintf_P(log_data, sizeof(log_data)-3, msg, arg);
|
||||
va_end(arg);
|
||||
if (len+3 > sizeof(log_data)) { strcat(log_data, "..."); } // Actual data is more
|
||||
be_raise(vm, except, log_data);
|
||||
}
|
||||
|
||||
static void map_insert_int(bvm *vm, const char *key, int value)
|
||||
{
|
||||
be_pushstring(vm, key);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <berry.h>
|
||||
|
||||
|
||||
#include <driver/dac.h>
|
||||
/*********************************************************************************************\
|
||||
* Native functions mapped to Berry functions
|
||||
*
|
||||
|
@ -39,7 +39,40 @@ extern "C" {
|
|||
int32_t pin = be_toint(vm, 1);
|
||||
int32_t mode = be_toint(vm, 2);
|
||||
if (pin >= 0) {
|
||||
if (mode > 0) {
|
||||
// standard ESP mode
|
||||
pinMode(pin, mode);
|
||||
} else {
|
||||
// synthetic mode
|
||||
if (-1 == mode) {
|
||||
// DAC
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
if (25 == pin || 26 == pin) {
|
||||
uint32_t channel = pin - 25; // 1 or 2
|
||||
esp_err_t err = dac_output_enable((dac_channel_t) channel);
|
||||
if (err) {
|
||||
be_raisef(vm, "value_error", "Error: dac_output_enable(%i) -> %i", channel, err);
|
||||
}
|
||||
} else {
|
||||
be_raise(vm, "value_error", "DAC only supported on GPIO25-26");
|
||||
}
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
if (17 == pin || 18 == pin) {
|
||||
uint32_t channel = pin - 17; // 1 or 2
|
||||
esp_err_t err = dac_output_enable((dac_channel_t) channel);
|
||||
if (err) {
|
||||
be_raisef(vm, "value_error", "Error: dac_output_enable(%i) -> %i", channel, err);
|
||||
}
|
||||
} else {
|
||||
be_raise(vm, "value_error", "DAC only supported on GPIO17-18");
|
||||
}
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
be_raise(vm, "value_error", "DAC unsupported in this chip");
|
||||
#else
|
||||
be_raise(vm, "value_error", "DAC unsupported in this chip");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
be_return_nil(vm);
|
||||
}
|
||||
|
@ -76,6 +109,45 @@ extern "C" {
|
|||
be_raise(vm, kTypeError, nullptr);
|
||||
}
|
||||
|
||||
int gp_dac_voltage(bvm *vm);
|
||||
int gp_dac_voltage(bvm *vm) {
|
||||
int32_t argc = be_top(vm); // Get the number of arguments
|
||||
if (argc == 2 && be_isint(vm, 1) && be_isint(vm, 2)) {
|
||||
int32_t pin = be_toint(vm, 1);
|
||||
int32_t mV = be_toint(vm, 2);
|
||||
if (mV < 0) { mV = 0; }
|
||||
uint32_t dac_value = changeUIntScale(mV, 0, 3300, 0, 255); // convert from 0..3300 ms to 0..255
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
if (25 == pin || 26 == pin) {
|
||||
uint32_t channel = pin - 25; // 1 or 2
|
||||
esp_err_t err = dac_output_voltage((dac_channel_t) channel, dac_value);
|
||||
if (err) {
|
||||
be_raisef(vm, "internal_error", "Error: esp_err_tdac_output_voltage(%i, %i) -> %i", channel, dac_value, err);
|
||||
}
|
||||
} else {
|
||||
be_raise(vm, "value_error", "DAC only supported on GPIO25-26");
|
||||
}
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
if (17 == pin || 18 == pin) {
|
||||
uint32_t channel = pin - 17; // 1 or 2
|
||||
esp_err_t err = dac_output_voltage((dac_channel_t) channel, dac_value);
|
||||
if (err) {
|
||||
be_raisef(vm, "internal_error", "Error: esp_err_tdac_output_voltage(%i, %i) -> %i", channel, dac_value, err);
|
||||
}
|
||||
} else {
|
||||
be_raise(vm, "value_error", "DAC only supported on GPIO17-18");
|
||||
}
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
be_raise(vm, "value_error", "DAC unsupported in this chip");
|
||||
#else
|
||||
be_raise(vm, "value_error", "DAC unsupported in this chip");
|
||||
#endif
|
||||
be_pushint(vm, changeUIntScale(dac_value, 0, 255, 0, 3300));
|
||||
be_return(vm);
|
||||
}
|
||||
be_raise(vm, kTypeError, nullptr);
|
||||
}
|
||||
|
||||
// Tasmota specific
|
||||
|
||||
int gp_pin_used(bvm *vm);
|
||||
|
|
Loading…
Reference in New Issue