UUID read and print
main.cpp@6:3deacf18cc07, 2014-11-20 (annotated)
- Committer:
- sam_grove
- Date:
- Thu Nov 20 00:08:45 2014 +0000
- Revision:
- 6:3deacf18cc07
- Parent:
- 5:c397bce05ecd
- Parent:
- 4:dd6505971fd2
- Child:
- 7:b66c459fd169
merge changes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sam_grove | 0:496297783a79 | 1 | #include "mbed.h" |
sam_grove | 0:496297783a79 | 2 | |
sam_grove | 4:dd6505971fd2 | 3 | // new comment |
sam_grove | 4:dd6505971fd2 | 4 | |
sam_grove | 2:3d2e61cce12a | 5 | //#if defined(TARGET_K64F) |
sam_grove | 2:3d2e61cce12a | 6 | //#if defined(TARGET_LPC1768) |
sam_grove | 2:3d2e61cce12a | 7 | #if defined(TARGET_C027) |
sam_grove | 2:3d2e61cce12a | 8 | #error haha |
sam_grove | 2:3d2e61cce12a | 9 | #endif |
sam_grove | 2:3d2e61cce12a | 10 | |
sam_grove | 0:496297783a79 | 11 | int main() { |
sam_grove | 1:3166c3c53a37 | 12 | uint32_t UUID_LOC = 0x40048054; // K64F address of UUID data |
sam_grove | 1:3166c3c53a37 | 13 | uint32_t result[4] = {0}; |
mbedAustin | 5:c397bce05ecd | 14 | uint32_t i = 3; //comment here |
sam_grove | 0:496297783a79 | 15 | |
sam_grove | 0:496297783a79 | 16 | for (; i>=0; --i) { |
sam_grove | 0:496297783a79 | 17 | result[i] = *(uint32_t *)UUID_LOC; |
mbedAustin | 5:c397bce05ecd | 18 | printf("REG:%08x\tVAL:%08x\n\r", UUID_LOC, result[i]); |
sam_grove | 0:496297783a79 | 19 | UUID_LOC += 4; |
sam_grove | 0:496297783a79 | 20 | } |
sam_grove | 0:496297783a79 | 21 | |
sam_grove | 0:496297783a79 | 22 | error("exit\r\n"); |
sam_grove | 0:496297783a79 | 23 | return *result; |
sam_grove | 0:496297783a79 | 24 | } |
sam_grove | 0:496297783a79 | 25 | |
sam_grove | 2:3d2e61cce12a | 26 | |
mbedAustin | 5:c397bce05ecd | 27 | //hadeerp derp derp thingy |