Loading...
Searching...
No Matches
u8g2_display_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025 HAW Hamburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
21
22#include "board.h"
23#include "u8g2_display.h"
24
25#include "periph/i2c.h"
26#include "periph/spi.h"
27#include "periph/gpio.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
43#ifndef U8G2_DISPLAY_PARAM_DEV
44# define U8G2_DISPLAY_PARAM_DEV I2C_DEV(0)
45#endif
46
51#ifndef U8G2_DISPLAY_PARAM_I2C_ADDR
52# define U8G2_DISPLAY_PARAM_I2C_ADDR (0x3c)
53#endif
54
59#ifndef U8G2_DISPLAY_PARAM_PIN_CS
60# define U8G2_DISPLAY_PARAM_PIN_CS GPIO_UNDEF
61#endif
62
67#ifndef U8G2_DISPLAY_PARAM_PIN_DC
68# define U8G2_DISPLAY_PARAM_PIN_DC GPIO_UNDEF
69#endif
70
75#ifndef U8G2_DISPLAY_PARAM_PIN_RESET
76# define U8G2_DISPLAY_PARAM_PIN_RESET GPIO_UNDEF
77#endif
78
84#ifndef U8G2_DISPLAY_PARAM_INIT_FUNCTION
85# define U8G2_DISPLAY_PARAM_INIT_FUNCTION u8g2_Setup_ssd1306_i2c_128x64_noname_f
86#endif
87
101#ifndef U8G2_DISPLAY_PARAM_ROTATION_FUNCTION
102# define U8G2_DISPLAY_PARAM_ROTATION_FUNCTION U8G2_R0
103#endif
104
105
109#ifndef U8G2_DISPLAY_PARAMS
110# define U8G2_DISPLAY_PARAMS \
111 { \
112 .init_function = U8G2_DISPLAY_PARAM_INIT_FUNCTION, \
113 .peripheral_configuration = { \
114 .device_index = U8G2_DISPLAY_PARAM_DEV, \
115 .pin_cs = U8G2_DISPLAY_PARAM_PIN_CS, \
116 .pin_dc = U8G2_DISPLAY_PARAM_PIN_DC, \
117 .pin_reset = U8G2_DISPLAY_PARAM_PIN_RESET, \
118 }, \
119 .i2c_address = U8G2_DISPLAY_PARAM_I2C_ADDR, \
120 .rotation_function = U8G2_DISPLAY_PARAM_ROTATION_FUNCTION, \
121 }
122#endif
124
132
136#ifndef U8G2_DISPLAY_PARAM_SCREEN_IDS
137# define U8G2_DISPLAY_PARAM_SCREEN_IDS 0
138#endif
139
143static const uint8_t u8g2_display_screen_ids[] =
144{
146};
147
148#ifdef __cplusplus
149}
150#endif
151
Low-level GPIO peripheral driver interface definitions.
static const uint8_t u8g2_display_screen_ids[]
Configure screen identifiers.
static const u8g2_display_params_t u8g2_display_params[]
Configuration struct.
#define U8G2_DISPLAY_PARAMS
Default configuration struct.
#define U8G2_DISPLAY_PARAM_SCREEN_IDS
Default screen identifiers.
Low-level I2C peripheral driver interface definition.
Low-level SPI peripheral driver interface definition.
U8G2 display initialization parameters.