fix windows compat and some bugs
This commit is contained in:
@@ -75,7 +75,7 @@ void LockJumper_Check(void)
|
||||
|
||||
// Read the pin state
|
||||
bool old = SystemSettings.editable;
|
||||
SystemSettings.editable = (bool) LL_GPIO_IsInputPinSet(lock_periph, lock_llpin);
|
||||
LockJumper_ReadHardware();
|
||||
|
||||
if (old != SystemSettings.editable) {
|
||||
// --- State changed ---
|
||||
@@ -84,3 +84,8 @@ void LockJumper_Check(void)
|
||||
jumper_changed();
|
||||
}
|
||||
}
|
||||
|
||||
void LockJumper_ReadHardware(void)
|
||||
{
|
||||
SystemSettings.editable = (bool) LL_GPIO_IsInputPinSet(lock_periph, lock_llpin);
|
||||
}
|
||||
|
||||
@@ -17,4 +17,10 @@ void LockJumper_Init(void);
|
||||
*/
|
||||
void LockJumper_Check(void);
|
||||
|
||||
/**
|
||||
* Check hardware jumper and load it's value into the settings struct.
|
||||
* Does NOT trigger MSC changes or anything else.
|
||||
*/
|
||||
void LockJumper_ReadHardware(void);
|
||||
|
||||
#endif //GEX_LOCK_JUMPER_H
|
||||
|
||||
Reference in New Issue
Block a user