Advertisement
Guest User

Untitled

a guest
Sep 7th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.87 KB | None | 0 0
  1. unsigned int bufSize = 1;
  2. volatile unsigned int mailbuffer[256] __attribute__ ((aligned (16)));
  3.  
  4. unsigned int deviceId = 0x00000000; // SD Card
  5. unsigned int state = 3; // 11b (On, Wait)
  6.  
  7. mailbuffer[bufSize++] = 0;          // 1. Request indicator
  8. mailbuffer[bufSize++] = 0x00020001; // 2. TAG - Set Power
  9. mailbuffer[bufSize++] = 8;          // 3. Value buffer size (in bytes)
  10. mailbuffer[bufSize++] = deviceId;   // 4. Value - Device id
  11. mailbuffer[bufSize++] = state;      // 5. Value - State
  12. mailbuffer[bufSize++] = 0;          // 6. Response - Device Id
  13. mailbuffer[bufSize++] = 0;          // 7. Response - State
  14. mailbuffer[bufSize++] = 0;          // 8. End of message tag
  15. mailbuffer[0] = bufSize * 4;       // Size of this buffer (in bytes)
  16.  
  17. ====== Response ========
  18. [0] = 36
  19. [1] = 0x80000000
  20. [2] = 0x00020001
  21. [3] = 8
  22. [4] = -2147483640
  23. [5] = 3
  24. [6] = 1
  25. [7] = 0
  26. [8] = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement