min-protocol / min

The MIN protocol specification and reference implementation
257 stars 88 forks source link

min_poll starts handling transports even frame is not ready #18

Open jussipo opened 5 years ago

jussipo commented 5 years ago

It seems that min_poll will go to handle TRANSPORT_PROTOCOL stuff even rx_byte() is still waiting more chars.

Would it be better just add to min_poll():

ifdef TRANSPORT_PROTOCOL

uint8_t window_size;

if(self->rx_frame_state == SEARCHING_FOR_SOF) { now = min_time_ms();

I hit this when using code w linux. I also use one-wire, so devices always sees (receives) own transmission. usart hw has collision detection trigger also. I also had to add src and tgt fields to the frame.