forked from Elron_dev/elbear_arduino_bsp
v0.5.1
- в модулях Wire, SPI, Serial приведена в соответствие нумерация используемых экземпляров и периферии микроконтроллера. - в функции analogWrite() перед запуском ШИМ проверяется, не запущен ли уже указанный канал. - добавлена возможность переопределения функции main() в скетчах. - при старте программы задается граница кэшируемой области SPIFI в соответствии с размером текущего исполняемого кода. - исправление выявленных ошибок. Co-authored-by: KLASSENTS <klassen@elron.tech> Co-committed-by: KLASSENTS <klassen@elron.tech>
This commit is contained in:
1 parent
f1e091bf77
commit
eb9b1aa0c9
37 files changed
+248
-156
No files matched your search
@@ -37,8 +37,8 @@ void pinMode(uint32_t PinNumber, uint32_t PinMode)
|
||||
return;
|
||||
}
|
||||
|
||||
if (digitalPinHasPWM(PinNumber))
|
||||
// if the pin can use PWM, disable PWM
|
||||
if (digitalPinPwmIsOn(PinNumber))
|
||||
// if the pin use PWM, disable PWM
|
||||
analogWriteStop(PinNumber);
|
||||
|
||||
// determine the port and the pin number in the port
|
||||
@@ -104,7 +104,7 @@ __attribute__((noinline, section(".ram_text"))) void digitalWrite(uint32_t PinNu
|
||||
}
|
||||
|
||||
if (digitalPinPwmIsOn(PinNumber))
|
||||
// if the pin can use PWM, disable PWM
|
||||
// if the pin use PWM, disable PWM
|
||||
analogWriteStop(PinNumber);
|
||||
|
||||
if (Val == HIGH)
|
||||
@@ -123,7 +123,7 @@ __attribute__((noinline, section(".ram_text"))) int digitalRead(uint32_t PinNumb
|
||||
}
|
||||
|
||||
if (digitalPinPwmIsOn(PinNumber))
|
||||
// if the pin can use PWM, disable PWM
|
||||
// if the pin use PWM, disable PWM
|
||||
analogWriteStop(PinNumber);
|
||||
|
||||
return GPIO_READ_PIN(digitalPinToPort(PinNumber), digitalPinToBitMask(PinNumber));
|
||||
@@ -139,7 +139,7 @@ __attribute__((noinline, section(".ram_text"))) void digitalToggle(uint32_t PinN
|
||||
}
|
||||
|
||||
if (digitalPinPwmIsOn(PinNumber))
|
||||
// if the pin can use PWM, disable PWM
|
||||
// if the pin use PWM, disable PWM
|
||||
analogWriteStop(PinNumber);
|
||||
|
||||
GPIO_TOGGLE_PIN(digitalPinToPort(PinNumber), digitalPinToBitMask(PinNumber));
|
||||
|
||||
Reference in new issue
Block a user