-
Notifications
You must be signed in to change notification settings - Fork 13
/
lib_flash.h
47 lines (39 loc) · 917 Bytes
/
lib_flash.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* File name: lib_flash.h
* Date first: code clipped from lib_log
* Date last: 10/18/2018
*
* Description: Library for Flash memory functions
*
* Author: Richard Hodges
*
* Copyright (C) 2018 Richard Hodges. All rights reserved.
* Permission is hereby granted for any use.
*
******************************************************************************
*
* Initialize Flash functions
*/
void flash_init(void);
/*
* Unlock the Flash for writing
* out: zero = fail
*/
char flash_unlock(void);
/*
* Lock Flash after writing
*/
void flash_lock(void);
#define FLASH_BLOCK_ERASE /* comment out to save setup and 30 bytes of RAM */
/*
* Erase FLASH block (64 or 128 bytes)
* in: block address
* out: zero = success
*/
char flash_erase(char *);
/*
* Clear range of Flash memory
* in: block base, size in bytes
* out: zero = success
*/
char flash_clear(char *, int);