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@1:4ff199bddbc1, 2016-03-08 (annotated)
- Committer:
- va009039
- Date:
- Tue Mar 08 12:03:48 2016 +0900
- Revision:
- 1:4ff199bddbc1
- Child:
- 2:e3c085ac77f1
first commit.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 |
1:4ff199bddbc1 | 1 | // Memory.h 2016/2/8 |
va009039 |
1:4ff199bddbc1 | 2 | #pragma once |
va009039 |
1:4ff199bddbc1 | 3 | #include <stdint.h> |
va009039 |
1:4ff199bddbc1 | 4 | |
va009039 |
1:4ff199bddbc1 | 5 | class Memory { |
va009039 |
1:4ff199bddbc1 | 6 | public: |
va009039 |
1:4ff199bddbc1 | 7 | Memory(int flashSize, int ramSize, uint32_t ramStart); |
va009039 |
1:4ff199bddbc1 | 8 | void Write(uint32_t addr, uint8_t c); |
va009039 |
1:4ff199bddbc1 | 9 | uint8_t Read(uint32_t addr); |
va009039 |
1:4ff199bddbc1 | 10 | void Copy(uint32_t dst, uint32_t src, int count); |
va009039 |
1:4ff199bddbc1 | 11 | |
va009039 |
1:4ff199bddbc1 | 12 | private: |
va009039 |
1:4ff199bddbc1 | 13 | uint8_t* flash; |
va009039 |
1:4ff199bddbc1 | 14 | uint8_t* ram; |
va009039 |
1:4ff199bddbc1 | 15 | uint32_t flash_end; |
va009039 |
1:4ff199bddbc1 | 16 | uint32_t ram_start; |
va009039 |
1:4ff199bddbc1 | 17 | uint32_t ram_end; |
va009039 |
1:4ff199bddbc1 | 18 | }; |
va009039 |
1:4ff199bddbc1 | 19 |