Serial Port
Posted: Tue Jun 08, 2010 12:07 pm
As a newbie I need a little help.
The issue I want to solve is to do with the serial port.
Consider incoming data stream a little like a dripping tap and the water being collected into a bucket. As the bucket fills I want to swap the bucket for a new and empty one whilst I work on the older full bucket.
So at some point in time I would like to swap the incoming serial buffer for an new empty buffer and then work on the data on the swapped out buffer. Is there any way of moving the new input buffer to a new memory location so that i can work on the old buffer? I would like to do this using pointers as I think that this is probably the quickest way of moving the data. The data in the buffer will be around 16Kb
BTW what is the max size for the individual serial port buffers?
Ideally I would want this to work both under Windows and linux.
Any constructive help or comments would be welcome.
The issue I want to solve is to do with the serial port.
Consider incoming data stream a little like a dripping tap and the water being collected into a bucket. As the bucket fills I want to swap the bucket for a new and empty one whilst I work on the older full bucket.
So at some point in time I would like to swap the incoming serial buffer for an new empty buffer and then work on the data on the swapped out buffer. Is there any way of moving the new input buffer to a new memory location so that i can work on the old buffer? I would like to do this using pointers as I think that this is probably the quickest way of moving the data. The data in the buffer will be around 16Kb
BTW what is the max size for the individual serial port buffers?
Ideally I would want this to work both under Windows and linux.
Any constructive help or comments would be welcome.