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