I added a constant to SLIP for ISR. The user will have a choice. each
is good and bad in their own way:

1. The ISR only gets characters and puts them in the buffer. It is up
to the user to check if there is a packet available. This is the
default setting. Here's an example:

procedure slip_received_packet_callback(byte in packet_size) is
   for packet_size loop               -- for each byte in packet
      serial_hw_data = slip_rx_buffer -- do something with the packet
data
   end loop
end procedure

-- your main loop
forever loop
   if slip_packet_available then -- if a packet is available
      slip_received_packet_callback(slip_packet_size_buffer)
   end if
   -- do other stuff here
end loop

2. The ISR will receive characters and when a full packet is received,
it will run the callback within the ISR:

procedure slip_received_packet_callback(byte in packet_size) is
   for packet_size loop               -- for each byte in packet
      serial_hw_data = slip_rx_buffer -- do something with the packet
data
   end loop
end procedure

-- your main loop
forever loop
   -- do other stuff here
end loop

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to