You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which is a bit confusing for me. If I understand this correctly the pointer increment in the first 2 lines actually does increment the pointer for the crc at this place, not the header (which is also 2 bytes), because the length of the header is already accumulated in offset.
I stumbled about this when attempting to use your code with a protocol that does not know the first header byte, after a few modifications it works, thanks for sharing the code.
Also please use constants for header and crc length instead of using the value 2 for both. Sometimes it is a bit hard to spot which is which.
The text was updated successfully, but these errors were encountered:
In rfm_filop_write() you are using this code fragment to increment the out_cur_end pointer to the end of the current buffer:
which is a bit confusing for me. If I understand this correctly the pointer increment in the first 2 lines actually does increment the pointer for the crc at this place, not the header (which is also 2 bytes), because the length of the header is already accumulated in offset.
recommended rewrite:
I stumbled about this when attempting to use your code with a protocol that does not know the first header byte, after a few modifications it works, thanks for sharing the code.
Also please use constants for header and crc length instead of using the value 2 for both. Sometimes it is a bit hard to spot which is which.
The text was updated successfully, but these errors were encountered: