mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 09:58:28 -04:00
HAL_ChibiOS: make all boards base GPIOs for servos at 50
this makes the docs for GPIO pins consistent across boards
This commit is contained in:
parent
5ce418b4ea
commit
78a32df2e7
@ -128,19 +128,19 @@ define HAL_EXT_COMPASS_HMC5843_I2C_BUS 1
|
||||
|
||||
|
||||
# PWM out pins
|
||||
PA0 TIM2_CH1 TIM2 PWM(1)
|
||||
PA1 TIM2_CH2 TIM2 PWM(2)
|
||||
PA2 TIM2_CH3 TIM2 PWM(3)
|
||||
PA3 TIM2_CH4 TIM2 PWM(4)
|
||||
PE9 TIM1_CH1 TIM1 PWM(5)
|
||||
PE11 TIM1_CH2 TIM1 PWM(6)
|
||||
PE13 TIM1_CH3 TIM1 PWM(7)
|
||||
PE14 TIM1_CH4 TIM1 PWM(8)
|
||||
PA0 TIM2_CH1 TIM2 PWM(1) GPIO(50)
|
||||
PA1 TIM2_CH2 TIM2 PWM(2) GPIO(51)
|
||||
PA2 TIM2_CH3 TIM2 PWM(3) GPIO(52)
|
||||
PA3 TIM2_CH4 TIM2 PWM(4) GPIO(53)
|
||||
PE9 TIM1_CH1 TIM1 PWM(5) GPIO(54)
|
||||
PE11 TIM1_CH2 TIM1 PWM(6) GPIO(55)
|
||||
PE13 TIM1_CH3 TIM1 PWM(7) GPIO(56)
|
||||
PE14 TIM1_CH4 TIM1 PWM(8) GPIO(57)
|
||||
|
||||
PD13 TIM4_CH2 TIM4 PWM(9)
|
||||
PD12 TIM4_CH1 TIM4 PWM(10)
|
||||
PD15 TIM4_CH4 TIM4 PWM(11)
|
||||
PD14 TIM4_CH3 TIM4 PWM(12)
|
||||
PD13 TIM4_CH2 TIM4 PWM(9) GPIO(58)
|
||||
PD12 TIM4_CH1 TIM4 PWM(10) GPIO(59)
|
||||
PD15 TIM4_CH4 TIM4 PWM(11) GPIO(60)
|
||||
PD14 TIM4_CH3 TIM4 PWM(12) GPIO(61)
|
||||
|
||||
# also USART6_RX for serial RC
|
||||
PC7 TIM8_CH2 TIM8 RCIN PULLUP LOW DMA_CH0
|
||||
|
@ -83,15 +83,15 @@ define HAL_GPIO_B_LED_PIN 1
|
||||
|
||||
|
||||
#pwm output
|
||||
PB7 TIM4_CH2 TIM4 PWM(1) GPIO(59)
|
||||
PB6 TIM4_CH1 TIM4 PWM(2) GPIO(58)
|
||||
PB0 TIM3_CH3 TIM3 PWM(3) GPIO(26)
|
||||
PB1 TIM3_CH4 TIM3 PWM(4) GPIO(27)
|
||||
PC8 TIM8_CH3 TIM8 PWM(5) GPIO(39)
|
||||
PC9 TIM8_CH4 TIM8 PWM(6) GPIO(40)
|
||||
PB14 TIM1_CH2N TIM1 PWM(7) GPIO(35)
|
||||
PB15 TIM1_CH3N TIM1 PWM(8) GPIO(36)
|
||||
PA8 TIM1_CH1 TIM1 PWM(9) GPIO(41)
|
||||
PB7 TIM4_CH2 TIM4 PWM(1) GPIO(50)
|
||||
PB6 TIM4_CH1 TIM4 PWM(2) GPIO(51)
|
||||
PB0 TIM3_CH3 TIM3 PWM(3) GPIO(52)
|
||||
PB1 TIM3_CH4 TIM3 PWM(4) GPIO(53)
|
||||
PC8 TIM8_CH3 TIM8 PWM(5) GPIO(54)
|
||||
PC9 TIM8_CH4 TIM8 PWM(6) GPIO(55)
|
||||
PB14 TIM1_CH2N TIM1 PWM(7) GPIO(56)
|
||||
PB15 TIM1_CH3N TIM1 PWM(8) GPIO(57)
|
||||
PA8 TIM1_CH1 TIM1 PWM(9) GPIO(58)
|
||||
|
||||
# SD CARD SPI
|
||||
PB3 SPI3_SCK SPI3
|
||||
|
@ -104,10 +104,10 @@ PC6 USART6_TX USART6
|
||||
# UART7, RX only?
|
||||
#PE7 UART7_RX UART7
|
||||
|
||||
PB0 TIM3_CH3 TIM3 PWM(1)
|
||||
PB1 TIM3_CH4 TIM3 PWM(2)
|
||||
PE9 TIM1_CH1 TIM1 PWM(3)
|
||||
PE11 TIM1_CH2 TIM1 PWM(4)
|
||||
PB0 TIM3_CH3 TIM3 PWM(1) GPIO(50)
|
||||
PB1 TIM3_CH4 TIM3 PWM(2) GPIO(51)
|
||||
PE9 TIM1_CH1 TIM1 PWM(3) GPIO(52)
|
||||
PE11 TIM1_CH2 TIM1 PWM(4) GPIO(53)
|
||||
|
||||
define HAL_STORAGE_SIZE 16384
|
||||
define STORAGE_FLASH_PAGE 1
|
||||
|
@ -34,12 +34,12 @@ PC2 BAT_VOLT_SENS ADC1 SCALE(1)
|
||||
PA0 RSSI_IN ADC1
|
||||
|
||||
#pwm output
|
||||
PB0 TIM1_CH2N TIM1 PWM(1) GPIO(26)
|
||||
PB1 TIM1_CH3N TIM1 PWM(2) GPIO(27)
|
||||
PA3 TIM2_CH4 TIM2 PWM(3) GPIO(17)
|
||||
PA2 TIM2_CH3 TIM2 PWM(4) GPIO(16)
|
||||
PA1 TIM2_CH2 TIM2 PWM(5) GPIO(15)
|
||||
PA8 TIM1_CH1 TIM1 PWM(6) GPIO(41)
|
||||
PB0 TIM1_CH2N TIM1 PWM(1) GPIO(50)
|
||||
PB1 TIM1_CH3N TIM1 PWM(2) GPIO(51)
|
||||
PA3 TIM2_CH4 TIM2 PWM(3) GPIO(52)
|
||||
PA2 TIM2_CH3 TIM2 PWM(4) GPIO(53)
|
||||
PA1 TIM2_CH2 TIM2 PWM(5) GPIO(54)
|
||||
PA8 TIM1_CH1 TIM1 PWM(6) GPIO(55)
|
||||
|
||||
PA4 MPU6000_CS CS
|
||||
PA5 SPI1_SCK SPI1
|
||||
|
@ -34,12 +34,12 @@ PC2 BAT_VOLT_SENS ADC1 SCALE(1)
|
||||
PA0 RSSI_IN ADC1
|
||||
|
||||
#pwm output
|
||||
PB0 TIM1_CH2N TIM1 PWM(1) GPIO(26)
|
||||
PB1 TIM1_CH3N TIM1 PWM(2) GPIO(27)
|
||||
PA3 TIM2_CH4 TIM2 PWM(3) GPIO(17)
|
||||
PA2 TIM2_CH3 TIM2 PWM(4) GPIO(16)
|
||||
PA1 TIM2_CH2 TIM2 PWM(5) GPIO(15)
|
||||
PA8 TIM1_CH1 TIM1 PWM(6) GPIO(41)
|
||||
PB0 TIM1_CH2N TIM1 PWM(1) GPIO(50)
|
||||
PB1 TIM1_CH3N TIM1 PWM(2) GPIO(51)
|
||||
PA3 TIM2_CH4 TIM2 PWM(3) GPIO(52)
|
||||
PA2 TIM2_CH3 TIM2 PWM(4) GPIO(53)
|
||||
PA1 TIM2_CH2 TIM2 PWM(5) GPIO(54)
|
||||
PA8 TIM1_CH1 TIM1 PWM(6) GPIO(55)
|
||||
|
||||
PA4 MPU6000_CS CS
|
||||
PA5 SPI1_SCK SPI1
|
||||
|
@ -1042,11 +1042,15 @@ def write_GPIO_config(f):
|
||||
'''write GPIO config defines'''
|
||||
f.write('// GPIO config\n')
|
||||
gpios = []
|
||||
gpioset = set()
|
||||
for l in bylabel:
|
||||
p = bylabel[l]
|
||||
gpio = p.extra_value('GPIO', type=int)
|
||||
if gpio is None:
|
||||
continue
|
||||
if gpio in gpioset:
|
||||
error("Duplicate GPIO value %u" % gpio)
|
||||
gpioset.add(gpio)
|
||||
# see if it is also a PWM pin
|
||||
pwm = p.extra_value('PWM', type=int, default=0)
|
||||
port = p.port
|
||||
|
Loading…
Reference in New Issue
Block a user