Skip to content

Commit db4be94

Browse files
authored
Merge pull request #4889 from ARMmbed/release-candidate
Release candidate for mbed-os-5.5.5
2 parents 4c256f0 + 4e1ec4a commit db4be94

File tree

162 files changed

+2679
-1153
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+2679
-1153
lines changed

TESTS/events/queue/main.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2017 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
#include "mbed_events.h"
217
#include "mbed.h"
318
#include "rtos.h"

TESTS/events/timing/main.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2017 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
#include "mbed_events.h"
217
#include "mbed.h"
318
#include "rtos.h"

TESTS/integration/basic/main.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2017 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
#include "test_env.h"
217

318
int main() {
419
GREENTEA_SETUP(15, "default_auto");
520
GREENTEA_TESTSUITE_RESULT(true);
6-
}
21+
}

TESTS/mbed_functional/callback/main.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2017 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
#include "mbed.h"
217
#include "greentea-client/test_env.h"
318
#include "unity.h"

TESTS/mbed_functional/callback_big/main.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2017 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
#include "mbed.h"
217
#include "greentea-client/test_env.h"
318
#include "unity.h"

TESTS/mbed_functional/callback_small/main.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2017 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
#include "mbed.h"
217
#include "greentea-client/test_env.h"
318
#include "unity.h"

TESTS/mbed_functional/functionpointer/main.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2017 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
#include "mbed.h"
217
#include "greentea-client/test_env.h"
318
#include "unity.h"

TESTS/mbed_hal/lp_us_tickers/main.cpp

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2017 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
#include "utest/utest.h"
17+
#include "unity/unity.h"
18+
#include "greentea-client/test_env.h"
19+
20+
#include "mbed.h"
21+
#include "us_ticker_api.h"
22+
#include "ticker_api.h"
23+
24+
using namespace utest::v1;
25+
26+
namespace {
27+
volatile bool complete;
28+
const ticker_interface_t* intf;
29+
}
30+
31+
/* Ticker init should be run just once, thus read should always return a value that
32+
* increases (no reset).
33+
*/
34+
void test_ticker_init(void)
35+
{
36+
intf->init();
37+
uint32_t previous = intf->read();
38+
39+
intf->init();
40+
uint32_t current = intf->read();
41+
TEST_ASSERT_TRUE_MESSAGE(previous <= current, "init() changed the counter");
42+
43+
previous = intf->read();
44+
intf->init();
45+
current = intf->read();
46+
TEST_ASSERT_TRUE_MESSAGE(previous <= current, "init() changed the counter");
47+
}
48+
49+
/* Read multiple times, each returned time should be bigger than the previous one
50+
* Counter up.
51+
*/
52+
void test_ticker_read(void)
53+
{
54+
// this test assumes that to wrap around we would need to run >60 minutes
55+
// therefore wrapping should not happen - previous <= current
56+
const uint32_t test_loop = 15000;
57+
uint32_t previous = intf->read();
58+
uint32_t current;
59+
for (uint32_t i = 0UL; i < test_loop; i++) {
60+
current = intf->read();
61+
TEST_ASSERT_TRUE_MESSAGE(previous <= current, "us ticker counter wrapped around");
62+
}
63+
}
64+
65+
/* Implement simple read while loop to check if time is increasing (counter up)
66+
*/
67+
void test_ticker_read_loop()
68+
{
69+
uint32_t future_time = intf->read() + 10000UL;
70+
while (intf->read() < future_time);
71+
TEST_ASSERT_TRUE_MESSAGE(future_time <= intf->read(), "Future time is in the past");
72+
}
73+
74+
utest::v1::status_t us_ticker_setup(const Case *const source, const size_t index_of_case)
75+
{
76+
intf = get_us_ticker_data()->interface;
77+
return greentea_case_setup_handler(source, index_of_case);
78+
}
79+
80+
#if DEVICE_LOWPOWERTIMER
81+
utest::v1::status_t lp_ticker_setup(const Case *const source, const size_t index_of_case)
82+
{
83+
intf = get_lp_ticker_data()->interface;
84+
return greentea_case_setup_handler(source, index_of_case);
85+
}
86+
#endif
87+
88+
Case cases[] = {
89+
Case("us ticker HAL - Init", us_ticker_setup, test_ticker_init),
90+
Case("us ticker HAL - Read", us_ticker_setup, test_ticker_read),
91+
Case("us ticker HAL - Read in the loop", us_ticker_setup, test_ticker_read_loop),
92+
#if DEVICE_LOWPOWERTIMER
93+
Case("lp ticker HAL - Init", lp_ticker_setup, test_ticker_init),
94+
Case("lp ticker HAL - Read", lp_ticker_setup, test_ticker_read),
95+
Case("lp ticker HAL - Read in the loop", lp_ticker_setup, test_ticker_read_loop),
96+
#endif
97+
};
98+
99+
utest::v1::status_t greentea_test_setup(const size_t number_of_cases)
100+
{
101+
GREENTEA_SETUP(20, "default_auto");
102+
return greentea_test_setup_handler(number_of_cases);
103+
}
104+
105+
Specification specification(greentea_test_setup, cases, greentea_test_teardown_handler);
106+
107+
int main()
108+
{
109+
Harness::run(specification);
110+
}

TESTS/mbedmicro-mbed/attributes/main.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2017 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
#include <stdio.h>
217
#include <stdint.h>
318

TESTS/mbedmicro-mbed/call_before_main/main.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2017 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
#include "greentea-client/test_env.h"
217

318
namespace {

TESTS/mbedmicro-mbed/cpp/main.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2017 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
#include "greentea-client/test_env.h"
217

318
#define PATTERN_CHECK_VALUE 0xF0F0ADAD

TESTS/mbedmicro-mbed/div/main.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2017 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
#include <utility> // std::pair
217
#include "mbed.h"
318
#include "greentea-client/test_env.h"

TESTS/mbedmicro-mbed/static_assert/main.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2017 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
#include <stdio.h>
217
#include <stdint.h>
318

TESTS/mbedmicro-rtos-mbed/isr/main.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2017 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
#include "mbed.h"
217
#include "greentea-client/test_env.h"
318
#include "rtos.h"

TESTS/mbedmicro-rtos-mbed/mail/main.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2017 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
#include "mbed.h"
217
#include "greentea-client/test_env.h"
318
#include "rtos.h"

0 commit comments

Comments
 (0)