소스 검색

🐛 Fix TWIBus Wire.begin call (#23183)

Stuart Pittaway 2 년 전
부모
커밋
6580e655fb
No account linked to committer's email address
1개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. 3
    4
      Marlin/src/feature/twibus.cpp

+ 3
- 4
Marlin/src/feature/twibus.cpp 파일 보기

40
       Wire.setSCL(pin_t(I2C_SCL_PIN));
40
       Wire.setSCL(pin_t(I2C_SCL_PIN));
41
     #endif
41
     #endif
42
 
42
 
43
-    Wire.begin();                    // No address joins the BUS as the master
43
+    Wire.begin();                   // No address joins the BUS as the master
44
 
44
 
45
   #else
45
   #else
46
 
46
 
47
-    Wire.begin(I2C_SLAVE_ADDRESS); // Join the bus as a slave
47
+    Wire.begin(I2C_SLAVE_ADDRESS);  // Join the bus as a slave
48
 
48
 
49
   #endif
49
   #endif
50
   reset();
50
   reset();
56
 }
56
 }
57
 
57
 
58
 void TWIBus::address(const uint8_t adr) {
58
 void TWIBus::address(const uint8_t adr) {
59
-  if (!WITHIN(adr, 8, 127)) {
59
+  if (!WITHIN(adr, 8, 127))
60
     SERIAL_ECHO_MSG("Bad I2C address (8-127)");
60
     SERIAL_ECHO_MSG("Bad I2C address (8-127)");
61
-  }
62
 
61
 
63
   addr = adr;
62
   addr = adr;
64
 
63
 

Loading…
취소
저장