Quote:
Originally Posted by Nathan
I thought that's what printf did?
|
As Adam pointed out, and assuming you're using my serial port driver, it's as simple as this:
Code:
// first, find out how much data, if any, is present in
// serial port 1's received data queue?
byte_count = Serial_Port_One_Byte_Count();
// have we received any data?
if(byte_count > 0)
{
// we have fresh data, so read each received byte one at a time
for(j = 0; j < byte_count; j++)
{
// get the next data byte
data = Read_Serial_Port_One();
// send it out the other serial port
Write_Serial_Port_Two(data);
// work with camera data here
}
}
-Kevin