diff --git a/examples b/examples index c3f6d1f1..f0f4e097 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit c3f6d1f17e6a901dc82c3bec462fcccda0cecbc9 +Subproject commit f0f4e0971b0f9f7b4d77a47cb436f910bf3b4add diff --git a/platformio/commands/test/processor.py b/platformio/commands/test/processor.py index cfc0f3ca..9f1b12c8 100644 --- a/platformio/commands/test/processor.py +++ b/platformio/commands/test/processor.py @@ -25,33 +25,33 @@ TRANSPORT_OPTIONS = { "arduino": { "include": "#include ", "object": "", - "putchar": "Serial.write(c)", - "flush": "Serial.flush()", - "begin": "Serial.begin($baudrate)", - "end": "Serial.end()", + "putchar": "Serial.write(c);", + "flush": "Serial.flush();", + "begin": "Serial.begin($baudrate);", + "end": "Serial.end();", "language": "cpp", }, "mbed": { "include": "#include ", - "object": "Serial pc(USBTX, USBRX);", - "putchar": "pc.putc(c)", + "object": "#if MBED_MAJOR_VERSION == 6\nUnbufferedSerial pc(USBTX, USBRX);\n#else\nRawSerial pc(USBTX, USBRX);\n#endif", + "putchar": "#if MBED_MAJOR_VERSION == 6\npc.write(&c, 1);\n#else\npc.putc(c);\n#endif", "flush": "", - "begin": "pc.baud($baudrate)", + "begin": "pc.baud($baudrate);", "end": "", "language": "cpp", }, "espidf": { "include": "#include ", "object": "", - "putchar": "putchar(c)", - "flush": "fflush(stdout)", + "putchar": "putchar(c);", + "flush": "fflush(stdout);", "begin": "", "end": "", }, "zephyr": { "include": "#include ", "object": "", - "putchar": 'printk("%c", c)', + "putchar": 'printk("%c", c);', "flush": "", "begin": "", "end": "", @@ -59,18 +59,18 @@ TRANSPORT_OPTIONS = { "native": { "include": "#include ", "object": "", - "putchar": "putchar(c)", - "flush": "fflush(stdout)", + "putchar": "putchar(c);", + "flush": "fflush(stdout);", "begin": "", "end": "", }, "custom": { "include": '#include "unittest_transport.h"', "object": "", - "putchar": "unittest_uart_putchar(c)", - "flush": "unittest_uart_flush()", - "begin": "unittest_uart_begin()", - "end": "unittest_uart_end()", + "putchar": "unittest_uart_putchar(c);", + "flush": "unittest_uart_flush();", + "begin": "unittest_uart_begin();", + "end": "unittest_uart_end();", "language": "cpp", }, } @@ -174,22 +174,22 @@ class TestProcessorBase(object): "void output_start(unsigned int baudrate)", "#endif", "{", - " $begin;", + " $begin", "}", "", "void output_char(int c)", "{", - " $putchar;", + " $putchar", "}", "", "void output_flush(void)", "{", - " $flush;", + " $flush", "}", "", "void output_complete(void)", "{", - " $end;", + " $end", "}", ] )