UUID read and print

Dependencies:   mbed

main.cpp

Committer:
sam_grove
Date:
2014-11-20
Revision:
6:3deacf18cc07
Parent:
5:c397bce05ecd
Parent:
4:dd6505971fd2
Child:
7:b66c459fd169

File content as of revision 6:3deacf18cc07:

#include "mbed.h"

// new comment

//#if defined(TARGET_K64F)
//#if defined(TARGET_LPC1768)
#if defined(TARGET_C027)
#error haha
#endif

int main() {
    uint32_t UUID_LOC = 0x40048054; // K64F address of UUID data
    uint32_t result[4] = {0};
    uint32_t i = 3; //comment here
        
    for (; i>=0; --i) {
        result[i] = *(uint32_t *)UUID_LOC;
        printf("REG:%08x\tVAL:%08x\n\r", UUID_LOC, result[i]);
        UUID_LOC += 4;
    }
    
    error("exit\r\n");
    return *result;
}


//hadeerp derp derp thingy