fix windows compat and some bugs

This commit is contained in:
2017-12-16 11:06:29 +01:00
parent 56a935cdd0
commit 62096da6e6
8 changed files with 28 additions and 4 deletions
+6 -1
View File
@@ -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);
}
+6
View File
@@ -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