So i m communicating to a wifly module via serial on the arduino. One of the tricky things i m trying to get my head around is the buffers on both wifly and arduino serial. So the wifly flush size is set to 1420 bytes and i think the wifly buffer has a max of around 1500 bytes. However the serial buffer is different. I think the arduino serial buffer size is 64 bytes. So the trouble im having is knowing the right time to flush. Eg if you write 1420 bytes to the wifly module does this mean that the serial buffer has overflowed because it exceeds the 64 bytes? Or should i be able to just write as many bytes to the wifly up to the 1420 bytes of the wifly's buffer size.
Does the serial buffer automatically flush once the wifly has flushed or will i have to limit the size of the wifly flush size so that it matches the mega at 64 bytes so it doesnt overflow?