Override for LPC1768 u8g/digipot I2C master ID (#16622)

This commit is contained in:
0r31
2020-01-21 03:09:16 +01:00
committed by Scott Lahteine
parent 1a5cbc9052
commit b57ef4b261
4 changed files with 24 additions and 15 deletions

View File

@@ -25,15 +25,17 @@
* HAL_LPC1768/include/i2c_util.h
*/
#ifndef USEDI2CDEV_M
#define USEDI2CDEV_M 1 // By default use I2C1 controller
#include "../../../inc/MarlinConfigPre.h"
#ifndef I2C_MASTER_ID
#define I2C_MASTER_ID 1
#endif
#if USEDI2CDEV_M == 0
#if I2C_MASTER_ID == 0
#define I2CDEV_M LPC_I2C0
#elif USEDI2CDEV_M == 1
#elif I2C_MASTER_ID == 1
#define I2CDEV_M LPC_I2C1
#elif USEDI2CDEV_M == 2
#elif I2C_MASTER_ID == 2
#define I2CDEV_M LPC_I2C2
#else
#error "Master I2C device not defined!"