mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 04:36:31 +00:00
upd
This commit is contained in:
parent
f6572a863b
commit
95bdb15ae9
@ -1338,7 +1338,7 @@ int ICACHE_RAM_ATTR Pin(uint32_t gpio, uint32_t index) {
|
|||||||
|
|
||||||
bool PinUsed(uint32_t gpio, uint32_t index = 0);
|
bool PinUsed(uint32_t gpio, uint32_t index = 0);
|
||||||
bool PinUsed(uint32_t gpio, uint32_t index) {
|
bool PinUsed(uint32_t gpio, uint32_t index) {
|
||||||
return (Pin(gpio, index) > -1);
|
return (Pin(gpio, index) >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t GetPin(uint32_t lpin) {
|
uint32_t GetPin(uint32_t lpin) {
|
||||||
|
@ -412,7 +412,7 @@ void SetLedLink(uint32_t state)
|
|||||||
if (-1 == led_pin) { // Legacy - LED1 is status
|
if (-1 == led_pin) { // Legacy - LED1 is status
|
||||||
SetLedPowerIdx(0, state);
|
SetLedPowerIdx(0, state);
|
||||||
}
|
}
|
||||||
else if (led_pin > -1) {
|
else if (led_pin >= 0) {
|
||||||
if (state) { state = 1; }
|
if (state) { state = 1; }
|
||||||
digitalWrite(led_pin, (led_inv) ? !state : state);
|
digitalWrite(led_pin, (led_inv) ? !state : state);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user