@@ -33,26 +33,28 @@ struct mipi_dbi_spi_data {
33
33
};
34
34
35
35
/* Expands to 1 if the node does not have the `write-only` property */
36
- #define _WRITE_ONLY_ABSENT (n ) (!DT_INST_PROP(n, write_only)) |
36
+ #define MIPI_DBI_SPI_WRITE_ONLY_ABSENT (n ) (!DT_INST_PROP(n, write_only)) |
37
37
38
38
/* This macro will evaluate to 1 if any of the nodes with zephyr,mipi-dbi-spi
39
39
* lack a `write-only` property. The intention here is to allow the entire
40
40
* command_read function to be optimized out when it is not needed.
41
41
*/
42
- #define MIPI_DBI_SPI_READ_REQUIRED DT_INST_FOREACH_STATUS_OKAY(_WRITE_ONLY_ABSENT ) 0
42
+ #define MIPI_DBI_SPI_READ_REQUIRED DT_INST_FOREACH_STATUS_OKAY(MIPI_DBI_SPI_WRITE_ONLY_ABSENT ) 0
43
43
uint32_t var = MIPI_DBI_SPI_READ_REQUIRED ;
44
44
45
45
/* Expands to 1 if the node does reflect the enum in `xfr-min-bits` property */
46
- #define _XFR_8BITS (n ) (DT_INST_STRING_UPPER_TOKEN(n, xfr_min_bits) == MIPI_DBI_SPI_XFR_8BIT) |
47
- #define _XFR_16BITS (n ) (DT_INST_STRING_UPPER_TOKEN(n, xfr_min_bits) == MIPI_DBI_SPI_XFR_16BIT) |
46
+ #define MIPI_DBI_SPI_XFR_8BITS (n ) (DT_INST_STRING_UPPER_TOKEN(n, xfr_min_bits) \
47
+ == MIPI_DBI_SPI_XFR_8BIT) |
48
+ #define MIPI_DBI_SPI_XFR_16BITS (n ) (DT_INST_STRING_UPPER_TOKEN(n, xfr_min_bits) \
49
+ == MIPI_DBI_SPI_XFR_16BIT) |
48
50
49
51
/* This macros will evaluate to 1 if any of the nodes with zephyr,mipi-dbi-spi
50
52
* have the `xfr-min-bits` property to corresponding enum value. The intention
51
53
* here is to allow the write helper functions to be optimized out when not all
52
54
* minimum transfer bits will be needed.
53
55
*/
54
- #define MIPI_DBI_SPI_WRITE_8BIT_REQUIRED DT_INST_FOREACH_STATUS_OKAY(_XFR_8BITS ) 0
55
- #define MIPI_DBI_SPI_WRITE_16BIT_REQUIRED DT_INST_FOREACH_STATUS_OKAY(_XFR_16BITS ) 0
56
+ #define MIPI_DBI_SPI_WRITE_8BIT_REQUIRED DT_INST_FOREACH_STATUS_OKAY(MIPI_DBI_SPI_XFR_8BITS ) 0
57
+ #define MIPI_DBI_SPI_WRITE_16BIT_REQUIRED DT_INST_FOREACH_STATUS_OKAY(MIPI_DBI_SPI_XFR_16BITS ) 0
56
58
57
59
/* In Type C mode 1 MIPI BIT communication, the 9th bit of the word
58
60
* (first bit sent in each word) indicates if the word is a command or
0 commit comments