profor
Active member
Hello all,
i am doing this test in my code
That works like charm
But such test is not possible to do on SerialUSB1 if i select Two serials.
It is not a big deal, but i do sniff on CAN-BUS and that i want to print out on SerialUSB1 keeping Serial free to control the sniff.
If the SerialUSB1 is not connected in windows, when there is output something in my code, it drops the Serial and restarts. Not sure now, if Teensy reboots, did not check yet.
All is good if prior the sniff i connect to the SerialUSB1 port
From the code above it is obvious what i want to do with the SerialUSB1, right?
Thanks a lot.
Teensy4 / Teensyduino 1.56
i am doing this test in my code
Code:
if (Serial) {
// print info menu after connecting the USB serial
if (!bitRead(dbg.status_flags, FLAG_DBG_SERIAL_CONNECTED)) {
if (dbg.wrk_wait < PRESET_DBG_WAIT) {
dbg.wrk_wait++;
} else {
bitSet(dbg.status_flags, FLAG_DBG_SERIAL_CONNECTED);
dbg.wrk_wait = 0;
for (uint8_t q = 0; q < PRESET_STAGES_SIZE; q++) {
dbg.stages[q] = 0;
}
dbg.stages[IDX_DBG_STAGE] = STAGE_DBG_TOP;
bitClear(dbg.flags, FLAG_DBG_MENU_PRINTED);
}
}
That works like charm
But such test is not possible to do on SerialUSB1 if i select Two serials.
It is not a big deal, but i do sniff on CAN-BUS and that i want to print out on SerialUSB1 keeping Serial free to control the sniff.
If the SerialUSB1 is not connected in windows, when there is output something in my code, it drops the Serial and restarts. Not sure now, if Teensy reboots, did not check yet.
All is good if prior the sniff i connect to the SerialUSB1 port
From the code above it is obvious what i want to do with the SerialUSB1, right?
Thanks a lot.
Teensy4 / Teensyduino 1.56