mirror of
https://github.com/eddyem/stm32samples.git
synced 2026-02-28 11:54:30 +03:00
fixed USBDP pullup in Multistepper (it works always, so you can use DFU)
This commit is contained in:
@@ -22,9 +22,7 @@
|
||||
#ifndef __COMMON_MACROS_H__
|
||||
#define __COMMON_MACROS_H__
|
||||
|
||||
#ifndef TRUE_INLINE
|
||||
#define TRUE_INLINE __attribute__((always_inline)) static inline
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
@@ -34,6 +32,10 @@
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef TRUE_INLINE
|
||||
#define TRUE_INLINE __attribute__((always_inline)) static inline
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL (0)
|
||||
#endif
|
||||
@@ -43,7 +45,7 @@
|
||||
|
||||
#define pin_toggle(gpioport, gpios) do{ \
|
||||
register uint32_t __port = gpioport->ODR; \
|
||||
gpioport->BSRR = ((__port & gpios) << 16) | (~__port & gpios);}while(0)
|
||||
gpioport->BSRR = ((__port & (gpios)) << 16) | (~__port & (gpios));}while(0)
|
||||
|
||||
#define pin_set(gpioport, gpios) do{gpioport->BSRR = gpios;}while(0)
|
||||
#define pin_clear(gpioport, gpios) do{gpioport->BSRR = ((gpios) << 16);}while(0)
|
||||
|
||||
Reference in New Issue
Block a user