@@ -45,7 +45,7 @@ LOG_MODULE_REGISTER(ssd1363, CONFIG_DISPLAY_LOG_LEVEL);
45
45
#define SSD1363_WRITE_RAM 0x5C
46
46
#define SSD1363_READ_RAM 0x5D
47
47
#define SSD1363_SET_REMAP_VALUE 0xA0
48
- #define SSD1363_SET_GREY_ENHANCE 0xB4
48
+ #define SSD1363_SET_GRAY_ENHANCE 0xB4
49
49
50
50
#define SSD1363_RESET_DELAY 100
51
51
@@ -75,10 +75,10 @@ struct ssd1363_config {
75
75
uint8_t precharge_period ;
76
76
uint8_t precharge_config ;
77
77
uint16_t column_offset ;
78
- uint8_t greyscale_table [15 ];
79
- bool greyscale_table_present ;
78
+ uint8_t grayscale_table [15 ];
79
+ bool grayscale_table_present ;
80
80
bool color_inversion ;
81
- bool greyscale_enhancement ;
81
+ bool grayscale_enhancement ;
82
82
uint8_t * conversion_buf ;
83
83
size_t conversion_buf_size ;
84
84
};
@@ -156,8 +156,8 @@ static inline int ssd1363_set_hardware_config(const struct device *dev)
156
156
if (err < 0 ) {
157
157
return err ;
158
158
}
159
- if (config -> greyscale_table_present ) {
160
- err = config -> write_cmd (dev , SSD1363_SET_LUT , config -> greyscale_table , 15 );
159
+ if (config -> grayscale_table_present ) {
160
+ err = config -> write_cmd (dev , SSD1363_SET_LUT , config -> grayscale_table , 15 );
161
161
if (err < 0 ) {
162
162
return err ;
163
163
}
@@ -178,11 +178,11 @@ static inline int ssd1363_set_hardware_config(const struct device *dev)
178
178
if (err < 0 ) {
179
179
return err ;
180
180
}
181
- if (config -> greyscale_enhancement ) {
181
+ if (config -> grayscale_enhancement ) {
182
182
/* Undocumented values from datasheet */
183
183
buf [0 ] = 0x32 ;
184
184
buf [1 ] = 0x0c ;
185
- err = config -> write_cmd (dev , SSD1363_SET_GREY_ENHANCE , buf , 2 );
185
+ err = config -> write_cmd (dev , SSD1363_SET_GRAY_ENHANCE , buf , 2 );
186
186
if (err < 0 ) {
187
187
return err ;
188
188
}
@@ -462,14 +462,14 @@ static DEVICE_API(display, ssd1363_driver_api) = {
462
462
#define SSD1363_CONV_BUFFER_SIZE (node_id ) \
463
463
DIV_ROUND_UP(DT_PROP(node_id, width) * CONFIG_SSD1363_CONV_BUFFER_LINES, 1)
464
464
465
- #define SSD1363_GREYSCALE_TABLE_YES (node_id ) \
466
- .greyscale_table = DT_PROP(node_id, greyscale_table ), .greyscale_table_present = true
465
+ #define SSD1363_GRAYSCALE_TABLE_YES (node_id ) \
466
+ .grayscale_table = DT_PROP(node_id, grayscale_table ), .grayscale_table_present = true
467
467
468
- #define SSD1363_GREYSCALE_TABLE_NO (node_id ) .greyscale_table_present = false
468
+ #define SSD1363_GRAYSCALE_TABLE_NO (node_id ) .grayscale_table_present = false
469
469
470
- #define SSD1363_GREYSCALE_TABLE (node_id ) \
471
- COND_CODE_1(DT_NODE_HAS_PROP(node_id, greyscale_table ), \
472
- (SSD1363_GREYSCALE_TABLE_YES (node_id)), (SSD1363_GREYSCALE_TABLE_NO (node_id)))
470
+ #define SSD1363_GRAYSCALE_TABLE (node_id ) \
471
+ COND_CODE_1(DT_NODE_HAS_PROP(node_id, grayscale_table ), \
472
+ (SSD1363_GRAYSCALE_TABLE_YES (node_id)), (SSD1363_GRAYSCALE_TABLE_NO (node_id)))
473
473
474
474
#define SSD1363_DEFINE_I2C (node_id ) \
475
475
static uint8_t conversion_buf##node_id[SSD1363_CONV_BUFFER_SIZE(node_id)]; \
@@ -490,8 +490,8 @@ static DEVICE_API(display, ssd1363_driver_api) = {
490
490
.precharge_period = DT_PROP(node_id, precharge_period), \
491
491
.precharge_config = DT_PROP(node_id, precharge_config), \
492
492
.column_offset = DT_PROP(node_id, column_offset), \
493
- .greyscale_enhancement = DT_PROP(node_id, greyscale_enhancement ), \
494
- SSD1363_GREYSCALE_TABLE (node_id), \
493
+ .grayscale_enhancement = DT_PROP(node_id, grayscale_enhancement ), \
494
+ SSD1363_GRAYSCALE_TABLE (node_id), \
495
495
.write_cmd = ssd1363_write_bus_cmd_i2c, \
496
496
.write_pixels = ssd1363_write_pixels_i2c, \
497
497
.conversion_buf = conversion_buf##node_id, \
@@ -522,8 +522,8 @@ static DEVICE_API(display, ssd1363_driver_api) = {
522
522
.precharge_period = DT_PROP(node_id, precharge_period), \
523
523
.precharge_config = DT_PROP(node_id, precharge_config), \
524
524
.column_offset = DT_PROP(node_id, column_offset), \
525
- .greyscale_enhancement = DT_PROP(node_id, greyscale_enhancement ), \
526
- SSD1363_GREYSCALE_TABLE (node_id), \
525
+ .grayscale_enhancement = DT_PROP(node_id, grayscale_enhancement ), \
526
+ SSD1363_GRAYSCALE_TABLE (node_id), \
527
527
.write_cmd = ssd1363_write_bus_cmd_mipi, \
528
528
.write_pixels = ssd1363_write_pixels_mipi, \
529
529
.conversion_buf = conversion_buf##node_id, \
0 commit comments