Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
libraries/tests/mbed/bus/main.cpp@0:6c56fb4bc5f0, 2016-11-04 (annotated)
- Committer:
- nexpaq
- Date:
- Fri Nov 04 20:27:58 2016 +0000
- Revision:
- 0:6c56fb4bc5f0
Moving to library for sharing updates
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| nexpaq | 0:6c56fb4bc5f0 | 1 | #include "mbed.h" |
| nexpaq | 0:6c56fb4bc5f0 | 2 | #include "test_env.h" |
| nexpaq | 0:6c56fb4bc5f0 | 3 | |
| nexpaq | 0:6c56fb4bc5f0 | 4 | #if defined(TARGET_SAMR21G18A) |
| nexpaq | 0:6c56fb4bc5f0 | 5 | BusOut bus1(PA06, PA07, PA13, PA28, PA18, PA19, PA22, PA23, PA16, PA17, PA05, PA04); |
| nexpaq | 0:6c56fb4bc5f0 | 6 | BusOut bus2(PB03, PB22, PB02, PB23); |
| nexpaq | 0:6c56fb4bc5f0 | 7 | |
| nexpaq | 0:6c56fb4bc5f0 | 8 | #elif defined(TARGET_SAMD21J18A) || defined(TARGET_SAMD21G18A) |
| nexpaq | 0:6c56fb4bc5f0 | 9 | BusOut bus1(PA06, PA07, PA13, PA28, PA18, PA19, PA22, PA23, PA16, PA17, PA05, PA04); |
| nexpaq | 0:6c56fb4bc5f0 | 10 | BusOut bus2(PB03, PB22, PB02, PB23); |
| nexpaq | 0:6c56fb4bc5f0 | 11 | |
| nexpaq | 0:6c56fb4bc5f0 | 12 | #elif defined(TARGET_SAML21J18A) |
| nexpaq | 0:6c56fb4bc5f0 | 13 | BusOut bus1(PA02, PA03, PA04, PA05, PA06, PA07, PA08, PA09, PA10, PA11, PA16, PA17); |
| nexpaq | 0:6c56fb4bc5f0 | 14 | BusOut bus2(PB10, PB11, PB12, PB13); |
| nexpaq | 0:6c56fb4bc5f0 | 15 | |
| nexpaq | 0:6c56fb4bc5f0 | 16 | #elif defined(TARGET_FF_ARDUINO) |
| nexpaq | 0:6c56fb4bc5f0 | 17 | BusOut bus1(D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, D15); |
| nexpaq | 0:6c56fb4bc5f0 | 18 | BusOut bus2(A5, A4, A3, A2, A1, A0); |
| nexpaq | 0:6c56fb4bc5f0 | 19 | |
| nexpaq | 0:6c56fb4bc5f0 | 20 | #elif defined(TARGET_SAMG55J19) |
| nexpaq | 0:6c56fb4bc5f0 | 21 | BusOut bus1(PA18, PA17, PA25, PA26, PA23, PA00, PA29, PA24, PA10, PA09, PA13, PA11, PA14); |
| nexpaq | 0:6c56fb4bc5f0 | 22 | BusOut bus2(PB00, PB01, PB08, PB09, PB10, PB11, PB14); |
| nexpaq | 0:6c56fb4bc5f0 | 23 | |
| nexpaq | 0:6c56fb4bc5f0 | 24 | #else |
| nexpaq | 0:6c56fb4bc5f0 | 25 | #error [NOT_SUPPORTED] This test is not supported on this target |
| nexpaq | 0:6c56fb4bc5f0 | 26 | |
| nexpaq | 0:6c56fb4bc5f0 | 27 | #endif |
| nexpaq | 0:6c56fb4bc5f0 | 28 | |
| nexpaq | 0:6c56fb4bc5f0 | 29 | int i; |
| nexpaq | 0:6c56fb4bc5f0 | 30 | |
| nexpaq | 0:6c56fb4bc5f0 | 31 | int main() |
| nexpaq | 0:6c56fb4bc5f0 | 32 | { |
| nexpaq | 0:6c56fb4bc5f0 | 33 | notify_start(); |
| nexpaq | 0:6c56fb4bc5f0 | 34 | |
| nexpaq | 0:6c56fb4bc5f0 | 35 | for (i=0; i<=65535; i++) { |
| nexpaq | 0:6c56fb4bc5f0 | 36 | bus1 = i; |
| nexpaq | 0:6c56fb4bc5f0 | 37 | bus2 = i; |
| nexpaq | 0:6c56fb4bc5f0 | 38 | wait(0.0001); |
| nexpaq | 0:6c56fb4bc5f0 | 39 | } |
| nexpaq | 0:6c56fb4bc5f0 | 40 | |
| nexpaq | 0:6c56fb4bc5f0 | 41 | notify_completion(true); |
| nexpaq | 0:6c56fb4bc5f0 | 42 | } |