7 #define USE_SOFTWARE_SPI 9 #if defined(USE_SOFTWARE_SPI) 10 #include "Software/SPI.h" 11 Software::SPI<BOARD::D11, BOARD::D12, BOARD::D13>
spi;
13 #include "Hardware/SPI.h" 36 for (
int i = 0; i <
BUF_MAX; i++)
buf[i] = n + i;
39 Serial.println(F(
"spi.FREQ(MHz) = 8"));
40 Serial.print(F(
"sram.SIZE(kbyte) = "));
41 Serial.println(
sram.SIZE / 1024);
45 Serial.println(F(
"write(N, us, us/byte, kbyte/s)"));
47 for (
int i = 1; i < 10000; i *= 10) {
48 uint32_t start = micros();
50 uint32_t us = micros() - start;
51 float uspb = ((float) us) / i;
53 Serial.print(F(
", "));
55 Serial.print(F(
", "));
57 Serial.print(F(
", "));
58 Serial.println(1000 / uspb);
66 Serial.println(F(
"read(N, us, us/byte, kbyte/s)"));
68 for (
int i = 1; i < 10000; i *= 10) {
69 uint32_t start = micros();
71 uint32_t us = micros() - start;
72 float uspb = ((float) us) / i;
74 Serial.print(F(
", "));
76 Serial.print(F(
", "));
78 Serial.print(F(
", "));
79 Serial.println(1000 / uspb);
83 for (
int i = 0; i <
BUF_MAX; i++) {
84 if (
buf[i] != ((n + i) & 0xff)) {
86 Serial.println(F(
": verification error"));
Software::SPI< BOARD::D11, BOARD::D12, BOARD::D13 > spi
static uint8_t buf[BUF_MAX]
MC23LC1024< BOARD::D10 > sram(spi)