Move some MarlinCore and MarlinUI code (#20832)
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
|
||||
#include <Wire.h>
|
||||
|
||||
TWIBus i2c;
|
||||
|
||||
TWIBus::TWIBus() {
|
||||
#if I2C_SLAVE_ADDRESS == 0
|
||||
Wire.begin(); // No address joins the BUS as the master
|
||||
@@ -155,6 +157,14 @@ void TWIBus::flush() {
|
||||
reset();
|
||||
}
|
||||
|
||||
void i2c_on_receive(int bytes) { // just echo all bytes received to serial
|
||||
i2c.receive(bytes);
|
||||
}
|
||||
|
||||
void i2c_on_request() { // just send dummy data for now
|
||||
i2c.reply("Hello World!\n");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(DEBUG_TWIBUS)
|
||||
|
||||
Reference in New Issue
Block a user