diff --git a/src/act/board_act.h b/src/act/board_act.h index 917570db5..64e75b012 100644 --- a/src/act/board_act.h +++ b/src/act/board_act.h @@ -52,6 +52,24 @@ #define PIN_BUTTON_PAGE GPIO_Pin_10 #define PIN_BUTTON_ENTER GPIO_Pin_14 +// Trims +#define GPIO_TRIM_LH_L GPIOE->IDR +#define GPIO_TRIM_LV_DN GPIOE->IDR +#define GPIO_TRIM_RV_UP GPIOE->IDR +#define GPIO_TRIM_RH_L GPIOE->IDR +#define GPIO_TRIM_LH_R GPIOE->IDR +#define GPIO_TRIM_LV_UP GPIOE->IDR +#define GPIO_TRIM_RV_DN GPIOE->IDR +#define GPIO_TRIM_RH_R GPIOE->IDR +#define PIN_TRIM_RV_DN GPIO_Pin_3 +#define PIN_TRIM_RV_UP GPIO_Pin_2 +#define PIN_TRIM_RH_L GPIO_Pin_1 +#define PIN_TRIM_RH_R GPIO_Pin_8 +#define PIN_TRIM_LH_R GPIO_Pin_4 +#define PIN_TRIM_LH_L GPIO_Pin_7 +#define PIN_TRIM_LV_DN GPIO_Pin_6 +#define PIN_TRIM_LV_UP GPIO_Pin_5 + // TODO elsewhere #if !defined(SIMU) #define SD_IS_HC() (1) diff --git a/src/act/keys_driver.cpp b/src/act/keys_driver.cpp index 0a796792c..7efe946ec 100644 --- a/src/act/keys_driver.cpp +++ b/src/act/keys_driver.cpp @@ -55,7 +55,30 @@ uint32_t readKeys() uint32_t readTrims() { - return 0; + register uint32_t e = GPIOE->IDR; + register uint32_t result = 0; + + if (~e & PIN_TRIM_LH_L) + result |= 0x01; // LH_L + if (~e & PIN_TRIM_LH_R) + result |= 0x02; // LH_R + if (~e & PIN_TRIM_LV_DN) + result |= 0x04; // LV_DN + if (~e & PIN_TRIM_LV_UP) + result |= 0x08; // LV_UP + + if (~e & PIN_TRIM_RV_DN) + result |= 0x10; // RV_DN + if (~e & PIN_TRIM_RV_UP) + result |= 0x20; // RV_UP + if (~e & PIN_TRIM_RH_L) + result |= 0x40; // RH_L + if (~e & PIN_TRIM_RH_R) + result |= 0x80; // RH_R + + // printf("readTrims(): %x %x => %x\n", c, e, result); fflush(stdout); + + return result; } uint8_t keyDown() @@ -75,12 +98,12 @@ void readKeysAndTrims() ++enuk; } - /* in = readTrims(); + in = readTrims(); for (i = 1; i < 256; i <<= 1) { keys[enuk].input(in & i, (EnumKeys) enuk); ++enuk; - } */ + } keys[BTN_REa].input(!(GPIO_BUTTON_ENTER & PIN_BUTTON_ENTER), BTN_REa); } diff --git a/src/gruvin9x/board_gruvin9x.cpp b/src/gruvin9x/board_gruvin9x.cpp index c33da48ae..54879da6c 100644 --- a/src/gruvin9x/board_gruvin9x.cpp +++ b/src/gruvin9x/board_gruvin9x.cpp @@ -280,7 +280,7 @@ FORCEINLINE void readKeysAndTrims() in = (tin & 0x0f) << 3; in |= (tin & 0x30) >> 3; - for(int i=1; i<7; i++) + for (int i=1; i<7; i++) { //INP_B_KEY_MEN 1 .. INP_B_KEY_LFT 6 keys[enuk].input(in & (1< 0) pin2 &= ~(mask2); else pin2 |= (mask2); \ break; #define KEY_CASE(key, pin, mask) \ case key: \ if (state) pin &= ~mask; else pin |= mask;\ break; +#define TRIM_CASE KEY_CASE #else #define SWITCH_CASE(swtch, pin, mask) \ - case DSW(swtch): \ - pin &= ~mask; \ - break; \ - case -DSW(swtch): \ - pin |= mask; \ + case swtch: \ + if (state) pin &= ~(mask); else pin |= (mask); \ + break; +#define SWITCH_3_CASE(swtch, pin1, pin2, mask1, mask2) \ + case swtch: \ + if (state >= 0) pin1 &= ~(mask1); else pin1 |= (mask1); \ + if (state <= 0) pin2 &= ~(mask2); else pin2 |= (mask2); \ break; #define KEY_CASE(key, pin, mask) \ case key: \ - if (state) pin |= mask; else pin &= ~mask;\ + if (state) pin |= (mask); else pin &= ~(mask);\ break; +#define TRIM_CASE KEY_CASE #endif void simuSetKey(uint8_t key, bool state) @@ -125,111 +131,39 @@ void simuSetKey(uint8_t key, bool state) } } -void simuSetSwitch(int8_t swtch) +void simuSetTrim(uint8_t trim, bool state) { + switch (trim) { + TRIM_CASE(0, GPIO_TRIM_LH_L, PIN_TRIM_LH_L) + TRIM_CASE(1, GPIO_TRIM_LH_R, PIN_TRIM_LH_R) + TRIM_CASE(2, GPIO_TRIM_LV_DN, PIN_TRIM_LV_DN) + TRIM_CASE(3, GPIO_TRIM_LV_UP, PIN_TRIM_LV_UP) + TRIM_CASE(4, GPIO_TRIM_RV_DN, PIN_TRIM_RV_DN) + TRIM_CASE(5, GPIO_TRIM_RV_UP, PIN_TRIM_RV_UP) + TRIM_CASE(6, GPIO_TRIM_RH_L, PIN_TRIM_RH_L) + TRIM_CASE(7, GPIO_TRIM_RH_R, PIN_TRIM_RH_R) + } +} + +void simuSetSwitch(uint8_t swtch, int8_t state) +{ + // printf("swtch=%d state=%d\n", swtch, state); fflush(stdout); switch (swtch) { #if defined(PCBACT) #elif defined(PCBX9D) - case DSW(SW_SA0): - GPIOE->IDR |= PIN_SW_A_L; - GPIOB->IDR &= ~PIN_SW_A_H; - break; - case DSW(SW_SA1): - GPIOB->IDR |= PIN_SW_A_H; - GPIOE->IDR |= PIN_SW_A_L; - break; - case DSW(SW_SA2): - GPIOE->IDR &= ~PIN_SW_A_L; - GPIOB->IDR |= PIN_SW_A_H; - break; - case DSW(SW_SB0): - GPIOB->IDR |= PIN_SW_B_L; - GPIOB->IDR &= ~PIN_SW_B_H; - break; - case DSW(SW_SB1): - GPIOB->IDR |= PIN_SW_B_H; - GPIOB->IDR |= PIN_SW_B_L; - break; - case DSW(SW_SB2): - GPIOB->IDR &= ~PIN_SW_B_L; - GPIOB->IDR |= PIN_SW_B_H; - break; - case DSW(SW_SC0): - GPIOE->IDR |= PIN_SW_C_L; - GPIOB->IDR &= ~PIN_SW_C_H; - break; - case DSW(SW_SC1): - GPIOB->IDR |= PIN_SW_C_H; - GPIOE->IDR |= PIN_SW_C_L; - break; - case DSW(SW_SC2): - GPIOE->IDR &= ~PIN_SW_C_L; - GPIOB->IDR |= PIN_SW_C_H; - break; - case DSW(SW_SD0): - GPIOE->IDR |= PIN_SW_D_L; - GPIOE->IDR &= ~PIN_SW_D_H; - break; - case DSW(SW_SD1): - GPIOE->IDR |= PIN_SW_D_H; - GPIOE->IDR |= PIN_SW_D_L; - break; - case DSW(SW_SD2): - GPIOE->IDR &= ~PIN_SW_D_L; - GPIOE->IDR |= PIN_SW_D_H; - break; - case DSW(SW_SE0): - GPIOB->IDR |= PIN_SW_E_L; - GPIOB->IDR &= ~PIN_SW_E_H; - break; - case DSW(SW_SE1): - GPIOB->IDR |= PIN_SW_E_H; - GPIOB->IDR |= PIN_SW_E_L; - break; - case DSW(SW_SE2): - GPIOB->IDR &= ~PIN_SW_E_L; - GPIOB->IDR |= PIN_SW_E_H; - break; - case DSW(SW_SF0): - GPIOE->IDR &= ~PIN_SW_F; - break; - case DSW(SW_SF2): - GPIOE->IDR |= PIN_SW_F; - break; - case DSW(SW_SG0): - GPIOB->IDR |= PIN_SW_G_L; - GPIOA->IDR &= ~PIN_SW_G_H; - break; - case DSW(SW_SG1): - GPIOA->IDR |= PIN_SW_G_H; - GPIOB->IDR |= PIN_SW_G_L; - break; - case DSW(SW_SG2): - GPIOB->IDR &= ~PIN_SW_G_L; - GPIOA->IDR |= PIN_SW_G_H; - break; - case DSW(SW_SH0): - GPIOE->IDR &= ~PIN_SW_H; - break; - case DSW(SW_SH2): - GPIOE->IDR |= PIN_SW_H; - break; + SWITCH_3_CASE(SW_SA0, GPIOB->IDR, GPIOE->IDR, PIN_SW_A_H, PIN_SW_A_L) + SWITCH_3_CASE(SW_SB0, GPIOB->IDR, GPIOB->IDR, PIN_SW_B_H, PIN_SW_B_L) + SWITCH_3_CASE(SW_SC0, GPIOB->IDR, GPIOE->IDR, PIN_SW_C_H, PIN_SW_C_L) + SWITCH_3_CASE(SW_SD0, GPIOE->IDR, GPIOE->IDR, PIN_SW_D_H, PIN_SW_D_L) + SWITCH_3_CASE(SW_SE0, GPIOB->IDR, GPIOB->IDR, PIN_SW_E_H, PIN_SW_E_L) + SWITCH_CASE(SW_SF0, GPIOE->IDR, PIN_SW_F) + SWITCH_3_CASE(SW_SG0, GPIOA->IDR, GPIOB->IDR, PIN_SW_G_H, PIN_SW_G_L) + SWITCH_CASE(SW_SH0, GPIOE->IDR, PIN_SW_H) #elif defined(PCBSKY9X) - case DSW(SW_ID0): - PIOC->PIO_PDSR &= ~0x00004000; - PIOC->PIO_PDSR |= 0x00000800; - break; - case DSW(SW_ID1): - PIOC->PIO_PDSR |= 0x00004800; - break; - case DSW(SW_ID2): - PIOC->PIO_PDSR &= ~0x00000800; - PIOC->PIO_PDSR |= 0x00004000; - break; - SWITCH_CASE(SW_THR, PIOC->PIO_PDSR, 1<<20) SWITCH_CASE(SW_RUD, PIOA->PIO_PDSR, 1<<15) SWITCH_CASE(SW_ELE, PIOC->PIO_PDSR, 1<<31) + SWITCH_3_CASE(SW_ID0, PIOC->PIO_PDSR, PIOC->PIO_PDSR, 0x00004000, 0x00000800) SWITCH_CASE(SW_AIL, PIOA->PIO_PDSR, 1<<2) SWITCH_CASE(SW_GEA, PIOC->PIO_PDSR, 1<<16) SWITCH_CASE(SW_TRN, PIOC->PIO_PDSR, 1<<8) @@ -237,20 +171,7 @@ void simuSetSwitch(int8_t swtch) SWITCH_CASE(SW_THR, ping, 1<IDR |= PIN_TRIM_LH_L | PIN_TRIM_LH_R | PIN_TRIM_LV_DN | PIN_TRIM_LV_UP; - GPIOC->IDR |= PIN_TRIM_RV_DN | PIN_TRIM_RV_UP | PIN_TRIM_RH_L | PIN_TRIM_RH_R; - // GPIOE->IDR |= 0xFFFFFFFF; - // GPIOB->IDR |= 0xFFFFFFFF; - // GPIOC->IDR |= 0xFFFFFFFF; -#elif defined(PCBSKY9X) - PIOA->PIO_PDSR |= (0x00800000 | 0x01000000 | 0x00000002 | 0x00000001); - PIOB->PIO_PDSR |= (0x00000050); - PIOC->PIO_PDSR |= (0x10000000 | 0x00000400 | 0x00000200); -#elif defined(PCBGRUVIN9X) - pinj = 0; -#else - pind = 0; + static FXuint trimKeys[] = { KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, KEY_F8 }; #endif - for(unsigned i=0; igetKeyState(keys2[i])) { -#if defined(PCBX9D) -#elif defined(PCBSKY9X) - switch(i) { - case 6: - PIOA->PIO_PDSR &= ~0x00800000; - break; - case 7: - PIOB->PIO_PDSR &= ~0x10; - break; - case 4: - PIOA->PIO_PDSR &= ~0x00000002; - break; - case 5: - PIOC->PIO_PDSR &= ~0x00000400; - break; - case 3: - PIOA->PIO_PDSR &= ~0x01000000; - break; - case 2: - PIOC->PIO_PDSR &= ~0x10000000; - break; - case 1: - PIOA->PIO_PDSR &= ~0x00000001; - break; - case 0: - PIOC->PIO_PDSR &= ~0x00000200; - break; - } -#elif defined(PCBGRUVIN9X) - pinj |= (1<getKeyState(trimKeys[i])); } -#if defined(PCBX9D) #define SWITCH_KEY(key, swtch, states) \ static bool state##key = 0; \ - static uint8_t state##swtch = 0; \ + static int8_t state##swtch = 2; \ if (getApp()->getKeyState(KEY_##key)) { \ if (!state##key) { \ - state##swtch = (state##swtch+1) % states; \ - simuSetSwitch(DSW(SW_##swtch+state##swtch)); \ + state##swtch = (state##swtch+1); \ + if (state##swtch == 2+states) state##swtch = 2; \ state##key = true; \ } \ } \ else { \ state##key = false; \ - } -#else -#define SWITCH_KEY(key, swtch, states) \ - static bool state##key = 0; \ - static uint8_t state##swtch = 0; \ - if (getApp()->getKeyState(KEY_##key)) { \ - if (!state##key) { \ - state##swtch = (state##swtch+1) % states; \ - if (states > 2) \ - simuSetSwitch(DSW(SW_##swtch+state##swtch)); \ - else \ - simuSetSwitch(state##swtch ? DSW(SW_##swtch) : -DSW(SW_##swtch)); \ - state##key = true; \ - } \ } \ - else { \ - state##key = false; \ - } -#endif + simuSetSwitch(SW_##swtch, state##swtch-states); #if defined(PCBX9D) || defined(PCBACT) SWITCH_KEY(A, SA0, 3); @@ -504,10 +419,6 @@ int main(int argc,char **argv) // so that persistent settings are now available. application.init(argc,argv); -#if !defined(PCBX9D) && !defined(PCBACT) - simuSetSwitch(DSW(SW_ID0)); -#endif - // This creates the main window. We pass in the title to be displayed // above the window, and possibly some icons for when its iconified. // The decorations determine stuff like the borders, close buttons, diff --git a/src/sky9x/board_sky9x.h b/src/sky9x/board_sky9x.h index 3083b1595..3b52911e2 100644 --- a/src/sky9x/board_sky9x.h +++ b/src/sky9x/board_sky9x.h @@ -67,28 +67,57 @@ #define PIN_BUTTON_LEFT 0x00000008 #endif +#define GPIO_TRIM_LH_L PIOA->PIO_PDSR +#define GPIO_TRIM_LV_DN PIOA->PIO_PDSR +#define GPIO_TRIM_RV_UP PIOA->PIO_PDSR +#define GPIO_TRIM_RH_L PIOA->PIO_PDSR +#define GPIO_TRIM_LH_R PIOB->PIO_PDSR +#define GPIO_TRIM_LV_UP PIOC->PIO_PDSR +#define GPIO_TRIM_RV_DN PIOC->PIO_PDSR +#define GPIO_TRIM_RH_R PIOC->PIO_PDSR + +#if defined(REVA) +#define PIN_TRIM_LH_L 0x00000080 +#define PIN_TRIM_LV_DN 0x08000000 +#define PIN_TRIM_RV_UP 0x40000000 +#define PIN_TRIM_RH_L 0x20000000 +#define PIN_TRIM_LH_R 0x00000010 +#define PIN_TRIM_LV_UP 0x10000000 +#define PIN_TRIM_RV_DN 0x00000400 +#define PIN_TRIM_RH_R 0x00000200 +#else +#define PIN_TRIM_LH_L 0x00800000 +#define PIN_TRIM_LV_DN 0x01000000 +#define PIN_TRIM_RV_UP 0x00000002 +#define PIN_TRIM_RH_L 0x00000001 +#define PIN_TRIM_LH_R 0x00000010 +#define PIN_TRIM_LV_UP 0x10000000 +#define PIN_TRIM_RV_DN 0x00000400 +#define PIN_TRIM_RH_R 0x00000200 +#endif + void usbMassStorage(); -#define PIN_ENABLE 0x001 -#define PIN_PERIPHERAL 0x000 -#define PIN_INPUT 0x002 -#define PIN_OUTPUT 0x000 -#define PIN_PULLUP 0x004 -#define PIN_NO_PULLUP 0x000 -#define PIN_PULLDOWN 0x008 -#define PIN_NO_PULLDOWN 0x000 -#define PIN_PERI_MASK_L 0x010 -#define PIN_PERI_MASK_H 0x020 -#define PIN_PER_A 0x000 -#define PIN_PER_B 0x010 -#define PIN_PER_C 0x020 -#define PIN_PER_D 0x030 -#define PIN_PORT_MASK 0x0C0 -#define PIN_PORTA 0x000 -#define PIN_PORTB 0x040 -#define PIN_PORTC 0x080 -#define PIN_LOW 0x000 -#define PIN_HIGH 0x100 +#define PIN_ENABLE 0x001 +#define PIN_PERIPHERAL 0x000 +#define PIN_INPUT 0x002 +#define PIN_OUTPUT 0x000 +#define PIN_PULLUP 0x004 +#define PIN_NO_PULLUP 0x000 +#define PIN_PULLDOWN 0x008 +#define PIN_NO_PULLDOWN 0x000 +#define PIN_PERI_MASK_L 0x010 +#define PIN_PERI_MASK_H 0x020 +#define PIN_PER_A 0x000 +#define PIN_PER_B 0x010 +#define PIN_PER_C 0x020 +#define PIN_PER_D 0x030 +#define PIN_PORT_MASK 0x0C0 +#define PIN_PORTA 0x000 +#define PIN_PORTB 0x040 +#define PIN_PORTC 0x080 +#define PIN_LOW 0x000 +#define PIN_HIGH 0x100 void configure_pins( uint32_t pins, uint16_t config ); uint16_t getCurrent(); diff --git a/src/sky9x/keys_driver.cpp b/src/sky9x/keys_driver.cpp index 4152d3ff0..7ae0ead3a 100644 --- a/src/sky9x/keys_driver.cpp +++ b/src/sky9x/keys_driver.cpp @@ -86,75 +86,29 @@ uint32_t readKeys() uint32_t readTrims() { - uint32_t trims; - uint32_t trima; + register uint32_t a = PIOA->PIO_PDSR; + register uint32_t b = PIOB->PIO_PDSR; + register uint32_t c = PIOC->PIO_PDSR; + register uint32_t result = 0; - trims = 0; + if (~a & PIN_TRIM_LH_L) + result |= 0x01; + if (~a & PIN_TRIM_LV_DN) + result |= 0x04; + if (~a & PIN_TRIM_RV_UP) + result |= 0x20; + if (~a & PIN_TRIM_RH_L) + result |= 0x40; + if (~b & PIN_TRIM_LH_R) + result |= 0x02; + if (~c & PIN_TRIM_LV_UP) + result |= 0x08; + if (~c & PIN_TRIM_RV_DN) + result |= 0x10; + if (~c & PIN_TRIM_RH_R) + result |= 0x80; - trima = PIOA->PIO_PDSR; - -// TRIM_LH_DOWN PA7 (PA23) -#if defined(REVA) - if ( ( trima & 0x0080 ) == 0 ) -#else - if ((trima & 0x00800000) == 0) -#endif - { - trims |= 1; - } - -// TRIM_LV_DOWN PA27 (PA24) -#if defined(REVA) - if ( ( trima & 0x08000000 ) == 0 ) -#else - if ((trima & 0x01000000) == 0) -#endif - { - trims |= 4; - } - -// TRIM_RV_UP PA30 (PA1) -#if defined(REVA) - if ( ( trima & 0x40000000 ) == 0 ) -#else - if ((trima & 0x00000002) == 0) -#endif - { - trims |= 0x20; - } - -// TRIM_RH_DOWN PA29 (PA0) -#if defined(REVA) - if ( ( trima & 0x20000000 ) == 0 ) -#else - if ((trima & 0x00000001) == 0) -#endif - { - trims |= 0x40; - } - -// TRIM_LH_UP PB4 - if ((PIOB->PIO_PDSR & 0x10) == 0) { - trims |= 2; - } - - trima = PIOC->PIO_PDSR; -// TRIM_LV_UP PC28 - if ((trima & 0x10000000) == 0) { - trims |= 8; - } - -// TRIM_RV_DOWN PC10 - if ((trima & 0x00000400) == 0) { - trims |= 0x10; - } - -// TRIM_RH_UP PC9 - if ((trima & 0x00000200) == 0) { - trims |= 0x80; - } - - return trims; + return result; } uint8_t keyDown() diff --git a/src/stock/board_stock.h b/src/stock/board_stock.h index 12df41fb2..9b3d46091 100644 --- a/src/stock/board_stock.h +++ b/src/stock/board_stock.h @@ -48,6 +48,23 @@ #define PIN_BUTTON_RIGHT (1<IDR #define GPIO_BUTTON_EXIT GPIOD->IDR #define GPIO_BUTTON_PAGE GPIOD->IDR -#define PIN_BUTTON_PLUS GPIO_Pin_10 //SW3 PE.10 -#define PIN_BUTTON_MINUS GPIO_Pin_11 //SW1 PE.12 -#define PIN_BUTTON_ENTER GPIO_Pin_12 //SW2 PE.11 -#define PIN_BUTTON_MENU GPIO_Pin_7 //SW4 PD.07 -#define PIN_BUTTON_PAGE GPIO_Pin_3 //SW6 PD.02 -#define PIN_BUTTON_EXIT GPIO_Pin_2 //SW5 PD.03 +#define PIN_BUTTON_PLUS GPIO_Pin_10 //SW3 PE.10 +#define PIN_BUTTON_MINUS GPIO_Pin_11 //SW1 PE.12 +#define PIN_BUTTON_ENTER GPIO_Pin_12 //SW2 PE.11 +#define PIN_BUTTON_MENU GPIO_Pin_7 //SW4 PD.07 +#define PIN_BUTTON_PAGE GPIO_Pin_3 //SW6 PD.02 +#define PIN_BUTTON_EXIT GPIO_Pin_2 //SW5 PD.03 // Trims -#define PIN_TRIM_RV_DN GPIO_Pin_3 //PC.03 -#define PIN_TRIM_RV_UP GPIO_Pin_2 //PC.02 -#define PIN_TRIM_RH_L GPIO_Pin_1 //PC.01 -#define PIN_TRIM_RH_R GPIO_Pin_13 //PC.13 -#define PIN_TRIM_LH_R GPIO_Pin_4 //PE.04 -#define PIN_TRIM_LH_L GPIO_Pin_3 //PE.03 -#define PIN_TRIM_LV_DN GPIO_Pin_6 //PE.06 -#define PIN_TRIM_LV_UP GPIO_Pin_5 //PE.05 +#define GPIO_TRIM_LH_L GPIOE->IDR +#define GPIO_TRIM_LV_DN GPIOE->IDR +#define GPIO_TRIM_RV_UP GPIOC->IDR +#define GPIO_TRIM_RH_L GPIOC->IDR +#define GPIO_TRIM_LH_R GPIOE->IDR +#define GPIO_TRIM_LV_UP GPIOE->IDR +#define GPIO_TRIM_RV_DN GPIOC->IDR +#define GPIO_TRIM_RH_R GPIOC->IDR +#define PIN_TRIM_RV_DN GPIO_Pin_3 //PC.03 +#define PIN_TRIM_RV_UP GPIO_Pin_2 //PC.02 +#define PIN_TRIM_RH_L GPIO_Pin_1 //PC.01 +#define PIN_TRIM_RH_R GPIO_Pin_13 //PC.13 +#define PIN_TRIM_LH_R GPIO_Pin_4 //PE.04 +#define PIN_TRIM_LH_L GPIO_Pin_3 //PE.03 +#define PIN_TRIM_LV_DN GPIO_Pin_6 //PE.06 +#define PIN_TRIM_LV_UP GPIO_Pin_5 //PE.05 // Switchs #define PIN_SW_F GPIO_Pin_14 //PE.14 @@ -45,7 +53,7 @@ #define PIN_SW_C_H GPIO_Pin_1 //PB.01 #define PIN_SW_D_H GPIO_Pin_9 //PE.09 #define PIN_SW_D_L GPIO_Pin_8 //PE.08 -#define PIN_SW_H GPIO_Pin_13 //PE.13 +#define PIN_SW_H GPIO_Pin_13 //PE.13 // ADC #define PIN_STK_J1 GPIO_Pin_0 //PA.00