Skip to content

Commit

Permalink
Fix hard-coded TARGET_IO_PORT* defines. (#13605)
Browse files Browse the repository at this point in the history
This should be able to be overridden by targets.  e.g. ones that  use
octospi IO lines 4-7 instead of 0-3.
  • Loading branch information
hydra committed Apr 29, 2024
1 parent d7fe372 commit 0f7d05f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/target/STM32H730/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,30 @@
// Disable OCTOSPI pins PB2/CLK, PB6/NCS, PD11/IO0, PD12/IO1, PD13/IO3, PE2/IO2
// PE7/IO4, PE8/IO5, PE9/IO6, PE10/IO7

#if !defined(TARGET_IO_PORTA)
#define TARGET_IO_PORTA 0xffff
#endif
#if !defined(TARGET_IO_PORTB)
#define TARGET_IO_PORTB (0xffff & ~(BIT(2)|BIT(6)))
#endif
#if !defined(TARGET_IO_PORTC)
#define TARGET_IO_PORTC 0xffff
#endif
#if !defined(TARGET_IO_PORTD)
#define TARGET_IO_PORTD (0xffff & ~(BIT(11)|BIT(12)|BIT(13)))
#endif
#if !defined(TARGET_IO_PORTE)
#define TARGET_IO_PORTE (0xffff & ~(BIT(2)|BIT(7)|BIT(8)|BIT(9)|BIT(10)))
#endif
#if !defined(TARGET_IO_PORTF)
#define TARGET_IO_PORTF 0xffff
#endif
#if !defined(TARGET_IO_PORTG)
#define TARGET_IO_PORTG 0xffff
#endif
#if !defined(TARGET_IO_PORTH)
#define TARGET_IO_PORTH 0xffff
#endif

#define USE_BEEPER

Expand Down

0 comments on commit 0f7d05f

Please sign in to comment.