Fix M261, i2c EEPROM, i2c Encoder for LPC (#17678)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
randellhodges
2020-04-25 11:35:35 -05:00
committed by GitHub
parent 307c48fe0a
commit b700b3cde6
4 changed files with 11 additions and 15 deletions

View File

@@ -292,11 +292,7 @@
#define FMOD(x, y) fmodf(x, y)
#define HYPOT(x,y) SQRT(HYPOT2(x,y))
#ifdef TARGET_LPC1768
#define I2C_ADDRESS(A) ((A) << 1)
#else
#define I2C_ADDRESS(A) A
#endif
#define I2C_ADDRESS(A) (TERN(TARGET_LPC1768, (A) << 1, A))
// Use NUM_ARGS(__VA_ARGS__) to get the number of variadic arguments
#define _NUM_ARGS(_,Z,Y,X,W,V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C,B,A,OUT,...) OUT