From 8a149e024238a63f07e4b1224fdbfe6a30faf2b9 Mon Sep 17 00:00:00 2001 From: "LBYANG\\wasdy" Date: Fri, 17 Nov 2023 13:23:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8DLE501C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libraries/_10_System_OneWire/OneWire.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libraries/_10_System_OneWire/OneWire.h b/libraries/_10_System_OneWire/OneWire.h index c2ad0bcc..9d8b8f0a 100644 --- a/libraries/_10_System_OneWire/OneWire.h +++ b/libraries/_10_System_OneWire/OneWire.h @@ -167,6 +167,17 @@ void directModeOutput(IO_REG_TYPE pin) #define DIRECT_MODE_OUTPUT(base, pin) directModeOutput(pin) #warning "ESP32 OneWire testing" +#elif defined(LE501X) +#include "le501x-hal-gpio.h" +#define PIN_TO_BASEREG(pin) (0) +#define PIN_TO_BITMASK(pin) (pin) +#define IO_REG_TYPE uint8_t +#define IO_REG_ASM +#define DIRECT_READ(base, pin) (fastReadPin(pin)) +#define DIRECT_WRITE_LOW(base, pin) (fastClrPin(pin)) +#define DIRECT_WRITE_HIGH(base, pin) (fastSetPin(pin)) +#define DIRECT_MODE_INPUT(base, pin) (pinMode(pin, INPUT)) +#define DIRECT_MODE_OUTPUT(base, pin) (pinMode(pin, OUTPUT)) #else #error "Please define I/O register types here" #endif