From 388bbfa008812cc3dc74a986b664e4f5fe5fcd99 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Sun, 31 May 2020 17:57:36 +0200 Subject: [PATCH] drivers: add generic screen wrapper around display and touch devices --- drivers/include/screen_dev.h | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 drivers/include/screen_dev.h diff --git a/drivers/include/screen_dev.h b/drivers/include/screen_dev.h new file mode 100644 index 0000000000..775c6cb7ea --- /dev/null +++ b/drivers/include/screen_dev.h @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2020 Inria + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @defgroup drivers_screen_dev Screen device generic API + * @ingroup drivers_display + * @brief Define the generic API of a screen device + * + * @see drivers_disp_dev @see drivers_touch_dev + * + * @experimental This API is experimental and in an early state - expect + * changes! + * @{ + * + * @author Alexandre Abadie + */ + +#ifndef SCREEN_DEV_H +#define SCREEN_DEV_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "disp_dev.h" + +#ifdef MODULE_TOUCH_DEV +#include "touch_dev.h" +#endif + +/** + * @brief Screen device descriptor + */ +typedef struct { + disp_dev_t *display; /**< Pointer to the display device */ +#if MODULE_TOUCH_DEV || DOXYGEN + touch_dev_t *touch; /**< Pointer to the touch device */ +#endif +} screen_dev_t; + +#ifdef __cplusplus +} +#endif + +#endif /* SCREEN_DEV_H */ +/** @} */