Test program for FlashAir with iSDIO
Dependencies: FlashAir_iSDIO SDFileSystem
main.cpp@3:fc1908567f3b, 2019-08-28 (annotated)
- Committer:
- kenjiArai
- Date:
- Wed Aug 28 22:48:37 2019 +0000
- Revision:
- 3:fc1908567f3b
- Parent:
- 2:e891da5a46a1
Test program for FlashAir/TOSHIBA with iSDIO
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kenjiArai | 3:fc1908567f3b | 1 | /* |
kenjiArai | 3:fc1908567f3b | 2 | * Mbed Application program |
kenjiArai | 3:fc1908567f3b | 3 | * FlashAir control program |
mbed_crane_elec | 0:0d4d83f88469 | 4 | * |
kenjiArai | 3:fc1908567f3b | 5 | * Copyright (c) 2018,'19 Kenji Arai / JH1PJL |
kenjiArai | 3:fc1908567f3b | 6 | * http://www.page.sannet.ne.jp/kenjia/index.html |
kenjiArai | 3:fc1908567f3b | 7 | * https://os.mbed.com/users/kenjiArai/ |
kenjiArai | 3:fc1908567f3b | 8 | * Created: April 4th, 2018 |
kenjiArai | 3:fc1908567f3b | 9 | * Revised: August 28th, 2019 |
mbed_crane_elec | 0:0d4d83f88469 | 10 | */ |
kenjiArai | 3:fc1908567f3b | 11 | |
kenjiArai | 3:fc1908567f3b | 12 | /* |
kenjiArai | 3:fc1908567f3b | 13 | * FlashAir: |
kenjiArai | 3:fc1908567f3b | 14 | * https://flashair-developers.com/ja/ |
kenjiArai | 3:fc1908567f3b | 15 | * |
kenjiArai | 3:fc1908567f3b | 16 | * Reference program: |
kenjiArai | 3:fc1908567f3b | 17 | * https://os.mbed.com/users/mbed_crane_elec/code/FlashAir_iSDIO_sample_OS5_/ |
kenjiArai | 3:fc1908567f3b | 18 | * https://os.mbed.com/users/ban4jp/code/FlashAir_Twitter/ |
kenjiArai | 3:fc1908567f3b | 19 | * |
kenjiArai | 3:fc1908567f3b | 20 | * Tested board on Nucleo-F446RE |
kenjiArai | 3:fc1908567f3b | 21 | */ |
kenjiArai | 3:fc1908567f3b | 22 | |
kenjiArai | 3:fc1908567f3b | 23 | // Include -------------------------------------------------------------------- |
mbed_crane_elec | 0:0d4d83f88469 | 24 | #include "mbed.h" |
mbed_crane_elec | 0:0d4d83f88469 | 25 | #include "FlashAir_iSDIO.h" |
mbed_crane_elec | 0:0d4d83f88469 | 26 | |
kenjiArai | 3:fc1908567f3b | 27 | // Definition ----------------------------------------------------------------- |
kenjiArai | 3:fc1908567f3b | 28 | |
kenjiArai | 3:fc1908567f3b | 29 | // Constructor ---------------------------------------------------------------- |
kenjiArai | 3:fc1908567f3b | 30 | Serial pc(USBTX, USBRX, 115200); |
kenjiArai | 3:fc1908567f3b | 31 | Serial console(A0, A1); // TX, RX |
kenjiArai | 3:fc1908567f3b | 32 | // mosi(CMD), miso(DAT0), sclk(CLK), cs(DAT3) |
kenjiArai | 3:fc1908567f3b | 33 | FlashAir_iSDIO sd(D11, D12, D13, D10, "sd", &console); |
mbed_crane_elec | 0:0d4d83f88469 | 34 | |
kenjiArai | 3:fc1908567f3b | 35 | // RAM ------------------------------------------------------------------------ |
kenjiArai | 3:fc1908567f3b | 36 | |
kenjiArai | 3:fc1908567f3b | 37 | // ROM / Constant data -------------------------------------------------------- |
mbed_crane_elec | 0:0d4d83f88469 | 38 | |
kenjiArai | 3:fc1908567f3b | 39 | // Function prototypes -------------------------------------------------------- |
kenjiArai | 3:fc1908567f3b | 40 | extern void mon (void); |
mbed_crane_elec | 0:0d4d83f88469 | 41 | |
kenjiArai | 3:fc1908567f3b | 42 | //------------------------------------------------------------------------------ |
kenjiArai | 3:fc1908567f3b | 43 | // Control Program |
kenjiArai | 3:fc1908567f3b | 44 | //------------------------------------------------------------------------------ |
mbed_crane_elec | 0:0d4d83f88469 | 45 | int main() |
mbed_crane_elec | 0:0d4d83f88469 | 46 | { |
kenjiArai | 3:fc1908567f3b | 47 | while(true) { |
kenjiArai | 3:fc1908567f3b | 48 | mon(); |
mbed_crane_elec | 0:0d4d83f88469 | 49 | } |
mbed_crane_elec | 0:0d4d83f88469 | 50 | } |