From 570df0640d72484788348816772693ba2182a45f Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Wed, 27 Dec 2023 16:46:20 +0100 Subject: [PATCH] board implementation cleanup implemented proper C/C++ practices other cleanup --- components/board_2432s024/board_2432s024.h | 4 +--- components/board_2432s024/board_2432s024_display.h | 11 ++++++++--- components/board_2432s024/board_2432s024_touch.h | 11 ++++++++--- main/src/main.c | 3 +-- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/components/board_2432s024/board_2432s024.h b/components/board_2432s024/board_2432s024.h index 64070f8e..226bc9a5 100644 --- a/components/board_2432s024/board_2432s024.h +++ b/components/board_2432s024/board_2432s024.h @@ -1,6 +1,4 @@ -#define NANOBAKE_BOARD_2432S024_H +#pragma once #include "board_2432s024_display.h" #include "board_2432s024_touch.h" - -#endif // NANOBAKE_BOARD_2432S024_H diff --git a/components/board_2432s024/board_2432s024_display.h b/components/board_2432s024/board_2432s024_display.h index 14aea06a..0f21a117 100644 --- a/components/board_2432s024/board_2432s024_display.h +++ b/components/board_2432s024/board_2432s024_display.h @@ -1,8 +1,13 @@ -#ifndef NANOBAKE_BOARD_2432S024_DISPLAY_H -#define NANOBAKE_BOARD_2432S024_DISPLAY_H +#pragma once #include "nb_display.h" +#ifdef __cplusplus +extern "C" { +#endif + extern NbDisplayDriver board_2432s024_create_display_driver(); -#endif //NANOBAKE_BOARD_2432S024_DISPLAY_H +#ifdef __cplusplus +} +#endif diff --git a/components/board_2432s024/board_2432s024_touch.h b/components/board_2432s024/board_2432s024_touch.h index 9c1b1b2c..df2a2320 100644 --- a/components/board_2432s024/board_2432s024_touch.h +++ b/components/board_2432s024/board_2432s024_touch.h @@ -1,8 +1,13 @@ -#ifndef NANOBAKE_BOARD_2432S024_TOUCH_H -#define NANOBAKE_BOARD_2432S024_TOUCH_H +#pragma once #include "nb_touch.h" +#ifdef __cplusplus +extern "C" { +#endif + NbTouchDriver board_2432s024_create_touch_driver(); -#endif // NANOBAKE_BOARD_2432S024_TOUCH_H +#ifdef __cplusplus +} +#endif diff --git a/main/src/main.c b/main/src/main.c index b6c96a15..c83fb486 100644 --- a/main/src/main.c +++ b/main/src/main.c @@ -1,8 +1,7 @@ #include "nanobake.h" // Hardware -#include "board_2432s024_touch.h" -#include "board_2432s024_display.h" +#include "board_2432s024.h" // Apps #include "hello_world/hello_world.h"