Skip to content

Commit d50b62d

Browse files
committed
Merge pull request #1078 from screamerbg/master
Tests: mbed app shield test for the SPI display and improve the armcc regex support to support armsm output
2 parents ffaae4b + c9324b7 commit d50b62d

File tree

10 files changed

+1449
-1
lines changed

10 files changed

+1449
-1
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/* Copyright (c) 2010-2011 mbed.org, MIT License
2+
*
3+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4+
* and associated documentation files (the "Software"), to deal in the Software without
5+
* restriction, including without limitation the rights to use, copy, modify, merge, publish,
6+
* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
7+
* Software is furnished to do so, subject to the following conditions:
8+
*
9+
* The above copyright notice and this permission notice shall be included in all copies or
10+
* substantial portions of the Software.
11+
*
12+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
13+
* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
14+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
15+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17+
*/
18+
19+
#include "test_env.h"
20+
#include "mbed.h"
21+
#include "C12832.h"
22+
23+
int main()
24+
{
25+
MBED_HOSTTEST_TIMEOUT(15);
26+
MBED_HOSTTEST_SELECT(default_auto);
27+
MBED_HOSTTEST_DESCRIPTION(SPI C12832 display);
28+
MBED_HOSTTEST_START("MBED_35");
29+
30+
C12832 lcd(D11, D13, D12, D7, D10);
31+
32+
// clear the screen
33+
lcd.cls();
34+
35+
// print the first line and wait 3 sec
36+
lcd.locate(0,3);
37+
lcd.printf("mbed application board!");
38+
39+
// print the counter prefix; the number will be printed in the while loop
40+
lcd.locate(0,15);
41+
lcd.printf("Counting:");
42+
43+
int i=1, j=0;
44+
while(i++,i<=200) {
45+
lcd.locate(42,15);
46+
lcd.printf("%d", i);
47+
if (i % 50 == 0) {
48+
lcd.invert(j = j ? 0 : 1);
49+
};
50+
wait(0.001);
51+
}
52+
53+
MBED_HOSTTEST_RESULT(1);
54+
}

0 commit comments

Comments
 (0)