Loading...
Searching...
No Matches
cpu_ltdc.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 Inria
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
19#ifndef PERIPH_CPU_LTDC_H
20#define PERIPH_CPU_LTDC_H
21
22#include <stdint.h>
23
24#include "periph/cpu_gpio.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
33typedef struct {
34 gpio_t pin;
37
41typedef struct {
42 uint8_t bus;
43 uint32_t rcc_mask;
48 ltdc_gpio_t r_pin[8];
49 ltdc_gpio_t g_pin[8];
50 ltdc_gpio_t b_pin[8];
51 uint8_t hsync;
52 uint8_t vsync;
53 uint8_t hbp;
54 uint8_t hfp;
55 uint8_t vbp;
56 uint8_t vfp;
58
62void ltdc_init(void);
63
67void ltdc_clear(void);
68
78void ltdc_map(uint16_t x1, uint16_t x2, uint16_t y1, uint16_t y2, const uint16_t *color);
79
89void ltdc_fill(uint16_t x1, uint16_t x2, uint16_t y1, uint16_t y2, const uint16_t color);
90
91#ifdef __cplusplus
92}
93#endif
94
95#endif /* PERIPH_CPU_LTDC_H */
GPIO CPU definitions for the STM32 family.
void ltdc_clear(void)
Clear the LTDC display.
void ltdc_init(void)
Initialize the LTDC (LCD-TFT Display Controller) peripheral.
void ltdc_map(uint16_t x1, uint16_t x2, uint16_t y1, uint16_t y2, const uint16_t *color)
Map a buffer of RGB565 (16bit depth) colors to the display.
void ltdc_fill(uint16_t x1, uint16_t x2, uint16_t y1, uint16_t y2, const uint16_t color)
Fill a region of the display with the same color.
gpio_af_t
Override alternative GPIO mode options.
Definition periph_cpu.h:166
LTDC Peripheral configuration.
Definition cpu_ltdc.h:41
ltdc_gpio_t vsync_pin
Vertical synchronization pin.
Definition cpu_ltdc.h:47
uint8_t hsync
Horizontal synchronization.
Definition cpu_ltdc.h:51
ltdc_gpio_t hsync_pin
Horizontal synchronization pin.
Definition cpu_ltdc.h:46
uint8_t hbp
Horizontal back porch.
Definition cpu_ltdc.h:53
uint8_t vbp
Vertical back porch.
Definition cpu_ltdc.h:55
uint32_t rcc_mask
bit in clock enable register
Definition cpu_ltdc.h:43
ltdc_gpio_t de_pin
Data enable pin.
Definition cpu_ltdc.h:45
uint8_t bus
APB bus.
Definition cpu_ltdc.h:42
uint8_t vsync
Vertical synchronization.
Definition cpu_ltdc.h:52
uint8_t hfp
Horizontal front porch.
Definition cpu_ltdc.h:54
ltdc_gpio_t clk_pin
CLK pin.
Definition cpu_ltdc.h:44
uint8_t vfp
Vertical front porch.
Definition cpu_ltdc.h:56
LTDC GPIO configuration.
Definition cpu_ltdc.h:33
gpio_t pin
GPIO pin.
Definition cpu_ltdc.h:34
gpio_af_t af
Alternate function.
Definition cpu_ltdc.h:35