Hi,
Anyone have an example or explanation on how to use Serial1.write9bit(word) for Teensy 3.2 to set or cleared the 9th bit? I am new to Teensy. I was able to modify the HardwareSerial.h with SERIAL_9BIT_SUPPORT. I am able to compiled with HWSERIAL.begin(115200, SERIAL_9N1);
I am confused on how to set or cleared the 9th bit. Could anyone provide me an example?
For instance, I am trying to send a byte 0x32 with 9th bit set. Do I use: Serial1.write9bit(0x328) ? Since 0x8 is 1000 (bits)
and if my byte is 0x01 with 9th bit cleared: do I use Serial1.write9bit(0x010) ?
Thank you
Anyone have an example or explanation on how to use Serial1.write9bit(word) for Teensy 3.2 to set or cleared the 9th bit? I am new to Teensy. I was able to modify the HardwareSerial.h with SERIAL_9BIT_SUPPORT. I am able to compiled with HWSERIAL.begin(115200, SERIAL_9N1);
I am confused on how to set or cleared the 9th bit. Could anyone provide me an example?
For instance, I am trying to send a byte 0x32 with 9th bit set. Do I use: Serial1.write9bit(0x328) ? Since 0x8 is 1000 (bits)
and if my byte is 0x01 with 9th bit cleared: do I use Serial1.write9bit(0x010) ?
Thank you