IoT Supervisor 0.0
Loading...
Searching...
No Matches
EFM8BB1_FlashPrimitives.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// EFM8BB1_FlashPrimitives.h
3//-----------------------------------------------------------------------------
4// Copyright 2014 Silicon Laboratories, Inc.
5// http://developer.silabs.com/legal/version/v11/Silicon_Labs_Software_License_Agreement.txt
6//
7// Program Description:
8//
9// This program contains several useful utilities for writing and updating
10// flash memory.
11//
12// Target: EFM8BB1
13// Tool chain: Keil C51
14//
15// Release 1.0
16// -Initial Revision (ST)
17// -10 OCT 2014
18//
19
20#ifndef _EFM8BB1_FLASHPRIMITIVES_H_
21#define _EFM8BB1_FLASHPRIMITIVES_H_
22
23//-----------------------------------------------------------------------------
24// Includes
25//-----------------------------------------------------------------------------
26#include <SI_EFM8BB1_Register_Enums.h>
27
28//-----------------------------------------------------------------------------
29// Structures, Unions, Enumerations, and Type Definitions
30//-----------------------------------------------------------------------------
31typedef uint16_t FLADDR;
32
33//-----------------------------------------------------------------------------
34// Global Constants
35//-----------------------------------------------------------------------------
36#ifndef FLASH_PAGESIZE
37#define FLASH_PAGESIZE 512
38#endif
39
40#ifndef FLASH_TEMP
41#define FLASH_TEMP 0x1C00L // For 8 kB Flash devices
42//#define FLASH_TEMP 0x0C00L // For 4 kB Flash devices
43//#define FLASH_TEMP 0x0400L // For 2 kB Flash devices
44#endif
45
46#ifndef FLASH_LAST
47#define FLASH_LAST 0x1E00L // For 8 kB Flash devices
48//#define FLASH_TEMP 0x0E00L // For 4 kB Flash devices
49//#define FLASH_TEMP 0x0600L // For 2 kB Flash devices
50#endif
51
52//-----------------------------------------------------------------------------
53// Exported Function Prototypes
54//-----------------------------------------------------------------------------
55void FLASH_ByteWrite (FLADDR addr, uint8_t byte);
56uint8_t FLASH_ByteRead (FLADDR addr);
57void FLASH_PageErase (FLADDR addr);
58
59
60#endif // _EFM8BB1_FLASHPRIMITIVES_H_
uint8_t FLASH_ByteRead(FLADDR addr)
uint16_t FLADDR
void FLASH_ByteWrite(FLADDR addr, uint8_t byte)
void FLASH_PageErase(FLADDR addr)