[X9D] Switches now OK on both HW and simu
This commit is contained in:
+3
-1
@@ -48,5 +48,7 @@ void delaysInit(void) {
|
||||
|
||||
void delay_01us(uint16_t nb){
|
||||
TIM13->CNT = 0;
|
||||
while(TIM13->CNT < nb);
|
||||
TIM13->EGR = 1;
|
||||
while(((uint16_t)TIM13->CNT) < nb);
|
||||
TIM13->EGR = 0;
|
||||
}
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "../open9x.h"
|
||||
|
||||
#define I2C_delay() delay_01us(15);
|
||||
#define I2C_delay() delay_01us(30);
|
||||
|
||||
/**
|
||||
* @brief Configure the used I/O ports pin
|
||||
|
||||
@@ -124,13 +124,13 @@ uint32_t keyState(EnumKeys enuk)
|
||||
|
||||
switch ((uint8_t) enuk) {
|
||||
case SW_SA0:
|
||||
xxx = (~b & PIN_SW_A_H) && (b & PIN_SW_A_L);
|
||||
xxx = (~b & PIN_SW_A_H) && (e & PIN_SW_A_L);
|
||||
break;
|
||||
case SW_SA1:
|
||||
xxx = (b & PIN_SW_A_H) && (b & PIN_SW_A_L);
|
||||
xxx = (b & PIN_SW_A_H) && (e & PIN_SW_A_L);
|
||||
break;
|
||||
case SW_SA2:
|
||||
xxx = (b & PIN_SW_A_H) && (~b & PIN_SW_A_L);
|
||||
xxx = (b & PIN_SW_A_H) && (~e & PIN_SW_A_L);
|
||||
break;
|
||||
|
||||
case SW_SB0:
|
||||
|
||||
Reference in New Issue
Block a user