aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gdisp/STM32F429iDiscovery/gdisp_lld_STM32F429iDiscovery.c2
-rw-r--r--drivers/gdisp/STM32F429iDiscovery/ili9341.h315
-rw-r--r--drivers/gdisp/STM32F429iDiscovery/stm32_ltdc.h409
3 files changed, 1 insertions, 725 deletions
diff --git a/drivers/gdisp/STM32F429iDiscovery/gdisp_lld_STM32F429iDiscovery.c b/drivers/gdisp/STM32F429iDiscovery/gdisp_lld_STM32F429iDiscovery.c
index aae21a8e..88d50114 100644
--- a/drivers/gdisp/STM32F429iDiscovery/gdisp_lld_STM32F429iDiscovery.c
+++ b/drivers/gdisp/STM32F429iDiscovery/gdisp_lld_STM32F429iDiscovery.c
@@ -29,7 +29,7 @@ typedef struct ltdcLayerConfig {
LLDCOLOR_TYPE *frame; // Frame buffer address
coord_t width, height; // Frame size in pixels
coord_t pitch; // Line pitch, in bytes
- ltdc_pixfmt_t fmt; // Pixel format in LTDC format
+ uint16_t fmt; // Pixel format in LTDC format
// window
coord_t x, y; // Start pixel position of the virtual layer
diff --git a/drivers/gdisp/STM32F429iDiscovery/ili9341.h b/drivers/gdisp/STM32F429iDiscovery/ili9341.h
index 17ad488c..ae1620c0 100644
--- a/drivers/gdisp/STM32F429iDiscovery/ili9341.h
+++ b/drivers/gdisp/STM32F429iDiscovery/ili9341.h
@@ -94,319 +94,4 @@
#define ILI9341_IM_4LSI_1 0x6 /**< 4-line serial, mode 1.*/
#define ILI9341_IM_4LSI_2 0xE /**< 4-line serial, mode 2.*/
-// ILI9341 command params (little endian)
-
-#pragma pack(push, 1)
-
-typedef union {
- struct ILI9341ParamBits_GET_ID_INFO {
- uint8_t reserved_;
- uint8_t ID1;
- uint8_t ID2;
- uint8_t ID3;
- } bits;
- uint8_t bytes[4];
-} ILI9341Params_GET_ID_INFO;
-
-typedef union {
- struct ILI9341ParamBits_GET_STATUS {
- unsigned _reserved_1 : 5; /* D[ 4: 0] */
- unsigned tearing_mode : 1; /* D[ 5] */
- unsigned gamma_curve : 3; /* D[ 8: 6] */
- unsigned tearing : 1; /* D[ 9] */
- unsigned display : 1; /* D[10] */
- unsigned all_on : 1; /* D[11] */
- unsigned all_off : 1; /* D[12] */
- unsigned invert : 1; /* D[13] */
- unsigned _reserved_2 : 1; /* D[14] */
- unsigned vscroll : 1; /* D[15] */
- unsigned normal : 1; /* D[16] */
- unsigned sleep : 1; /* D[17] */
- unsigned partial : 1; /* D[18] */
- unsigned idle : 1; /* D[19] */
- unsigned pixel_format : 3; /* D[22:20] */
- unsigned _reserved_3 : 2; /* D[24:23] */
- unsigned hrefr_rtl_nltr : 1; /* D[25] */
- unsigned bgr_nrgb : 1; /* D[26] */
- unsigned vrefr_btt_nttb : 1; /* D[27] */
- unsigned transpose : 1; /* D[28] */
- unsigned coladr_rtl_nltr : 1; /* D[29] */
- unsigned rowadr_btt_nttb : 1; /* D[30] */
- unsigned booster : 1; /* D[31] */
- } bits;
- uint8_t bytes[4];
-} ILI9341Params_GET_STATUS;
-
-typedef union {
- struct ILI9341ParamBits_GET_PWR_MODE {
- unsigned _reserved_1 : 2; /* D[1:0] */
- unsigned display : 1; /* D[2] */
- unsigned normal : 1; /* D[3] */
- unsigned sleep : 1; /* D[4] */
- unsigned partial : 1; /* D[5] */
- unsigned idle : 1; /* D[6] */
- unsigned booster : 1; /* D[7] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_GET_PWR_MODE;
-
-typedef union {
- struct ILI9341ParamBits_GET_MADCTL {
- unsigned _reserved_1 : 2; /* D[1:0] */
- unsigned refr_rtl_nltr : 1; /* D[2] */
- unsigned bgr_nrgb : 1; /* D[3] */
- unsigned refr_btt_nttb : 1; /* D[4] */
- unsigned invert : 1; /* D[5] */
- unsigned rtl_nltr : 1; /* D[6] */
- unsigned btt_nttb : 1; /* D[7] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_GET_MADCTL;
-
-typedef union {
- struct ILI9341ParamBits_GET_PIX_FMT {
- unsigned DBI : 3; /* D[2:0] */
- unsigned _reserved_1 : 1; /* D[3] */
- unsigned DPI : 3; /* D[6:4] */
- unsigned RIM : 1; /* D[7] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_GET_PIX_FMT;
-
-typedef union {
- struct ILI9341ParamBits_GET_IMG_FMT {
- unsigned gamma_curve : 3; /* D[2:0] */
- unsigned _reserved_1 : 5; /* D[7:3] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_GET_IMG_FMT;
-
-typedef union {
- struct ILI9341ParamBits_GET_SIG_MODE {
- unsigned _reserved_1 : 2; /* D[1:0] */
- unsigned data_enable : 1; /* D[2] */
- unsigned pixel_clock : 1; /* D[3] */
- unsigned vsync : 1; /* D[4] */
- unsigned hsync : 1; /* D[5] */
- unsigned tearing_mode : 1; /* D[6] */
- unsigned tearing : 1; /* D[7] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_GET_SIG_MODE;
-
-typedef union {
- struct ILI9341ParamBits_GET_SELF_DIAG {
- unsigned _reserved_1 : 6; /* D[5:0] */
- unsigned func_err : 1; /* D[6] */
- unsigned reg_err : 1; /* D[7] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_GET_SELF_DIAG;
-
-typedef union {
- struct ILI9341ParamBits_SET_GAMMA {
- uint8_t gamma_curve; /* D[7:0] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_SET_GAMMA;
-
-typedef union {
- struct ILI9341ParamBits_SET_COL_ADDR {
- uint8_t SC_15_8; /* D[ 7: 0] */
- uint8_t SC_7_0; /* D[15: 8] */
- uint8_t EC_15_8; /* D[23:16] */
- uint8_t EC_7_0; /* D[31:24] */
- } bits;
- uint8_t bytes[4];
-} ILI9341Params_SET_COL_ADDR;
-
-typedef union {
- struct ILI9341ParamBits_SET_PAGE_ADDR {
- uint8_t SP_15_8; /* D[ 7: 0] */
- uint8_t SP_7_0; /* D[15: 8] */
- uint8_t EP_15_8; /* D[23:16] */
- uint8_t EP_7_0; /* D[31:24] */
- } bits;
- uint8_t bytes[4];
-} ILI9341Params_SET_PAGE_ADDR;
-
-typedef union {
- struct ILI9341ParamBits_SET_PARTIAL_AREA {
- uint8_t SR_15_8; /* D[ 7: 0] */
- uint8_t SR_7_0; /* D[15: 8] */
- uint8_t ER_15_8; /* D[23:16] */
- uint8_t ER_7_0; /* D[31:24] */
- } bits;
- uint8_t bytes[4];
-} ILI9341Params_SET_PARTIAL_AREA;
-
-typedef union {
- struct ILI9341ParamBits_SET_VSCROLL {
- uint8_t TFA_15_8; /* D[ 7: 0] */
- uint8_t TFA_7_0; /* D[15: 8] */
- uint8_t VSA_15_8; /* D[23:16] */
- uint8_t VSA_7_0; /* D[31:24] */
- uint8_t BFA_15_8; /* D[39:32] */
- uint8_t BFA_7_0; /* D[47:40] */
- } bits;
- uint8_t bytes[6];
-} ILI9341Params_SET_VSCROLL;
-
-typedef union {
- struct ILI9341ParamBits_CMD_TEARING_ON {
- unsigned M : 1; /* D[0] */
- unsigned _reserved_1 : 7; /* D[7:1] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_CMD_TEARING_ON;
-
-typedef union {
- struct ILI9341ParamBits_SET_MEM_ACS_CTL {
- unsigned _reserved_1 : 2; /* D[1:0] */
- unsigned MH : 1; /* D[2] */
- unsigned BGR : 1; /* D[3] */
- unsigned ML : 1; /* D[4] */
- unsigned MV : 1; /* D[5] */
- unsigned MX : 1; /* D[6] */
- unsigned MY : 1; /* D[7] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_SET_MEM_ACS_CTL;
-
-typedef union {
- struct ILI9341ParamBits_SET_VSCROLL_ADDR {
- uint8_t VSP_15_8; /* D[ 7: 0] */
- uint8_t VSP_7_0; /* D[15: 8] */
- } bits;
- uint8_t bytes[2];
-} ILI9341Params_SET_VSCROLL_ADDR;
-
-typedef union {
- struct ILI9341ParamBits_SET_PIX_FMT {
- unsigned DBI : 3; /* D[2:0] */
- unsigned _reserved_1 : 1; /* D[3] */
- unsigned DPI : 3; /* D[4:6] */
- unsigned _reserved_2 : 1; /* D[7] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_SET_PIX_FMT;
-
-typedef union {
- struct ILI9341ParamBits_SET_TEAR_SCANLINE {
- uint8_t STS_8; /* D[ 7: 0] */
- uint8_t STS_7_0; /* D[15: 8] */
- } bits;
- uint8_t bytes[4];
-} ILI9341Params_SET_TEAR_SCANLINE;
-
-typedef union {
- struct ILI9341ParamBits_GET_TEAR_SCANLINE {
- uint8_t GTS_9_8; /* D[ 7: 0] */
- uint8_t GTS_7_0; /* D[15: 8] */
- } bits;
- uint8_t bytes[2];
-} ILI9341Params_GET_TEAR_SCANLINE;
-
-typedef union {
- struct ILI9341ParamBits_SET_BRIGHTNESS {
- uint8_t DBV; /* D[7:0] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_SET_BRIGHTNESS;
-
-typedef union {
- struct ILI9341ParamBits_GET_BRIGHTNESS {
- uint8_t DBV; /* D[7:0] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_GET_BRIGHTNESS;
-
-typedef union {
- struct ILI9341ParamBits_SET_DISPLAY_CTL {
- unsigned _reserved_1 : 2; /* D[1:0] */
- unsigned BL : 1; /* D[2] */
- unsigned DD : 1; /* D[3] */
- unsigned _reserved_2 : 1; /* D[4] */
- unsigned BCTRL : 1; /* D[5] */
- unsigned _reserved_3 : 1; /* D[7:6] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_SET_DISPLAY_CTL;
-
-typedef union {
- struct ILI9341ParamBits_GET_DISPLAY_CTL {
- unsigned _reserved_1 : 2; /* D[1:0] */
- unsigned BL : 1; /* D[2] */
- unsigned DD : 1; /* D[3] */
- unsigned _reserved_2 : 1; /* D[4] */
- unsigned BCTRL : 1; /* D[5] */
- unsigned _reserved_3 : 1; /* D[7:6] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_GET_DISPLAY_CTL;
-
-typedef union {
- struct ILI9341ParamBits_SET_CABC {
- unsigned C : 2; /* D[1:0] */
- unsigned _reserved_1 : 6; /* D[7:2] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_SET_CABC;
-
-typedef union {
- struct ILI9341ParamBits_GET_CABC {
- unsigned C : 2; /* D[1:0] */
- unsigned _reserved_1 : 6; /* D[7:2] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_GET_CABC;
-
-typedef union {
- struct ILI9341ParamBits_SET_CABC_MIN {
- uint8_t CMB; /* D[7:0] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_SET_CABC_MIN;
-
-typedef union {
- struct ILI9341ParamBits_GET_CABC_MIN {
- uint8_t CMB; /* D[7:0] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_GET_CABC_MIN;
-
-#if 0 /* TODO: Extended command structs.*/
-
-typedef union {
- struct ILI9341ParamBits {
- unsigned : 1; /* D[] */
- unsigned : 1; /* D[] */
- unsigned : 1; /* D[] */
- unsigned : 1; /* D[] */
- unsigned : 1; /* D[] */
- unsigned : 1; /* D[] */
- unsigned : 1; /* D[] */
- unsigned : 1; /* D[] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_;
-
-typedef union {
- struct ILI9341ParamBits {
- unsigned : 1; /* D[] */
- unsigned : 1; /* D[] */
- unsigned : 1; /* D[] */
- unsigned : 1; /* D[] */
- unsigned : 1; /* D[] */
- unsigned : 1; /* D[] */
- unsigned : 1; /* D[] */
- unsigned : 1; /* D[] */
- } bits;
- uint8_t bytes[1];
-} ILI9341Params_;
-
-#endif /*0*/
-
-#pragma pack(pop)
-
#endif /* ILI9341_H */
diff --git a/drivers/gdisp/STM32F429iDiscovery/stm32_ltdc.h b/drivers/gdisp/STM32F429iDiscovery/stm32_ltdc.h
index dd7c94e8..866b9d89 100644
--- a/drivers/gdisp/STM32F429iDiscovery/stm32_ltdc.h
+++ b/drivers/gdisp/STM32F429iDiscovery/stm32_ltdc.h
@@ -135,417 +135,8 @@
#define LTDC_COLOR_AQUA 0xFF00FFFF
#define LTDC_COLOR_WHITE 0xFFFFFFFF
-/**/
-#define STM32_LTDC_EV_HANDLER LTDC_EV_IRQHandler
-#define STM32_LTDC_ER_HANDLER LTDC_ER_IRQHandler
-#define STM32_LTDC_EV_NUMBER LTDC_IRQn
-#define STM32_LTDC_ER_NUMBER LTDC_ER_IRQn
-#define LTDC_EV_IRQHandler Vector1A0
-#define LTDC_ER_IRQHandler Vector1A4
-
-#define STM32_LTDC_EV_IRQ_PRIORITY 11
-#define STM32_LTDC_ER_IRQ_PRIORITY 11
-#define LTDC_USE_WAIT TRUE
-#define LTDC_USE_SOFTWARE_CONVERSIONS TRUE
-
#ifndef STM32F429_439xx
#error "Currently only STM32F429xx and STM32F439xx are supported"
#endif
-/*===========================================================================*/
-/* Driver data structures and types. */
-/*===========================================================================*/
-
-/* Complex types forwarding.*/
-typedef union ltdc_coloralias_t ltdc_coloralias_t;
-typedef struct ltdc_window_t ltdc_window_t;
-typedef struct ltdc_frame_t ltdc_frame_t;
-typedef struct ltdc_laycfg_t ltdc_laycfg_t;
-typedef struct LTDCConfig LTDCConfig;
-typedef enum ltdc_state_t ltdc_state_t;
-typedef struct LTDCDriver LTDCDriver;
-
-/**
- * @name LTDC Data types
- * @{
- */
-
-/**
- * @brief LTDC generic color.
- */
-typedef uint32_t ltdc_color_t;
-
-/**
- * @brief LTDC color aliases.
- * @detail Mapped with ARGB-8888, except for luminance (L mapped onto B).
- * Padding fields prefixed with <tt>'x'</tt>, which should be clear
- * (all 0) before compression and set (all 1) after expansion.
- */
-typedef union ltdc_coloralias_t {
- struct {
- unsigned b : 8;
- unsigned g : 8;
- unsigned r : 8;
- unsigned a : 8;
- } argb8888; /**< Mapped ARGB-8888 bits.*/
- struct {
- unsigned b : 8;
- unsigned g : 8;
- unsigned r : 8;
- unsigned xa : 8;
- } rgb888; /**< Mapped RGB-888 bits.*/
- struct {
- unsigned xb : 3;
- unsigned b : 5;
- unsigned xg : 2;
- unsigned g : 6;
- unsigned xr : 3;
- unsigned r : 5;
- unsigned xa : 8;
- } rgb565; /**< Mapped RGB-565 bits.*/
- struct {
- unsigned xb : 3;
- unsigned b : 5;
- unsigned xg : 3;
- unsigned g : 5;
- unsigned xr : 3;
- unsigned r : 5;
- unsigned xa : 7;
- unsigned a : 1;
- } argb1555; /**< Mapped ARGB-1555 values.*/
- struct {
- unsigned xb : 4;
- unsigned b : 4;
- unsigned xg : 4;
- unsigned g : 4;
- unsigned xr : 4;
- unsigned r : 4;
- unsigned xa : 4;
- unsigned a : 4;
- } argb4444; /**< Mapped ARGB-4444 values.*/
- struct {
- unsigned l : 8;
- unsigned x : 16;
- unsigned xa : 8;
- } l8; /**< Mapped L-8 bits.*/
- struct {
- unsigned xl : 4;
- unsigned l : 4;
- unsigned x : 16;
- unsigned xa : 4;
- unsigned a : 4;
- } al44; /**< Mapped AL-44 bits.*/
- struct {
- unsigned l : 8;
- unsigned x : 16;
- unsigned a : 8;
- } al88; /**< Mapped AL-88 bits.*/
- ltdc_color_t aliased; /**< Aliased raw bits.*/
-} ltdc_coloralias_t;
-
-/**
- * @brief LTDC layer identifier.
- */
-typedef uint32_t ltdc_layerid_t;
-
-/**
- * @brief LTDC pixel format.
- */
-typedef uint32_t ltdc_pixfmt_t;
-
-/**
- * @brief LTDC blending factor.
- */
-typedef uint32_t ltdc_blendf_t;
-
-/**
- * @brief LTDC ISR callback.
- */
-typedef void (*ltdc_isrcb_t)(LTDCDriver *ltdcp);
-
-/**
- * @brief LTDC window specifications.
- */
-typedef struct ltdc_window_t {
- uint16_t hstart; /**< Horizontal start pixel (left).*/
- uint16_t hstop; /**< Horizontal stop pixel (right).*/
- uint16_t vstart; /**< Vertical start pixel (top).*/
- uint16_t vstop; /**< Vertical stop pixel (bottom).*/
-} ltdc_window_t;
-
-/**
- * @brief LTDC frame specifications.
- */
-typedef struct ltdc_frame_t {
- void *bufferp; /**< Frame buffer address.*/
- uint16_t width; /**< Frame width, in pixels.*/
- uint16_t height; /**< Frame height, in pixels.*/
- size_t pitch; /**< Line pitch, in bytes.*/
- ltdc_pixfmt_t fmt; /**< Pixel format.*/
-} ltdc_frame_t;
-
-/**
- * @brief LTDC configuration flags.
- */
-typedef uint8_t ltdc_flags_t;
-
-/**
- * @brief LTDC startup layer configuration.
- */
-typedef struct ltdc_laycfg_t {
- const ltdc_frame_t *frame; /**< Frame buffer specifications.*/
- const ltdc_window_t *window; /**< Window specifications.*/
- ltdc_color_t def_color; /**< Default color, ARGB-8888.*/
- uint8_t const_alpha; /**< Constant alpha factor.*/
- ltdc_color_t key_color; /**< Color key.*/
- const ltdc_color_t *pal_colors; /**< Palette colors, or @p NULL.*/
- uint16_t pal_length; /**< Palette length, or @p 0.*/
- ltdc_blendf_t blending; /**< Blending factors.*/
- ltdc_flags_t flags; /**< Layer configuration flags.*/
-} ltdc_laycfg_t;
-
-/**
- * @brief LTDC driver configuration.
- */
-typedef struct LTDCConfig {
- /* Display specifications.*/
- uint16_t screen_width; /**< Screen pixel width.*/
- uint16_t screen_height; /**< Screen pixel height.*/
- uint16_t hsync_width; /**< Horizontal sync pixel width.*/
- uint16_t vsync_height; /**< Vertical sync pixel height.*/
- uint16_t hbp_width; /**< Horizontal back porch pixel width.*/
- uint16_t vbp_height; /**< Vertical back porch pixel height.*/
- uint16_t hfp_width; /**< Horizontal front porch pixel width.*/
- uint16_t vfp_height; /**< Vertical front porch pixel height.*/
- ltdc_flags_t flags; /**< Driver configuration flags.*/
-
- /* ISR callbacks.*/
- ltdc_isrcb_t line_isr; /**< Line Interrupt ISR, or @p NULL.*/
- ltdc_isrcb_t rr_isr; /**< Register Reload ISR, or @p NULL.*/
- ltdc_isrcb_t fuerr_isr; /**< FIFO Underrun ISR, or @p NULL.*/
- ltdc_isrcb_t terr_isr; /**< Transfer Error ISR, or @p NULL.*/
-
- /* Layer and color settings.*/
- ltdc_color_t clear_color; /**< Clear screen color, RGB-888.*/
- const ltdc_laycfg_t *bg_laycfg; /**< Background layer specs, or @p NULL.*/
- const ltdc_laycfg_t *fg_laycfg; /**< Foreground layer specs, or @p NULL.*/
-} LTDCConfig;
-
-/*===========================================================================*/
-/* Driver macros. */
-/*===========================================================================*/
-
-/**
- * @brief Makes an ARGB-8888 value from byte components.
- *
- * @param[in] a alpha byte component
- * @param[in] r red byte component
- * @param[in] g green byte component
- * @param[in] b blue byte component
- *
- * @return color in ARGB-8888 format
- *
- * @api
- */
-#define ltdcMakeARGB8888(a, r, g, b) \
- ((((ltdc_color_t)(a) & 0xFF) << 24) | \
- (((ltdc_color_t)(r) & 0xFF) << 16) | \
- (((ltdc_color_t)(g) & 0xFF) << 8) | \
- (((ltdc_color_t)(b) & 0xFF) << 0))
-
-/**
- * @brief Compute bytes per pixel.
- * @details Computes the bytes per pixel for the specified pixel format.
- * Rounds to the ceiling.
- *
- * @param[in] fmt pixel format
- *
- * @return bytes per pixel
- *
- * @api
- */
-#define ltdcBytesPerPixel(fmt) \
- ((ltdcBitsPerPixel(fmt) + 7) >> 3)
-
-/*===========================================================================*/
-/* External declarations. */
-/*===========================================================================*/
-
- /* Global methods.*/
- ltdc_flags_t ltdcGetEnableFlagsI(LTDCDriver *ltdcp);
- ltdc_flags_t ltdcGetEnableFlags(LTDCDriver *ltdcp);
- void ltdcSetEnableFlagsI(LTDCDriver *ltdcp, ltdc_flags_t flags);
- void ltdcSetEnableFlags(LTDCDriver *ltdcp, ltdc_flags_t flags);
- bool_t ltdcIsReloadingI(LTDCDriver *ltdcp);
- bool_t ltdcIsReloading(LTDCDriver *ltdcp);
- void ltdcStartReloadI(LTDCDriver *ltdcp, bool_t immediately);
- void ltdcStartReload(LTDCDriver *ltdcp, bool_t immediately);
- void ltdcReloadS(LTDCDriver *ltdcp, bool_t immediately);
- void ltdcReload(LTDCDriver *ltdcp, bool_t immediately);
- bool_t ltdcIsDitheringEnabledI(LTDCDriver *ltdcp);
- bool_t ltdcIsDitheringEnabled(LTDCDriver *ltdcp);
- void ltdcEnableDitheringI(LTDCDriver *ltdcp);
- void ltdcEnableDithering(LTDCDriver *ltdcp);
- void ltdcDisableDitheringI(LTDCDriver *ltdcp);
- void ltdcDisableDithering(LTDCDriver *ltdcp);
- ltdc_color_t ltdcGetClearColorI(LTDCDriver *ltdcp);
- ltdc_color_t ltdcGetClearColor(LTDCDriver *ltdcp);
- void ltdcSetClearColorI(LTDCDriver *ltdcp, ltdc_color_t c);
- void ltdcSetClearColor(LTDCDriver *ltdcp, ltdc_color_t c);
- uint16_t ltdcGetLineInterruptPosI(LTDCDriver *ltdcp);
- uint16_t ltdcGetLineInterruptPos(LTDCDriver *ltdcp);
- void ltdcSetLineInterruptPosI(LTDCDriver *ltdcp, uint16_t line);
- void ltdcSetLineInterruptPos(LTDCDriver *ltdcp, uint16_t line);
- bool_t ltdcIsLineInterruptEnabledI(LTDCDriver *ltdcp);
- bool_t ltdcIsLineInterruptEnabled(LTDCDriver *ltdcp);
- void ltdcEnableLineInterruptI(LTDCDriver *ltdcp);
- void ltdcEnableLineInterrupt(LTDCDriver *ltdcp);
- void ltdcDisableLineInterruptI(LTDCDriver *ltdcp);
- void ltdcDisableLineInterrupt(LTDCDriver *ltdcp);
- void ltdcGetCurrentPosI(LTDCDriver *ltdcp, uint16_t *xp, uint16_t *yp);
- void ltdcGetCurrentPos(LTDCDriver *ltdcp, uint16_t *xp, uint16_t *yp);
-
- /* Background layer methods.*/
- ltdc_flags_t ltdcBgGetEnableFlagsI(LTDCDriver *ltdcp);
- ltdc_flags_t ltdcBgGetEnableFlags(LTDCDriver *ltdcp);
- void ltdcBgSetEnableFlagsI(LTDCDriver *ltdcp, ltdc_flags_t flags);
- void ltdcBgSetEnableFlags(LTDCDriver *ltdcp, ltdc_flags_t flags);
- bool_t ltdcBgIsEnabledI(LTDCDriver *ltdcp);
- bool_t ltdcBgIsEnabled(LTDCDriver *ltdcp);
- void ltdcBgEnableI(LTDCDriver *ltdcp);
- void ltdcBgEnable(LTDCDriver *ltdcp);
- void ltdcBgDisableI(LTDCDriver *ltdcp);
- void ltdcBgDisable(LTDCDriver *ltdcp);
- bool_t ltdcBgIsPaletteEnabledI(LTDCDriver *ltdcp);
- bool_t ltdcBgIsPaletteEnabled(LTDCDriver *ltdcp);
- void ltdcBgEnablePaletteI(LTDCDriver *ltdcp);
- void ltdcBgEnablePalette(LTDCDriver *ltdcp);
- void ltdcBgDisablePaletteI(LTDCDriver *ltdcp);
- void ltdcBgDisablePalette(LTDCDriver *ltdcp);
- void ltdcBgSetPaletteColorI(LTDCDriver *ltdcp, uint8_t slot, ltdc_color_t c);
- void ltdcBgSetPaletteColor(LTDCDriver *ltdcp, uint8_t slot, ltdc_color_t c);
- void ltdcBgSetPaletteI(LTDCDriver *ltdcp, const ltdc_color_t colors[],
- uint16_t length);
- void ltdcBgSetPalette(LTDCDriver *ltdcp, const ltdc_color_t colors[],
- uint16_t length);
- ltdc_pixfmt_t ltdcBgGetPixelFormatI(LTDCDriver *ltdcp);
- ltdc_pixfmt_t ltdcBgGetPixelFormat(LTDCDriver *ltdcp);
- void ltdcBgSetPixelFormatI(LTDCDriver *ltdcp, ltdc_pixfmt_t fmt);
- void ltdcBgSetPixelFormat(LTDCDriver *ltdcp, ltdc_pixfmt_t fmt);
- bool_t ltdcBgIsKeyingEnabledI(LTDCDriver *ltdcp);
- bool_t ltdcBgIsKeyingEnabled(LTDCDriver *ltdcp);
- void ltdcBgEnableKeyingI(LTDCDriver *ltdcp);
- void ltdcBgEnableKeying(LTDCDriver *ltdcp);
- void ltdcBgDisableKeyingI(LTDCDriver *ltdcp);
- void ltdcBgDisableKeying(LTDCDriver *ltdcp);
- ltdc_color_t ltdcBgGetKeyingColorI(LTDCDriver *ltdcp);
- ltdc_color_t ltdcBgGetKeyingColor(LTDCDriver *ltdcp);
- void ltdcBgSetKeyingColorI(LTDCDriver *ltdcp, ltdc_color_t c);
- void ltdcBgSetKeyingColor(LTDCDriver *ltdcp, ltdc_color_t c);
- uint8_t ltdcBgGetConstantAlphaI(LTDCDriver *ltdcp);
- uint8_t ltdcBgGetConstantAlpha(LTDCDriver *ltdcp);
- void ltdcBgSetConstantAlphaI(LTDCDriver *ltdcp, uint8_t a);
- void ltdcBgSetConstantAlpha(LTDCDriver *ltdcp, uint8_t a);
- ltdc_color_t ltdcBgGetDefaultColorI(LTDCDriver *ltdcp);
- ltdc_color_t ltdcBgGetDefaultColor(LTDCDriver *ltdcp);
- void ltdcBgSetDefaultColorI(LTDCDriver *ltdcp, ltdc_color_t c);
- void ltdcBgSetDefaultColor(LTDCDriver *ltdcp, ltdc_color_t c);
- ltdc_blendf_t ltdcBgGetBlendingFactorsI(LTDCDriver *ltdcp);
- ltdc_blendf_t ltdcBgGetBlendingFactors(LTDCDriver *ltdcp);
- void ltdcBgSetBlendingFactorsI(LTDCDriver *ltdcp, ltdc_blendf_t bf);
- void ltdcBgSetBlendingFactors(LTDCDriver *ltdcp, ltdc_blendf_t bf);
- void ltdcBgGetWindowI(LTDCDriver *ltdcp, ltdc_window_t *windowp);
- void ltdcBgGetWindow(LTDCDriver *ltdcp, ltdc_window_t *windowp);
- void ltdcBgSetWindowI(LTDCDriver *ltdcp, const ltdc_window_t *windowp);
- void ltdcBgSetWindow(LTDCDriver *ltdcp, const ltdc_window_t *windowp);
- void ltdcBgSetInvalidWindowI(LTDCDriver *ltdcp);
- void ltdcBgSetInvalidWindow(LTDCDriver *ltdcp);
- void ltdcBgGetFrameI(LTDCDriver *ltdcp, ltdc_frame_t *framep);
- void ltdcBgGetFrame(LTDCDriver *ltdcp, ltdc_frame_t *framep);
- void ltdcBgSetFrameI(LTDCDriver *ltdcp, const ltdc_frame_t *framep);
- void ltdcBgSetFrame(LTDCDriver *ltdcp, const ltdc_frame_t *framep);
- void *ltdcBgGetFrameAddressI(LTDCDriver *ltdcp);
- void *ltdcBgGetFrameAddress(LTDCDriver *ltdcp);
- void ltdcBgSetFrameAddressI(LTDCDriver *ltdcp, void *bufferp);
- void ltdcBgSetFrameAddress(LTDCDriver *ltdcp, void *bufferp);
- void ltdcBgGetLayerI(LTDCDriver *ltdcp, ltdc_laycfg_t *cfgp);
- void ltdcBgGetLayer(LTDCDriver *ltdcp, ltdc_laycfg_t *cfgp);
- void ltdcBgSetConfigI(LTDCDriver *ltdcp, const ltdc_laycfg_t *cfgp);
- void ltdcBgSetConfig(LTDCDriver *ltdcp, const ltdc_laycfg_t *cfgp);
-
- /* Foreground layer methods.*/
- ltdc_flags_t ltdcFgGetEnableFlagsI(LTDCDriver *ltdcp);
- ltdc_flags_t ltdcFgGetEnableFlags(LTDCDriver *ltdcp);
- void ltdcFgSetEnableFlagsI(LTDCDriver *ltdcp, ltdc_flags_t flags);
- void ltdcFgSetEnableFlags(LTDCDriver *ltdcp, ltdc_flags_t flags);
- bool_t ltdcFgIsEnabledI(LTDCDriver *ltdcp);
- bool_t ltdcFgIsEnabled(LTDCDriver *ltdcp);
- void ltdcFgEnableI(LTDCDriver *ltdcp);
- void ltdcFgEnable(LTDCDriver *ltdcp);
- void ltdcFgDisableI(LTDCDriver *ltdcp);
- void ltdcFgDisable(LTDCDriver *ltdcp);
- bool_t ltdcFgIsPaletteEnabledI(LTDCDriver *ltdcp);
- bool_t ltdcFgIsPaletteEnabled(LTDCDriver *ltdcp);
- void ltdcFgEnablePaletteI(LTDCDriver *ltdcp);
- void ltdcFgEnablePalette(LTDCDriver *ltdcp);
- void ltdcFgDisablePaletteI(LTDCDriver *ltdcp);
- void ltdcFgDisablePalette(LTDCDriver *ltdcp);
- void ltdcFgSetPaletteColorI(LTDCDriver *ltdcp, uint8_t slot, ltdc_color_t c);
- void ltdcFgSetPaletteColor(LTDCDriver *ltdcp, uint8_t slot, ltdc_color_t c);
- void ltdcFgSetPaletteI(LTDCDriver *ltdcp, const ltdc_color_t colors[],
- uint16_t length);
- void ltdcFgSetPalette(LTDCDriver *ltdcp, const ltdc_color_t colors[],
- uint16_t length);
- ltdc_pixfmt_t ltdcFgGetPixelFormatI(LTDCDriver *ltdcp);
- ltdc_pixfmt_t ltdcFgGetPixelFormat(LTDCDriver *ltdcp);
- void ltdcFgSetPixelFormatI(LTDCDriver *ltdcp, ltdc_pixfmt_t fmt);
- void ltdcFgSetPixelFormat(LTDCDriver *ltdcp, ltdc_pixfmt_t fmt);
- bool_t ltdcFgIsKeyingEnabledI(LTDCDriver *ltdcp);
- bool_t ltdcFgIsKeyingEnabled(LTDCDriver *ltdcp);
- void ltdcFgEnableKeyingI(LTDCDriver *ltdcp);
- void ltdcFgEnableKeying(LTDCDriver *ltdcp);
- void ltdcFgDisableKeyingI(LTDCDriver *ltdcp);
- void ltdcFgDisableKeying(LTDCDriver *ltdcp);
- ltdc_color_t ltdcFgGetKeyingColorI(LTDCDriver *ltdcp);
- ltdc_color_t ltdcFgGetKeyingColor(LTDCDriver *ltdcp);
- void ltdcFgSetKeyingColorI(LTDCDriver *ltdcp, ltdc_color_t c);
- void ltdcFgSetKeyingColor(LTDCDriver *ltdcp, ltdc_color_t c);
- uint8_t ltdcFgGetConstantAlphaI(LTDCDriver *ltdcp);
- uint8_t ltdcFgGetConstantAlpha(LTDCDriver *ltdcp);
- void ltdcFgSetConstantAlphaI(LTDCDriver *ltdcp, uint8_t a);
- void ltdcFgSetConstantAlpha(LTDCDriver *ltdcp, uint8_t a);
- ltdc_color_t ltdcFgGetDefaultColorI(LTDCDriver *ltdcp);
- ltdc_color_t ltdcFgGetDefaultColor(LTDCDriver *ltdcp);
- void ltdcFgSetDefaultColorI(LTDCDriver *ltdcp, ltdc_color_t c);
- void ltdcFgSetDefaultColor(LTDCDriver *ltdcp, ltdc_color_t c);
- ltdc_blendf_t ltdcFgGetBlendingFactorsI(LTDCDriver *ltdcp);
- ltdc_blendf_t ltdcFgGetBlendingFactors(LTDCDriver *ltdcp);
- void ltdcFgSetBlendingFactorsI(LTDCDriver *ltdcp, ltdc_blendf_t bf);
- void ltdcFgSetBlendingFactors(LTDCDriver *ltdcp, ltdc_blendf_t bf);
- void ltdcFgGetWindowI(LTDCDriver *ltdcp, ltdc_window_t *windowp);
- void ltdcFgGetWindow(LTDCDriver *ltdcp, ltdc_window_t *windowp);
- void ltdcFgSetWindowI(LTDCDriver *ltdcp, const ltdc_window_t *windowp);
- void ltdcFgSetWindow(LTDCDriver *ltdcp, const ltdc_window_t *windowp);
- void ltdcFgSetInvalidWindowI(LTDCDriver *ltdcp);
- void ltdcFgSetInvalidWindow(LTDCDriver *ltdcp);
- void ltdcFgGetFrameI(LTDCDriver *ltdcp, ltdc_frame_t *framep);
- void ltdcFgGetFrame(LTDCDriver *ltdcp, ltdc_frame_t *framep);
- void ltdcFgSetFrameI(LTDCDriver *ltdcp, const ltdc_frame_t *framep);
- void ltdcFgSetFrame(LTDCDriver *ltdcp, const ltdc_frame_t *framep);
- void *ltdcFgGetFrameAddressI(LTDCDriver *ltdcp);
- void *ltdcFgGetFrameAddress(LTDCDriver *ltdcp);
- void ltdcFgSetFrameAddressI(LTDCDriver *ltdcp, void *bufferp);
- void ltdcFgSetFrameAddress(LTDCDriver *ltdcp, void *bufferp);
- void ltdcFgGetLayerI(LTDCDriver *ltdcp, ltdc_laycfg_t *cfgp);
- void ltdcFgGetLayer(LTDCDriver *ltdcp, ltdc_laycfg_t *cfgp);
- void ltdcFgSetConfigI(LTDCDriver *ltdcp, const ltdc_laycfg_t *cfgp);
- void ltdcFgSetConfig(LTDCDriver *ltdcp, const ltdc_laycfg_t *cfgp);
-
- /* Helper functions.*/
- size_t ltdcBitsPerPixel(ltdc_pixfmt_t fmt);
-#if LTDC_USE_SOFTWARE_CONVERSIONS || defined(__DOXYGEN__)
- ltdc_color_t ltdcFromARGB8888(ltdc_color_t c, ltdc_pixfmt_t fmt);
- ltdc_color_t ltdcToARGB8888(ltdc_color_t c, ltdc_pixfmt_t fmt);
-#endif /* LTDC_USE_SOFTWARE_CONVERSIONS */
-
#endif /* STM32_LTDC_H */