Closed chaealarm closed 7 months ago
Line 52 change from this:
static uint8_t gpioPin(uint8_t gpio, pin_size_t pin)
{
if(gpio == 0) {
return pin;
} else if(gpio == 2) {
return pin - 2;
} else {
return pin - 10;
}
}
To this:
static uint8_t gpioPin(uint8_t gpio, pin_size_t pin)
{
if(gpio == 0) {
return pin + 1;
} else if(gpio == 2) {
return pin - 2;
} else {
return pin - 10;
}
}
20 this commit fix your issue. Check modification on file wiring_digital.cpp and change your file.
Line 52 change from this:
static uint8_t gpioPin(uint8_t gpio, pin_size_t pin)
{
if(gpio == 0) {
return pin;
} else if(gpio == 2) {
return pin - 2;
} else {
return pin - 10;
}
}
To this:
static uint8_t gpioPin(uint8_t gpio, pin_size_t pin)
{
if(gpio == 0) {
return pin + 1;
} else if(gpio == 2) {
return pin - 2;
} else {
return pin - 10;
}
}
It works! Thank you very much!
At this code, A1 is blinking, but A2 is floating. These pin was no problem when using ch32v003fun.
I think something wrong in cores/arduino/wiring_digital.cpp at specifying pin number