Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. ///do ****.c
  2. Hello_ack_message_t parse_recieved_hello_ack(uint8_t * recieved_data, uint8_t size1){
  3. hello_ack_message.command_id = recieved_data[0];
  4. memcpy(&hello_ack_message.address, recieved_data + 1, 2);
  5. memcpy(&hello_ack_message.sleep_period, recieved_data + 3, 2);
  6. memcpy(&hello_ack_message.reserved, recieved_data + 5, 2);
  7. return hello_ack_message;
  8. }
  9.  
  10. ///do *****.h
  11. Hello_ack_message_t parse_recieved_hello_ack(uint8_t * recieved_data, uint8_t size);
  12.  
  13.  
  14. ///struktura
  15. typedef struct Hello_ack_message_t {
  16. uint8_t command_id;
  17. uint16_t address;
  18. uint16_t sleep_period;
  19. uint16_t reserved;
  20. }Hello_ack_message_t;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement