initial commit
This commit is contained in:
17
FIRMWARE/test_spi_flash.c
Normal file
17
FIRMWARE/test_spi_flash.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define SPI_FLASH_BASE ((uint32_t*)(1 << 23))
|
||||
|
||||
int main() {
|
||||
for(;;) {
|
||||
for(int i=0; i<40; ++i) {
|
||||
uint32_t word = SPI_FLASH_BASE[i];
|
||||
char* c = (char*)&word;
|
||||
printf("%d 0x%x %c%c%c%c\n", i, word, c[0],c[1],c[2],c[3]);
|
||||
}
|
||||
printf("\n");
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user