Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Memory.h@5:e2c275b33bbf, 2016-03-25 (annotated)
- Committer:
- va009039
- Date:
- Fri Mar 25 06:08:40 2016 +0900
- Revision:
- 5:e2c275b33bbf
- Parent:
- 4:05f33cc747fd
mystring class.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 |
4:05f33cc747fd | 1 | // Memory.h 2016/3/23 |
va009039 |
1:4ff199bddbc1 | 2 | #pragma once |
va009039 |
1:4ff199bddbc1 | 3 | #include <stdint.h> |
va009039 |
4:05f33cc747fd | 4 | #include "mymap.h" |
va009039 |
1:4ff199bddbc1 | 5 | |
va009039 |
1:4ff199bddbc1 | 6 | class Memory { |
va009039 |
1:4ff199bddbc1 | 7 | public: |
va009039 |
3:ccc673a10485 | 8 | Memory(int flashSize = 0x4000, int sramSize = 0x1000, uint32_t sramBase = 0x10000000); |
va009039 |
3:ccc673a10485 | 9 | bool Write(uint32_t addr, uint8_t c); |
va009039 |
1:4ff199bddbc1 | 10 | uint8_t Read(uint32_t addr); |
va009039 |
3:ccc673a10485 | 11 | bool Copy(uint32_t dst, uint32_t src, int count); |
va009039 |
1:4ff199bddbc1 | 12 | |
va009039 |
1:4ff199bddbc1 | 13 | private: |
va009039 |
4:05f33cc747fd | 14 | mymap<int,uint8_t*> flash; |
va009039 |
4:05f33cc747fd | 15 | mymap<int,uint8_t*> sram; |
va009039 |
1:4ff199bddbc1 | 16 | uint32_t flash_end; |
va009039 |
2:e3c085ac77f1 | 17 | uint32_t sram_base; |
va009039 |
2:e3c085ac77f1 | 18 | uint32_t sram_end; |
va009039 |
1:4ff199bddbc1 | 19 | }; |
va009039 |
1:4ff199bddbc1 | 20 |