1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 01:35:41 +03:00

EXTI - Remove boolean argument from EXTIEnable.

It's confusing to have a method called EXTIEnable that takes an argument
that can DISABLE the line.

There are usually 3 options for this:
1. Use two methods, one for enable, one for disable.
2. Use enum constants instead of the boolean argument.
3. Rename to '*Set', e.g. EXTISet(...)

This commit applies option 1 above, as it's cleaner and the most common
use case in the codebase.
This commit is contained in:
Dominic Clifton 2022-03-05 17:14:29 +01:00
parent 0cfd462d85
commit d0de9ac1f8
14 changed files with 52 additions and 29 deletions

View file

@ -180,7 +180,9 @@ void EXTIHandlerInit(extiCallbackRec_t *, extiHandlerCallback *) {
void EXTIConfig(IO_t, extiCallbackRec_t *, int, ioConfig_t, extiTrigger_t) {
}
void EXTIEnable(IO_t, bool) {
void EXTIEnable(IO_t) {
}
void EXTIDisable(IO_t) {
}