| 61 | // for debugging or measuring on an oscilloscope. |
| 62 | #if _DEBUG |
| 63 | inline void DebugPulse(uint8_t pin, uint8_t count) |
| 64 | { |
| 65 | volatile uint8_t *pport = portOutputRegister(digitalPinToPort(pin)); |
| 66 | |
| 67 | uint8_t val = *pport; |
| 68 | while (count--) |
| 69 | { |
| 70 | *pport = val | digitalPinToBitMask(pin); |
| 71 | *pport = val; |
| 72 | } |
| 73 | } |
| 74 | #else |
| 75 | inline void DebugPulse(uint8_t, uint8_t) {} |
| 76 | #endif |