[X9D] REV3 switches assignation (regression)

This commit is contained in:
bsongis
2013-03-10 17:54:42 +00:00
parent 6e553663ee
commit d8467af191
2 changed files with 8 additions and 4 deletions
+4 -4
View File
@@ -64,10 +64,10 @@
#endif #endif
#if defined(REV3) #if defined(REV3)
#define GPIO_PIN_SW_A_L GPIOB->IDR #define GPIO_PIN_SW_A_H (~GPIOB->IDR)
#define GPIO_PIN_SW_A_H GPIOE->IDR #define GPIO_PIN_SW_A_L (~GPIOE->IDR)
#define PIN_SW_A_L GPIO_Pin_7 //PB.07 #define PIN_SW_A_H GPIO_Pin_7 //PB.07
#define PIN_SW_A_H GPIO_Pin_2 //PE.02 #define PIN_SW_A_L GPIO_Pin_2 //PE.02
#else #else
#define GPIO_PIN_SW_A_H GPIOB->IDR #define GPIO_PIN_SW_A_H GPIOB->IDR
#define GPIO_PIN_SW_A_L GPIOE->IDR #define GPIO_PIN_SW_A_L GPIOE->IDR
+4
View File
@@ -129,7 +129,11 @@ bool switchState(EnumKeys enuk)
xxx = (GPIO_PIN_SW_A_H & PIN_SW_A_H) && (~GPIO_PIN_SW_A_L & PIN_SW_A_L); xxx = (GPIO_PIN_SW_A_H & PIN_SW_A_H) && (~GPIO_PIN_SW_A_L & PIN_SW_A_L);
break; break;
case SW_SA1: case SW_SA1:
#if defined(REV3)
xxx = (~GPIO_PIN_SW_A_H & PIN_SW_A_H) && (~GPIO_PIN_SW_A_L & PIN_SW_A_L);
#else
xxx = (GPIO_PIN_SW_A_H & PIN_SW_A_H) && (GPIO_PIN_SW_A_L & PIN_SW_A_L); xxx = (GPIO_PIN_SW_A_H & PIN_SW_A_H) && (GPIO_PIN_SW_A_L & PIN_SW_A_L);
#endif
break; break;
case SW_SA2: case SW_SA2:
xxx = (~GPIO_PIN_SW_A_H & PIN_SW_A_H) && (GPIO_PIN_SW_A_L & PIN_SW_A_L); xxx = (~GPIO_PIN_SW_A_H & PIN_SW_A_H) && (GPIO_PIN_SW_A_L & PIN_SW_A_L);