diff options
author | tv <tv@xso> | 2011-08-22 12:48:27 +0200 |
---|---|---|
committer | tv <tv@xso> | 2011-08-22 12:48:27 +0200 |
commit | c2117a9064fcee0d287fbd8d164eef57d6b6c275 (patch) | |
tree | 60eda265a3ee69195c86ce8d1ee16c014fd75d52 /oncology/dpfhack_display/include/flash.h | |
parent | 45ceee319c70522d821f65505735bc514d123df5 (diff) | |
parent | 5e102279a72d77305d84f3cab9aef464a76ecb68 (diff) |
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'oncology/dpfhack_display/include/flash.h')
-rw-r--r-- | oncology/dpfhack_display/include/flash.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/oncology/dpfhack_display/include/flash.h b/oncology/dpfhack_display/include/flash.h new file mode 100644 index 00000000..f753bd59 --- /dev/null +++ b/oncology/dpfhack_display/include/flash.h @@ -0,0 +1,19 @@ +// SPI STM flash commands: +// stolen from BFloader + +#define SPM_RDID 0x9f // Read ID +#define SPM_WREN 0x06 // Write enable +#define SPM_WRDI 0x04 // Write disable +#define SPM_RDSR 0x05 // Read status register +#define SPM_WRSR 0x01 // Write status register +#define SPM_READ 0x03 // Read data bytes +#define SPM_PP 0x02 // Page program +#define SPM_DP 0xb9 // Deep power down +#define SPM_RES 0xab // Release from deep power down + // and read signature +#define SPM_FLASH_SE 0xd8 // Sector erase +#define SPM_FLASH_BE 0xc7 // Bulk erase +#define SPM_FLASH_FAST_READ 0x0B // Read data bytes fast + +#define SPM_SR_SRWD 0x80 // SR write protection (HW) + |