Use _BV32 to avoid name conflict

This commit is contained in:
Scott Lahteine
2018-02-01 00:06:44 -06:00
parent 6339b506c0
commit f5cfdf6efe
5 changed files with 15 additions and 10 deletions

View File

@ -130,8 +130,8 @@ extern "C" void GpioDisableInt(const uint32_t port, const uint32_t pin) {
}
}
bool isPowerOf2(unsigned int n) {
return n == 1 || (n & (n - 1)) == 0;
constexpr bool isPowerOf2(const uint16_t n) {
return IS_POWER_OF_2(n);
}
#if 0

View File

@ -98,7 +98,7 @@
#define NUM_SERIAL 1
#endif
#define _BV(b) (1UL << (b))
#define _BV(b) (1 << (b))
/**
* TODO: review this to return 1 for pins that are not analog input

View File

@ -29,7 +29,7 @@
#ifndef _FASTIO_STM32F7_H
#define _FASTIO_STM32F7_H
#define _BV(b) (1UL << (b))
#define _BV(b) (1 << (b))
#define READ(IO) digitalRead(IO)
#define WRITE(IO, v) digitalWrite(IO,v)