-
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.
19941: drivers/lcd: add MCU-driven low-level parallel interface r=benpicco a=gschorcht ### Contribution description The PR extends the LCD driver by a low-level interface for MCU-driven implementations of the MCU 8080 16-/8-bit parallel interface, allowing the MCU to use special peripherals for the interface, such as the FMC for STM32 MCUs, which is significantly faster than the integrated GPIO-driven parallel interface implementation of the LCD driver. ### Testing procedure ~Once PR #19938 and PR #19939 are merged, a PRs for these board can be pushed that allow to test this PR.~ Use either PR #19943 or PR #19944 on top of this PR to test, e.g. with PR #19943: ``` BOARD=stm32f723e-disco make -j8 -C tests/drivers/st77xx flash ``` ### Issues/PRs references Co-authored-by: Gunar Schorcht <[email protected]>
- Loading branch information
Showing
12 changed files
with
558 additions
and
228 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
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
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
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
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
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,100 @@ | ||
/* | ||
* Copyright (C) 2023 Gunar Schorcht | ||
* | ||
* 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. | ||
*/ | ||
|
||
#if !DOXYGEN /* hide from documentation */ | ||
|
||
/** | ||
* @ingroup drivers_lcd | ||
* | ||
* @brief GPIO-driven low-level parallel interface implementation | ||
* | ||
* @{ | ||
* @file | ||
* @author Gunar Schorcht <[email protected]> | ||
*/ | ||
|
||
#ifndef LCD_LL_PAR_GPIO_H | ||
#define LCD_LL_PAR_GPIO_H | ||
|
||
#include <assert.h> | ||
|
||
#include "lcd.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief Initialize the GPIOs of the GPIO-driven low-level parallel interface | ||
* | ||
* @param[in] dev device descriptor | ||
*/ | ||
|
||
void lcd_ll_par_gpio_init(lcd_t *dev); | ||
|
||
/** | ||
* @brief Set the direction of the data GPIOs of the low-level parallel interface | ||
* | ||
* @param[in] dev device descriptor | ||
* @param[in] output set to output mode if true and to input mode otherwise | ||
*/ | ||
void lcd_ll_par_gpio_set_data_dir(lcd_t *dev, bool output); | ||
|
||
/** | ||
* @brief Write command using the MCU-driven low-level parallel interface | ||
* | ||
* @param[in] dev device descriptor | ||
* @param[in] cmd command | ||
* @param[in] cont operation is continued | ||
*/ | ||
void lcd_ll_par_gpio_cmd_start(lcd_t *dev, uint8_t cmd, bool cont); | ||
|
||
/** | ||
* @brief Write a byte to the GPIO-driven low-level parallel interface | ||
* | ||
* @param[in] dev device descriptor | ||
* @param[in] cont operation is continued | ||
* @param[in] out byte to be written | ||
*/ | ||
void lcd_ll_par_gpio_write_byte(lcd_t *dev, bool cont, uint8_t out); | ||
|
||
/** | ||
* @brief Write a word to the GPIO-driven low-level parallel interface | ||
* | ||
* @param[in] dev device descriptor | ||
* @param[in] cont operation is continued | ||
* @param[in] out word to be written | ||
*/ | ||
void lcd_ll_par_gpio_write_word(lcd_t *dev, bool cont, uint16_t out); | ||
|
||
/** | ||
* @brief Read a byte from the GPIO-driven low-level parallel interface | ||
* | ||
* @param[in] dev device descriptor | ||
* @param[in] cont operation is continued | ||
* | ||
* @return read byte | ||
*/ | ||
uint8_t lcd_ll_par_gpio_read_byte(lcd_t *dev, bool cont); | ||
|
||
/** | ||
* @brief Read a word from the GPIO-driven low-level parallel interface | ||
* | ||
* @param[in] dev device descriptor | ||
* @param[in] cont operation is continued | ||
* | ||
* @return read word | ||
*/ | ||
uint16_t lcd_ll_par_gpio_read_word(lcd_t *dev, bool cont); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
#endif /* LCD_LL_PAR_GPIO_H */ | ||
/** @} */ | ||
#endif /* !DOXYGEN */ |
Oops, something went wrong.