Skip to content

Commit 63bc413

Browse files
authored
πŸ§‘β€πŸ’» Add STM32/STM32F1 Open Drain (OD) pin mode (#27616)
1 parent 22977c8 commit 63bc413

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

β€ŽMarlin/src/HAL/STM32/fastio.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ void FastIO_init(); // Must be called before using fast io macros
7777
#define SET_INPUT_PULLUP(IO) _SET_MODE(IO, INPUT_PULLUP) //!< Input with Pull-up activation
7878
#define SET_INPUT_PULLDOWN(IO) _SET_MODE(IO, INPUT_PULLDOWN) //!< Input with Pull-down activation
7979
#define SET_OUTPUT(IO) OUT_WRITE(IO, LOW)
80+
#define SET_OUTPUT_OD(IO) OUT_WRITE_OD(IO, LOW)
8081
#define SET_PWM(IO) _SET_MODE(IO, PWM)
8182

8283
#define IS_INPUT(IO)

β€ŽMarlin/src/HAL/STM32F1/fastio.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#define SET_INPUT_PULLUP(IO) _SET_MODE(IO, GPIO_INPUT_PU)
4545
#define SET_INPUT_PULLDOWN(IO) _SET_MODE(IO, GPIO_INPUT_PD)
4646
#define SET_OUTPUT(IO) OUT_WRITE(IO, LOW)
47+
#define SET_OUTPUT_OD(IO) OUT_WRITE_OD(IO, LOW)
4748
#define SET_PWM(IO) pinMode(IO, PWM) // do{ gpio_set_mode(PIN_MAP[pin].gpio_device, PIN_MAP[pin].gpio_bit, GPIO_AF_OUTPUT_PP); timer_set_mode(PIN_MAP[pin].timer_device, PIN_MAP[pin].timer_channel, TIMER_PWM); }while(0)
4849
#define SET_PWM_OD(IO) pinMode(IO, PWM_OPEN_DRAIN)
4950

0 commit comments

Comments
Β (0)