Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. for (int i = 0; i < sizeof(unsigned short); ++i)
  2. {
  3. if((pkt & 1) > 0)
  4. {
  5. /* call correct function for bit at index 'i' with
  6. remaining packet data (minus these 2 header bytes) */
  7. }
  8. pkt >> 1;
  9. }
  10.  
  11. char val = pkt[0]
  12. switch (val)
  13. {
  14. case 65:
  15. /* call relevant function */
  16. break;
  17. case 66:
  18. /* call relevant function */
  19. break;
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement