Skip to content

Instantly share code, notes, and snippets.

@matthijskooijman
Last active September 15, 2015 16:14
void printByte(uint8_t b) {
if (b < 0x10) Serial.print("0");
Serial.print(b, HEX);
}
void dump(uint8_t *p, size_t len) {
for (size_t i = 0; i < len; ++i) {
if (i % 32 == 0) {
if (i != 0)
Serial.println();
printByte((uintptr_t)p >> 8);
printByte((uintptr_t)p);
Serial.write(' ');
}
Serial.write(' ');
printByte(*(p++));
}
Serial.println();
}
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
size_t len = 0x900;
dump((uint8_t*)0, len);
dump((uint8_t*)(RAMEND + 1), len);
}
void loop() {
// put your main code here, to run repeatedly:
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment