Skip to content

Commit

Permalink
AP_HAL_ChibiOS: use new AP_PERIPH_MSP_ENABLED define
Browse files Browse the repository at this point in the history
  • Loading branch information
shiv-tyagi authored and peterbarker committed Feb 22, 2025
1 parent dabd9ba commit 5f1d3da
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libraries/AP_HAL_ChibiOS/hwdef/MatekG474-GPS/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ define HAL_PROBE_EXTERNAL_I2C_COMPASSES


# ----------- MSP
define HAL_PERIPH_ENABLE_MSP
define AP_PERIPH_MSP_ENABLED 1
define HAL_MSP_ENABLED 1
define AP_PERIPH_MSP_PORT_DEFAULT 3

Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_HAL_ChibiOS/hwdef/MatekG474-Periph/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ define HAL_BATT_MONITOR_DEFAULT 21


# ----------- MSP
define HAL_PERIPH_ENABLE_MSP
define AP_PERIPH_MSP_ENABLED 1
define HAL_MSP_ENABLED 1


Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_HAL_ChibiOS/hwdef/MatekL431-GPS/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ undef HAL_CAN_POOL_SIZE
define HAL_CAN_POOL_SIZE 12000

# -------------------- MSP --------------------------------
define HAL_PERIPH_ENABLE_MSP
define AP_PERIPH_MSP_ENABLED 1
define HAL_MSP_ENABLED 1
define AP_PERIPH_MSP_PORT_DEFAULT 1

Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_HAL_ChibiOS/hwdef/MatekL431-Periph/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ define HAL_AIRSPEED_TYPE_DEFAULT 1
define AIRSPEED_MAX_SENSORS 1

# -------------------- MSP --------------------------------
define HAL_PERIPH_ENABLE_MSP
define AP_PERIPH_MSP_ENABLED 1
define HAL_MSP_ENABLED 1
define AP_PERIPH_MSP_PORT_DEFAULT 1

Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_HAL_ChibiOS/hwdef/f303-MatekGPS/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ define AP_PERIPH_MAG_ENABLED 1
define AP_PERIPH_BARO_ENABLED 1
define AP_PERIPH_AIRSPEED_ENABLED 1
define AP_PERIPH_RANGEFINDER_ENABLED 1
define HAL_PERIPH_ENABLE_MSP
define AP_PERIPH_MSP_ENABLED 1

# setup for MSP
define HAL_MSP_ENABLED 1
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_HAL_ChibiOS/hwdef/f405-MatekGPS/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ define HAL_AIRSPEED_TYPE_DEFAULT 1
define AIRSPEED_MAX_SENSORS 1

# -------------------- MSP --------------------------------
define HAL_PERIPH_ENABLE_MSP
define AP_PERIPH_MSP_ENABLED 1
define HAL_MSP_ENABLED 1
define AP_PERIPH_MSP_PORT_DEFAULT 4

Expand Down
6 changes: 6 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/scripts/defaults_periph.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@
* sanity checks that hwdefs are up-to-date in terms of how they are
* trying to configure the peripheral:
*/
#ifdef HAL_PERIPH_ENABLE_MSP
#error "Change 'define HAL_PERIPH_ENABLE_MSP' to 'define AP_PERIPH_MSP_ENABLED 1'"
#endif
#ifdef HAL_PERIPH_ENABLE_NOTIFY
#error "Change 'define HAL_PERIPH_ENABLE_NOTIFY' to 'define AP_PERIPH_NOTIFY_ENABLED 1'"
#endif
Expand Down Expand Up @@ -224,6 +227,9 @@
/*
* defaults for various AP_Periph features:
*/
#ifndef AP_PERIPH_MSP_ENABLED
#define AP_PERIPH_MSP_ENABLED 0
#endif
#ifndef AP_PERIPH_NOTIFY_ENABLED
#define AP_PERIPH_NOTIFY_ENABLED 0
#endif
Expand Down

0 comments on commit 5f1d3da

Please sign in to comment.