mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-12-28 18:30:36 -07:00
🧑💻 Add STM32/STM32F1 Open Drain (OD) pin mode (#27616)
This commit is contained in:
parent
22977c885b
commit
63bc413da8
2 changed files with 2 additions and 0 deletions
|
|
@ -77,6 +77,7 @@ void FastIO_init(); // Must be called before using fast io macros
|
|||
#define SET_INPUT_PULLUP(IO) _SET_MODE(IO, INPUT_PULLUP) //!< Input with Pull-up activation
|
||||
#define SET_INPUT_PULLDOWN(IO) _SET_MODE(IO, INPUT_PULLDOWN) //!< Input with Pull-down activation
|
||||
#define SET_OUTPUT(IO) OUT_WRITE(IO, LOW)
|
||||
#define SET_OUTPUT_OD(IO) OUT_WRITE_OD(IO, LOW)
|
||||
#define SET_PWM(IO) _SET_MODE(IO, PWM)
|
||||
|
||||
#define IS_INPUT(IO)
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
#define SET_INPUT_PULLUP(IO) _SET_MODE(IO, GPIO_INPUT_PU)
|
||||
#define SET_INPUT_PULLDOWN(IO) _SET_MODE(IO, GPIO_INPUT_PD)
|
||||
#define SET_OUTPUT(IO) OUT_WRITE(IO, LOW)
|
||||
#define SET_OUTPUT_OD(IO) OUT_WRITE_OD(IO, LOW)
|
||||
#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)
|
||||
#define SET_PWM_OD(IO) pinMode(IO, PWM_OPEN_DRAIN)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue