mirror of https://github.com/ArduPilot/ardupilot
HAL_ChibiOS: simplify skyviper-v2450 config
remove unused peripherals
This commit is contained in:
parent
b90c0d78f3
commit
4ce0c2c827
|
@ -828,6 +828,7 @@ def build_peripheral_list():
|
||||||
|
|
||||||
def process_line(line):
|
def process_line(line):
|
||||||
'''process one line of pin definition file'''
|
'''process one line of pin definition file'''
|
||||||
|
global allpins
|
||||||
a = shlex.split(line)
|
a = shlex.split(line)
|
||||||
# keep all config lines for later use
|
# keep all config lines for later use
|
||||||
alllines.append(line)
|
alllines.append(line)
|
||||||
|
@ -864,11 +865,24 @@ def process_line(line):
|
||||||
if a[0] == 'SPIDEV':
|
if a[0] == 'SPIDEV':
|
||||||
spidev.append(a[1:])
|
spidev.append(a[1:])
|
||||||
if a[0] == 'undef':
|
if a[0] == 'undef':
|
||||||
|
print("Removing %s" % a[1])
|
||||||
config.pop(a[1], '')
|
config.pop(a[1], '')
|
||||||
|
bytype.pop(a[1],'')
|
||||||
|
bylabel.pop(a[1],'')
|
||||||
#also remove all occurences of defines in previous lines if any
|
#also remove all occurences of defines in previous lines if any
|
||||||
for line in alllines:
|
for line in alllines[:]:
|
||||||
if line.startswith('define') and a[1] in line:
|
if line.startswith('define') and a[1] in line:
|
||||||
alllines.remove(line)
|
alllines.remove(line)
|
||||||
|
newpins = []
|
||||||
|
for pin in allpins:
|
||||||
|
if pin.type == a[1]:
|
||||||
|
continue
|
||||||
|
if pin.label == a[1]:
|
||||||
|
continue
|
||||||
|
if pin.portpin == a[1]:
|
||||||
|
continue
|
||||||
|
newpins.append(pin)
|
||||||
|
allpins = newpins
|
||||||
|
|
||||||
|
|
||||||
def process_file(filename):
|
def process_file(filename):
|
||||||
|
|
|
@ -4,24 +4,35 @@
|
||||||
# start with fmuv3 base port
|
# start with fmuv3 base port
|
||||||
include ../fmuv3/hwdef.dat
|
include ../fmuv3/hwdef.dat
|
||||||
|
|
||||||
|
# remove some unnecessary features from fmuv3
|
||||||
|
undef UART8
|
||||||
|
undef UART8_TX
|
||||||
|
undef UART8_RX
|
||||||
|
undef USART3
|
||||||
|
undef USART3_TX
|
||||||
|
undef USART3_RX
|
||||||
|
undef HAL_WITH_UAVCAN
|
||||||
|
undef IOMCU_UART
|
||||||
|
undef AP_FEATURE_SBUS_OUT
|
||||||
|
undef HAL_OS_FATFS_IO
|
||||||
|
undef AP_FEATURE_RTSCTS
|
||||||
|
undef HAL_WITH_RAMTRON
|
||||||
|
undef IOMCU_UART
|
||||||
|
|
||||||
|
UART_ORDER OTG1 UART4 USART2
|
||||||
|
|
||||||
# enable AP_Radio support
|
# enable AP_Radio support
|
||||||
define HAL_RCINPUT_WITH_AP_RADIO 1
|
define HAL_RCINPUT_WITH_AP_RADIO 1
|
||||||
|
|
||||||
define HAL_GPIO_RADIO_RESET 1 // PB0 GPIO from FMU3
|
define HAL_GPIO_RADIO_RESET 1 // PB0 GPIO from FMU3
|
||||||
define HAL_GPIO_RADIO_IRQ 15 // PD15
|
define HAL_GPIO_RADIO_IRQ 15 // PD15
|
||||||
|
|
||||||
# disable FRAM for storage
|
|
||||||
undef HAL_WITH_RAMTRON
|
|
||||||
|
|
||||||
# setup defines for ArduCopter config
|
# setup defines for ArduCopter config
|
||||||
define TOY_MODE_ENABLED ENABLED
|
define TOY_MODE_ENABLED ENABLED
|
||||||
define ARMING_DELAY_SEC 0
|
define ARMING_DELAY_SEC 0
|
||||||
define LAND_START_ALT 700
|
define LAND_START_ALT 700
|
||||||
define LAND_DETECTOR_ACCEL_MAX 2.0f
|
define LAND_DETECTOR_ACCEL_MAX 2.0f
|
||||||
|
|
||||||
# disable IOMCU
|
|
||||||
undef IOMCU_UART
|
|
||||||
|
|
||||||
# support cypress and cc2500 radios
|
# support cypress and cc2500 radios
|
||||||
SPIDEV cypress SPI2 DEVID11 FRAM_CS MODE0 2*MHZ 2*MHZ
|
SPIDEV cypress SPI2 DEVID11 FRAM_CS MODE0 2*MHZ 2*MHZ
|
||||||
SPIDEV cc2500 SPI2 DEVID12 FRAM_CS MODE0 4*MHZ 4*MHZ
|
SPIDEV cc2500 SPI2 DEVID12 FRAM_CS MODE0 4*MHZ 4*MHZ
|
||||||
|
|
Loading…
Reference in New Issue