Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unsigned int bufSize = 1;
- volatile unsigned int mailbuffer[256] __attribute__ ((aligned (16)));
- unsigned int deviceId = 0x00000000; // SD Card
- unsigned int state = 3; // 11b (On, Wait)
- mailbuffer[bufSize++] = 0; // 1. Request indicator
- mailbuffer[bufSize++] = 0x00020001; // 2. TAG - Set Power
- mailbuffer[bufSize++] = 8; // 3. Value buffer size (in bytes)
- mailbuffer[bufSize++] = deviceId; // 4. Value - Device id
- mailbuffer[bufSize++] = state; // 5. Value - State
- mailbuffer[bufSize++] = 0; // 6. Response - Device Id
- mailbuffer[bufSize++] = 0; // 7. Response - State
- mailbuffer[bufSize++] = 0; // 8. End of message tag
- mailbuffer[0] = bufSize * 4; // Size of this buffer (in bytes)
- ====== Response ========
- [0] = 36
- [1] = 0x80000000
- [2] = 0x00020001
- [3] = 8
- [4] = -2147483640
- [5] = 3
- [6] = 1
- [7] = 0
- [8] = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement