mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
i2c/sfp: Demagic shift-values
This commit is contained in:
1 parent
f65d14f452
commit
b5fe9f217f
3 files changed
+6
-4
No files matched your search
@@ -6,8 +6,8 @@
|
||||
#include "rtl837x_common.h"
|
||||
|
||||
#define I2CBUS(sda, scl) \
|
||||
((uint8_t)((I2C_BUS_FROM_SCL_PIN(scl) << 5) | \
|
||||
(I2C_BUS_FROM_SDA_PIN(sda) << 2)))
|
||||
((uint8_t)((I2C_BUS_FROM_SCL_PIN(scl) << RTL837X_REG_I2C_SCL_SHIFT) | \
|
||||
(I2C_BUS_FROM_SDA_PIN(sda) << RTL837X_REG_I2C_SDA_SHIFT)))
|
||||
|
||||
#define I2C_BUS_FROM_SDA_PIN(sda_pin) \
|
||||
((sda_pin) == GPIO47_I2C_SDA0 ? (uint8_t)0 : \
|
||||
|
||||
Reference in new issue
Block a user