Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Main Page
Related Pages
Supported Boards
Modules
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Enumerations
Data Structures
Data Structures
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
w
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerator
Related Symbols
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
p
q
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
▼
RIOT OS
►
RIOT Documentation
mutex.doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
doc
RIOT Vision
►
Governance of the RIOT Community
►
Roadmap
►
Code of Conduct Information
►
Creating modules
►
Creating an application
►
Porting boards
►
Writing a Device Driver in RIOT
►
Getting started
►
Flashing via RIOT's Build System
►
Terminal programs configuration
►
Build In Docker
►
Running and creating tests
►
Hints for quicker & better RIOT development
►
Build System Basics
►
List of Features (Features as Build System Enties)
►
Kconfig in RIOT
►
Using C++ in RIOT
►
Using Rust in RIOT
►
Advanced build system tricks
►
Debugging Tools
►
Emulators
►
Release cycle
►
IO-Mapping and Shields
►
Changelog
►
Removed Features and Modules
Deprecated List
Todo List
Supported Boards
►
Modules
►
Namespaces
►
Data Structures
▼
Files
▼
File List
►
boards
►
core
▼
cpu
▼
arm7_common
▼
include
architecture_arch.h
arm7_common.h
arm_cpu.h
atomic_utils_arch.h
c11_atomics_compat_cpu.hpp
iap.h
irq_arch.h
thread_arch.h
VIC.h
►
arm7tdmi_gba
►
atmega1281
►
atmega1284p
►
atmega128rfa1
►
atmega2560
►
atmega256rfr2
►
atmega328p
►
atmega32u4
►
atmega8
►
atmega_common
►
atxmega
►
avr8_common
►
cc2538
►
cc26x0_cc13x0
►
cc26x2_cc13x2
►
cc26xx_cc13xx
►
cortexm_common
►
efm32
►
esp32
►
esp8266
►
esp_common
►
fe310
►
gd32v
►
kinetis
►
lm4f120
►
lpc1768
►
lpc23xx
►
msp430
►
native
►
nrf51
►
nrf52
►
nrf53
►
nrf5x_common
►
nrf9160
►
qn908x
►
riscv_common
►
rpx0xx
►
sam0_common
►
sam3
►
sam4s
►
sam_common
►
samd21
►
samd5x
►
saml1x
►
saml21
►
stm32
►
dist
►
drivers
►
makefiles
►
pkg
►
sys
►
Globals
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
iap.h
1
/*
2
* Copyright (C) 2014 Freie Universität Berlin
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
9
#ifndef IAP_H
10
#define IAP_H
11
12
#include <stdint.h>
13
14
#ifdef __cplusplus
15
extern
"C"
{
16
#endif
17
18
/* IAP-Commands */
19
#define PREPARE_SECTOR_FOR_WRITE_OPERATION (50)
20
#define COPY_RAM_TO_FLASH (51)
21
#define ERASE_SECTOR (52)
22
#define BLANK_CHECK_SECTOR (53)
23
#define READ_PART_ID (54)
24
#define READ_BOOT_CODE_VERSION (55)
25
#define COMPARE (56)
26
27
/* IAP status codes */
28
#define CMD_SUCCESS (0)
29
#define INVALID_COMMAND (1)
30
#define SRC_ADDR_ERROR (2)
31
#define DST_ADDR_ERROR (3)
32
#define SRC_ADDR_NOT_MAPPED (4)
33
#define DST_ADDR_NOT_MAPPED (5)
34
#define COUNT_ERROR (6)
35
#define INVALID_SECTOR (7)
36
#define SECTOR_NOT_BLANK (8)
37
#define SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION (9)
38
#define COMPARE_ERROR (10)
39
#define BUSY (11)
40
41
#define INVALID_ADDRESS (0xFF)
42
43
/* IAP start location on flash */
44
#define IAP_LOCATION (0x7FFFFFF1)
45
46
/* PLL */
47
#define PLLCON_PLLE (0x01)
48
#define PLLCON_PLLD (0x00)
49
#define PLLCON_PLLC (0x03)
50
#define PLLSTAT_PLOCK (0x0400)
52
/*
53
* @brief: Converts 'addr' to sector number
54
* @note: Sector table (Users Manual P. 610)
55
*
56
* @param addr Flash address
57
*
58
* @return Sector number. 0xFF on error
59
*/
60
uint8_t iap_get_sector(uint32_t addr);
61
62
#ifdef __cplusplus
63
}
64
#endif
65
66
#endif
/* IAP_H */
Generated on Tue Apr 1 2025 18:17:32 by
1.12.0