The difference was a typo. I've corrected it to mirror the SPI opcodes because it's 'finalized' and I2C is only in the nightly. The change will go in the next nightly compile.
Here's the UART notes/comments from the code (rawIO.c), also updated to fix the mistake:
Baud
A) standard settings
B) send 2 bytes for custom BRG
databits and parity (2bits)
1. 8, NONE *default \x0D\x0A 2. 8, EVEN \x0D\x0A 3. 8, ODD \x0D\x0A 4. 9, NONE
Stop bits:\x0D\x0A 1. 1 *default\x0D\x0A 2. 2 \x0D\x0A
Receive polarity:\x0D\x0A 1. Idle 1 *default\x0D\x0A 2. Idle 0\x0D\x0A
output type (hiz or regular
peripheral settings
# 00000000//reset to BBIO
# 00000001 – mode version string (ART1)
# 00000010 – UART open
# 00000011 – UART close
# 00000111 - UART speed manual config, 2 bytes (BRGH, BRGL)
# 00001111 - bridge mode (reset to exit)
# 0001xxxx – Bulk transfer, send 1-16 bytes (0=1byte!)
# 0100wxyz – Set peripheral w=power, x=pullups, y=AUX, z=CS
# 0101wxyz – read peripherals
# 0110xxxx - Set speed,0000=300,0001=1200,10=2400,4800,9600,19200,33250, 38400,57600,1010=115200,
# 0111xxxx - Read speed,
# 100wxxyz – config, w=output type, xx=databits and parity, y=stop bits, z=rx polarity (default :00000)
# 101wxxyz – read config
Any comments or thoughts? The only one that isn't the same here is the config command. It requires an extra bit.
See datasheet for BRG calculation, or online calculators. PIC speed is 32MHZ/16MIPS (2 cycles per instruction).
Note to self: It's important that the UART open command clears the overrun error bit.