Gorazd Kovacic
/
AT45_spi_flash_example
ported for ff-lpc546xx
Revision 1:1f267b9c975a, committed 2019-05-27
- Comitter:
- gorazdko
- Date:
- Mon May 27 11:06:33 2019 +0000
- Parent:
- 0:cb29c01320b1
- Commit message:
- port for l-tek lpc546xx
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed-os.lib | Show annotated file Show diff for this revision Revisions of this file |
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());
diff -r cb29c01320b1 -r 1f267b9c975a mbed-os.lib --- a/mbed-os.lib Tue Nov 14 14:58:48 2017 +0000 +++ b/mbed-os.lib Mon May 27 11:06:33 2019 +0000 @@ -1,1 +1,1 @@ -https://github.com/armmbed/mbed-os/#78474a5129e18e136cc7e872adbaa5b74fbb8f6a +https://github.com/armmbed/mbed-os/#73f096399b4cda1f780b140c87afad9446047432