Merge branch 'next' into projectkk2glider/9xe_adc3_driver
Conflicts: radio/src/myeeprom.h
This commit is contained in:
@@ -4,6 +4,6 @@ MEGA2560 board
|
||||
DIY radio wih :
|
||||
- Arduino MEGA2560 or compatible
|
||||
- Gruvin9x features (soft-off, SD-Card, RTC, haptic, voice, rotary encoders)
|
||||
- Artronic LCD 128x64 ST7565R
|
||||
- LCD 128x64 Artronic (ST7565R) or Zolen (ST7565P)
|
||||
- Aurora9 or T9X gimballs
|
||||
- home made case
|
||||
@@ -44,11 +44,11 @@ inline void boardInit()
|
||||
DDRA = 0b11111111; PORTA = 0b00000000; // LCD data
|
||||
DDRB = 0b01110111; PORTB = 0b00101111; // 7:PPM_IN 6:PPM_OUT, 5:SimCTRL, 4:Buzzer, SDCARD[3:MISO 2:MOSI 1:SCK 0:CS]
|
||||
DDRC = 0b11111100; PORTC = 0b00000011; // 7-3:LCD, 2:BackLight, 1:ID2_SW, 0:ID1_SW
|
||||
DDRD = 0b00000000; PORTD = 0b11111111; // 7:AilDR_SW, 6:N/A, 5:N/A, 4:N/A, 3:RENC2_B, 2:RENC2_A, 1:N/A, 0:N/A
|
||||
DDRD = 0b00000000; PORTD = 0b11111100; // 7:AilDR_SW, 6:N/A, 5:N/A, 4:N/A, 3:RENC2_B, 2:RENC2_A, 1:I2C_SDA, 0:I2C_SCL
|
||||
DDRE = 0b00000010; PORTE = 0b11111100; // 7:N/A, 6:N/A, 5:RENC1_B, 4:RENC1_A, 3:N/A, 2:N/A, 1:TELEM_TX, 0:TELEM_RX
|
||||
DDRF = 0b00000000; PORTF = 0b11111111; // 7-0:Trim switch inputs
|
||||
DDRG = 0b00000000; PORTG = 0b11111111; // 7:N/A, 6:N/A, 5:N/A, 4:N/A, 3:N/A, 2:TCut_SW, 1:Gear_SW, 0: RudDr_SW
|
||||
DDRH = 0b00011000; PORTH = 0b11110111; // 7:N/A, 6:RFPw, 5:JackPres, 4:HoldPw, 3:Speaker, 2:N/A, 1:N/A, 0:N/A
|
||||
DDRH = 0b00011000; PORTH = 0b11110110; // 7:N/A, 6:RFPw, 5:JackPres, 4:HoldPw, 3:Speaker, 2:N/A, 1:N/A, 0:Haptic
|
||||
DDRJ = 0b00000000; PORTJ = 0b11111111; // 7:N/A, 6:N/A, 5:N/A, 4:N/A, 3:N/A, 2:N/A, 1:RENC2_push, 0:RENC1_push
|
||||
DDRK = 0b00000000; PORTK = 0b00000000; // Analogic input (no pull-ups)
|
||||
DDRL = 0b00000000; PORTL = 0b11111111; // 7:TRN_SW 6:EleDR_SW, 5:ESC, 4:MENU 3:Keyb_Left, 2:Keyb_Right, 1:Keyb_Up, 0:Keyb_Down
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@@ -17,12 +17,16 @@
|
||||
#define GPIO_BUTTON_MENU GPIOD->IDR
|
||||
#define GPIO_BUTTON_EXIT GPIOD->IDR
|
||||
#define GPIO_BUTTON_PAGE GPIOD->IDR
|
||||
#define PIN_BUTTON_PLUS GPIO_Pin_10 // PE.10
|
||||
#define PIN_BUTTON_MINUS GPIO_Pin_11 // PE.11
|
||||
#if defined(REV9E)
|
||||
#if defined(SIMU)
|
||||
#define PIN_BUTTON_PLUS GPIO_Pin_5 // This is for SIMU: reuse rotary encoder pins to map UP and DOWN keyboard keys
|
||||
#define PIN_BUTTON_MINUS GPIO_Pin_6 // This is for SIMU: reuse rotary encoder pins to map UP and DOWN keyboard keys
|
||||
#endif
|
||||
#define GPIO_BUTTON_ENTER GPIOF->IDR
|
||||
#define PIN_BUTTON_ENTER GPIO_Pin_0 // PF.00
|
||||
#else
|
||||
#define PIN_BUTTON_PLUS GPIO_Pin_10 // PE.10
|
||||
#define PIN_BUTTON_MINUS GPIO_Pin_11 // PE.11
|
||||
#define GPIO_BUTTON_ENTER GPIOE->IDR
|
||||
#define PIN_BUTTON_ENTER GPIO_Pin_12 // PE.12
|
||||
#endif
|
||||
|
||||
@@ -143,7 +143,7 @@ void readKeysAndTrims()
|
||||
++enuk;
|
||||
}
|
||||
|
||||
#if defined(REV9E)
|
||||
#if defined(REV9E) && !defined(SIMU)
|
||||
static rotenc_t rePreviousValue;
|
||||
rotenc_t reNewValue = (x9de_rotenc / 2);
|
||||
int8_t scrollRE = reNewValue - rePreviousValue;
|
||||
@@ -321,7 +321,7 @@ void keysInit()
|
||||
| PIN_TRIM_LV_DN | PIN_TRIM_LV_UP
|
||||
| PIN_SW_A_L | PIN_SW_D_L | PIN_SW_F | PIN_SW_C_L | PIN_SW_D_H | PIN_SW_H;
|
||||
#elif defined(REV9E)
|
||||
GPIO_InitStructure.GPIO_Pin = PIN_BUTTON_PLUS | PIN_BUTTON_MINUS | PIN_TRIM_LH_R | PIN_TRIM_LH_L
|
||||
GPIO_InitStructure.GPIO_Pin = PIN_TRIM_LH_R | PIN_TRIM_LH_L
|
||||
| PIN_SW_F_H | PIN_SW_A_L | PIN_SW_B_H | PIN_SW_B_L | PIN_SW_C_H | PIN_SW_D_H | PIN_SW_D_L | PIN_SW_G_H | PIN_SW_G_L | PIN_SW_L_L | PIN_SW_Q_H | PIN_SW_Q_L;
|
||||
#elif defined(REVPLUS)
|
||||
GPIO_InitStructure.GPIO_Pin = PIN_BUTTON_PLUS | PIN_BUTTON_ENTER | PIN_BUTTON_MINUS | PIN_TRIM_LH_R | PIN_TRIM_LH_L
|
||||
|
||||
@@ -299,7 +299,7 @@ static void LCD_BL_Config()
|
||||
TIM4->CCMR2 = TIM_CCMR2_OC4M_1 | TIM_CCMR2_OC4M_2 ; // PWM
|
||||
TIM4->CCER = TIM_CCER_CC4E | TIM_CCER_CC2E ;
|
||||
TIM4->CCR2 = 0 ;
|
||||
TIM4->CCR4 = 0 ;
|
||||
TIM4->CCR4 = 80 ;
|
||||
TIM4->EGR = 0 ;
|
||||
TIM4->CR1 = TIM_CR1_CEN ; // Counter enable
|
||||
#else
|
||||
|
||||
@@ -554,7 +554,7 @@ static void init_pa7_ppm()
|
||||
TIM8->CCER = TIM_CCER_CC1E ;
|
||||
#else
|
||||
TIM8->CCER = TIM_CCER_CC1NE;
|
||||
if(!g_model.moduleData[EXTERNAL_MODULE].ppmPulsePol)
|
||||
if(g_model.moduleData[EXTERNAL_MODULE].ppmPulsePol)
|
||||
TIM8->CCER |= TIM_CCER_CC1NP;
|
||||
#endif
|
||||
TIM8->CCMR1 = TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC2PE ; // PWM mode 1
|
||||
|
||||
Reference in New Issue
Block a user