Skip to content

Commit be6b49c

Browse files
committed
Add back internal flash header and slim it down.
1 parent 168e23e commit be6b49c

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

ports/atmel-samd/supervisor/internal_flash.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
* THE SOFTWARE.
2525
*/
2626

27+
#include "supervisor/internal_flash.h"
28+
2729
#include <stdint.h>
2830
#include <string.h>
2931

ports/atmel-samd/supervisor/internal_flash.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232

3333
#include "sam.h"
3434

35-
#define FLASH_ROOT_POINTERS
36-
3735
#ifdef SAMD51
3836
#define TOTAL_INTERNAL_FLASH_SIZE (FLASH_SIZE / 2)
3937
#endif
@@ -49,21 +47,4 @@
4947
#define INTERNAL_FLASH_SYSTICK_MASK (0x1ff) // 512ms
5048
#define INTERNAL_FLASH_IDLE_TICK(tick) (((tick) & INTERNAL_FLASH_SYSTICK_MASK) == 2)
5149

52-
void internal_flash_init(void);
53-
uint32_t internal_flash_get_block_size(void);
54-
uint32_t internal_flash_get_block_count(void);
55-
void internal_flash_irq_handler(void);
56-
void internal_flash_flush(void);
57-
bool internal_flash_read_block(uint8_t *dest, uint32_t block);
58-
bool internal_flash_write_block(const uint8_t *src, uint32_t block);
59-
60-
// these return 0 on success, non-zero on error
61-
mp_uint_t internal_flash_read_blocks(uint8_t *dest, uint32_t block_num, uint32_t num_blocks);
62-
mp_uint_t internal_flash_write_blocks(const uint8_t *src, uint32_t block_num, uint32_t num_blocks);
63-
64-
extern const struct _mp_obj_type_t internal_flash_type;
65-
66-
struct _fs_user_mount_t;
67-
void flash_init_vfs(struct _fs_user_mount_t *vfs);
68-
6950
#endif // MICROPY_INCLUDED_ATMEL_SAMD_INTERNAL_FLASH_H

0 commit comments

Comments
 (0)