I am trying to get an additional data bit out of ttyAMA0, which basicly works with edo1's approach (Without the CMSPAR patch, atm). In addition, I'm already running an arbitrary Baud rate of 20,35k, using the BOTHER flag.
Now the problem is that you obviously have to switch the parity on a per Byte basis, but it does not seem to change fast enough, resulting in entire blocks of data carrying the wrong(but same throughout blocks) parity.
Does anyone know what is causing that and/or a way around it?
#include <unistd.h>
#include <fcntl.h>
#include <asm/termios.h>
void send_byte_with_parity(unsigned char byte, unsigned char parity);
for(i=0;i<37;i++)
{
send_byte_with_parity((unsigned char)tx_buffer[i], (tx_buffer[i] & (1<<8)));
}
Reading the parity bit on Rx is a different story, but I'm glad for any info on that as well.