|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#13
|
||||
|
||||
|
Re: printf() inside interrupt routine?
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
}
}
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Routine declaration syntax error (Or: Where's wlado?) | Astronouth7303 | Programming | 15 | 24-03-2004 05:51 |
| printf isn't printf-ing. Help! | Meandmyself | Programming | 14 | 15-02-2004 16:27 |
| Pre-Match/Post- Match Pit Routine | Mark_lyons | General Forum | 14 | 31-03-2002 15:19 |
| Master uP Initialization Routine | Ulibrium | Technical Discussion | 5 | 24-01-2002 16:43 |