mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-29 05:21:37 +03:00
Migrate from astyle to clang-format (#8464)
This commit is contained in:
committed by
Max Prokhorov
parent
46190b61f1
commit
19b7a29720
@ -17,16 +17,15 @@ const int16_t I2C_MASTER = 0x42;
|
||||
const int16_t I2C_SLAVE = 0x08;
|
||||
|
||||
void setup() {
|
||||
Wire.begin(SDA_PIN, SCL_PIN, I2C_SLAVE); // join i2c bus with address #8
|
||||
Wire.onRequest(requestEvent); // register event
|
||||
Wire.begin(SDA_PIN, SCL_PIN, I2C_SLAVE); // join i2c bus with address #8
|
||||
Wire.onRequest(requestEvent); // register event
|
||||
}
|
||||
|
||||
void loop() {
|
||||
}
|
||||
void loop() {}
|
||||
|
||||
// function that executes whenever data is requested by master
|
||||
// this function is registered as an event, see setup()
|
||||
void requestEvent() {
|
||||
Wire.write("hello\n"); // respond with message of 6 bytes
|
||||
Wire.write("hello\n"); // respond with message of 6 bytes
|
||||
// as expected by master
|
||||
}
|
||||
|
Reference in New Issue
Block a user