ported for ff-lpc546xx

Diff: main.cpp
- Revision:
- 1:1f267b9c975a
- Parent:
- 0:cb29c01320b1
diff -r cb29c01320b1 -r 1f267b9c975a main.cpp
--- a/main.cpp Tue Nov 14 14:58:48 2017 +0000
+++ b/main.cpp Mon May 27 11:06:33 2019 +0000
@@ -2,16 +2,27 @@
#include "AT45.h"
-/* Tested on FRDM-KW24D512 */
+/* Tested on L-Tek FF_LPC546xx */
-SPI spi(D11, D12, D13);
-AT45 spif(&spi, D10);
+#define PIN_MOSI P0_8
+#define PIN_MISO P0_9
+#define PIN_SCK P0_6
+#define PIN_CS P0_7
+
+
+DigitalOut led1(LED1);
+
+SPI spi(PIN_MOSI, PIN_MISO, PIN_SCK); // mosi, miso, sclk
+AT45 spif(&spi, PIN_CS);
DigitalOut myled(LED1);
int main() {
printf("spif test\n\r");
+
+
+ printf("id: %d\n\r", spif.id());
printf("spif size: %d bytes\n\r", spif.device_size());
printf("spif page erase size: %d bytes\n\r", spif.pagesize());