-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers/ili9341: provide adaption to disp_dev interface
- Loading branch information
Showing
3 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (C) 2019 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. | ||
*/ | ||
|
||
/** | ||
* @ingroup drivers_ili9341 | ||
* @{ | ||
* | ||
* @file | ||
* @brief Driver adaption to disp_dev generic interface | ||
* | ||
* @author Alexandre Abadie <alexandre.abadie@inria.fr> | ||
* @} | ||
*/ | ||
|
||
#include "ili9341.h" | ||
#include "ili9341_disp_dev.h" | ||
|
||
void _ili9341_map(disp_dev_t *dev, uint16_t x1, uint16_t x2, | ||
uint16_t y1, uint16_t y2, const uint16_t *color) | ||
{ | ||
ili9341_t *ili9341 = (ili9341_t *)dev; | ||
ili9341_pixmap(ili9341, x1, x2, y1, y2, color); | ||
} | ||
|
||
const disp_dev_driver_t ili9341_disp_dev_driver = { | ||
.map = _ili9341_map, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (C) 2019 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. | ||
*/ | ||
|
||
/** | ||
* @ingroup drivers_ili9341 | ||
* @{ | ||
* | ||
* @file | ||
* @brief Definition of the driver for the disp_dev generic interface | ||
* | ||
* @author Alexandre Abadie <alexandre.abadie@inria.fr> | ||
*/ | ||
|
||
#ifndef ILI9341_DISP_DEV_H | ||
#define ILI9341_DISP_DEV_H | ||
|
||
#include "disp_dev.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief Reference to the display device driver struct | ||
*/ | ||
extern const disp_dev_driver_t ili9341_disp_dev_driver; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* ILI9341_DISP_DEV_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters