Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: mbed-TFT-example-NCS36510 mbed-Accelerometer-example-NCS36510 mbed-Accelerometer-example-NCS36510
dump.cpp
00001 /* 00002 * mbed Microcontroller Library 00003 * Copyright (c) 2006-2016 ARM Limited 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 * Simple tool (implemented as a test case) to dump cfstore contents. 00018 */ 00019 00020 /** @file dump.cpp test binary for dumping CFSTORE configuration. 00021 */ 00022 00023 #include "mbed.h" 00024 #include "cfstore_config.h" 00025 #include "cfstore_test.h" 00026 #include "cfstore_debug.h" 00027 #include "Driver_Common.h" 00028 #include "configuration_store.h" 00029 #include "utest/utest.h" 00030 #include "unity/unity.h" 00031 #include "greentea-client/test_env.h" 00032 #include "cfstore_utest.h" 00033 #ifdef YOTTA_CFG_CFSTORE_UVISOR 00034 #include "uvisor-lib/uvisor-lib.h" 00035 #endif /* YOTTA_CFG_CFSTORE_UVISOR */ 00036 00037 #include <stdio.h> 00038 #include <stdlib.h> 00039 #include <string.h> 00040 #include <assert.h> 00041 #include <inttypes.h> 00042 00043 using namespace utest::v1; 00044 00045 00046 control_t cfstore_dump_test_01_end(const size_t call_count) 00047 { 00048 int32_t ret = ARM_DRIVER_ERROR; 00049 ARM_CFSTORE_DRIVER* drv = &cfstore_driver; 00050 00051 ret = cfstore_test_dump(); 00052 if(ret < ARM_DRIVER_OK){ 00053 CFSTORE_LOG("Error: failed to dump CFSTORE contents%s", "\n"); 00054 } 00055 ret = drv->Uninitialize(); 00056 if(ret < ARM_DRIVER_OK){ 00057 CFSTORE_LOG("Error: failed to Uninitialize() CFSTORE%s", "\n"); 00058 } 00059 return CaseNext; 00060 } 00061 00062 00063 /// @cond CFSTORE_DOXYGEN_DISABLE 00064 utest::v1::status_t greentea_setup(const size_t number_of_cases) 00065 { 00066 GREENTEA_SETUP(400, "default_auto"); 00067 return greentea_test_setup_handler(number_of_cases); 00068 } 00069 00070 Case cases[] = { 00071 /* 1 2 3 4 5 6 7 */ 00072 /* 1234567890123456789012345678901234567890123456789012345678901234567890 */ 00073 Case("DUMP_test_01_start", cfstore_utest_default_start), 00074 Case("DUMP_test_01_end", cfstore_dump_test_01_end), 00075 }; 00076 00077 00078 /* Declare your test specification with a custom setup handler */ 00079 Specification specification(greentea_setup, cases); 00080 00081 int main() 00082 { 00083 return !Harness::run(specification); 00084 } 00085 /// @endcond 00086
Generated on Tue Jul 12 2022 11:02:36 by
