Skip to content

Commit dbf9750

Browse files
committed
fix(wire): typo and sintax error
1 parent 694df6f commit dbf9750

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libraries/Wire/src/Wire.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,14 +596,14 @@ void TwoWire::flush() {
596596
//i2cFlush(num); // cleanup
597597
}
598598

599-
void TwoWire::onReceive(std::function<void(int) function) {
599+
void TwoWire::onReceive(std::function<void(int)> function) {
600600
#if SOC_I2C_SUPPORT_SLAVE
601601
user_onReceive = function;
602602
#endif
603603
}
604604

605605
// sets function called on slave read
606-
void TwoWire::onRequest(std::function<void() function) {
606+
void TwoWire::onRequest(std::function<void()> function) {
607607
#if SOC_I2C_SUPPORT_SLAVE
608608
user_onRequest = function;
609609
#endif

libraries/Wire/src/Wire.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class TwoWire : public HardwareI2C {
7575
bool is_slave;
7676
// functional pointers for user callbacks
7777
std::function<void()> user_onRequest;
78-
std::function<void(int) user_onReceive;
78+
std::function<void(int)> user_onReceive;
7979
static void onRequestService(uint8_t, void *);
8080
static void onReceiveService(uint8_t, uint8_t *, size_t, bool, void *);
8181
#endif /* SOC_I2C_SUPPORT_SLAVE */
@@ -113,7 +113,7 @@ class TwoWire : public HardwareI2C {
113113
size_t requestFrom(uint8_t address, size_t len, bool stopBit) override;
114114
size_t requestFrom(uint8_t address, size_t len) override;
115115

116-
void onReceive(std::function<void(int)) override;
116+
void onReceive(std::function<void(int)>) override;
117117
void onRequest(std::function<void()>) override;
118118

119119
//call setPins() first, so that begin() can be called without arguments from libraries

0 commit comments

Comments
 (0)