Sfoglia il codice sorgente

Serial assert (needs work)

Scott Lahteine 6 anni fa
parent
commit
94f2e82897
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2
    0
      Marlin/src/core/serial.h

+ 2
- 0
Marlin/src/core/serial.h Vedi File

@@ -60,10 +60,12 @@ extern uint8_t marlin_debug_flags;
60 60
     if (!serial_port_index || serial_port_index == SERIAL_BOTH) (void)MYSERIAL0.WHAT(V); \
61 61
     if ( serial_port_index) (void)MYSERIAL1.WHAT(V); \
62 62
   }while(0)
63
+  #define SERIAL_ASSERT(P)      if(serial_port_index!=(P)){ debugger(); }
63 64
 #else
64 65
   #define _PORT_REDIRECT(n,p)   NOOP
65 66
   #define _PORT_RESTORE(n)      NOOP
66 67
   #define SERIAL_OUT(WHAT, V...) (void)MYSERIAL0.WHAT(V)
68
+  #define SERIAL_ASSERT(P)      NOOP
67 69
 #endif
68 70
 
69 71
 #define PORT_REDIRECT(p)        _PORT_REDIRECT(1,p)

Loading…
Annulla
Salva