libDaisy
Hardware Library for Daisy
Toggle main menu visibility
Introduction
Related Pages
Additional Resources
Electrosmith Website
Daisy Seed Product Page
Daisy Web Programmer
Daisy Seed Datasheet
DaisySP DSP Library Documentation
Daisy Forum
Classes
Class List
Class Index
Class Hierarchy
Class Members
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
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
a
b
c
d
f
g
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
Related Symbols
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
u
w
Functions
Variables
Macros
_
a
b
c
d
e
f
i
l
m
n
o
p
q
r
s
t
u
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
sdram.h
Go to the documentation of this file.
1
14
//Edit the Linker Script to have the following lines in the following sections:
15
/*
16
MEMORY
17
{
18
SDRAM (RWX) : ORIGIN = 0xC0000000, LENGTH = 64M
19
}
20
SECTIONS
21
{
22
23
.sdram_data :
24
{
25
. = ALIGN(4);
26
_ssdram_data = .;
27
28
29
PROVIDE(__sdram_data_start = _ssdram_data);
30
*(.sdram_data)
31
*(.sdram_data*)
32
. = ALIGN(4);
33
_esdram_data = .;
34
35
PROVIDE(__sdram_data_end = _esdram_data);
36
} > SDRAM AT >FLASH
37
_sisdram_data = LOADADDR(.sdram_data);
38
39
40
.sdram_bss (NOLOAD):
41
{
42
. = ALIGN(4);
43
__ssdram_bss = .;
44
PROVIDE(__sdram_bss_start = _ssdram_bss);
45
*(.sdram_bss)
46
*(.sdram_bss*)
47
. = ALIGN(4);
48
_esdram_bss = .;
49
50
51
PROVIDE(__sdram_bss_end = _esdram_bss);
52
53
} > SDRAM
54
}
55
*/
56
#ifndef RAM_AS4C16M16SA_H
57
#define RAM_AS4C16M16SA_H
58
#include <stdint.h>
59
#include "
daisy_core.h
"
60
66
/*
67
As mentioned above, this does not currently initialize correctly (startup
68
code needs to be modified to init SDRAM, and fill
69
The variables placed here will also need to fit inside of the flash in order to initialize.
70
*/
71
74
#define DSY_SDRAM_DATA __attribute__((section(".sdram_data")))
75
76
81
#define DSY_SDRAM_BSS __attribute__((section(".sdram_bss")))
82
83
class
SdramHandle
84
{
85
public
:
86
enum class
Result
87
{
88
OK
,
89
ERR
,
90
};
86
enum class
Result
{
…
};
91
93
Result
Init
();
94
Result
DeInit
();
95
96
private
:
97
Result
PeriphInit();
98
Result
DeviceInit();
99
Result
PeriphDeInit();
100
Result
DeviceDeInit();
101
};
83
class
SdramHandle
{
…
};
102
#endif
SdramHandle
Definition
sdram.h:84
SdramHandle::DeInit
Result DeInit()
SdramHandle::Result
Result
Definition
sdram.h:87
SdramHandle::Result::ERR
@ ERR
SdramHandle::Result::OK
@ OK
SdramHandle::Init
Result Init()
daisy_core.h
src
dev
sdram.h