Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/02/04 14:44
Read: times


 
#61742 - RE: Whats wrong with good ol pointer/global?
Responding to: ???'s previous message
well, thats tricky!

if you are working with strings, you got to have two things - the string itself and a pointer.

as far as processing strings in from a serial port is concerned, you need a buffer of sufficient length. Especially if you are looking them up in a table.

As for protocol processing, you can check the frame against the immidiate byte, dont need to store anywhere. Can have a state variable that indicates the paramter number/type/state of packet and check the received byte. Next you have to store the data in a suitable buffer, and then work on it. You cant simply issue a command and wait for the date to arrive.

Most of the protocol processing esp. packet frame checking can be done in the ISR itself, but make sure it isnt too long. A state variable comes handy, just switch to an appropriate section of code to process the byte at hand.

regards,
girish

List of 21 messages in thread
TopicAuthorDate
OT: C parameter by reference or by value            01/01/70 00:00      
   RE: OT: C parameter by reference or by value            01/01/70 00:00      
      Parameters on stack            01/01/70 00:00      
      RE: OT: C parameter by reference or by value            01/01/70 00:00      
   Whats wrong with good ol pointer/global?            01/01/70 00:00      
      RE: Whats wrong with good ol pointer/global?            01/01/70 00:00      
         RE: Whats wrong with good ol pointer/global?            01/01/70 00:00      
            RE: Whats wrong with good ol pointer/global?            01/01/70 00:00      
               RE: Whats wrong with good ol pointer/global?            01/01/70 00:00      
            Pointer vs Reference            01/01/70 00:00      
               RE: Pointer vs Reference            01/01/70 00:00      
                  RE: Pointer vs Reference            01/01/70 00:00      
                     RE: Pointer vs Reference            01/01/70 00:00      
         RE: Whats wrong with good ol pointer/global?            01/01/70 00:00      
         RE: Whats wrong with good ol pointer/global?            01/01/70 00:00      
            RE: recursive functions            01/01/70 00:00      
   RE: OT: C parameter by reference or by v            01/01/70 00:00      
      RE: OT: C parameter by reference or by v            01/01/70 00:00      
      RE: OT: C parameter by reference or by v            01/01/70 00:00      
         RE: OT: more useful to have explicit ..            01/01/70 00:00      
         RE: OT: C parameter by reference or by v            01/01/70 00:00      

Back to Subject List