Browse Source

Clean up softspi.h

Scott Lahteine 6 years ago
parent
commit
389376c40e
1 changed files with 6 additions and 8 deletions
  1. 6
    8
      Marlin/src/libs/softspi.h

+ 6
- 8
Marlin/src/libs/softspi.h View File

@@ -19,11 +19,10 @@ bool fastDigitalRead(uint8_t pin) {
19 19
  */
20 20
 static inline __attribute__((always_inline))
21 21
 void fastDigitalWrite(uint8_t pin, bool value) {
22
-  if (value) {
22
+  if (value)
23 23
     *portSetRegister(pin) = 1;
24
-  } else {
24
+  else
25 25
     *portClearRegister(pin) = 1;
26
-  }
27 26
 }
28 27
 #else  // CORE_TEENSY
29 28
 //------------------------------------------------------------------------------
@@ -42,17 +41,16 @@ bool fastDigitalRead(uint8_t pin){
42 41
  */
43 42
 static inline __attribute__((always_inline))
44 43
 void fastDigitalWrite(uint8_t pin, bool value){
45
-  if(value) {
44
+  if (value)
46 45
     g_APinDescription[pin].pPort->PIO_SODR = g_APinDescription[pin].ulPin;
47
-  } else {
46
+  else
48 47
     g_APinDescription[pin].pPort->PIO_CODR = g_APinDescription[pin].ulPin;
49
-  }
50 48
 }
51 49
 #endif  // CORE_TEENSY
52 50
 //------------------------------------------------------------------------------
53 51
 inline void fastDigitalToggle(uint8_t pin) {
54
- fastDigitalWrite(pin, !fastDigitalRead(pin));
55
- }
52
+  fastDigitalWrite(pin, !fastDigitalRead(pin));
53
+}
56 54
 //------------------------------------------------------------------------------
57 55
 inline void fastPinMode(uint8_t pin, bool mode) {pinMode(pin, mode);}
58 56
 #else  // __arm__

Loading…
Cancel
Save