From 8d850e979aca32187bef1b8242a89b8d78716bf7 Mon Sep 17 00:00:00 2001 From: Siddharth Purohit Date: Thu, 27 Dec 2018 16:51:56 +0800 Subject: [PATCH] HAL_ChibiOS: add CubePurple/PH2Slim board config --- .../hwdef/CubePurple/defaults.parm | 8 ++++++++ .../hwdef/CubePurple/hwdef-bl.dat | 18 ++++++++++++++++++ .../AP_HAL_ChibiOS/hwdef/CubePurple/hwdef.dat | 18 ++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/CubePurple/defaults.parm create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/CubePurple/hwdef-bl.dat create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/CubePurple/hwdef.dat diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubePurple/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/CubePurple/defaults.parm new file mode 100644 index 0000000000..a785685df1 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubePurple/defaults.parm @@ -0,0 +1,8 @@ +# setup correct defaults for battery monitoring for cube power brick +BATT2_CURR_PIN 14 +BATT2_VOLT_PIN 13 +BATT_AMP_PERVLT 39.877 +BATT_VOLT_MULT 12.02 +BATT2_AMP_PERVLT 39.877 +BATT2_VOLT_MULT 12.02 +BRD_TYPE 6 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubePurple/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/CubePurple/hwdef-bl.dat new file mode 100644 index 0000000000..6a0176b5a5 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubePurple/hwdef-bl.dat @@ -0,0 +1,18 @@ +# hw definition file for processing by chibios_hwdef.py +# for The CUBE Black and the Cube Purple hardware +# this is based on fmuv3, but with vendor specific USB IDs + +include ../fmuv3/hwdef-bl.dat + +# USB setup +USB_VENDOR 0x2DAE # ONLY FOR USE BY HEX! NOBODY ELSE +USB_PRODUCT 0x1005 +USB_STRING_MANUFACTURER "Hex/ProfiCNC" +USB_STRING_PRODUCT "CubePurple-BL" +USB_STRING_SERIAL "%SERIAL%" + +PA0 GPS_PIN1 OUTPUT LOW PULLDOWN +PA1 GPS_PIN2 OUTPUT LOW PULLDOWN +PB8 GPS_PIN3 OUTPUT LOW PULLDOWN +PB9 GPS_PIN4 OUTPUT LOW PULLDOWN +PB5 GPS_PIN5 OUTPUT LOW PULLDOWN diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubePurple/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CubePurple/hwdef.dat new file mode 100644 index 0000000000..7fb22019ec --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubePurple/hwdef.dat @@ -0,0 +1,18 @@ +# hw definition file for processing by chibios_hwdef.py +# for The CUBE Black and the Cube Purple hardware +# this is based on fmuv3, but with vendor specific USB IDs + +include ../fmuv3/hwdef.dat + +# USB setup +USB_VENDOR 0x2DAE # ONLY FOR USE BY HEX! NOBODY ELSE +USB_PRODUCT 0x1015 +USB_STRING_MANUFACTURER "Hex/ProfiCNC" +USB_STRING_PRODUCT "CubePurple" +USB_STRING_SERIAL "%SERIAL%" + +# remap PB0/1 as ADC's +undef PB0 +undef PB1 +PB0 PB0_ADC ADC1 SCALE(1) +PB1 PB1_ADC ADC1 SCALE(1)