Marlin must override _BV for 32-bit masks!
This commit is contained in:
parent
45cfb16424
commit
58671e1bc1
|
@ -98,7 +98,7 @@
|
||||||
#define NUM_SERIAL 1
|
#define NUM_SERIAL 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _BV(bit) (1 << (bit))
|
#define _BV(b) (1UL << (b))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO: review this to return 1 for pins that are not analog input
|
* TODO: review this to return 1 for pins that are not analog input
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#ifndef _FASTIO_STM32F7_H
|
#ifndef _FASTIO_STM32F7_H
|
||||||
#define _FASTIO_STM32F7_H
|
#define _FASTIO_STM32F7_H
|
||||||
|
|
||||||
#define _BV(bit) (1 << (bit))
|
#define _BV(b) (1UL << (b))
|
||||||
|
|
||||||
#define READ(IO) digitalRead(IO)
|
#define READ(IO) digitalRead(IO)
|
||||||
#define WRITE(IO, v) digitalWrite(IO,v)
|
#define WRITE(IO, v) digitalWrite(IO,v)
|
||||||
|
|
|
@ -95,9 +95,8 @@
|
||||||
#define STRINGIFY(M) STRINGIFY_(M)
|
#define STRINGIFY(M) STRINGIFY_(M)
|
||||||
|
|
||||||
// Macros for bit masks
|
// Macros for bit masks
|
||||||
#ifndef _BV
|
#undef _BV // Marlin needs 32-bit unsigned!
|
||||||
#define _BV(n) (1<<(n))
|
#define _BV(b) (1UL << (b))
|
||||||
#endif
|
|
||||||
#define TEST(n,b) (((n)&_BV(b))!=0)
|
#define TEST(n,b) (((n)&_BV(b))!=0)
|
||||||
#define SBI(n,b) (n |= _BV(b))
|
#define SBI(n,b) (n |= _BV(b))
|
||||||
#define CBI(n,b) (n &= ~_BV(b))
|
#define CBI(n,b) (n &= ~_BV(b))
|
||||||
|
|
Loading…
Reference in a new issue