Skip to content

Commit 13eaf1f

Browse files
committed
drivers: display: ssd1327: lut table as const
LUT table to rom instead of ram Signed-off-by: Camille BAUD <[email protected]>
1 parent 3ae962f commit 13eaf1f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/display/ssd1327.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ struct ssd1327_config {
4747
uint8_t function_selection_b;
4848
uint8_t precharge_voltage;
4949
uint8_t vcomh_voltage;
50-
uint8_t *grayscale_table;
50+
const uint8_t *grayscale_table;
5151
bool color_inversion;
5252
uint8_t *conversion_buf;
5353
size_t conversion_buf_size;
@@ -468,7 +468,7 @@ static DEVICE_API(display, ssd1327_driver_api) = {
468468
static uint8_t conversion_buf##node_id[SSD1327_CONV_BUFFER_SIZE(node_id)]; \
469469
static struct ssd1327_data data##node_id; \
470470
COND_CODE_1(DT_NODE_HAS_PROP(node_id, grayscale_table), ( \
471-
static uint8_t ssd1327_grayscale_table_##node_id[SSD1327_SET_LUT_COUNT] = \
471+
static const uint8_t ssd1327_grayscale_table_##node_id[SSD1327_SET_LUT_COUNT] = \
472472
DT_PROP(node_id, grayscale_table);), ()) \
473473
static const struct ssd1327_config config##node_id = { \
474474
.i2c = I2C_DT_SPEC_GET(node_id), \
@@ -499,7 +499,7 @@ static DEVICE_API(display, ssd1327_driver_api) = {
499499
static uint8_t conversion_buf##node_id[SSD1327_CONV_BUFFER_SIZE(node_id)]; \
500500
static struct ssd1327_data data##node_id; \
501501
COND_CODE_1(DT_NODE_HAS_PROP(node_id, grayscale_table), ( \
502-
static uint8_t ssd1327_grayscale_table_##node_id[SSD1327_SET_LUT_COUNT] = \
502+
static const uint8_t ssd1327_grayscale_table_##node_id[SSD1327_SET_LUT_COUNT] = \
503503
DT_PROP(node_id, grayscale_table);), ()) \
504504
static const struct ssd1327_config config##node_id = { \
505505
.mipi_dev = DEVICE_DT_GET(DT_PARENT(node_id)), \

0 commit comments

Comments
 (0)