Skip to content

Commit

Permalink
cubeorangeplus: add check for SMPS support
Browse files Browse the repository at this point in the history
If NuttX is built without support for SMPS it can brick the hardware.
Therefore, I suggest that we add this additional compile-time check.

Signed-off-by: Julian Oes <[email protected]>
  • Loading branch information
julianoes committed Apr 26, 2023
1 parent dd15dc1 commit 398c11e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions boards/cubepilot/cubeorangeplus/src/board_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@
#include <stdint.h>
#include <stm32_gpio.h>

/**
* If NuttX is built without support for SMPS it can brick the hardware.
* Therefore, we make sure the NuttX headers are correct.
*/
#include "hardware/stm32h7x3xx_pwr.h"
#if STM32_PWR_CR3_SMPSEXTHP != (1 << 3)
# error "No SMPS support in NuttX submodule");
#endif


/* PX4IO connection configuration */
#define BOARD_USES_PX4IO_VERSION 2
#define PX4IO_SERIAL_DEVICE "/dev/ttyS3"
Expand Down

0 comments on commit 398c11e

Please sign in to comment.