fixed USBDP pullup in Multistepper (it works always, so you can use DFU)

This commit is contained in:
Edward Emelianov
2023-02-06 20:05:45 +03:00
parent 756ed4be08
commit daf17a651e
54 changed files with 12332 additions and 9328 deletions

View File

@@ -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)