From a456658d40c35882fb53c4af1521e816da640bda Mon Sep 17 00:00:00 2001 From: Xavier Chapron Date: Tue, 6 Feb 2024 18:04:16 +0100 Subject: [PATCH 1/2] lib_ux_nbgl: Renaming from lib_ux_stax --- Makefile.rules | 2 +- doc/Doxyfile | 4 ++-- {lib_ux_stax => lib_ux_nbgl}/doc/mainpage.dox | 0 {lib_ux_stax => lib_ux_nbgl}/ux.c | 0 {lib_ux_stax => lib_ux_nbgl}/ux.h | 0 {lib_ux_stax => lib_ux_nbgl}/ux_loc.h | 0 unit-tests/lib_nbgl/CMakeLists.txt | 2 +- 7 files changed, 4 insertions(+), 4 deletions(-) rename {lib_ux_stax => lib_ux_nbgl}/doc/mainpage.dox (100%) rename {lib_ux_stax => lib_ux_nbgl}/ux.c (100%) rename {lib_ux_stax => lib_ux_nbgl}/ux.h (100%) rename {lib_ux_stax => lib_ux_nbgl}/ux_loc.h (100%) diff --git a/Makefile.rules b/Makefile.rules index f802e9954..a625fc23b 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -19,7 +19,7 @@ ifeq ($(USE_NBGL),0) SDK_SOURCE_PATH += lib_bagl lib_ux else - SDK_SOURCE_PATH += lib_nbgl lib_ux_stax + SDK_SOURCE_PATH += lib_nbgl lib_ux_nbgl endif define uniq = diff --git a/doc/Doxyfile b/doc/Doxyfile index 70d72d7b1..ac9121848 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -855,8 +855,8 @@ INPUT = \ lib_ux/doc \ lib_ux/include \ lib_ux/src \ - lib_ux_stax/doc \ - lib_ux_stax + lib_ux_nbgl/doc \ + lib_ux_nbgl # 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 diff --git a/lib_ux_stax/doc/mainpage.dox b/lib_ux_nbgl/doc/mainpage.dox similarity index 100% rename from lib_ux_stax/doc/mainpage.dox rename to lib_ux_nbgl/doc/mainpage.dox diff --git a/lib_ux_stax/ux.c b/lib_ux_nbgl/ux.c similarity index 100% rename from lib_ux_stax/ux.c rename to lib_ux_nbgl/ux.c diff --git a/lib_ux_stax/ux.h b/lib_ux_nbgl/ux.h similarity index 100% rename from lib_ux_stax/ux.h rename to lib_ux_nbgl/ux.h diff --git a/lib_ux_stax/ux_loc.h b/lib_ux_nbgl/ux_loc.h similarity index 100% rename from lib_ux_stax/ux_loc.h rename to lib_ux_nbgl/ux_loc.h diff --git a/unit-tests/lib_nbgl/CMakeLists.txt b/unit-tests/lib_nbgl/CMakeLists.txt index 0519e9cb8..9ab6fcd30 100644 --- a/unit-tests/lib_nbgl/CMakeLists.txt +++ b/unit-tests/lib_nbgl/CMakeLists.txt @@ -56,7 +56,7 @@ include_directories(.) include_directories(../../target/stax/include) include_directories(../../include) include_directories(../../lib_nbgl/include) -include_directories(../../lib_ux_stax) +include_directories(../../lib_ux_nbgl) add_executable(test_nbgl_fonts test_nbgl_fonts.c) add_executable(test_nbgl_obj_pool test_nbgl_obj_pool.c) From b106c7b5791e3eff0f3bcacfdb6f59c6a75bab8b Mon Sep 17 00:00:00 2001 From: Xavier Chapron Date: Tue, 6 Feb 2024 18:11:12 +0100 Subject: [PATCH 2/2] ux.h/ux_loc.h: Add redirection to avoid name collision --- include/ux.h | 26 ++++++++++++++++++++++ include/ux_loc.h | 26 ++++++++++++++++++++++ lib_ux/include/{ux.h => ux_bagl.h} | 0 lib_ux/include/{ux_loc.h => ux_loc_bagl.h} | 0 lib_ux_nbgl/{ux_loc.h => ux_loc_nbgl.h} | 0 lib_ux_nbgl/{ux.h => ux_nbgl.h} | 0 6 files changed, 52 insertions(+) create mode 100644 include/ux.h create mode 100644 include/ux_loc.h rename lib_ux/include/{ux.h => ux_bagl.h} (100%) rename lib_ux/include/{ux_loc.h => ux_loc_bagl.h} (100%) rename lib_ux_nbgl/{ux_loc.h => ux_loc_nbgl.h} (100%) rename lib_ux_nbgl/{ux.h => ux_nbgl.h} (100%) diff --git a/include/ux.h b/include/ux.h new file mode 100644 index 000000000..c927ab5a8 --- /dev/null +++ b/include/ux.h @@ -0,0 +1,26 @@ + +/***************************************************************************** + * (c) 2024 Ledger SAS. + * + * 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. + *****************************************************************************/ + +#pragma once + +#ifdef HAVE_BAGL +#include "ux_bagl.h" +#endif + +#ifdef HAVE_NBGL +#include "ux_nbgl.h" +#endif diff --git a/include/ux_loc.h b/include/ux_loc.h new file mode 100644 index 000000000..ab7d1f45a --- /dev/null +++ b/include/ux_loc.h @@ -0,0 +1,26 @@ + +/***************************************************************************** + * (c) 2024 Ledger SAS. + * + * 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. + *****************************************************************************/ + +#pragma once + +#ifdef HAVE_BAGL +#include "ux_loc_bagl.h" +#endif + +#ifdef HAVE_NBGL +#include "ux_loc_nbgl.h" +#endif diff --git a/lib_ux/include/ux.h b/lib_ux/include/ux_bagl.h similarity index 100% rename from lib_ux/include/ux.h rename to lib_ux/include/ux_bagl.h diff --git a/lib_ux/include/ux_loc.h b/lib_ux/include/ux_loc_bagl.h similarity index 100% rename from lib_ux/include/ux_loc.h rename to lib_ux/include/ux_loc_bagl.h diff --git a/lib_ux_nbgl/ux_loc.h b/lib_ux_nbgl/ux_loc_nbgl.h similarity index 100% rename from lib_ux_nbgl/ux_loc.h rename to lib_ux_nbgl/ux_loc_nbgl.h diff --git a/lib_ux_nbgl/ux.h b/lib_ux_nbgl/ux_nbgl.h similarity index 100% rename from lib_ux_nbgl/ux.h rename to lib_ux_nbgl/ux_nbgl.h