4 #include "Driver/MC23LC1024.h" 7 #define USE_HARDWARE_SPI 9 #if defined(USE_SOFTWARE_SPI) 10 #include "Software/SPI.h" 11 Software::SPI<BOARD::D11, BOARD::D12, BOARD::D13>
spi;
12 #elif defined(USE_HARDWARE_SPI) 13 #include "Hardware/SPI.h" 35 Serial.print(F(
"sram.SIZE = "));
36 Serial.println(
sram.SIZE);
37 Serial.print(F(
"sram.room = "));
38 Serial.println(
sram.room());
46 for (
int i = 0; i <
N; i++) {
47 Serial.println(analogRead(A0));
55 for (
int i = 0; i <
N; i++) {
56 ios.println(analogRead(A0));
89 for (
int i = 0; i <
N; i++) {
90 sample = analogRead(A0);
91 ios.
write((
const uint8_t*) &sample,
sizeof(sample));
98 ios.readBytes((uint8_t*) &sample,
sizeof(sample));
99 Serial.println(sample);
105 Serial.print(F(
"ios.addr = "));
107 Serial.print(F(
"temps.addr = "));
109 Serial.print(F(
"sram.addr = "));
110 Serial.println(
sram.alloc(0));
111 Serial.print(F(
"Samples, N = "));
113 Serial.print(F(
"Serial.print, m0 = "));
114 Serial.println(
m0 / N);
115 Serial.print(F(
"SRAM::Stream.print, m1 = "));
116 Serial.println(
m1 / N);
118 Serial.print(F(
"SRAM::Stream.available, count = "));
119 Serial.println(count);
120 Serial.print(F(
"SRAM::Stream.write/read, m2 = "));
121 Serial.println(
m2 / count);
122 Serial.print(F(
"SRAM::Stream.read/Serial.write, m3 = "));
123 Serial.println(
m3 / count);
124 Serial.print(F(
"SRAM::Stream.write, m4 = "));
125 Serial.println(
m4 / count);
126 Serial.print(F(
"SRAM::Stream.read, m5 = "));
127 Serial.println(
m5 / count);
129 Serial.print(F(
"SRAM::Stream.available, N*2 = "));
130 Serial.println(N * 2);
131 Serial.print(F(
"SRAM::Stream.write(2), m6 = "));
132 Serial.println(
m6 / N);
133 Serial.print(F(
"SRAM::Stream.read(2)/Serial.print, m7 = "));
134 Serial.println(
m7 / N);
Storage::Stream temps(sram, 10000)
Storage::Stream ios(sram, 10000)
virtual size_t write(uint8_t byte)
MC23LC1024< BOARD::D10 > sram(spi)