Skip to content

Commit

Permalink
适配LE501C
Browse files Browse the repository at this point in the history
  • Loading branch information
LBYANG\wasdy committed Nov 17, 2023
1 parent fb162de commit 8a149e0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions libraries/_10_System_OneWire/OneWire.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8a149e0

Please sign in to comment.