diff --git a/.github/issue_template.md b/.github/issue_template.md new file mode 100644 index 0000000000..ddf3bb511a --- /dev/null +++ b/.github/issue_template.md @@ -0,0 +1,38 @@ +Note: This is just a template, so feel free to use/remove the unnecessary things + +### Description +- Type: Bug | Enhancement | Question +- Related Issue: `#abc` +- Priority: Blocker | Major | Minor + +--------------------------------------------------------------- +## Bug + +**mbed-os sha** +(`git describe --tags`) + +**mbed-cli version** +(`mbed`) + +**Expected Behavior** + +**Actual Behavior** + +**Steps to Reproduce** + +---------------------------------------------------------------- +## Enhancement + +**Reason to enhance/problem with existing solution** + +**Suggested enhancement** + +**Pros** + +**Cons** + +----------------------------------------------------------------- + +## Question + +**How to?** diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000000..1e7c2a522d --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,40 @@ +Notes: +* Pull requests will not be accepted until the submitter has agreed to the contributer agreement. +* This is just a template, so feel free to use/remove the unnecessary things + + +## Status +**READY/IN DEVELOPMENT/HOLD** + + +## Migrations +If this PR changes any APIs or behaviors, give a short description of what "API users" should do when this PR is merged. + +YES | NO + + +## Description +A few sentences describing the overall goals of the pull request's commits. + + +## Related PRs +List related PRs against other branches: + +branch | PR +------ | ------ +other_pr_production | [link]() +other_pr_master | [link]() + + +## Todos +- [ ] Tests +- [ ] Documentation + + +## Deploy Notes +Notes regarding the deployment of the contained body of work. These should note any +required changes in the build environment, tools, compilers, etc. + + +## Steps to Test or Reproduce +Outline the steps to test or reproduce the PR here. diff --git a/README.md b/README.md new file mode 100644 index 0000000000..da4e02207b --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +[![CircleCI](https://circleci.com/gh/ARMmbed/mbed-os.svg?style=svg)](https://circleci.com/gh/ARMmbed/mbed-os) + +--- + +# mbed-os diff --git a/TESTS/cfstore/add_del/add_del.cpp b/TESTS/cfstore/add_del/add_del.cpp index 00ab84e7c9..9b74383238 100644 --- a/TESTS/cfstore/add_del/add_del.cpp +++ b/TESTS/cfstore/add_del/add_del.cpp @@ -20,20 +20,15 @@ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC #include #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -42,6 +37,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_add_del_test_00(const size_t call_count) @@ -77,21 +77,15 @@ int main() #else -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -//#include -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -101,6 +95,11 @@ int main() #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static char cfstore_add_del_utest_msg_g[CFSTORE_UTEST_MSG_BUF_SIZE]; diff --git a/TESTS/cfstore/close/close.cpp b/TESTS/cfstore/close/close.cpp index 44a0db38e9..5023a64bd2 100644 --- a/TESTS/cfstore/close/close.cpp +++ b/TESTS/cfstore/close/close.cpp @@ -21,20 +21,15 @@ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -43,6 +38,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_close_test_00(const size_t call_count) @@ -78,18 +78,13 @@ int main() #else -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -//#include -#include -#include +#include "Driver_Common.h" +#include "configuration-store/configuration_store.h" #include "cfstore_test.h" #include "cfstore_debug.h" #include "utest/utest.h" @@ -100,6 +95,10 @@ int main() #include "uvisor-lib/uvisor-lib.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include + using namespace utest::v1; static char cfstore_close_utest_msg_g[CFSTORE_UTEST_MSG_BUF_SIZE]; diff --git a/TESTS/cfstore/create/create.cpp b/TESTS/cfstore/create/create.cpp index 03fb8603e0..f59fa72575 100644 --- a/TESTS/cfstore/create/create.cpp +++ b/TESTS/cfstore/create/create.cpp @@ -20,20 +20,15 @@ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -42,6 +37,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_create_test_00(const size_t call_count) @@ -78,21 +78,15 @@ int main() #else -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" #include "cfstore_debug.h" #include "cfstore_test.h" -//#include -#include -#include +#include "Driver_Common.h" +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -101,6 +95,11 @@ int main() #include "uvisor-lib/uvisor-lib.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; #ifdef CFSTORE_DEBUG diff --git a/TESTS/cfstore/example1/example1.cpp b/TESTS/cfstore/example1/example1.cpp index 6792035f55..a81ab526e2 100644 --- a/TESTS/cfstore/example1/example1.cpp +++ b/TESTS/cfstore/example1/example1.cpp @@ -55,20 +55,15 @@ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -77,6 +72,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_example1_test_00(const size_t call_count) @@ -109,17 +109,11 @@ int main() } - #else - -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #ifndef YOTTA_CONFIGURATION_STORE_EXAMPLE1_VERSION_STRING /* when built as Configuration-Store example, include greentea support otherwise omit */ @@ -132,14 +126,17 @@ int main() #define CaseNext #endif // YOTTA_CONFIGURATION_STORE_EXAMPLE1_VERSION_STRING -#include -#include #include "cfstore_config.h" -#include +#include "configuration-store/configuration_store.h" #ifdef YOTTA_CFG_CONFIG_UVISOR #include "uvisor-lib/uvisor-lib.h" #endif /* YOTTA_CFG_CONFIG_UVISOR */ +#include +#include +#include + + #ifndef YOTTA_CONFIGURATION_STORE_EXAMPLE1_VERSION_STRING using namespace utest::v1; diff --git a/TESTS/cfstore/example2/example2.cpp b/TESTS/cfstore/example2/example2.cpp index 18523686f9..6949c98989 100644 --- a/TESTS/cfstore/example2/example2.cpp +++ b/TESTS/cfstore/example2/example2.cpp @@ -35,20 +35,15 @@ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -57,6 +52,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_example2_test_00(const size_t call_count) @@ -93,22 +93,15 @@ int main() #else -#include -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" #include "cfstore_test.h" #include "cfstore_debug.h" -//#include -#include -#include +#include "Driver_Common.h" +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -116,6 +109,11 @@ int main() #include "uvisor-lib/uvisor-lib.h" #endif /* YOTTA_CFG_CONFIG_UVISOR */ +#include +#include +#include +#include +#include using namespace utest::v1; diff --git a/TESTS/cfstore/example3/example3.cpp b/TESTS/cfstore/example3/example3.cpp index 4b7d3dc195..83d86459f0 100644 --- a/TESTS/cfstore/example3/example3.cpp +++ b/TESTS/cfstore/example3/example3.cpp @@ -50,20 +50,15 @@ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -72,6 +67,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_example3_test_00(const size_t call_count) @@ -108,12 +108,8 @@ int main() #else -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #ifndef YOTTA_CONFIGURATION_STORE_EXAMPLE3_VERSION_STRING /* when built as Configuration-Store example, include greentea support otherwise omit */ @@ -121,19 +117,21 @@ int main() #include "unity/unity.h" #include "greentea-client/test_env.h" #else // YOTTA_CONFIGURATION_STORE_EXAMPLE3_VERSION_STRING -// map utest types for building as stand alone example +/* map utest types for building as stand alone example */ #define control_t void #define CaseNext #endif // YOTTA_CONFIGURATION_STORE_EXAMPLE3_VERSION_STRING -#include -#include #include "cfstore_config.h" -#include +#include "configuration-store/configuration_store.h" + #ifdef YOTTA_CFG_CONFIG_UVISOR #include "uvisor-lib/uvisor-lib.h" #endif /* YOTTA_CFG_CONFIG_UVISOR */ +#include +#include +#include #ifndef YOTTA_CONFIGURATION_STORE_EXAMPLE3_VERSION_STRING using namespace utest::v1; diff --git a/TESTS/cfstore/example4/example4.cpp b/TESTS/cfstore/example4/example4.cpp index 6ffbd11bf6..a42fa6526f 100644 --- a/TESTS/cfstore/example4/example4.cpp +++ b/TESTS/cfstore/example4/example4.cpp @@ -20,20 +20,15 @@ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -42,6 +37,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_example4_test_00(const size_t call_count) @@ -78,22 +78,15 @@ int main() #else -#include -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" #include "cfstore_test.h" #include "cfstore_debug.h" -//#include -#include -#include +#include "Driver_Common.h" +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -101,6 +94,11 @@ int main() #include "uvisor-lib/uvisor-lib.h" #endif /* YOTTA_CFG_CONFIG_UVISOR */ +#include +#include +#include +#include +#include using namespace utest::v1; diff --git a/TESTS/cfstore/example5/example5.cpp b/TESTS/cfstore/example5/example5.cpp index 9e234c2ef6..86cbe14980 100644 --- a/TESTS/cfstore/example5/example5.cpp +++ b/TESTS/cfstore/example5/example5.cpp @@ -49,20 +49,15 @@ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -71,6 +66,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_example5_test_00(const size_t call_count) @@ -106,17 +106,11 @@ int main() #else -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif -//#include -#include +#include "Driver_Common.h" #ifndef YOTTA_CONFIGURATION_STORE_EXAMPLE5_VERSION_STRING /* when built as Configuration-Store example, include greentea support otherwise omit */ @@ -124,13 +118,18 @@ int main() #include "unity/unity.h" #include "greentea-client/test_env.h" #else // YOTTA_CONFIGURATION_STORE_EXAMPLE5_VERSION_STRING -// map utest types for building as stand alone example +/* map utest types for building as stand alone example */ #define control_t void #define CaseNext #endif // YOTTA_CONFIGURATION_STORE_EXAMPLE5_VERSION_STRING #include "cfstore_config.h" -#include +#include "configuration-store/configuration_store.h" + +#include +#include +#include +#include #ifndef YOTTA_CONFIGURATION_STORE_EXAMPLE5_VERSION_STRING diff --git a/TESTS/cfstore/find/find.cpp b/TESTS/cfstore/find/find.cpp index b8b58a926c..4d79a6c209 100644 --- a/TESTS/cfstore/find/find.cpp +++ b/TESTS/cfstore/find/find.cpp @@ -20,20 +20,15 @@ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -42,6 +37,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_find_test_00(const size_t call_count) @@ -78,22 +78,15 @@ int main() #else -#include -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" #include "cfstore_test.h" #include "cfstore_debug.h" -//#include -#include -#include +#include "Driver_Common.h" +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -102,6 +95,12 @@ int main() #include "uvisor-lib/uvisor-lib.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include +#include + using namespace utest::v1; static char cfstore_find_utest_msg_g[CFSTORE_UTEST_MSG_BUF_SIZE]; diff --git a/TESTS/cfstore/find2/find2.cpp b/TESTS/cfstore/find2/find2.cpp index e0e02fcf5d..d190c5b300 100644 --- a/TESTS/cfstore/find2/find2.cpp +++ b/TESTS/cfstore/find2/find2.cpp @@ -20,20 +20,15 @@ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -42,6 +37,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_find2_test_00(const size_t call_count) @@ -78,22 +78,15 @@ int main() #else -#include -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" #include "cfstore_test.h" #include "cfstore_debug.h" -//#include -#include -#include +#include "Driver_Common.h" +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -101,6 +94,12 @@ int main() #include "uvisor-lib/uvisor-lib.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include +#include + using namespace utest::v1; static char cfstore_find2_utest_msg_g[CFSTORE_UTEST_MSG_BUF_SIZE]; diff --git a/TESTS/cfstore/flash/flash.cpp b/TESTS/cfstore/flash/flash.cpp index 1f2dc7c6d6..254f53fef1 100644 --- a/TESTS/cfstore/flash/flash.cpp +++ b/TESTS/cfstore/flash/flash.cpp @@ -20,20 +20,15 @@ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -42,6 +37,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_flash_test_00(const size_t call_count) @@ -77,12 +77,6 @@ int main() #else - -#include -#include -#include -#include - #if defined CFSTORE_CONFIG_BACKEND_FLASH_ENABLED && CFSTORE_CONFIG_BACKEND_FLASH_ENABLED == 1 #include #include @@ -90,9 +84,8 @@ int main() #include "cfstore_config.h" #include "cfstore_test.h" #include "cfstore_debug.h" -//#include -#include -#include +#include "Driver_Common.h" +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -100,6 +93,11 @@ int main() #include "uvisor-lib/uvisor-lib.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; /* Configure secure box. */ diff --git a/TESTS/cfstore/flush/flush.cpp b/TESTS/cfstore/flush/flush.cpp index 177789c336..818ae1d45d 100644 --- a/TESTS/cfstore/flush/flush.cpp +++ b/TESTS/cfstore/flush/flush.cpp @@ -20,20 +20,15 @@ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -42,6 +37,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_flush_test_00(const size_t call_count) @@ -78,21 +78,15 @@ int main() -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" #include "cfstore_test.h" #include "cfstore_debug.h" -//#include -#include -#include +#include "Driver_Common.h" +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -100,6 +94,11 @@ int main() #include "uvisor-lib/uvisor-lib.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; /* diff --git a/TESTS/cfstore/flush2/flush2.cpp b/TESTS/cfstore/flush2/flush2.cpp index ca868d18af..31becefc3a 100644 --- a/TESTS/cfstore/flush2/flush2.cpp +++ b/TESTS/cfstore/flush2/flush2.cpp @@ -20,20 +20,15 @@ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -42,6 +37,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_flush2_test_00(const size_t call_count) @@ -78,20 +78,14 @@ int main() #else - -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "utest/utest.h" #include "unity/unity.h" #include "cfstore_config.h" -#include +#include "configuration-store/configuration_store.h" #include "greentea-client/test_env.h" #include "cfstore_test.h" #include "cfstore_debug.h" @@ -100,6 +94,11 @@ int main() #include "uvisor-lib/uvisor-lib.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; /* diff --git a/TESTS/cfstore/init/init.cpp b/TESTS/cfstore/init/init.cpp index 109438a76b..3631f099ce 100644 --- a/TESTS/cfstore/init/init.cpp +++ b/TESTS/cfstore/init/init.cpp @@ -18,20 +18,17 @@ * Test cases to test initialization/uninitialization code. */ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include + #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -40,6 +37,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_init_test_00(const size_t call_count) @@ -72,25 +74,18 @@ int main() } - #else -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif -//#include -#include +#include "Driver_Common.h" #include "cfstore_config.h" #include "cfstore_test.h" #include "cfstore_debug.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -98,6 +93,10 @@ int main() #include "uvisor-lib/uvisor-lib.h" #endif /* YOTTA_CFG_CONFIG_UVISOR */ +#include +#include +#include +#include using namespace utest::v1; diff --git a/TESTS/cfstore/misc/misc.cpp b/TESTS/cfstore/misc/misc.cpp index 56443c7d67..537463e79e 100644 --- a/TESTS/cfstore/misc/misc.cpp +++ b/TESTS/cfstore/misc/misc.cpp @@ -21,20 +21,15 @@ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -43,6 +38,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_misc_test_00(const size_t call_count) @@ -79,20 +79,16 @@ int main() #else -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" #include "cfstore_test.h" #include "cfstore_debug.h" -#include +#include "Driver_Common.h" #include "cfstore_config.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -102,6 +98,10 @@ int main() #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include + using namespace utest::v1; static char cfstore_misc_utest_msg_g[CFSTORE_UTEST_MSG_BUF_SIZE]; @@ -117,7 +117,6 @@ UVISOR_SET_MODE_ACL(UVISOR_ENABLED, cfstore_acl_uvisor_box_misc_g); #endif /* YOTTA_CFG_CFSTORE_UVISOR */ - /* report whether built/configured for flash sync or async mode */ static control_t cfstore_misc_test_00(const size_t call_count) { diff --git a/TESTS/cfstore/open/open.cpp b/TESTS/cfstore/open/open.cpp index 653e25ea6f..cbf18cd68b 100644 --- a/TESTS/cfstore/open/open.cpp +++ b/TESTS/cfstore/open/open.cpp @@ -21,20 +21,15 @@ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -43,6 +38,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_open_test_00(const size_t call_count) @@ -78,21 +78,15 @@ int main() #else -#include -#include -#include /*rand()*/ -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" #include "cfstore_test.h" #include "cfstore_debug.h" -//#include -#include -#include +#include "Driver_Common.h" +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -101,6 +95,11 @@ int main() #include "uvisor-lib/uvisor-lib.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include /*rand()*/ +#include + using namespace utest::v1; static char cfstore_open_utest_msg_g[CFSTORE_UTEST_MSG_BUF_SIZE]; diff --git a/TESTS/cfstore/read/read.cpp b/TESTS/cfstore/read/read.cpp index ff3b4c59a2..fff843bb49 100644 --- a/TESTS/cfstore/read/read.cpp +++ b/TESTS/cfstore/read/read.cpp @@ -20,20 +20,15 @@ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -42,6 +37,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_read_test_00(const size_t call_count) @@ -78,20 +78,15 @@ int main() #else -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" #include "cfstore_test.h" #include "cfstore_debug.h" -//#include -#include -#include +#include "Driver_Common.h" +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -100,6 +95,10 @@ int main() #include "uvisor-lib/uvisor-lib.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include + using namespace utest::v1; static char cfstore_read_utest_msg_g[CFSTORE_UTEST_MSG_BUF_SIZE]; diff --git a/TESTS/cfstore/write/write.cpp b/TESTS/cfstore/write/write.cpp index 667d24385c..750de913d7 100644 --- a/TESTS/cfstore/write/write.cpp +++ b/TESTS/cfstore/write/write.cpp @@ -20,20 +20,15 @@ #if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM -#include -#include -#include -#include - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" -#include +#include "Driver_Common.h" #include "cfstore_debug.h" #include "cfstore_test.h" -#include +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -42,6 +37,11 @@ #include "cfstore_uvisor.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include +#include + using namespace utest::v1; static control_t cfstore_write_test_00(const size_t call_count) @@ -78,21 +78,15 @@ int main() #else -#include -#include -#include - - #ifdef TARGET_LIKE_FRDM_K64F_GCC -#include +#include "mbed-drivers/mbed.h" #endif #include "cfstore_config.h" #include "cfstore_test.h" #include "cfstore_debug.h" -//#include -#include -#include +#include "Driver_Common.h" +#include "configuration-store/configuration_store.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -101,6 +95,10 @@ int main() #include "uvisor-lib/uvisor-lib.h" #endif /* YOTTA_CFG_CFSTORE_UVISOR */ +#include +#include +#include + using namespace utest::v1; static char cfstore_write_utest_msg_g[CFSTORE_UTEST_MSG_BUF_SIZE]; diff --git a/TESTS/mbed_drivers/c_strings/main.cpp b/TESTS/mbed_drivers/c_strings/main.cpp new file mode 100644 index 0000000000..efb73999ef --- /dev/null +++ b/TESTS/mbed_drivers/c_strings/main.cpp @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2013-2016, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "unity/unity.h" +#include "utest/utest.h" + +namespace { +static char buffer[256] = {0}; +} + +#define CLEAN_BUFFER memset(::buffer, 0x00, sizeof(::buffer)) +#define NEGATIVE_INTEGERS -32768,-3214,-999,-100,-1,0,-1,-4231,-999,-4123,-32760,-99999 +#define POSITIVE_INTEGERS 32768,3214,999,100,1,0,1,4231,999,4123,32760,99999 +#define FLOATS 0.002,0.92430,15.91320,791.77368,6208.2,25719.4952,426815.982588,6429271.046,42468024.93,212006462.910 + +using namespace utest::v1; + + +void test_case_c_string_i_d() { + CLEAN_BUFFER; + sprintf(buffer, "%i %d %i %d %i %d %i %d %i %d %i %i", NEGATIVE_INTEGERS); + TEST_ASSERT_EQUAL_STRING("-32768 -3214 -999 -100 -1 0 -1 -4231 -999 -4123 -32760 -99999", buffer); +} + +void test_case_c_string_u_d() { + CLEAN_BUFFER; + sprintf(buffer, "%u %d %u %d %u %d %u %d %u %d %u %d", POSITIVE_INTEGERS); + TEST_ASSERT_EQUAL_STRING("32768 3214 999 100 1 0 1 4231 999 4123 32760 99999", buffer); +} + +void test_case_c_string_x_E() { + CLEAN_BUFFER; + sprintf(buffer, "%x %X %x %X %x %X %x %X %x %X %x %X", POSITIVE_INTEGERS); + TEST_ASSERT_EQUAL_STRING("8000 C8E 3e7 64 1 0 1 1087 3e7 101B 7ff8 1869F", buffer); +} + +void test_case_c_string_f_f() { + CLEAN_BUFFER; + sprintf(buffer, "%f %f %f %f %f %f %f %f %f %f", FLOATS); + TEST_ASSERT_EQUAL_STRING("0.002000 0.924300 15.913200 791.773680 6208.200000 25719.495200 426815.982588 6429271.046000 42468024.930000 212006462.910000", buffer); +} + +void test_case_c_string_g_g() { + CLEAN_BUFFER; + sprintf(buffer, "%g %g %g %g %g %g %g %g %g %g", FLOATS); + TEST_ASSERT_EQUAL_STRING("0.002 0.9243 15.9132 791.774 6208.2 25719.5 426816 6.42927e+006 4.2468e+007 2.12006e+008", buffer); + TEST_ASSERT_EQUAL_STRING("0.002 0.9243 15.9132 791.774 6208.2 25719.5 426816 6.42927e+06 4.2468e+07 2.12006e+08", buffer); +} + +void test_case_c_string_e_E() { + CLEAN_BUFFER; + sprintf(buffer, "%e %E %e %E %e %E %e %E %e %E", FLOATS); + TEST_ASSERT_EQUAL_STRING("2.000000e-003 9.243000E-001 1.591320e+001 7.917737E+002 6.208200e+003 2.571950E+004 4.268160e+005 6.429271E+006 4.246802e+007 2.120065E+008", buffer); + TEST_ASSERT_EQUAL_STRING("2.000000e-03 9.243000E-01 1.591320e+01 7.917737E+02 6.208200e+03 2.571950E+04 4.268160e+05 6.429271E+06 4.246802e+07 2.120065E+08", buffer); +} + +void test_case_c_string_strtok() { + CLEAN_BUFFER; + char str[] ="- This, a sample string."; + char * pch = strtok (str," ,.-"); + while (pch != NULL) { + strcat(buffer, pch); + pch = strtok (NULL, " ,.-"); + } + TEST_ASSERT_EQUAL_STRING("Thisasamplestring", buffer); +} + +void test_case_c_string_strpbrk() { + CLEAN_BUFFER; + char str[] = "This is a sample string"; + char key[] = "aeiou"; + char *pch = strpbrk(str, key); + while (pch != NULL) + { + char buf[2] = {*pch, '\0'}; + strcat(buffer, buf); + pch = strpbrk(pch + 1,key); + } + TEST_ASSERT_EQUAL_STRING("iiaaei", buffer); +} + +utest::v1::status_t greentea_failure_handler(const Case *const source, const failure_t reason) { + greentea_case_failure_abort_handler(source, reason); + return STATUS_CONTINUE; +} + +Case cases[] = { + Case("C strings: strtok", test_case_c_string_strtok, greentea_failure_handler), + Case("C strings: strpbrk", test_case_c_string_strpbrk, greentea_failure_handler), + Case("C strings: %i %d integer formatting", test_case_c_string_i_d, greentea_failure_handler), + Case("C strings: %u %d integer formatting", test_case_c_string_u_d, greentea_failure_handler), + Case("C strings: %x %E integer formatting", test_case_c_string_x_E, greentea_failure_handler), + Case("C strings: %f %f float formatting", test_case_c_string_f_f, greentea_failure_handler), + Case("C strings: %e %E float formatting", test_case_c_string_e_E, greentea_failure_handler), + Case("C strings: %g %g float formatting", test_case_c_string_g_g, greentea_failure_handler), +}; + +utest::v1::status_t greentea_test_setup(const size_t number_of_cases) { + GREENTEA_SETUP(5, "default_auto"); + return greentea_test_setup_handler(number_of_cases); +} + +Specification specification(greentea_test_setup, cases, greentea_test_teardown_handler); + +int main() { + Harness::run(specification); +} diff --git a/TESTS/mbed_drivers/callback/main.cpp b/TESTS/mbed_drivers/callback/main.cpp new file mode 100644 index 0000000000..7d229fa7a3 --- /dev/null +++ b/TESTS/mbed_drivers/callback/main.cpp @@ -0,0 +1,267 @@ +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "unity.h" +#include "utest.h" + +using namespace utest::v1; + + +// static functions +template +T static_func5(T a0, T a1, T a2, T a3, T a4) { return a0 | a1 | a2 | a3 | a4; } +template +T static_func4(T a0, T a1, T a2, T a3) { return a0 | a1 | a2 | a3; } +template +T static_func3(T a0, T a1, T a2) { return a0 | a1 | a2; } +template +T static_func2(T a0, T a1) { return a0 | a1; } +template +T static_func1(T a0) { return a0; } +template +T static_func0() { return 0; } + +// class functions +template +struct Thing { + T t; + Thing() : t(0x80) {} + + T member_func5(T a0, T a1, T a2, T a3, T a4) { return t | a0 | a1 | a2 | a3 | a4; } + T member_func4(T a0, T a1, T a2, T a3) { return t | a0 | a1 | a2 | a3; } + T member_func3(T a0, T a1, T a2) { return t | a0 | a1 | a2; } + T member_func2(T a0, T a1) { return t | a0 | a1; } + T member_func1(T a0) { return t | a0; } + T member_func0() { return t; } +}; + +// bound functions +template +T bound_func5(Thing *t, T a0, T a1, T a2, T a3, T a4) { return t->t | a0 | a1 | a2 | a3 | a4; } +template +T bound_func4(Thing *t, T a0, T a1, T a2, T a3) { return t->t | a0 | a1 | a2 | a3; } +template +T bound_func3(Thing *t, T a0, T a1, T a2) { return t->t | a0 | a1 | a2; } +template +T bound_func2(Thing *t, T a0, T a1) { return t->t | a0 | a1; } +template +T bound_func1(Thing *t, T a0) { return t->t | a0; } +template +T bound_func0(Thing *t) { return t->t; } + + +// function call and result verification +template +struct Verifier { + static void verify5(Callback func) { + T result = func(0x01, 0x02, 0x04, 0x08, 0x10); + TEST_ASSERT_EQUAL(result, 0x1f); + } + + template + static void verify5(O *obj, M method) { + Callback func(obj, method); + T result = func(0x01, 0x02, 0x04, 0x08, 0x10); + TEST_ASSERT_EQUAL(result, 0x9f); + } + + static void verify4(Callback func) { + T result = func(0x01, 0x02, 0x04, 0x08); + TEST_ASSERT_EQUAL(result, 0x0f); + } + + template + static void verify4(O *obj, M method) { + Callback func(obj, method); + T result = func(0x01, 0x02, 0x04, 0x08); + TEST_ASSERT_EQUAL(result, 0x8f); + } + + static void verify3(Callback func) { + T result = func(0x01, 0x02, 0x04); + TEST_ASSERT_EQUAL(result, 0x07); + } + + template + static void verify3(O *obj, M method) { + Callback func(obj, method); + T result = func(0x01, 0x02, 0x04); + TEST_ASSERT_EQUAL(result, 0x87); + } + + static void verify2(Callback func) { + T result = func(0x01, 0x02); + TEST_ASSERT_EQUAL(result, 0x03); + } + + template + static void verify2(O *obj, M method) { + Callback func(obj, method); + T result = func(0x01, 0x02); + TEST_ASSERT_EQUAL(result, 0x83); + } + + static void verify1(Callback func) { + T result = func(0x01); + TEST_ASSERT_EQUAL(result, 0x01); + } + + template + static void verify1(O *obj, M method) { + Callback func(obj, method); + T result = func(0x01); + TEST_ASSERT_EQUAL(result, 0x81); + } + + static void verify0(Callback func) { + T result = func(); + TEST_ASSERT_EQUAL(result, 0x00); + } + + template + static void verify0(O *obj, M method) { + Callback func(obj, method); + T result = func(); + TEST_ASSERT_EQUAL(result, 0x80); + } +}; + + +// test dispatch +template +void test_dispatch5() { + Thing thing; + Verifier::verify5(static_func5); + Verifier::verify5(&thing, &Thing::member_func5); + Verifier::verify5(&thing, &bound_func5); + + Callback callback(static_func5); + Verifier::verify5(callback); + callback.attach(&thing, &bound_func5); + Verifier::verify5(&callback, &Callback::call); + Verifier::verify5((void*)&callback, &Callback::thunk); +} + +template +void test_dispatch4() { + Thing thing; + Verifier::verify4(static_func4); + Verifier::verify4(&thing, &Thing::member_func4); + Verifier::verify4(&thing, &bound_func4); + + Callback callback(static_func4); + Verifier::verify4(callback); + callback.attach(&thing, &bound_func4); + Verifier::verify4(&callback, &Callback::call); + Verifier::verify4((void*)&callback, &Callback::thunk); +} + +template +void test_dispatch3() { + Thing thing; + Verifier::verify3(static_func3); + Verifier::verify3(&thing, &Thing::member_func3); + Verifier::verify3(&thing, &bound_func3); + + Callback callback(static_func3); + Verifier::verify3(callback); + callback.attach(&thing, &bound_func3); + Verifier::verify3(&callback, &Callback::call); + Verifier::verify3((void*)&callback, &Callback::thunk); +} + +template +void test_dispatch2() { + Thing thing; + Verifier::verify2(static_func2); + Verifier::verify2(&thing, &Thing::member_func2); + Verifier::verify2(&thing, &bound_func2); + + Callback callback(static_func2); + Verifier::verify2(callback); + callback.attach(&thing, &bound_func2); + Verifier::verify2(&callback, &Callback::call); + Verifier::verify2((void*)&callback, &Callback::thunk); +} + +template +void test_dispatch1() { + Thing thing; + Verifier::verify1(static_func1); + Verifier::verify1(&thing, &Thing::member_func1); + Verifier::verify1(&thing, &bound_func1); + + Callback callback(static_func1); + Verifier::verify1(callback); + callback.attach(&thing, &bound_func1); + Verifier::verify1(&callback, &Callback::call); + Verifier::verify1((void*)&callback, &Callback::thunk); +} + +template +void test_dispatch0() { + Thing thing; + Verifier::verify0(static_func0); + Verifier::verify0(&thing, &Thing::member_func0); + Verifier::verify0(&thing, &bound_func0); + + Callback callback(static_func0); + Verifier::verify0(callback); + callback.attach(&thing, &bound_func0); + Verifier::verify0(&callback, &Callback::call); + Verifier::verify0((void*)&callback, &Callback::thunk); +} + +template +void test_fparg1() { + Thing thing; + FunctionPointerArg1 fp(static_func1); + Verifier::verify1(fp); + Verifier::verify1(fp.get_function()); +} + +template +void test_fparg0() { + Thing thing; + FunctionPointerArg1 fp(static_func0); + Verifier::verify0(fp); + Verifier::verify0(fp.get_function()); +} + + +// Test setup +utest::v1::status_t test_setup(const size_t number_of_cases) { + GREENTEA_SETUP(5, "default_auto"); + return verbose_test_setup_handler(number_of_cases); +} + +Case cases[] = { + Case("Testing callbacks with 5 ints", test_dispatch5), + Case("Testing callbacks with 4 ints", test_dispatch4), + Case("Testing callbacks with 3 ints", test_dispatch3), + Case("Testing callbacks with 2 ints", test_dispatch2), + Case("Testing callbacks with 1 ints", test_dispatch1), + Case("Testing callbacks with 0 ints", test_dispatch0), + + Case("Testing callbacks with 5 uchars", test_dispatch5), + Case("Testing callbacks with 4 uchars", test_dispatch4), + Case("Testing callbacks with 3 uchars", test_dispatch3), + Case("Testing callbacks with 2 uchars", test_dispatch2), + Case("Testing callbacks with 1 uchars", test_dispatch1), + Case("Testing callbacks with 0 uchars", test_dispatch0), + + Case("Testing callbacks with 5 uint64s", test_dispatch5), + Case("Testing callbacks with 4 uint64s", test_dispatch4), + Case("Testing callbacks with 3 uint64s", test_dispatch3), + Case("Testing callbacks with 2 uint64s", test_dispatch2), + Case("Testing callbacks with 1 uint64s", test_dispatch1), + Case("Testing callbacks with 0 uint64s", test_dispatch0), + + Case("Testing FunctionPointerArg1 compatibility", test_fparg1), + Case("Testing FunctionPointer compatibility", test_fparg0), +}; + +Specification specification(test_setup, cases); + +int main() { + return !Harness::run(specification); +} diff --git a/TESTS/mbed_drivers/dev_null/main.cpp b/TESTS/mbed_drivers/dev_null/main.cpp new file mode 100644 index 0000000000..5513ca64fc --- /dev/null +++ b/TESTS/mbed_drivers/dev_null/main.cpp @@ -0,0 +1,51 @@ +/* mbed Microcontroller Library + * Copyright (c) 2013-2014 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "mbed.h" +#include "greentea-client/test_env.h" + +class DevNull : public Stream { +public: + DevNull(const char *name = NULL) : Stream(name) {} + +protected: + virtual int _getc() { + return 0; + } + virtual int _putc(int c) { + return c; + } +}; + +DevNull null("null"); + +int main() { + GREENTEA_SETUP(2, "dev_null_auto"); + + printf("MBED: before re-routing stdout to /null\n"); // This shouldn't appear + greentea_send_kv("to_stdout", "re-routing stdout to /null"); + + if (freopen("/null", "w", stdout)) { + // This shouldn't appear on serial + // We should use pure printf here to send KV + printf("{{to_null;printf redirected to /null}}\n"); + printf("MBED: this printf is already redirected to /null\n"); + } + + while(1) { + // Success is determined by the host test at this point, so busy wait + } +} diff --git a/TESTS/mbed_drivers/echo/main.cpp b/TESTS/mbed_drivers/echo/main.cpp new file mode 100644 index 0000000000..f531a79f7d --- /dev/null +++ b/TESTS/mbed_drivers/echo/main.cpp @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2013-2016, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "unity/unity.h" +#include "utest/utest.h" + +using namespace utest::v1; + +// Echo server (echo payload to host) +template +void test_case_echo_server_x() { + char _key[10] = {}; + char _value[128] = {}; + const int echo_count = N; + + // Handshake with host + greentea_send_kv("echo_count", echo_count); + greentea_parse_kv(_key, _value, sizeof(_key), sizeof(_value)); + TEST_ASSERT_EQUAL_INT(echo_count, atoi(_value)); + + for (int i=0; i < echo_count; ++i) { + greentea_parse_kv(_key, _value, sizeof(_key), sizeof(_value)); + greentea_send_kv(_key, _value); + } +} + +utest::v1::status_t greentea_failure_handler(const Case *const source, const failure_t reason) { + greentea_case_failure_abort_handler(source, reason); + return STATUS_CONTINUE; +} + +Case cases[] = { + Case("Echo server: x16", test_case_echo_server_x<16>, greentea_failure_handler), + Case("Echo server: x32", test_case_echo_server_x<32>, greentea_failure_handler), + Case("Echo server: x64", test_case_echo_server_x<64>, greentea_failure_handler), +}; + +utest::v1::status_t greentea_test_setup(const size_t number_of_cases) { + GREENTEA_SETUP(30, "echo"); + return greentea_test_setup_handler(number_of_cases); +} + +Specification specification(greentea_test_setup, cases, greentea_test_teardown_handler); + +int main() { + Harness::run(specification); +} diff --git a/TESTS/mbed_drivers/generic_tests/main.cpp b/TESTS/mbed_drivers/generic_tests/main.cpp new file mode 100644 index 0000000000..dc177e3f4d --- /dev/null +++ b/TESTS/mbed_drivers/generic_tests/main.cpp @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2013-2016, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include // std::pair +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "unity/unity.h" +#include "utest/utest.h" + +using namespace utest::v1; + +#define PATTERN_CHECK_VALUE 0xF0F0ADAD + +class CppTestCaseHelperClass { +private: + const char* name; + const unsigned pattern; + +public: + CppTestCaseHelperClass(const char* _name) : name(_name), pattern(PATTERN_CHECK_VALUE) { + print("init"); + } + + void print(const char *message) { + printf("%s::%s\n", name, message); + } + + bool check_init(void) { + bool result = (pattern == PATTERN_CHECK_VALUE); + print(result ? "check_init: OK" : "check_init: ERROR"); + return result; + } + + void stack_test(void) { + print("stack_test"); + CppTestCaseHelperClass t("Stack"); + t.hello(); + } + + void hello(void) { + print("hello"); + } + + ~CppTestCaseHelperClass() { + print("destroy"); + } +}; + + +void test_case_basic() { + TEST_ASSERT_TRUE(true); + TEST_ASSERT_FALSE(false); + TEST_ASSERT_EQUAL_STRING("The quick brown fox jumps over the lazy dog", + "The quick brown fox jumps over the lazy dog"); +} + +void test_case_blinky() { + static DigitalOut myled(LED1); + const int cnt_max = 1024; + for (int cnt = 0; cnt < cnt_max; ++cnt) { + myled = !myled; + } +} + +void test_case_cpp_stack() { + // Check C++ start-up initialisation + CppTestCaseHelperClass s("Static"); + + // Global stack object simple test + s.stack_test(); + TEST_ASSERT_TRUE_MESSAGE(s.check_init(), "s.check_init() failed"); +} + +void test_case_cpp_heap() { + // Heap test object simple test + CppTestCaseHelperClass *m = new CppTestCaseHelperClass("Heap"); + m->hello(); + TEST_ASSERT_TRUE_MESSAGE(m->check_init(), "m->check_init() failed"); + delete m; +} + +utest::v1::status_t greentea_failure_handler(const Case *const source, const failure_t reason) { + greentea_case_failure_abort_handler(source, reason); + return STATUS_CONTINUE; +} + +// Generic test cases +Case cases[] = { + Case("Basic", test_case_basic, greentea_failure_handler), + Case("Blinky", test_case_blinky, greentea_failure_handler), + Case("C++ stack", test_case_cpp_stack, greentea_failure_handler), + Case("C++ heap", test_case_cpp_heap, greentea_failure_handler) +}; + +utest::v1::status_t greentea_test_setup(const size_t number_of_cases) { + GREENTEA_SETUP(20, "default_auto"); + return greentea_test_setup_handler(number_of_cases); +} + +Specification specification(greentea_test_setup, cases, greentea_test_teardown_handler); + +int main() { + Harness::run(specification); +} diff --git a/TESTS/mbed_drivers/rtc/main.cpp b/TESTS/mbed_drivers/rtc/main.cpp new file mode 100644 index 0000000000..fae4d06e20 --- /dev/null +++ b/TESTS/mbed_drivers/rtc/main.cpp @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2013-2016, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "unity/unity.h" +#include "utest/utest.h" + +using namespace utest::v1; + +#define CUSTOM_TIME 1256729737 + +void test_case_rtc_strftime() { + greentea_send_kv("timestamp", CUSTOM_TIME); + + char buffer[32] = {0}; + char kv_buff[64] = {0}; + set_time(CUSTOM_TIME); // Set RTC time to Wed, 28 Oct 2009 11:35:37 + + for (int i=0; i<10; ++i) { + time_t seconds = time(NULL); + sprintf(kv_buff, "[%ld] ", seconds); + strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S %p", localtime(&seconds)); + strcat(kv_buff, buffer); + greentea_send_kv("rtc", kv_buff); + wait(1); + } +} + +Case cases[] = { + Case("RTC strftime", test_case_rtc_strftime), +}; + +utest::v1::status_t greentea_test_setup(const size_t number_of_cases) { + GREENTEA_SETUP(20, "rtc_auto"); + return greentea_test_setup_handler(number_of_cases); +} + +Specification specification(greentea_test_setup, cases, greentea_test_teardown_handler); + +int main() { + Harness::run(specification); +} diff --git a/TESTS/mbed_drivers/stl_features/main.cpp b/TESTS/mbed_drivers/stl_features/main.cpp new file mode 100644 index 0000000000..2cfbd2b50c --- /dev/null +++ b/TESTS/mbed_drivers/stl_features/main.cpp @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2013-2016, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "unity/unity.h" +#include "utest/utest.h" +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace utest::v1; + +#define TABLE_SIZE(TAB) (sizeof(TAB) / sizeof(TAB[0])) + +#define NEGATIVE_INTEGERS -32768,-3214,-999,-100,-1,0,1,4231,999,4123,32760,99999 +#define POSITIVE_INTEGERS 32768,3214,999,100,1,0,1,4231,999,4123,32760,99999 +#define FLOATS 0.002,0.92430,15.91320,791.77368,6208.2,25719.4952,426815.982588,6429271.046,42468024.93,212006462.910 +#define FLOATS_STR "0.002","0.92430","15.91320","791.77368","6208.2","25719.4952","426815.982588","6429271.046","42468024.93","212006462.910" + + +namespace { +int p_integers[] = {POSITIVE_INTEGERS}; +int n_integers[] = {NEGATIVE_INTEGERS}; +float floats[] = {FLOATS}; + +template +void BubbleSort(T& _array, size_t array_size, F functor) { + bool flag = true; + size_t numLength = array_size; + for(size_t i = 1; (i <= numLength) && flag; i++) { + flag = false; + for (size_t j = 0; j < (numLength - 1); j++) { + if (functor(_array[j+1], _array[j])) { + int temp = _array[j]; + _array[j] = _array[j + 1]; + _array[j+1] = temp; + flag = true; + } + } + } +} + +struct printInt { + void operator()(int i) { printf("%d ", i); } +}; + +struct printFloat { + void operator()(float f) { printf("%f ", f); } +}; + +struct printString { + void operator()(const char* s) { printf("%s ", s); } +}; + +struct greaterAbs { + bool operator()(int a, int b) { return abs(a) > abs(b); } +}; + +} // namespace + +void test_case_stl_equal() { + std::vector v_pints(p_integers, p_integers + TABLE_SIZE(p_integers)); + TEST_ASSERT_TRUE(std::equal(v_pints.begin(), v_pints.end(), p_integers)); +} + +void test_case_stl_transform() { + const char* floats_str[] = {FLOATS_STR}; + float floats_transform[TABLE_SIZE(floats_str)] = {0.0}; + std::transform(floats_str, floats_str + TABLE_SIZE(floats_str), floats_transform, atof); + //printf("stl_transform::floats_str: "); + //std::for_each(floats_str, floats_str + TABLE_SIZE(floats_str), printString()); + //printf("stl_transform::floats_transform: "); + //std::for_each(floats_transform, floats_transform + TABLE_SIZE(floats_transform), printFloat()); + //printf("\n"); + + TEST_ASSERT_TRUE(std::equal(floats_transform, floats_transform + TABLE_SIZE(floats_transform), floats)); +} + +void test_case_stl_sort_greater() { + std::vector v_nints_1(n_integers, n_integers + TABLE_SIZE(n_integers)); + std::vector v_nints_2(n_integers, n_integers + TABLE_SIZE(n_integers)); + + BubbleSort(v_nints_1, v_nints_1.size(), std::greater()); + std::sort(v_nints_2.begin(), v_nints_2.end(), std::greater()); + + TEST_ASSERT_TRUE(std::equal(v_nints_1.begin(), v_nints_1.end(), v_nints_2.begin())); +} + +void test_case_stl_sort_abs() { + std::vector v_nints_1(n_integers, n_integers + TABLE_SIZE(n_integers)); + std::vector v_nints_2(n_integers, n_integers + TABLE_SIZE(n_integers)); + + BubbleSort(v_nints_1, v_nints_1.size(), greaterAbs()); + std::sort(v_nints_2.begin(), v_nints_2.end(), greaterAbs()); + + TEST_ASSERT_TRUE(std::equal(v_nints_1.begin(), v_nints_1.end(), v_nints_2.begin())); +} + +utest::v1::status_t greentea_failure_handler(const Case *const source, const failure_t reason) { + greentea_case_failure_abort_handler(source, reason); + return STATUS_CONTINUE; +} + +Case cases[] = { + Case("STL std::equal", test_case_stl_equal, greentea_failure_handler), + Case("STL std::transform", test_case_stl_transform, greentea_failure_handler), + Case("STL std::sort greater", test_case_stl_sort_greater, greentea_failure_handler), + Case("STL std::sort abs", test_case_stl_sort_abs, greentea_failure_handler) +}; + +utest::v1::status_t greentea_test_setup(const size_t number_of_cases) { + GREENTEA_SETUP(5, "default_auto"); + return greentea_test_setup_handler(number_of_cases); +} + +Specification specification(greentea_test_setup, cases, greentea_test_teardown_handler); + +int main() { + Harness::run(specification); +} diff --git a/TESTS/mbed_drivers/ticker/main.cpp b/TESTS/mbed_drivers/ticker/main.cpp new file mode 100644 index 0000000000..0b6cdeac1c --- /dev/null +++ b/TESTS/mbed_drivers/ticker/main.cpp @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2013-2016, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "utest/utest.h" + +using namespace utest::v1; + +void send_kv_tick() { + static int count = 0; + if (count < 10) { + greentea_send_kv("tick", count); + } else if (count == 10) { + Harness::validate_callback(); + } + count++; +} + +Ticker flipper_1; +DigitalOut led1(LED1); + +void flip_1() { + static int led1_state = 0; + if (led1_state) { + led1 = 0; led1_state = 0; + } else { + led1 = 1; led1_state = 1; + } + send_kv_tick(); +} + +Ticker flipper_2; +DigitalOut led2(LED2); + +void flip_2() { + static int led2_state = 0; + if (led2_state) { + led2 = 0; led2_state = 0; + } else { + led2 = 1; led2_state = 1; + } +} + +control_t test_case_ticker() { + led1 = 0; + led2 = 0; + flipper_1.attach(&flip_1, 1.0); + flipper_2.attach(&flip_2, 2.0); + return CaseTimeout(15 * 1000); +} + +// Test cases +Case cases[] = { + Case("Timers: 2 x tickers", test_case_ticker), +}; + +utest::v1::status_t greentea_test_setup(const size_t number_of_cases) { + GREENTEA_SETUP(20, "wait_us_auto"); + return greentea_test_setup_handler(number_of_cases); +} + +Specification specification(greentea_test_setup, cases, greentea_test_teardown_handler); + +int main() { + Harness::run(specification); +} diff --git a/TESTS/mbed_drivers/ticker_2/main.cpp b/TESTS/mbed_drivers/ticker_2/main.cpp new file mode 100644 index 0000000000..7fcc526d8a --- /dev/null +++ b/TESTS/mbed_drivers/ticker_2/main.cpp @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2013-2016, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "utest/utest.h" + +using namespace utest::v1; + +Ticker tick; +DigitalOut led(LED1); + +namespace { + const int MS_INTERVALS = 1000; +} + +void send_kv_tick() { + static int count = 0; + if (count < 10) { + greentea_send_kv("tick", count); + } else if (count == 10) { + Harness::validate_callback(); + } + count++; +} + +void togglePin(void) { + static int ticker_count = 0; + if (ticker_count >= MS_INTERVALS) { + send_kv_tick(); + ticker_count = 0; + led = !led; + } + ticker_count++; +} + +utest::v1::control_t test_case_ticker() { + tick.attach_us(togglePin, 1000); + return CaseTimeout(15 * 1000); +} + +// Test cases +Case cases[] = { + Case("Timers: 1x ticker", test_case_ticker), +}; + +utest::v1::status_t greentea_test_setup(const size_t number_of_cases) { + GREENTEA_SETUP(20, "wait_us_auto"); + return greentea_test_setup_handler(number_of_cases); +} + +Specification specification(greentea_test_setup, cases, greentea_test_teardown_handler); + +int main() { + Harness::run(specification); +} diff --git a/TESTS/mbed_drivers/ticker_3/main.cpp b/TESTS/mbed_drivers/ticker_3/main.cpp new file mode 100644 index 0000000000..dcb95d8127 --- /dev/null +++ b/TESTS/mbed_drivers/ticker_3/main.cpp @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2013-2016, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "utest/utest.h" + +using namespace utest::v1; + +void ticker_callback_1(void); +void ticker_callback_2(void); + +DigitalOut led0(LED1); +DigitalOut led1(LED2); +Ticker ticker; + +void send_kv_tick() { + static int count = 0; + if (count < 10) { + greentea_send_kv("tick", count); + } else if (count == 10) { + Harness::validate_callback(); + } + count++; +} + +void ticker_callback_2(void) { + ticker.detach(); + ticker.attach(ticker_callback_1, 1.0); + led1 = !led1; + send_kv_tick(); +} + +void ticker_callback_1(void) { + ticker.detach(); + ticker.attach(ticker_callback_2, 1.0); + led0 = !led0; + send_kv_tick(); +} + +utest::v1::control_t test_case_ticker() { + ticker.attach(ticker_callback_1, 1.0); + return CaseTimeout(15 * 1000); +} + +// Test cases +Case cases[] = { + Case("Timers: 2x callbacks", test_case_ticker), +}; + +utest::v1::status_t greentea_test_setup(const size_t number_of_cases) { + GREENTEA_SETUP(20, "wait_us_auto"); + return greentea_test_setup_handler(number_of_cases); +} + +Specification specification(greentea_test_setup, cases, greentea_test_teardown_handler); + +int main() { + Harness::run(specification); +} diff --git a/TESTS/mbed_drivers/timeout/main.cpp b/TESTS/mbed_drivers/timeout/main.cpp new file mode 100644 index 0000000000..1317475db4 --- /dev/null +++ b/TESTS/mbed_drivers/timeout/main.cpp @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2013-2016, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "utest/utest.h" + +using namespace utest::v1; + +Timeout timer; +DigitalOut led(LED1); + +namespace { + const int MS_INTERVALS = 1000; +} + +void send_kv_tick() { + static int count = 0; + if (count < 10) { + greentea_send_kv("tick", count); + } else if (count == 10) { + Harness::validate_callback(); + } + count++; +} + +void toggleOff(void); + +void toggleOn(void) { + static int toggle_counter = 0; + if (toggle_counter == MS_INTERVALS) { + led = !led; + send_kv_tick(); + toggle_counter = 0; + } + toggle_counter++; + timer.attach_us(toggleOff, 500); +} + +void toggleOff(void) { + timer.attach_us(toggleOn, 500); +} + +control_t test_case_ticker() { + toggleOn(); + return CaseTimeout(15 * 1000); +} + +// Test cases +Case cases[] = { + Case("Timers: toggle on/off", test_case_ticker), +}; + +utest::v1::status_t greentea_test_setup(const size_t number_of_cases) { + GREENTEA_SETUP(20, "wait_us_auto"); + return greentea_test_setup_handler(number_of_cases); +} + +Specification specification(greentea_test_setup, cases, greentea_test_teardown_handler); + +int main() { + Harness::run(specification); +} + diff --git a/TESTS/mbed_drivers/wait_us/main.cpp b/TESTS/mbed_drivers/wait_us/main.cpp new file mode 100644 index 0000000000..429f2409cb --- /dev/null +++ b/TESTS/mbed_drivers/wait_us/main.cpp @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2013-2016, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "utest/utest.h" + +using namespace utest::v1; + +DigitalOut led(LED1); + +void test_case_ticker() { + for (int i=0; i < 10; ++i) { + // 10 secs... + for (int j = 0; j < 1000; ++j) { + // 1000 * 1000us = 1 sec + wait_us(1000); + } + led = !led; // Blink + greentea_send_kv("tick", i); + } +} + +// Test cases +Case cases[] = { + Case("Timers: wait_us", test_case_ticker), +}; + +utest::v1::status_t greentea_test_setup(const size_t number_of_cases) { + GREENTEA_SETUP(20, "wait_us_auto"); + return greentea_test_setup_handler(number_of_cases); +} + +Specification specification(greentea_test_setup, cases, greentea_test_teardown_handler); + +int main() { + Harness::run(specification); +} diff --git a/TESTS/mbedmicro-mbed/attributes/attributes.c b/TESTS/mbedmicro-mbed/attributes/attributes.c new file mode 100644 index 0000000000..1130b43461 --- /dev/null +++ b/TESTS/mbedmicro-mbed/attributes/attributes.c @@ -0,0 +1,143 @@ +#include "toolchain.h" + +#include +#include + + +MBED_PACKED(struct) TestAttrPackedStruct1 { + char a; + int x; +}; + +typedef MBED_PACKED(struct) { + char a; + int x; +} TestAttrPackedStruct2; + +int testPacked() { + int failed = 0; + + if (sizeof(struct TestAttrPackedStruct1) != sizeof(int) + sizeof(char)) { + failed++; + } + + if (sizeof(TestAttrPackedStruct2) != sizeof(int) + sizeof(char)) { + failed++; + } + + return failed; +} + + +MBED_ALIGN(8) char a; +MBED_ALIGN(8) char b; +MBED_ALIGN(16) char c; +MBED_ALIGN(8) char d; +MBED_ALIGN(16) char e; + +int testAlign() { + int failed = 0; + + if(((uintptr_t)&a) & 0x7){ + failed++; + } + if(((uintptr_t)&b) & 0x7){ + failed++; + } + if(((uintptr_t)&c) & 0xf){ + failed++; + } + if(((uintptr_t)&d) & 0x7){ + failed++; + } + if(((uintptr_t)&e) & 0xf){ + failed++; + } + + return failed; +} + + +int testUnused1(MBED_UNUSED int arg) { + return 0; +} + +int testUnused() { + return testUnused1(0); +} + + +int testWeak1(); +int testWeak2(); + +MBED_WEAK int testWeak1() { + return 1; +} + +int testWeak2() { + return 0; +} + +int testWeak() { + return testWeak1() | testWeak2(); +} + + +MBED_PURE int testPure1() { + return 0; +} + +int testPure() { + return testPure1(); +} + + +MBED_FORCEINLINE int testForceInline1() { + return 0; +} + +int testForceInline() { + return testForceInline1(); +} + + +MBED_NORETURN int testNoReturn1() { + while (1) {} +} + +int testNoReturn() { + if (0) { + testNoReturn1(); + } + return 0; +} + + +int testUnreachable1(int i) { + switch (i) { + case 0: + return 0; + } + + MBED_UNREACHABLE; +} + +int testUnreachable() { + return testUnreachable1(0); +} + + +MBED_DEPRECATED("this message should not be displayed") +void testDeprecatedUnused(); +void testDeprecatedUnused() { } + +MBED_DEPRECATED("this message should be displayed") +int testDeprecatedUsed(); +int testDeprecatedUsed() { + return 0; +} + +int testDeprecated() { + return testDeprecatedUsed(); +} + diff --git a/TESTS/mbedmicro-mbed/attributes/main.cpp b/TESTS/mbedmicro-mbed/attributes/main.cpp new file mode 100644 index 0000000000..c006e904db --- /dev/null +++ b/TESTS/mbedmicro-mbed/attributes/main.cpp @@ -0,0 +1,53 @@ +#include +#include + +#include "toolchain.h" +#include "greentea-client/test_env.h" +#include "unity.h" +#include "utest.h" + +using namespace utest::v1; + + +// Test functions declared as C functions to avoid issues with name mangling +extern "C" { + int testPacked(); + int testAlign(); + int testUnused(); + int testWeak(); + int testPure(); + int testForceInline(); + int testNoReturn(); + int testUnreachable(); + int testDeprecated(); +} + + +// Test wrapper and test cases for utest +template +void test_wrapper() { + TEST_ASSERT_UNLESS(F()); +} + +utest::v1::status_t test_setup(const size_t number_of_cases) { + GREENTEA_SETUP(5, "default_auto"); + return verbose_test_setup_handler(number_of_cases); +} + +Case cases[] = { + Case("Testing PACKED attribute", test_wrapper), + Case("Testing ALIGN attribute", test_wrapper), + Case("Testing UNUSED attribute", test_wrapper), + Case("Testing WEAK attribute", test_wrapper), + Case("Testing PURE attribute", test_wrapper), + Case("Testing FORCEINLINE attribute", test_wrapper), + Case("Testing NORETURN attribute", test_wrapper), + Case("Testing UNREACHABLE attribute", test_wrapper), + Case("Testing DEPRECATED attribute", test_wrapper), +}; + +Specification specification(test_setup, cases); + +int main() { + return !Harness::run(specification); +} diff --git a/TESTS/mbedmicro-mbed/attributes/weak.c b/TESTS/mbedmicro-mbed/attributes/weak.c new file mode 100644 index 0000000000..05db78dbea --- /dev/null +++ b/TESTS/mbedmicro-mbed/attributes/weak.c @@ -0,0 +1,10 @@ +#include "toolchain.h" + +int testWeak1() { + return 0; +} + +MBED_WEAK int testWeak2() { + return 1; +} + diff --git a/TESTS/mbedmicro-mbed/call_before_main/main.cpp b/TESTS/mbedmicro-mbed/call_before_main/main.cpp new file mode 100644 index 0000000000..9a713d3f30 --- /dev/null +++ b/TESTS/mbedmicro-mbed/call_before_main/main.cpp @@ -0,0 +1,16 @@ +#include "greentea-client/test_env.h" + +namespace { + bool mbed_main_called = false; +} + +extern "C" void mbed_main() { + printf("MBED: mbed_main() call before main()\r\n"); + mbed_main_called = true; +} + +int main() { + GREENTEA_SETUP(5, "default_auto"); + printf("MBED: main() starts now!\r\n"); + GREENTEA_TESTSUITE_RESULT(mbed_main_called); +} diff --git a/TESTS/mbedmicro-mbed/cpp/main.cpp b/TESTS/mbedmicro-mbed/cpp/main.cpp new file mode 100644 index 0000000000..bfa02200ae --- /dev/null +++ b/TESTS/mbedmicro-mbed/cpp/main.cpp @@ -0,0 +1,83 @@ +#include "greentea-client/test_env.h" + +#define PATTERN_CHECK_VALUE 0xF0F0ADAD + +class Test { + +private: + const char* name; + const int pattern; + +public: + Test(const char* _name) : name(_name), pattern(PATTERN_CHECK_VALUE) { + print("init"); + } + + void print(const char *message) { + printf("%s::%s\n", name, message); + } + + bool check_init(void) { + bool result = (pattern == PATTERN_CHECK_VALUE); + print(result ? "check_init: OK" : "check_init: ERROR"); + return result; + } + + void stack_test(void) { + print("stack_test"); + Test t("Stack"); + t.hello(); + } + + void hello(void) { + print("hello"); + } + + ~Test() { + print("destroy"); + } +}; + +/* Check C++ startup initialisation */ +Test s("Static"); + +/* EXPECTED OUTPUT: +******************* +Static::init +Static::stack_test +Stack::init +Stack::hello +Stack::destroy +Static::check_init: OK +Heap::init +Heap::hello +Heap::destroy +*******************/ +int main (void) { + GREENTEA_SETUP(10, "default_auto"); + + bool result = true; + for (;;) + { + // Global stack object simple test + s.stack_test(); + if (s.check_init() == false) + { + result = false; + break; + } + + // Heap test object simple test + Test *m = new Test("Heap"); + m->hello(); + + if (m->check_init() == false) + { + result = false; + } + delete m; + break; + } + + GREENTEA_TESTSUITE_RESULT(result); +} diff --git a/TESTS/mbedmicro-mbed/div/main.cpp b/TESTS/mbedmicro-mbed/div/main.cpp new file mode 100644 index 0000000000..6658d6db15 --- /dev/null +++ b/TESTS/mbedmicro-mbed/div/main.cpp @@ -0,0 +1,41 @@ +#include // std::pair +#include "mbed.h" +#include "greentea-client/test_env.h" + +uint32_t test_64(uint64_t ticks) { + ticks >>= 3; // divide by 8 + if (ticks > 0xFFFFFFFF) { + ticks /= 3; + } else { + ticks = (ticks * 0x55555556) >> 32; // divide by 3 + } + return (uint32_t)(0xFFFFFFFF & ticks); +} + +const char *result_str(bool result) { + return result ? "[OK]" : "[FAIL]"; +} + +int main() { + GREENTEA_SETUP(5, "default_auto"); + + bool result = true; + + { // 0xFFFFFFFF * 8 = 0x7fffffff8 + std::pair values = std::make_pair(0x55555555, 0x7FFFFFFF8); + uint32_t test_ret = test_64(values.second); + bool test_res = values.first == test_ret; + result = result && test_res; + printf("64bit: 0x7FFFFFFF8: expected 0x%lX got 0x%lX ... %s\r\n", values.first, test_ret, result_str(test_res)); + } + + { // 0xFFFFFFFF * 24 = 0x17ffffffe8 + std::pair values = std::make_pair(0xFFFFFFFF, 0x17FFFFFFE8); + uint32_t test_ret = test_64(values.second); + bool test_res = values.first == test_ret; + result = result && test_res; + printf("64bit: 0x17FFFFFFE8: expected 0x%lX got 0x%lX ... %s\r\n", values.first, test_ret, result_str(test_res)); + } + + GREENTEA_TESTSUITE_RESULT(result); +} diff --git a/TESTS/mbedmicro-mbed/heap_and_stack/main.cpp b/TESTS/mbedmicro-mbed/heap_and_stack/main.cpp new file mode 100644 index 0000000000..b27f7f1f90 --- /dev/null +++ b/TESTS/mbedmicro-mbed/heap_and_stack/main.cpp @@ -0,0 +1,80 @@ +#include +#include +#include "greentea-client/test_env.h" + +static char *initial_stack_p; +static char *initial_heap_p; + +static char line[256]; +static unsigned int iterations = 0; + +void report_iterations(void) { + unsigned int tot = (0x100 * iterations)*2; + printf("\nAllocated (%d)Kb in (%u) iterations\n", tot/1024, iterations); +#if !defined(TOOLCHAIN_GCC_CR) + // EA: This causes a crash when compiling with GCC_CR??? + printf("%.2f\n", ((float)(tot)/(float)(initial_stack_p - initial_heap_p))*100.); +#endif +#ifdef TOOLCHAIN_ARM +#ifndef __MICROLIB + __heapvalid((__heapprt) fprintf, stdout, 1); +#endif +#endif +} + +void stack_test(char *latest_heap_pointer) { + char stack_line[256]; + iterations++; + + sprintf(stack_line, "\nstack pointer: %p", &stack_line[255]); + puts(stack_line); + + char *heap_pointer = (char*)malloc(0x100); + + if (heap_pointer == NULL) { + int diff = (&stack_line[255] - latest_heap_pointer); + if (diff > 0x200) { + sprintf(stack_line, "\n[WARNING] Malloc failed to allocate memory too soon. There are (0x%x) free bytes", diff); + report_iterations(); + puts(stack_line); + } else { + puts("\n[SUCCESS] Stack/Heap collision detected"); + report_iterations(); + } + return; + } else { + heap_pointer += 0x100; + sprintf(line, "heap pointer: %p", heap_pointer); + puts(line); + } + + if ((&stack_line[255]) > heap_pointer) { + stack_test(heap_pointer); + } else { + puts("\n[WARNING] The Stack/Heap collision was not detected"); + report_iterations(); + } +} + + +int main (void) { + GREENTEA_SETUP(30, "default_auto"); + + char c; + initial_stack_p = &c; + + initial_heap_p = (char*)malloc(1); + if (initial_heap_p == NULL) { + printf("Unable to malloc a single byte\n"); + GREENTEA_TESTSUITE_RESULT(false); + } + + printf("Initial stack/heap geometry:\n"); + printf(" stack pointer:V %p\n", initial_stack_p); + printf(" heap pointer :^ %p\n", initial_heap_p); + + initial_heap_p++; + stack_test(initial_heap_p); + + GREENTEA_TESTSUITE_RESULT(true); +} diff --git a/TESTS/mbedmicro-net/.mbedignore b/TESTS/mbedmicro-net/.mbedignore new file mode 100644 index 0000000000..709fc03605 --- /dev/null +++ b/TESTS/mbedmicro-net/.mbedignore @@ -0,0 +1 @@ +host_tests/* \ No newline at end of file diff --git a/TESTS/mbedmicro-net/host_tests/tcp_echo_client.py b/TESTS/mbedmicro-net/host_tests/tcp_echo_client.py new file mode 100644 index 0000000000..51a3c21c14 --- /dev/null +++ b/TESTS/mbedmicro-net/host_tests/tcp_echo_client.py @@ -0,0 +1,198 @@ +# Copyright 2015 ARM Limited, All rights reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import sys +import select +import socket +import logging +from threading import Thread +from sys import stdout +from SocketServer import BaseRequestHandler, TCPServer +from mbed_host_tests import BaseHostTest, event_callback + + +class TCPEchoClientHandler(BaseRequestHandler): + def handle(self): + """ + Handles a connection. Test starts by client(i.e. mbed) connecting to server. + This connection handler receives data and echoes back to the client util + {{end}} is received. Then it sits on recv() for client to terminate the + connection. + + Note: reason for not echoing data back after receiving {{end}} is that send + fails raising a SocketError as client closes connection. + """ + print ("HOST: TCPEchoClient_Handler: Connection received...") + while self.server.isrunning(): + try: + data = self.recv() + if not data: break + except Exception as e: + print ('HOST: TCPEchoClient_Handler recv error: %s' % str(e)) + break + + print ('HOST: TCPEchoClient_Handler: Rx: \n%s\n' % data) + + try: + # echo data back to the client + self.send(data) + except Exception as e: + print ('HOST: TCPEchoClient_Handler send error: %s' % str(e)) + break + print 'Connection finished' + + def recv(self): + """ + Try to receive until server is shutdown + """ + while self.server.isrunning(): + rl, wl, xl = select.select([self.request], [], [], 1) + if len(rl): + return self.request.recv(1024) + + def send(self, data): + """ + Try to send until server is shutdown + """ + while self.server.isrunning(): + rl, wl, xl = select.select([], [self.request], [], 1) + if len(wl): + self.request.sendall(data) + break + + +class TCPServerWrapper(TCPServer): + """ + Wrapper over TCP server to implement server initiated shutdown. + Adds a flag:= running that a request handler can check and come out of + recv loop when shutdown is called. + """ + + def __init__(self, addr, request_handler): + # hmm, TCPServer is not sub-classed from object! + if issubclass(TCPServer, object): + super(TCPServerWrapper, self).__init__(addr, request_handler) + else: + TCPServer.__init__(self, addr, request_handler) + self.running = False + + def serve_forever(self): + self.running = True + if issubclass(TCPServer, object): + super(TCPServerWrapper, self).serve_forever() + else: + TCPServer.serve_forever(self) + + def shutdown(self): + self.running = False + if issubclass(TCPServer, object): + super(TCPServerWrapper, self).shutdown() + else: + TCPServer.shutdown(self) + + def isrunning(self): + return self.running + + +class TCPEchoClientTest(BaseHostTest): + + def __init__(self): + """ + Initialise test parameters. + + :return: + """ + BaseHostTest.__init__(self) + self.SERVER_IP = None # Will be determined after knowing the target IP + self.SERVER_PORT = 0 # Let TCPServer choose an arbitrary port + self.server = None + self.server_thread = None + self.target_ip = None + + @staticmethod + def find_interface_to_target_addr(target_ip): + """ + Finds IP address of the interface through which it is connected to the target. + + :return: + """ + s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + s.connect((target_ip, 0)) # Target IP, Any port + ip = s.getsockname()[0] + s.close() + return ip + + def setup_tcp_server(self): + """ + sets up a TCP server for target to connect and send test data. + + :return: + """ + # !NOTE: There should mechanism to assert in the host test + if self.SERVER_IP is None: + self.log("setup_tcp_server() called before determining server IP!") + self.notify_complete(False) + + # Returning none will suppress host test from printing success code + self.server = TCPServerWrapper((self.SERVER_IP, self.SERVER_PORT), TCPEchoClientHandler) + ip, port = self.server.server_address + self.SERVER_PORT = port + self.server.allow_reuse_address = True + self.log("HOST: Listening for TCP connections: " + self.SERVER_IP + ":" + str(self.SERVER_PORT)) + self.server_thread = Thread(target=TCPEchoClientTest.server_thread_func, args=(self,)) + self.server_thread.start() + + @staticmethod + def server_thread_func(this): + """ + Thread function to run TCP server forever. + + :param this: + :return: + """ + this.server.serve_forever() + + @event_callback("target_ip") + def _callback_target_ip(self, key, value, timestamp): + """ + Callback to handle reception of target's IP address. + + :param key: + :param value: + :param timestamp: + :return: + """ + self.target_ip = value + self.SERVER_IP = self.find_interface_to_target_addr(self.target_ip) + self.setup_tcp_server() + + @event_callback("host_ip") + def _callback_host_ip(self, key, value, timestamp): + """ + Callback for request for host IP Addr + + """ + self.send_kv("host_ip", self.SERVER_IP) + + @event_callback("host_port") + def _callback_host_port(self, key, value, timestamp): + """ + Callback for request for host port + """ + self.send_kv("host_port", self.SERVER_PORT) + + def teardown(self): + if self.server: + self.server.shutdown() + self.server_thread.join() diff --git a/TESTS/mbedmicro-net/host_tests/udp_echo_client.py b/TESTS/mbedmicro-net/host_tests/udp_echo_client.py new file mode 100644 index 0000000000..a2882c6aa2 --- /dev/null +++ b/TESTS/mbedmicro-net/host_tests/udp_echo_client.py @@ -0,0 +1,125 @@ +""" +mbed SDK +Copyright (c) 2011-2013 ARM Limited + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + +import sys +import socket +from sys import stdout +from threading import Thread +from SocketServer import BaseRequestHandler, UDPServer +from mbed_host_tests import BaseHostTest, event_callback + + +class UDPEchoClientHandler(BaseRequestHandler): + def handle(self): + """ UDP packet handler. Echoes data back to sender's address. + """ + data, sock = self.request + print ('HOST: UDPEchoClientHandler: Rx: \n%s\n' % data) + sock.sendto(data, self.client_address) + + +class UDPEchoClientTest(BaseHostTest): + + def __init__(self): + """ + Initialise test parameters. + + :return: + """ + BaseHostTest.__init__(self) + self.SERVER_IP = None # Will be determined after knowing the target IP + self.SERVER_PORT = 0 # Let TCPServer choose an arbitrary port + self.server = None + self.server_thread = None + self.target_ip = None + + @staticmethod + def find_interface_to_target_addr(target_ip): + """ + Finds IP address of the interface through which it is connected to the target. + + :return: + """ + s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + s.connect((target_ip, 0)) # Target IP, Any port + ip = s.getsockname()[0] + s.close() + return ip + + def setup_udp_server(self): + """ + sets up a UDP server for target to connect and send test data. + + :return: + """ + # !NOTE: There should mechanism to assert in the host test + if self.SERVER_IP is None: + self.log("setup_udp_server() called before determining server IP!") + self.notify_complete(False) + + # Returning none will suppress host test from printing success code + self.server = UDPServer((self.SERVER_IP, self.SERVER_PORT), UDPEchoClientHandler) + ip, port = self.server.server_address + self.SERVER_PORT = port + self.server.allow_reuse_address = True + self.log("HOST: Listening for UDP packets: " + self.SERVER_IP + ":" + str(self.SERVER_PORT)) + self.server_thread = Thread(target=UDPEchoClientTest.server_thread_func, args=(self,)) + self.server_thread.start() + + @staticmethod + def server_thread_func(this): + """ + Thread function to run TCP server forever. + + :param this: + :return: + """ + this.server.serve_forever() + + @event_callback("target_ip") + def _callback_target_ip(self, key, value, timestamp): + """ + Callback to handle reception of target's IP address. + + :param key: + :param value: + :param timestamp: + :return: + """ + self.target_ip = value + self.SERVER_IP = self.find_interface_to_target_addr(self.target_ip) + self.setup_udp_server() + + @event_callback("host_ip") + def _callback_host_ip(self, key, value, timestamp): + """ + Callback for request for host IP Addr + + """ + self.send_kv("host_ip", self.SERVER_IP) + + @event_callback("host_port") + def _callback_host_port(self, key, value, timestamp): + """ + Callback for request for host port + """ + self.send_kv("host_port", self.SERVER_PORT) + + def teardown(self): + if self.server: + self.server.shutdown() + self.server_thread.join() diff --git a/TESTS/mbedmicro-net/nist_internet_time_service/main.cpp b/TESTS/mbedmicro-net/nist_internet_time_service/main.cpp new file mode 100644 index 0000000000..aefa9931bf --- /dev/null +++ b/TESTS/mbedmicro-net/nist_internet_time_service/main.cpp @@ -0,0 +1,61 @@ +#include "mbed.h" +#include "LWIPInterface.h" +#include "UDPSocket.h" +#include "greentea-client/test_env.h" + +namespace { + //const char *HTTP_SERVER_NAME = "utcnist.colorado.edu"; + const char *HTTP_SERVER_NAME = "pool.ntp.org"; + const int HTTP_SERVER_PORT = 123; +} + + +int main() { + GREENTEA_SETUP(20, "default_auto"); + + bool result = false; + const time_t TIME1970 = 2208988800L; + int ntp_values[12] = {0}; + + LWIPInterface eth; + //eth.init(); //Use DHCP + eth.connect(); + printf("UDP client IP Address is %s\n", eth.get_ip_address()); + + UDPSocket sock; + sock.open(ð); + + SocketAddress nist(ð, HTTP_SERVER_NAME, HTTP_SERVER_PORT); + + printf("UDP: NIST server %s address: %s on port %d\r\n", HTTP_SERVER_NAME, nist.get_ip_address(), nist.get_port()); + + memset(ntp_values, 0x00, sizeof(ntp_values)); + ntp_values[0] = '\x1b'; + + int ret_send = sock.sendto(nist, (void*)ntp_values, sizeof(ntp_values)); + printf("UDP: Sent %d Bytes to NTP server \n", ret_send); + + const int n = sock.recvfrom(&nist, (void*)ntp_values, sizeof(ntp_values)); + + printf("UDP: Recved from NTP server %d Bytes \n", n); + + if (n > 0 ) { + result = true; + + printf("UDP: Values returned by NTP server: \n"); + for (size_t i=0; i < sizeof(ntp_values) / sizeof(ntp_values[0]); ++i) { + printf("\t[%02d] 0x%X", i, ntohl(ntp_values[i])); + + if (i == 10) { + time_t timestamp = ntohl(ntp_values[i]) - TIME1970; + printf("\tNTP timestamp is %s", ctime(×tamp)); + } else { + printf("\n"); + } + } + } + + sock.close(); + eth.disconnect(); + GREENTEA_TESTSUITE_RESULT(result); +} diff --git a/TESTS/mbedmicro-net/tcp_client_echo/main.cpp b/TESTS/mbedmicro-net/tcp_client_echo/main.cpp new file mode 100644 index 0000000000..4b0e9a8afc --- /dev/null +++ b/TESTS/mbedmicro-net/tcp_client_echo/main.cpp @@ -0,0 +1,73 @@ +#include "mbed.h" +#include "LWIPInterface.h" +#include "TCPSocket.h" +#include "greentea-client/test_env.h" +#include "unity/unity.h" + + +#ifndef MBED_CFG_TCP_CLIENT_ECHO_BUFFER_SIZE +#define MBED_CFG_TCP_CLIENT_ECHO_BUFFER_SIZE 256 +#endif + +namespace { + char tx_buffer[MBED_CFG_TCP_CLIENT_ECHO_BUFFER_SIZE] = {0}; + char rx_buffer[MBED_CFG_TCP_CLIENT_ECHO_BUFFER_SIZE] = {0}; + const char ASCII_MAX = '~' - ' '; +} + +void prep_buffer(char *tx_buffer, size_t tx_size) { + for (size_t i=0; i +#include "mbed.h" +#include "LWIPInterface.h" +#include "TCPSocket.h" +#include "greentea-client/test_env.h" +#include "unity/unity.h" + +namespace { + // Test connection information + const char *HTTP_SERVER_NAME = "developer.mbed.org"; + const char *HTTP_SERVER_FILE_PATH = "/media/uploads/mbed_official/hello.txt"; + const int HTTP_SERVER_PORT = 80; +#if defined(TARGET_VK_RZ_A1H) + const int RECV_BUFFER_SIZE = 300; +#else + const int RECV_BUFFER_SIZE = 512; +#endif + // Test related data + const char *HTTP_OK_STR = "200 OK"; + const char *HTTP_HELLO_STR = "Hello world!"; + + // Test buffers + char buffer[RECV_BUFFER_SIZE] = {0}; +} + +bool find_substring(const char *first, const char *last, const char *s_first, const char *s_last) { + const char *f = std::search(first, last, s_first, s_last); + return (f != last); +} + +int main() { + GREENTEA_SETUP(20, "default_auto"); + + bool result = true; + LWIPInterface eth; + //eth.init(); //Use DHCP + eth.connect(); + printf("TCP client IP Address is %s\r\n", eth.get_ip_address()); + + TCPSocket sock(ð); + if (sock.connect(HTTP_SERVER_NAME, HTTP_SERVER_PORT) == 0) { + printf("HTTP: Connected to %s:%d\r\n", HTTP_SERVER_NAME, HTTP_SERVER_PORT); + + // We are constructing GET command like this: + // GET http://developer.mbed.org/media/uploads/mbed_official/hello.txt HTTP/1.0\n\n + strcpy(buffer, "GET http://"); + strcat(buffer, HTTP_SERVER_NAME); + strcat(buffer, HTTP_SERVER_FILE_PATH); + strcat(buffer, " HTTP/1.0\n\n"); + // Send GET command + sock.send(buffer, strlen(buffer)); + + // Server will respond with HTTP GET's success code + const int ret = sock.recv(buffer, sizeof(buffer) - 1); + buffer[ret] = '\0'; + + // Find 200 OK HTTP status in reply + bool found_200_ok = find_substring(buffer, buffer + ret, HTTP_OK_STR, HTTP_OK_STR + strlen(HTTP_OK_STR)); + // Find "Hello World!" string in reply + bool found_hello = find_substring(buffer, buffer + ret, HTTP_HELLO_STR, HTTP_HELLO_STR + strlen(HTTP_HELLO_STR)); + + TEST_ASSERT_TRUE(found_200_ok); + TEST_ASSERT_TRUE(found_hello); + + if (!found_200_ok) result = false; + if (!found_hello) result = false; + + printf("HTTP: Received %d chars from server\r\n", ret); + printf("HTTP: Received 200 OK status ... %s\r\n", found_200_ok ? "[OK]" : "[FAIL]"); + printf("HTTP: Received '%s' status ... %s\r\n", HTTP_HELLO_STR, found_hello ? "[OK]" : "[FAIL]"); + printf("HTTP: Received massage:\r\n\r\n"); + printf("%s", buffer); + } + + sock.close(); + eth.disconnect(); + GREENTEA_TESTSUITE_RESULT(result); +} diff --git a/TESTS/mbedmicro-net/udp_echo_client/main.cpp b/TESTS/mbedmicro-net/udp_echo_client/main.cpp new file mode 100644 index 0000000000..84c0b26fa8 --- /dev/null +++ b/TESTS/mbedmicro-net/udp_echo_client/main.cpp @@ -0,0 +1,70 @@ +#include "mbed.h" +#include "LWIPInterface.h" +#include "UDPSocket.h" +#include "greentea-client/test_env.h" + +#ifndef MBED_CFG_UDP_CLIENT_ECHO_BUFFER_SIZE +#define MBED_CFG_UDP_CLIENT_ECHO_BUFFER_SIZE 256 +#endif + +namespace { + char tx_buffer[MBED_CFG_UDP_CLIENT_ECHO_BUFFER_SIZE] = {0}; + char rx_buffer[MBED_CFG_UDP_CLIENT_ECHO_BUFFER_SIZE] = {0}; + const char ASCII_MAX = '~' - ' '; + const int ECHO_LOOPS = 16; +} + +void prep_buffer(char *tx_buffer, size_t tx_size) { + for (size_t i=0; i queue; + +DigitalOut myled(LED1); + +void queue_isr() { + + queue.put((uint32_t*)QUEUE_PUT_ISR_VALUE); + myled = !myled; +} + +void queue_thread(void const *argument) { + while (true) { + queue.put((uint32_t*)QUEUE_PUT_THREAD_VALUE); + Thread::wait(THREAD_DELAY); + } +} + +int main (void) { + GREENTEA_SETUP(20, "default_auto"); + + Thread thread(queue_thread, NULL, osPriorityNormal, STACK_SIZE); + Ticker ticker; + ticker.attach(queue_isr, 1.0); + int isr_puts_counter = 0; + bool result = true; + + while (true) { + osEvent evt = queue.get(); + if (evt.status != osEventMessage) { + printf("QUEUE_GET: Status(0x%02X) ... [FAIL]\r\n", evt.status); + result = false; + break; + } else { + printf("QUEUE_GET: Value(%u) ... [OK]\r\n", evt.value.v); + if (evt.value.v == QUEUE_PUT_ISR_VALUE) { + isr_puts_counter++; + } + if (isr_puts_counter >= QUEUE_SIZE) { + break; + } + } + } + + GREENTEA_TESTSUITE_RESULT(result); + return 0; +} diff --git a/TESTS/mbedmicro-rtos-mbed/mail/main.cpp b/TESTS/mbedmicro-rtos-mbed/mail/main.cpp new file mode 100644 index 0000000000..60e5117410 --- /dev/null +++ b/TESTS/mbedmicro-rtos-mbed/mail/main.cpp @@ -0,0 +1,76 @@ +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "rtos.h" + +typedef struct { + float voltage; /* AD result of measured voltage */ + float current; /* AD result of measured current */ + uint32_t counter; /* A counter value */ +} mail_t; + +#define CREATE_VOLTAGE(COUNTER) (COUNTER * 0.1) * 33 +#define CREATE_CURRENT(COUNTER) (COUNTER * 0.1) * 11 +#define QUEUE_SIZE 16 +#define QUEUE_PUT_DELAY 100 + +/* + * The stack size is defined in cmsis_os.h mainly dependent on the underlying toolchain and + * the C standard library. For GCC, ARM_STD and IAR it is defined with a size of 2048 bytes + * and for ARM_MICRO 512. Because of reduce RAM size some targets need a reduced stacksize. + */ +#if (defined(TARGET_STM32L053R8) || defined(TARGET_STM32L053C8)) && defined(TOOLCHAIN_GCC) + #define STACK_SIZE DEFAULT_STACK_SIZE/4 +#elif (defined(TARGET_STM32F030R8)) && defined(TOOLCHAIN_GCC) + #define STACK_SIZE DEFAULT_STACK_SIZE/2 +#elif (defined(TARGET_STM32F030R8)) && defined(TOOLCHAIN_IAR) + #define STACK_SIZE DEFAULT_STACK_SIZE/2 +#else + #define STACK_SIZE DEFAULT_STACK_SIZE +#endif + +Mail mail_box; + +void send_thread (void const *argument) { + static uint32_t i = 10; + while (true) { + i++; // fake data update + mail_t *mail = mail_box.alloc(); + mail->voltage = CREATE_VOLTAGE(i); + mail->current = CREATE_CURRENT(i); + mail->counter = i; + mail_box.put(mail); + Thread::wait(QUEUE_PUT_DELAY); + } +} + +int main (void) { + GREENTEA_SETUP(20, "default_auto"); + + Thread thread(send_thread, NULL, osPriorityNormal, STACK_SIZE); + bool result = true; + int result_counter = 0; + + while (true) { + osEvent evt = mail_box.get(); + if (evt.status == osEventMail) { + mail_t *mail = (mail_t*)evt.value.p; + const float expected_voltage = CREATE_VOLTAGE(mail->counter); + const float expected_current = CREATE_CURRENT(mail->counter); + // Check using macros if received values correspond to values sent via queue + bool expected_values = (expected_voltage == mail->voltage) && + (expected_current == mail->current); + result = result && expected_values; + const char *result_msg = expected_values ? "OK" : "FAIL"; + printf("%3d %.2fV %.2fA ... [%s]\r\n", mail->counter, + mail->voltage, + mail->current, + result_msg); + mail_box.free(mail); + if (result == false || ++result_counter == QUEUE_SIZE) { + break; + } + } + } + GREENTEA_TESTSUITE_RESULT(result); + return 0; +} diff --git a/TESTS/mbedmicro-rtos-mbed/mutex/main.cpp b/TESTS/mbedmicro-rtos-mbed/mutex/main.cpp new file mode 100644 index 0000000000..bbd29dec2e --- /dev/null +++ b/TESTS/mbedmicro-rtos-mbed/mutex/main.cpp @@ -0,0 +1,98 @@ +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "rtos.h" + +#define THREAD_DELAY 50 +#define SIGNALS_TO_EMIT 100 + +/* + * The stack size is defined in cmsis_os.h mainly dependent on the underlying toolchain and + * the C standard library. For GCC, ARM_STD and IAR it is defined with a size of 2048 bytes + * and for ARM_MICRO 512. Because of reduce RAM size some targets need a reduced stacksize. + */ +#if (defined(TARGET_STM32L053R8) || defined(TARGET_STM32L053C8)) && defined(TOOLCHAIN_GCC) + #define STACK_SIZE DEFAULT_STACK_SIZE/4 +#elif (defined(TARGET_STM32F030R8) || defined(TARGET_STM32F070RB)) && defined(TOOLCHAIN_GCC) + #define STACK_SIZE DEFAULT_STACK_SIZE/4 +#elif defined(TARGET_STM32F334R8) && defined(TOOLCHAIN_IAR) + #define STACK_SIZE DEFAULT_STACK_SIZE/4 +#elif defined(TARGET_STM32F030R8) && defined(TOOLCHAIN_IAR) + #define STACK_SIZE DEFAULT_STACK_SIZE/4 +#elif defined(TARGET_STM32F070RB) && defined(TOOLCHAIN_IAR) + #define STACK_SIZE DEFAULT_STACK_SIZE/2 +#elif defined(TARGET_STM32F072RB) && defined(TOOLCHAIN_IAR) + #define STACK_SIZE DEFAULT_STACK_SIZE/2 +#elif defined(TARGET_STM32F302R8) && defined(TOOLCHAIN_IAR) + #define STACK_SIZE DEFAULT_STACK_SIZE/2 +#elif defined(TARGET_STM32F303K8) && defined(TOOLCHAIN_IAR) + #define STACK_SIZE DEFAULT_STACK_SIZE/2 +#else + #define STACK_SIZE DEFAULT_STACK_SIZE +#endif + +void print_char(char c = '*') { + printf("%c", c); + fflush(stdout); +} + +Mutex stdio_mutex; +DigitalOut led(LED1); + +volatile int change_counter = 0; +volatile bool changing_counter = false; +volatile bool mutex_defect = false; + +bool manipulate_protected_zone(const int thread_delay) { + bool result = true; + + stdio_mutex.lock(); // LOCK + if (changing_counter == true) { + // 'e' stands for error. If changing_counter is true access is not exclusively + print_char('e'); + result = false; + mutex_defect = true; + } + changing_counter = true; + + // Some action on protected + led = !led; + change_counter++; + print_char('.'); + Thread::wait(thread_delay); + + changing_counter = false; + stdio_mutex.unlock(); // UNLOCK + return result; +} + +void test_thread(void const *args) { + const int thread_delay = int(args); + while (true) { + manipulate_protected_zone(thread_delay); + } +} + +int main() { + GREENTEA_SETUP(20, "default_auto"); + + const int t1_delay = THREAD_DELAY * 1; + const int t2_delay = THREAD_DELAY * 2; + const int t3_delay = THREAD_DELAY * 3; + Thread t2(test_thread, (void *)t2_delay, osPriorityNormal, STACK_SIZE); + Thread t3(test_thread, (void *)t3_delay, osPriorityNormal, STACK_SIZE); + + while (true) { + // Thread 1 action + Thread::wait(t1_delay); + manipulate_protected_zone(t1_delay); + if (change_counter >= SIGNALS_TO_EMIT or mutex_defect == true) { + t2.terminate(); + t3.terminate(); + break; + } + } + + fflush(stdout); + GREENTEA_TESTSUITE_RESULT(!mutex_defect); + return 0; +} diff --git a/TESTS/mbedmicro-rtos-mbed/queue/main.cpp b/TESTS/mbedmicro-rtos-mbed/queue/main.cpp new file mode 100644 index 0000000000..98dd5e13f6 --- /dev/null +++ b/TESTS/mbedmicro-rtos-mbed/queue/main.cpp @@ -0,0 +1,78 @@ +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "rtos.h" + +typedef struct { + float voltage; /* AD result of measured voltage */ + float current; /* AD result of measured current */ + uint32_t counter; /* A counter value */ +} message_t; + +#define CREATE_VOLTAGE(COUNTER) (COUNTER * 0.1) * 33 +#define CREATE_CURRENT(COUNTER) (COUNTER * 0.1) * 11 +#define QUEUE_SIZE 16 +#define QUEUE_PUT_DELAY 100 + +/* + * The stack size is defined in cmsis_os.h mainly dependent on the underlying toolchain and + * the C standard library. For GCC, ARM_STD and IAR it is defined with a size of 2048 bytes + * and for ARM_MICRO 512. Because of reduce RAM size some targets need a reduced stacksize. + */ +#if (defined(TARGET_STM32L053R8) || defined(TARGET_STM32L053C8)) && defined(TOOLCHAIN_GCC) + #define STACK_SIZE DEFAULT_STACK_SIZE/4 +#elif (defined(TARGET_STM32F030R8)) && defined(TOOLCHAIN_GCC) + #define STACK_SIZE DEFAULT_STACK_SIZE/4 +#elif (defined(TARGET_STM32F030R8)) && defined(TOOLCHAIN_IAR) + #define STACK_SIZE DEFAULT_STACK_SIZE/2 +#else + #define STACK_SIZE DEFAULT_STACK_SIZE +#endif + +MemoryPool mpool; +Queue queue; + +/* Send Thread */ +void send_thread (void const *argument) { + static uint32_t i = 10; + while (true) { + i++; // Fake data update + message_t *message = mpool.alloc(); + message->voltage = CREATE_VOLTAGE(i); + message->current = CREATE_CURRENT(i); + message->counter = i; + queue.put(message); + Thread::wait(QUEUE_PUT_DELAY); + } +} + +int main (void) { + GREENTEA_SETUP(20, "default_auto"); + + Thread thread(send_thread, NULL, osPriorityNormal, STACK_SIZE); + bool result = true; + int result_counter = 0; + + while (true) { + osEvent evt = queue.get(); + if (evt.status == osEventMessage) { + message_t *message = (message_t*)evt.value.p; + const float expected_voltage = CREATE_VOLTAGE(message->counter); + const float expected_current = CREATE_CURRENT(message->counter); + // Check using macros if received values correspond to values sent via queue + bool expected_values = (expected_voltage == message->voltage) && + (expected_current == message->current); + result = result && expected_values; + const char *result_msg = expected_values ? "OK" : "FAIL"; + printf("%3d %.2fV %.2fA ... [%s]\r\n", message->counter, + message->voltage, + message->current, + result_msg); + mpool.free(message); + if (result == false || ++result_counter == QUEUE_SIZE) { + break; + } + } + } + GREENTEA_TESTSUITE_RESULT(result); + return 0; +} diff --git a/TESTS/mbedmicro-rtos-mbed/semaphore/main.cpp b/TESTS/mbedmicro-rtos-mbed/semaphore/main.cpp new file mode 100644 index 0000000000..2024a0286e --- /dev/null +++ b/TESTS/mbedmicro-rtos-mbed/semaphore/main.cpp @@ -0,0 +1,88 @@ +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "rtos.h" + +#define THREAD_DELAY 75 +#define SEMAPHORE_SLOTS 2 +#define SEM_CHANGES 100 + +/* + * The stack size is defined in cmsis_os.h mainly dependent on the underlying toolchain and + * the C standard library. For GCC, ARM_STD and IAR it is defined with a size of 2048 bytes + * and for ARM_MICRO 512. Because of reduce RAM size some targets need a reduced stacksize. + */ +#if (defined(TARGET_STM32L053R8) || defined(TARGET_STM32L053C8)) && defined(TOOLCHAIN_GCC) + #define STACK_SIZE DEFAULT_STACK_SIZE/16 +#elif (defined(TARGET_STM32F030R8) || defined(TARGET_STM32F070RB)) && defined(TOOLCHAIN_GCC) + #define STACK_SIZE DEFAULT_STACK_SIZE/8 +#elif defined(TARGET_STM32F334R8) && (defined(TOOLCHAIN_GCC) || defined(TOOLCHAIN_IAR)) + #define STACK_SIZE DEFAULT_STACK_SIZE/4 +#elif defined(TARGET_STM32F103RB) && defined(TOOLCHAIN_IAR) + #define STACK_SIZE DEFAULT_STACK_SIZE/4 +#elif defined(TARGET_STM32F030R8) && defined(TOOLCHAIN_IAR) + #define STACK_SIZE DEFAULT_STACK_SIZE/4 +#elif defined(TARGET_STM32F070RB) && defined(TOOLCHAIN_IAR) + #define STACK_SIZE DEFAULT_STACK_SIZE/2 +#elif defined(TARGET_STM32F072RB) && defined(TOOLCHAIN_IAR) + #define STACK_SIZE DEFAULT_STACK_SIZE/2 +#elif defined(TARGET_STM32F302R8) && defined(TOOLCHAIN_IAR) + #define STACK_SIZE DEFAULT_STACK_SIZE/2 +#elif defined(TARGET_STM32F303K8) && defined(TOOLCHAIN_IAR) + #define STACK_SIZE DEFAULT_STACK_SIZE/4 +#else + #define STACK_SIZE DEFAULT_STACK_SIZE +#endif + +void print_char(char c = '*') { + printf("%c", c); + fflush(stdout); +} + +Semaphore two_slots(SEMAPHORE_SLOTS); + +volatile int change_counter = 0; +volatile int sem_counter = 0; +volatile bool sem_defect = false; + +void test_thread(void const *delay) { + const int thread_delay = int(delay); + while (true) { + two_slots.wait(); + sem_counter++; + const bool sem_lock_failed = sem_counter > SEMAPHORE_SLOTS; + const char msg = sem_lock_failed ? 'e' : sem_counter + '0'; + print_char(msg); + if (sem_lock_failed) { + sem_defect = true; + } + Thread::wait(thread_delay); + print_char('.'); + sem_counter--; + change_counter++; + two_slots.release(); + } +} + +int main (void) { + GREENTEA_SETUP(20, "default_auto"); + + const int t1_delay = THREAD_DELAY * 1; + const int t2_delay = THREAD_DELAY * 2; + const int t3_delay = THREAD_DELAY * 3; + Thread t1(test_thread, (void *)t1_delay, osPriorityNormal, STACK_SIZE); + Thread t2(test_thread, (void *)t2_delay, osPriorityNormal, STACK_SIZE); + Thread t3(test_thread, (void *)t3_delay, osPriorityNormal, STACK_SIZE); + + while (true) { + if (change_counter >= SEM_CHANGES or sem_defect == true) { + t1.terminate(); + t2.terminate(); + t3.terminate(); + break; + } + } + + fflush(stdout); + GREENTEA_TESTSUITE_RESULT(!sem_defect); + return 0; +} diff --git a/TESTS/mbedmicro-rtos-mbed/signals/main.cpp b/TESTS/mbedmicro-rtos-mbed/signals/main.cpp new file mode 100644 index 0000000000..866b67d0eb --- /dev/null +++ b/TESTS/mbedmicro-rtos-mbed/signals/main.cpp @@ -0,0 +1,53 @@ +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "rtos.h" + +#define SIGNAL_SET_VALUE 0x01 +const int SIGNALS_TO_EMIT = 100; +const int SIGNAL_HANDLE_DELEY = 25; + +/* + * The stack size is defined in cmsis_os.h mainly dependent on the underlying toolchain and + * the C standard library. For GCC, ARM_STD and IAR it is defined with a size of 2048 bytes + * and for ARM_MICRO 512. Because of reduce RAM size some targets need a reduced stacksize. + */ +#if defined(TARGET_STM32L053R8) || defined(TARGET_STM32L053C8) + #define STACK_SIZE DEFAULT_STACK_SIZE/4 +#elif (defined(TARGET_STM32F030R8)) && defined(TOOLCHAIN_IAR) + #define STACK_SIZE DEFAULT_STACK_SIZE/2 +#else + #define STACK_SIZE DEFAULT_STACK_SIZE +#endif + +DigitalOut led(LED1); +int signal_counter = 0; + +void led_thread(void const *argument) { + while (true) { + // Signal flags that are reported as event are automatically cleared. + Thread::signal_wait(SIGNAL_SET_VALUE); + led = !led; + signal_counter++; + } +} + +int main (void) { + GREENTEA_SETUP(20, "default_auto"); + + Thread thread(led_thread, NULL, osPriorityNormal, STACK_SIZE); + bool result = false; + + printf("Handling %d signals...\r\n", SIGNALS_TO_EMIT); + + while (true) { + Thread::wait(2 * SIGNAL_HANDLE_DELEY); + thread.signal_set(SIGNAL_SET_VALUE); + if (signal_counter == SIGNALS_TO_EMIT) { + printf("Handled %d signals\r\n", signal_counter); + result = true; + break; + } + } + GREENTEA_TESTSUITE_RESULT(result); + return 0; +} diff --git a/TESTS/mbedmicro-rtos-mbed/threads/main.cpp b/TESTS/mbedmicro-rtos-mbed/threads/main.cpp new file mode 100644 index 0000000000..d3f8acc18f --- /dev/null +++ b/TESTS/mbedmicro-rtos-mbed/threads/main.cpp @@ -0,0 +1,110 @@ +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "unity.h" +#include "utest.h" +#include "rtos.h" + + +using namespace utest::v1; + + +// Tasks with different functions to test on threads +void increment(const void *var) { + (*(int *)var)++; +} + +void increment_with_yield(const void *var) { + Thread::yield(); + (*(int *)var)++; +} + +void increment_with_wait(const void *var) { + Thread::wait(100); + (*(int *)var)++; +} + +void increment_with_child(const void *var) { + Thread child(increment, (void*)var); + child.join(); +} + +void increment_with_murder(const void *var) { + Thread child(increment_with_wait, (void*)var); + // Kill child before it can increment var + child.terminate(); + (*(int *)var)++; +} + + +// Tests that spawn tasks in different configurations +template +void test_single_thread() { + int var = 0; + Thread thread(F, &var); + thread.join(); + TEST_ASSERT_EQUAL(var, 1); +} + +template +void test_parallel_threads() { + int var = 0; + Thread *threads[N]; + + for (int i = 0; i < N; i++) { + threads[i] = new Thread(F, &var); + } + + for (int i = 0; i < N; i++) { + threads[i]->join(); + delete threads[i]; + } + + TEST_ASSERT_EQUAL(var, N); +} + +template +void test_serial_threads() { + int var = 0; + + for (int i = 0; i < N; i++) { + Thread thread(F, &var); + thread.join(); + } + + TEST_ASSERT_EQUAL(var, N); +} + + +utest::v1::status_t test_setup(const size_t number_of_cases) { + GREENTEA_SETUP(40, "default_auto"); + return verbose_test_setup_handler(number_of_cases); +} + +// Test cases +Case cases[] = { + Case("Testing single thread", test_single_thread), + Case("Testing parallel threads", test_parallel_threads<3, increment>), + Case("Testing serial threads", test_serial_threads<10, increment>), + + Case("Testing single thread with yield", test_single_thread), + Case("Testing parallel threads with yield", test_parallel_threads<3, increment_with_yield>), + Case("Testing serial threads with yield", test_serial_threads<10, increment_with_yield>), + + Case("Testing single thread with wait", test_single_thread), + Case("Testing parallel threads with wait", test_parallel_threads<3, increment_with_wait>), + Case("Testing serial threads with wait", test_serial_threads<10, increment_with_wait>), + + Case("Testing single thread with child", test_single_thread), + Case("Testing parallel threads with child", test_parallel_threads<3, increment_with_child>), + Case("Testing serial threads with child", test_serial_threads<10, increment_with_child>), + + Case("Testing single thread with murder", test_single_thread), + Case("Testing parallel threads with murder", test_parallel_threads<3, increment_with_murder>), + Case("Testing serial threads with murder", test_serial_threads<10, increment_with_murder>), +}; + +Specification specification(test_setup, cases); + +int main() { + return !Harness::run(specification); +} diff --git a/TESTS/mbedmicro-rtos-mbed/timer/main.cpp b/TESTS/mbedmicro-rtos-mbed/timer/main.cpp new file mode 100644 index 0000000000..e643333ad6 --- /dev/null +++ b/TESTS/mbedmicro-rtos-mbed/timer/main.cpp @@ -0,0 +1,34 @@ +#include "mbed.h" +#include "greentea-client/test_env.h" +#include "rtos.h" + +DigitalOut LEDs[4] = { + DigitalOut(LED1), DigitalOut(LED2), DigitalOut(LED3), DigitalOut(LED4) +}; + +void blink(void const *n) { + static int blink_counter = 0; + static int count = 0; + const int led_id = int(n); + LEDs[led_id] = !LEDs[led_id]; + if (++blink_counter == 75) { + greentea_send_kv("tick", count++); + blink_counter = 0; + } +} + +int main(void) { + GREENTEA_SETUP(15, "wait_us_auto"); + + RtosTimer led_1_timer(blink, osTimerPeriodic, (void *)0); + RtosTimer led_2_timer(blink, osTimerPeriodic, (void *)1); + RtosTimer led_3_timer(blink, osTimerPeriodic, (void *)2); + RtosTimer led_4_timer(blink, osTimerPeriodic, (void *)3); + + led_1_timer.start(200); + led_2_timer.start(100); + led_3_timer.start(50); + led_4_timer.start(25); + + Thread::wait(osWaitForever); +} diff --git a/bluetooth/ble/.gitignore b/bluetooth/ble/.gitignore deleted file mode 100644 index f7bdb36b20..0000000000 --- a/bluetooth/ble/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore the generated Doxygen output -apidoc/ diff --git a/bluetooth/ble/CHANGELOG.md b/bluetooth/ble/CHANGELOG.md deleted file mode 100644 index 03a73ff954..0000000000 --- a/bluetooth/ble/CHANGELOG.md +++ /dev/null @@ -1,393 +0,0 @@ -# Change Log - -## [v2.5.2](https://github.com/ARMmbed/ble/tree/v2.5.2) (2016-03-02) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.5.1...v2.5.2) - -**Closed issues:** - -- Infinite busy [\#69](https://github.com/ARMmbed/ble/issues/69) - -## [v2.5.1](https://github.com/ARMmbed/ble/tree/v2.5.1) (2016-01-27) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.5.0...v2.5.1) - -**Closed issues:** - -- Gap state is not updated when the advertising stop after the timeout [\#80](https://github.com/ARMmbed/ble/issues/80) -- crash on memory allocation [\#26](https://github.com/ARMmbed/ble/issues/26) - -**Merged pull requests:** - -- Change onShutdown\(obj, func\) definition [\#174](https://github.com/ARMmbed/ble/pull/174) ([andresag01](https://github.com/andresag01)) -- Invalid adv payloads are not committed before checking [\#171](https://github.com/ARMmbed/ble/pull/171) ([andresag01](https://github.com/andresag01)) -- Update Gap state in startAdvertising\(\) [\#170](https://github.com/ARMmbed/ble/pull/170) ([andresag01](https://github.com/andresag01)) -- Improve doxygen documentation: [\#169](https://github.com/ARMmbed/ble/pull/169) ([pan-](https://github.com/pan-)) -- Update Gap state after advertising times out [\#168](https://github.com/ARMmbed/ble/pull/168) ([andresag01](https://github.com/andresag01)) -- merge version 2.5.0 into master [\#163](https://github.com/ARMmbed/ble/pull/163) ([pan-](https://github.com/pan-)) -- Fix doxygen warnings for BLE API [\#162](https://github.com/ARMmbed/ble/pull/162) ([andresag01](https://github.com/andresag01)) - -## [v2.5.0](https://github.com/ARMmbed/ble/tree/v2.5.0) (2016-01-12) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.4.0...v2.5.0) - -**Merged pull requests:** - -- merge branch develop \(v2.4.0\) [\#161](https://github.com/ARMmbed/ble/pull/161) ([pan-](https://github.com/pan-)) -- Add API to get addresses of peers in bond table [\#160](https://github.com/ARMmbed/ble/pull/160) ([andresag01](https://github.com/andresag01)) - -## [v2.4.0](https://github.com/ARMmbed/ble/tree/v2.4.0) (2016-01-07) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.3.0...v2.4.0) - -**Merged pull requests:** - -- Whitelisting experimental API [\#159](https://github.com/ARMmbed/ble/pull/159) ([andresag01](https://github.com/andresag01)) - -## [v2.3.0](https://github.com/ARMmbed/ble/tree/v2.3.0) (2015-12-23) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.2.3...v2.3.0) - -**Merged pull requests:** - -- Characteristic descriptor discovery [\#105](https://github.com/ARMmbed/ble/pull/105) ([pan-](https://github.com/pan-)) - -## [v2.2.3](https://github.com/ARMmbed/ble/tree/v2.2.3) (2015-12-23) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.2.2...v2.2.3) - -**Closed issues:** - -- Two different enum list of BLE appearances [\#136](https://github.com/ARMmbed/ble/issues/136) -- Gap::updateAdvertisingPayload should work for different length of data [\#84](https://github.com/ARMmbed/ble/issues/84) - -**Merged pull requests:** - -- Hotfix for backward compatibility [\#158](https://github.com/ARMmbed/ble/pull/158) ([LiyouZhou](https://github.com/LiyouZhou)) -- Clean up code in DiscoveredCharacteristic.cpp [\#154](https://github.com/ARMmbed/ble/pull/154) ([andresag01](https://github.com/andresag01)) -- Modify functions that manipulate adv payload [\#153](https://github.com/ARMmbed/ble/pull/153) ([andresag01](https://github.com/andresag01)) - -## [v2.2.2](https://github.com/ARMmbed/ble/tree/v2.2.2) (2015-12-21) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.2.1...v2.2.2) - -**Merged pull requests:** - -- Add BLE\_ERROR\_INTERNAL\_STACK\_FAILURE error code [\#155](https://github.com/ARMmbed/ble/pull/155) ([andresag01](https://github.com/andresag01)) - -## [v2.2.1](https://github.com/ARMmbed/ble/tree/v2.2.1) (2015-12-18) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.2.0...v2.2.1) - -**Merged pull requests:** - -- Remove deprecated appearance enum from blecommon.h [\#150](https://github.com/ARMmbed/ble/pull/150) ([andresag01](https://github.com/andresag01)) - -## [v2.2.0](https://github.com/ARMmbed/ble/tree/v2.2.0) (2015-12-17) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.1.16...v2.2.0) - -**Merged pull requests:** - -- Add onShutdown to register callbacks [\#146](https://github.com/ARMmbed/ble/pull/146) ([andresag01](https://github.com/andresag01)) -- transparenly support existing applications which may have used Gap::ADDR\_TYPE\_\* [\#145](https://github.com/ARMmbed/ble/pull/145) ([rgrover](https://github.com/rgrover)) - -## [v2.1.16](https://github.com/ARMmbed/ble/tree/v2.1.16) (2015-12-16) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.1.15...v2.1.16) - -**Merged pull requests:** - -- Improve API to facilitate full shutdown procedure [\#141](https://github.com/ARMmbed/ble/pull/141) ([andresag01](https://github.com/andresag01)) - -## [v2.1.15](https://github.com/ARMmbed/ble/tree/v2.1.15) (2015-12-15) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.1.14...v2.1.15) - -**Merged pull requests:** - -- Extract Adress related types from Gap.h into BLEProtocol.h [\#142](https://github.com/ARMmbed/ble/pull/142) ([rgrover](https://github.com/rgrover)) - -## [v2.1.14](https://github.com/ARMmbed/ble/tree/v2.1.14) (2015-12-11) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.1.13...v2.1.14) - -## [v2.1.13](https://github.com/ARMmbed/ble/tree/v2.1.13) (2015-12-11) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.1.11...v2.1.13) - -**Merged pull requests:** - -- Added SecurityManager::setLinkSecurity call for elevating security settings on a particular connection. [\#140](https://github.com/ARMmbed/ble/pull/140) ([marcuschangarm](https://github.com/marcuschangarm)) - -## [v2.1.11](https://github.com/ARMmbed/ble/tree/v2.1.11) (2015-12-10) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.1.10...v2.1.11) - -## [v2.1.10](https://github.com/ARMmbed/ble/tree/v2.1.10) (2015-12-07) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.1.9...v2.1.10) - -**Merged pull requests:** - -- WIP: UUID endian change [\#128](https://github.com/ARMmbed/ble/pull/128) ([marcuschangarm](https://github.com/marcuschangarm)) - -## [v2.1.9](https://github.com/ARMmbed/ble/tree/v2.1.9) (2015-12-04) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.1.8...v2.1.9) - -**Merged pull requests:** - -- Fix documentation for advertising interval getters [\#134](https://github.com/ARMmbed/ble/pull/134) ([andresag01](https://github.com/andresag01)) -- I change the service description [\#132](https://github.com/ARMmbed/ble/pull/132) ([iriark01](https://github.com/iriark01)) -- Add a doxyfile that warns for undocumented elements [\#131](https://github.com/ARMmbed/ble/pull/131) ([bremoran](https://github.com/bremoran)) - -## [v2.1.8](https://github.com/ARMmbed/ble/tree/v2.1.8) (2015-12-03) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.1.7...v2.1.8) - -**Merged pull requests:** - -- Edit [\#130](https://github.com/ARMmbed/ble/pull/130) ([iriark01](https://github.com/iriark01)) -- Edit [\#129](https://github.com/ARMmbed/ble/pull/129) ([iriark01](https://github.com/iriark01)) - -## [v2.1.7](https://github.com/ARMmbed/ble/tree/v2.1.7) (2015-12-02) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.1.6...v2.1.7) - -## [v2.1.6](https://github.com/ARMmbed/ble/tree/v2.1.6) (2015-12-02) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.1.5...v2.1.6) - -**Closed issues:** - -- Terrible handling of initLen / minLen and variable length characteristics. [\#93](https://github.com/ARMmbed/ble/issues/93) - -**Merged pull requests:** - -- Allow GattAttributes to have variable length [\#127](https://github.com/ARMmbed/ble/pull/127) ([andresag01](https://github.com/andresag01)) - -## [v2.1.5](https://github.com/ARMmbed/ble/tree/v2.1.5) (2015-12-02) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.1.4...v2.1.5) - -**Merged pull requests:** - -- Edit [\#126](https://github.com/ARMmbed/ble/pull/126) ([iriark01](https://github.com/iriark01)) -- Edit [\#125](https://github.com/ARMmbed/ble/pull/125) ([iriark01](https://github.com/iriark01)) -- Edit [\#124](https://github.com/ARMmbed/ble/pull/124) ([iriark01](https://github.com/iriark01)) -- Edit [\#123](https://github.com/ARMmbed/ble/pull/123) ([iriark01](https://github.com/iriark01)) -- Separate the concept of minlen and len in GattAttr [\#122](https://github.com/ARMmbed/ble/pull/122) ([andresag01](https://github.com/andresag01)) -- Doxygen fixes [\#120](https://github.com/ARMmbed/ble/pull/120) ([metc](https://github.com/metc)) -- Minor edits [\#114](https://github.com/ARMmbed/ble/pull/114) ([iriark01](https://github.com/iriark01)) - -## [v2.1.4](https://github.com/ARMmbed/ble/tree/v2.1.4) (2015-11-26) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.1.3...v2.1.4) - -**Merged pull requests:** - -- Guard nordic specific implementation with \#ifdef TARGET\_NRF51822 [\#119](https://github.com/ARMmbed/ble/pull/119) ([LiyouZhou](https://github.com/LiyouZhou)) - -## [v2.1.3](https://github.com/ARMmbed/ble/tree/v2.1.3) (2015-11-26) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.1.2...v2.1.3) - -**Merged pull requests:** - -- Call bootloader\_start implicitly trough a event handler call [\#118](https://github.com/ARMmbed/ble/pull/118) ([LiyouZhou](https://github.com/LiyouZhou)) - -## [v2.1.2](https://github.com/ARMmbed/ble/tree/v2.1.2) (2015-11-26) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.1.1...v2.1.2) - -**Merged pull requests:** - -- Reintroduce old Eddystone with deprecated warnings [\#117](https://github.com/ARMmbed/ble/pull/117) ([andresag01](https://github.com/andresag01)) - -## [v2.1.1](https://github.com/ARMmbed/ble/tree/v2.1.1) (2015-11-26) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.1.0...v2.1.1) - -## [v2.1.0](https://github.com/ARMmbed/ble/tree/v2.1.0) (2015-11-26) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.0.5...v2.1.0) - -**Closed issues:** - -- All BLE event handling should happen in thread mode [\#89](https://github.com/ARMmbed/ble/issues/89) - -**Merged pull requests:** - -- First Doxygen output [\#116](https://github.com/ARMmbed/ble/pull/116) ([metc](https://github.com/metc)) -- Minor doc changes [\#113](https://github.com/ARMmbed/ble/pull/113) ([metc](https://github.com/metc)) -- Minor edits [\#112](https://github.com/ARMmbed/ble/pull/112) ([iriark01](https://github.com/iriark01)) -- Minor edits [\#111](https://github.com/ARMmbed/ble/pull/111) ([iriark01](https://github.com/iriark01)) -- Minor edits [\#110](https://github.com/ARMmbed/ble/pull/110) ([iriark01](https://github.com/iriark01)) -- Remove persistant callbacks [\#109](https://github.com/ARMmbed/ble/pull/109) ([pan-](https://github.com/pan-)) -- Changed GapAdvertisingData.addData to take current fields into account when adding data. [\#108](https://github.com/ARMmbed/ble/pull/108) ([marcuschangarm](https://github.com/marcuschangarm)) -- Remove Eddystone implementation in ble/services [\#107](https://github.com/ARMmbed/ble/pull/107) ([andresag01](https://github.com/andresag01)) - -## [v2.0.5](https://github.com/ARMmbed/ble/tree/v2.0.5) (2015-11-16) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.0.4...v2.0.5) - -**Merged pull requests:** - -- Edits - with a couple of comments [\#104](https://github.com/ARMmbed/ble/pull/104) ([iriark01](https://github.com/iriark01)) - -## [v2.0.4](https://github.com/ARMmbed/ble/tree/v2.0.4) (2015-11-13) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.0.3...v2.0.4) - -**Merged pull requests:** - -- Edits [\#102](https://github.com/ARMmbed/ble/pull/102) ([iriark01](https://github.com/iriark01)) - -## [v2.0.3](https://github.com/ARMmbed/ble/tree/v2.0.3) (2015-11-03) -[Full Changelog](https://github.com/ARMmbed/ble/compare/mbedos-release-15-11...v2.0.3) - -## [mbedos-release-15-11](https://github.com/ARMmbed/ble/tree/mbedos-release-15-11) (2015-11-03) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.0.2...mbedos-release-15-11) - -## [v2.0.2](https://github.com/ARMmbed/ble/tree/v2.0.2) (2015-11-03) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.0.1...v2.0.2) - -**Merged pull requests:** - -- BLE::init\(\) should also be able to take an \ tuple for its callback [\#97](https://github.com/ARMmbed/ble/pull/97) ([rgrover](https://github.com/rgrover)) - -## [v2.0.1](https://github.com/ARMmbed/ble/tree/v2.0.1) (2015-11-02) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v2.0.0...v2.0.1) - -**Merged pull requests:** - -- Fix beaconPeriod and defaults for voltage/temp [\#94](https://github.com/ARMmbed/ble/pull/94) ([andresag01](https://github.com/andresag01)) - -## [v2.0.0](https://github.com/ARMmbed/ble/tree/v2.0.0) (2015-11-02) -[Full Changelog](https://github.com/ARMmbed/ble/compare/mbedos-techcon-oob2...v2.0.0) - -**Closed issues:** - -- BLE::init\(\) should be non-blocking [\#90](https://github.com/ARMmbed/ble/issues/90) -- Wrong include file in HealthTermometerService.h:20:17 [\#86](https://github.com/ARMmbed/ble/issues/86) -- Return error on write request when locked [\#19](https://github.com/ARMmbed/ble/issues/19) - -**Merged pull requests:** - -- Introduced fixes to Eddystone implementation [\#92](https://github.com/ARMmbed/ble/pull/92) ([andresag01](https://github.com/andresag01)) -- BLE::init\(\) now takes in a callback paramter [\#91](https://github.com/ARMmbed/ble/pull/91) ([rgrover](https://github.com/rgrover)) -- Fixed include problem in HealthThermometer header [\#87](https://github.com/ARMmbed/ble/pull/87) ([andresag01](https://github.com/andresag01)) -- use the github url public url in module.json [\#82](https://github.com/ARMmbed/ble/pull/82) ([jrobeson](https://github.com/jrobeson)) -- Reduce the memory consumed by FunctionPointerWithContext instances [\#81](https://github.com/ARMmbed/ble/pull/81) ([pan-](https://github.com/pan-)) -- Introduced fix for defect IOTSFW-1058 [\#79](https://github.com/ARMmbed/ble/pull/79) ([andresag01](https://github.com/andresag01)) - -## [mbedos-techcon-oob2](https://github.com/ARMmbed/ble/tree/mbedos-techcon-oob2) (2015-10-19) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v1.0.0...mbedos-techcon-oob2) - -## [v1.0.0](https://github.com/ARMmbed/ble/tree/v1.0.0) (2015-10-19) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v0.4.8...v1.0.0) - -**Closed issues:** - -- add support for Eddystone [\#57](https://github.com/ARMmbed/ble/issues/57) - -**Merged pull requests:** - -- Add st-ble-shield as a possible target dependency. [\#76](https://github.com/ARMmbed/ble/pull/76) ([pan-](https://github.com/pan-)) -- Support for Environmental Service \(temperature, pressure and humidity\) [\#75](https://github.com/ARMmbed/ble/pull/75) ([crespum](https://github.com/crespum)) - -## [v0.4.8](https://github.com/ARMmbed/ble/tree/v0.4.8) (2015-09-29) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v0.4.7...v0.4.8) - -**Closed issues:** - -- ERROR: undefined reference to `createBLEInstance\(\)' [\#68](https://github.com/ARMmbed/ble/issues/68) - -**Merged pull requests:** - -- Adding Eddystone Support [\#74](https://github.com/ARMmbed/ble/pull/74) ([BlackstoneEngineering](https://github.com/BlackstoneEngineering)) -- Changed onConnection and onDisconnection to accept object/methods and… [\#72](https://github.com/ARMmbed/ble/pull/72) ([marcuschangarm](https://github.com/marcuschangarm)) -- adding an initial prototype for a yotta-config based initialization f… [\#71](https://github.com/ARMmbed/ble/pull/71) ([rgrover](https://github.com/rgrover)) -- Gap.h - Added onConnection callback chain simarly to the currently pr… [\#70](https://github.com/ARMmbed/ble/pull/70) ([marcuschangarm](https://github.com/marcuschangarm)) - -## [v0.4.7](https://github.com/ARMmbed/ble/tree/v0.4.7) (2015-08-13) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v0.4.6...v0.4.7) - -## [v0.4.6](https://github.com/ARMmbed/ble/tree/v0.4.6) (2015-08-11) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v0.4.5...v0.4.6) - -**Merged pull requests:** - -- Eddystone Service Working [\#66](https://github.com/ARMmbed/ble/pull/66) ([BlackstoneEngineering](https://github.com/BlackstoneEngineering)) - -## [v0.4.5](https://github.com/ARMmbed/ble/tree/v0.4.5) (2015-08-10) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v0.4.4...v0.4.5) - -## [v0.4.4](https://github.com/ARMmbed/ble/tree/v0.4.4) (2015-08-07) -[Full Changelog](https://github.com/ARMmbed/ble/compare/v0.4.3...v0.4.4) - -**Closed issues:** - -- GapAdvertisingData::getPayload\(\) should not return NULL if payloadLen == 0 [\#64](https://github.com/ARMmbed/ble/issues/64) -- enableActiveScanning\(\) [\#60](https://github.com/ARMmbed/ble/issues/60) -- add central role for s130 [\#58](https://github.com/ARMmbed/ble/issues/58) -- Clash With Definition and Enum Naming [\#46](https://github.com/ARMmbed/ble/issues/46) -- URIBeacon2Service Needs initial AdvertisedTxPowerLevels [\#17](https://github.com/ARMmbed/ble/issues/17) - -**Merged pull requests:** - -- Conversion from advertisement duration units to ms moved from Gap to … [\#63](https://github.com/ARMmbed/ble/pull/63) ([jslater8](https://github.com/jslater8)) -- Add a new function updateAdvertisingPayload\(\) [\#61](https://github.com/ARMmbed/ble/pull/61) ([sunsmilearm](https://github.com/sunsmilearm)) -- minor corrections to the comments [\#59](https://github.com/ARMmbed/ble/pull/59) ([ddavidebor](https://github.com/ddavidebor)) - -## [v0.4.3](https://github.com/ARMmbed/ble/tree/v0.4.3) (2015-07-22) -[Full Changelog](https://github.com/ARMmbed/ble/compare/0.4.1...v0.4.3) - -**Closed issues:** - -- add GattClient::onHVX [\#53](https://github.com/ARMmbed/ble/issues/53) -- Need some help regarding the development of BLE network simulator [\#52](https://github.com/ARMmbed/ble/issues/52) - -**Merged pull requests:** - -- expose descriptors optional arg in derived GattChar. constructors [\#56](https://github.com/ARMmbed/ble/pull/56) ([OJFord](https://github.com/OJFord)) -- Change DiscoveredCharacteristic API to return long or short UUIDs. [\#55](https://github.com/ARMmbed/ble/pull/55) ([adfernandes](https://github.com/adfernandes)) -- Refactor using new include paths [\#51](https://github.com/ARMmbed/ble/pull/51) ([rosterloh](https://github.com/rosterloh)) -- Revert "use mbed-classic as mbed dependency" [\#50](https://github.com/ARMmbed/ble/pull/50) ([rgrover](https://github.com/rgrover)) -- use mbed-classic as mbed dependency [\#45](https://github.com/ARMmbed/ble/pull/45) ([autopulated](https://github.com/autopulated)) - -## [0.4.1](https://github.com/ARMmbed/ble/tree/0.4.1) (2015-07-02) -[Full Changelog](https://github.com/ARMmbed/ble/compare/workingOldBootloader...0.4.1) - -**Closed issues:** - -- DiscoveredCharacteristic::setupOnDataRead\(\) should be GattClient::onDataRead\(\) instead [\#49](https://github.com/ARMmbed/ble/issues/49) -- CONNECTION\_TIMEOUT should be added to DisconnectionReason\_t [\#43](https://github.com/ARMmbed/ble/issues/43) -- Typo in definition of UNIT\_0\_625\_MS in Gap.h [\#40](https://github.com/ARMmbed/ble/issues/40) -- Initial value for \_requiredSecurity member of GattCharacteristic class breaks existing code [\#39](https://github.com/ARMmbed/ble/issues/39) -- Allow adding a User Description descriptor to a GattCharacteristic. [\#38](https://github.com/ARMmbed/ble/issues/38) -- The example code in GattAttribute.h does not refer to GattAttribute [\#37](https://github.com/ARMmbed/ble/issues/37) -- BLEDevice::clearAdvertisingPayload doesn't clear the scan response PDU [\#36](https://github.com/ARMmbed/ble/issues/36) - -**Merged pull requests:** - -- Added get/set methods for advertisement payload and parameters. [\#42](https://github.com/ARMmbed/ble/pull/42) ([marcuschangarm](https://github.com/marcuschangarm)) - -## [workingOldBootloader](https://github.com/ARMmbed/ble/tree/workingOldBootloader) (2015-03-02) -**Implemented enhancements:** - -- Which are the allowed values for txPower? \> BLEDevice::setTxPower\(int8\_t txPower\) [\#30](https://github.com/ARMmbed/ble/issues/30) -- Modes: UriBeacon and UriBeaconConfig [\#15](https://github.com/ARMmbed/ble/issues/15) -- URIBeacon2Service.h should be called UriBeaconConfigService.h [\#11](https://github.com/ARMmbed/ble/issues/11) -- Lock and Unlock missing from URIBeacon2Service.h [\#10](https://github.com/ARMmbed/ble/issues/10) -- Service Characteristics [\#9](https://github.com/ARMmbed/ble/issues/9) -- URIBeacon2Service.h missing TX Power Mode [\#8](https://github.com/ARMmbed/ble/issues/8) - -**Fixed bugs:** - -- URIBeacon2Service configure\(\) [\#14](https://github.com/ARMmbed/ble/issues/14) -- URIBeacon2Service.h does not reset to defaults [\#7](https://github.com/ARMmbed/ble/issues/7) -- Uri Data Length and semantics [\#6](https://github.com/ARMmbed/ble/issues/6) - -**Closed issues:** - -- Inconsistent use of uint\_16\_t and Handle\_t [\#34](https://github.com/ARMmbed/ble/issues/34) -- Incorrect documentation on void setAdvertisingType\(\)? [\#29](https://github.com/ARMmbed/ble/issues/29) -- URIBeacon2Service setTxPowerLevel should follow specification [\#16](https://github.com/ARMmbed/ble/issues/16) -- URIBeacon2Service does not advertise UriBeacon [\#13](https://github.com/ARMmbed/ble/issues/13) -- Roadmap [\#3](https://github.com/ARMmbed/ble/issues/3) -- nRF51822 advertising interval problem [\#2](https://github.com/ARMmbed/ble/issues/2) -- nRF51822 low-power operation [\#1](https://github.com/ARMmbed/ble/issues/1) - -**Merged pull requests:** - -- Added callback on characteristic reads [\#33](https://github.com/ARMmbed/ble/pull/33) ([jeremybrodt](https://github.com/jeremybrodt)) -- Updated UUID class to get length and pointer. Added UUID comparison. [\#32](https://github.com/ARMmbed/ble/pull/32) ([jeremybrodt](https://github.com/jeremybrodt)) -- Extended attribute length handling to support dynamic length. [\#31](https://github.com/ARMmbed/ble/pull/31) ([jeremybrodt](https://github.com/jeremybrodt)) -- added API for creating iBeacons [\#28](https://github.com/ARMmbed/ble/pull/28) ([BlackstoneEngineering](https://github.com/BlackstoneEngineering)) -- Uribeacon update [\#25](https://github.com/ARMmbed/ble/pull/25) ([schilit](https://github.com/schilit)) -- Fix README links [\#23](https://github.com/ARMmbed/ble/pull/23) ([shirishb](https://github.com/shirishb)) -- Added optional data and length fields to the return struct for authorize... [\#22](https://github.com/ARMmbed/ble/pull/22) ([marcuschangarm](https://github.com/marcuschangarm)) -- Chained callbacks for onDataSent [\#21](https://github.com/ARMmbed/ble/pull/21) ([marcuschangarm](https://github.com/marcuschangarm)) -- Updated Readme [\#20](https://github.com/ARMmbed/ble/pull/20) ([BlackstoneEngineering](https://github.com/BlackstoneEngineering)) -- Add getHandle for readability [\#18](https://github.com/ARMmbed/ble/pull/18) ([schilit](https://github.com/schilit)) -- make the library less dependent on the mbed.h header [\#5](https://github.com/ARMmbed/ble/pull/5) ([xiongyihui](https://github.com/xiongyihui)) -- adding initial readme with references to developer.mbed.org [\#4](https://github.com/ARMmbed/ble/pull/4) ([BlackstoneEngineering](https://github.com/BlackstoneEngineering)) - - - -\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file diff --git a/bluetooth/ble/CONTRIBUTING.md b/bluetooth/ble/CONTRIBUTING.md deleted file mode 100644 index 6ddc4304e4..0000000000 --- a/bluetooth/ble/CONTRIBUTING.md +++ /dev/null @@ -1,7 +0,0 @@ -# Hello! -We are an open source project of [ARM mbed](https://www.mbed.com). Contributions via [pull request](https://github.com/ARMmbed/ble/pulls), and [bug reports](https://github.com/ARMmbed/ble/issues) are welcome! - -Please submit your pull request to the `develop` branch of [this module](https://github.com/ARMmbed/ble/tree/develop). Commits to develop will be merge into the master branch at the time of the next release. - -# Contributor agreement -For your pull request to be accepted, we will need you to agree to our [contributor agreement](https://developer.mbed.org/contributor_agreement/) to give us the necessary rights to use and distribute your contributions. (To click through the agreement create an account on mbed.com and log in.) diff --git a/bluetooth/ble/DOXYGEN_FRONTPAGE.md b/bluetooth/ble/DOXYGEN_FRONTPAGE.md deleted file mode 100644 index f221277628..0000000000 --- a/bluetooth/ble/DOXYGEN_FRONTPAGE.md +++ /dev/null @@ -1,30 +0,0 @@ -# BLE API {#mainpage} - -The BLE module within mbed OS offers a high abstraction level for using -Bluetooth Low Energy on multiple platforms. - -This documentation describes the internal structure of the mbed -[BLE API](https://github.com/armmbed/ble). - -For getting started with BLE on mbed, check our [introduction -page](https://docs.mbed.com/docs/ble-intros/en/latest/). - -For mbed OS examples using BLE, check [this -repository](https://github.com/armmbed/ble-examples). For mbed-classic -examples, please refer to [code under mbed.org](https://developer.mbed.org/teams/Bluetooth-Low-Energy/code/). - -## Supported Services - -Currently supported reference services include: - -* [Battery](@ref BatteryService) -* [Device Firmware Update (DFU)](@ref DFUService) -* [Device Information](@ref DeviceInformationService) -* [Health Thermometer](@ref HealthThermometerService) -* [Heart Rate](@ref HeartRateService) -* [UART](@ref UARTService) -* [UriBeacon](@ref URIBeaconConfigService) -* [iBeacon](@ref iBeacon) - -The [documentation](https://docs.mbed.com/docs/ble-intros/en/latest/AdvSamples/Overview/) -contains an overview on how to create new, application-specific services. diff --git a/bluetooth/ble/README.md b/bluetooth/ble/README.md deleted file mode 100644 index 17821ec3b9..0000000000 --- a/bluetooth/ble/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# mbed Bluetooth Low Energy Stack -This is the Github repo for the `BLE_API` used by developer.mbed.org. Please see the [mbed BLE Homepage](https://developer.mbed.org/teams/Bluetooth-Low-Energy/) for all documentation, code examples and general help. - -# Supported Services -Supported GATT services and constantly being added and can be found in the [ble/services/](https://github.com/ARMmbed/ble/tree/master/ble/services) folder. - -Currently supported services include: -* Battery -* Device Firmware Update (DFU) -* Device Information -* Eddystone Configuration Service -* Health Thermometer -* Heart Rate -* Link Loss -* UART -* UriBeacon -* iBeacon - -The [documentation](https://docs.mbed.com/docs/ble-intros/en/latest/AdvSamples/Overview/) -contains an overview on how to create new, application-specific services. - -# Getting Started -The mbed BLE API is meant to be used in projects on developer.mbed.org. Please see examples and sample project files there. -A good starting point are these pages: -* [mbed BLE Homepage](https://developer.mbed.org/teams/Bluetooth-Low-Energy/) for all things BLE -* [mbed BLE Getting Started Guide](https://developer.mbed.org/forum/team-63-Bluetooth-Low-Energy-community/topic/5262/) a wonderful primer on using BLE with mbed -* [mbed BLE doc](https://docs.mbed.com/docs/ble-intros/en/latest/) for an introduction to mbed BLE -* [mbed BLE API page](https://docs.mbed.com/docs/ble-api/en/latest/api/index.html) for the Doxygen API documentation diff --git a/bluetooth/ble/apache-2.0.txt b/bluetooth/ble/apache-2.0.txt deleted file mode 100644 index 9327527edd..0000000000 --- a/bluetooth/ble/apache-2.0.txt +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2015 ARM Limited - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/bluetooth/ble/ble.doxyfile b/bluetooth/ble/ble.doxyfile deleted file mode 100644 index 007bbe2610..0000000000 --- a/bluetooth/ble/ble.doxyfile +++ /dev/null @@ -1,2418 +0,0 @@ -# Doxyfile 1.8.10 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "BLE API" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = v2 - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = "An abstraction for using Bluetooth Low Energy." - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = apidoc/ - -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = YES - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = "experimental=\n
Experimental:
This feature is marked as experimental.
\n" \ - "experimental{1}=\n
Experimental:
\1
\n" - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = h=C++ - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# If one adds a struct or class to a group and this option is enabled, then also -# any nested class or struct is added to the same group. By default this option -# is disabled and one has to add nested compounds explicitly via \ingroup. -# The default value is: NO. - -GROUP_NESTED_COMPOUNDS = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = YES - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO, these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES, upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = YES - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = YES - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = doxygen_warn.log - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING -# Note: If this tag is empty the current directory is searched. - -INPUT = - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# read by doxygen. -# -# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, -# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, -# *.vhdl, *.ucf, *.qsf, *.as and *.js. - -FILE_PATTERNS = *.h \ - *.cpp \ - *.md - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = configs \ - CONTRIBUTING.md \ - README.md - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = DOXYGEN_FRONTPAGE.md - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# compiled with the --with-libclang option. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = . - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , / - -