Lines Matching +full:gpio +full:- +full:width

4  * SPDX-License-Identifier: Apache-2.0
10 #include <zephyr/drivers/gpio.h>
25 uint16_t width; member
28 uint8_t bias; /* 0-7 */
29 uint8_t ct; /* 0-255 */
30 uint8_t duty; /* 1-64 */
32 bool shl; /* 0 COM1->COMN 1 COMN->COM1 */
33 bool adc; /* 0 seg1->seg132 1 seg132->seg1 */
35 bool rev; /* 0 RAM1->LCD ON 1 RAM0->LCD ON */
43 const struct ist3931_config *config = dev->config; in ist3931_write_bus()
51 return i2c_write_dt(&config->bus, i2c_write_buf, num_bytes * 2); in ist3931_write_bus()
56 const struct ist3931_config *config = dev->config; in ist3931_bus_ready()
58 return i2c_is_ready_dt(&config->bus); in ist3931_bus_ready()
63 const struct ist3931_config *config = dev->config; in ist3931_set_power()
64 uint8_t cmd_buf = IST3931_CMD_POWER_CONTROL | config->vc | config->vf << 1; in ist3931_set_power()
71 const struct ist3931_config *config = dev->config; in ist3931_set_bias()
72 uint8_t cmd_buf = IST3931_CMD_BIAS | config->bias; in ist3931_set_bias()
79 const struct ist3931_config *config = dev->config; in ist3931_set_ct()
80 uint8_t cmd_buf[2] = {IST3931_CMD_CT, config->ct}; in ist3931_set_ct()
87 const struct ist3931_config *config = dev->config; in ist3931_set_fr()
88 uint8_t cmd_buf[3] = {IST3931_CMD_FRAME_CONTROL, config->fr & 0x00FF, config->fr >> 8}; in ist3931_set_fr()
95 const struct ist3931_config *config = dev->config; in ist3931_set_duty()
96 uint8_t cmd_buf[2] = {(IST3931_CMD_SET_DUTY_LSB | (config->duty & 0x0F)), in ist3931_set_duty()
97 (IST3931_CMD_SET_DUTY_MSB | (config->duty >> 4))}; in ist3931_set_duty()
104 const struct ist3931_config *config = dev->config; in ist3931_driver_display_control()
105 uint8_t cmd_buf = IST3931_CMD_DRIVER_DISPLAY_CONTROL | config->shl << 3 | config->adc << 2 | in ist3931_driver_display_control()
106 config->eon << 1 | config->rev; in ist3931_driver_display_control()
142 const struct ist3931_config *config = dev->config; in ist3931_driver_set_ay()
143 uint8_t cmd_buf1 = IST3931_CMD_SET_AY_ADD_LSB | ((config->y_offset + y) & 0x0F); in ist3931_driver_set_ay()
144 uint8_t cmd_buf2 = IST3931_CMD_SET_AY_ADD_MSB | ((config->y_offset + y) >> 4); in ist3931_driver_set_ay()
152 const struct ist3931_config *config = dev->config; in ist3931_driver_set_ax()
153 uint8_t cmd_buf = IST3931_CMD_SET_AX_ADD | (config->x_offset + x); in ist3931_driver_set_ax()
160 const struct ist3931_config *config = dev->config; in ist3931_init_device()
162 gpio_pin_set_dt(&config->reset_gpio, 1); in ist3931_init_device()
164 gpio_pin_set_dt(&config->reset_gpio, 0); in ist3931_init_device()
166 gpio_pin_set_dt(&config->reset_gpio, 1); in ist3931_init_device()
181 const struct ist3931_config *config = dev->config; in ist3931_init()
186 return -ENODEV; in ist3931_init()
190 if (!gpio_is_ready_dt(&config->reset_gpio)) { in ist3931_init()
191 LOG_ERR("Reset GPIO device not ready"); in ist3931_init()
192 return -ENODEV; in ist3931_init()
194 ret = gpio_pin_configure_dt(&config->reset_gpio, GPIO_OUTPUT_INACTIVE); in ist3931_init()
210 const struct ist3931_config *config = dev->config; in ist3931_get_capabilities()
213 caps->x_resolution = config->width; in ist3931_get_capabilities()
214 caps->y_resolution = config->height; in ist3931_get_capabilities()
215 caps->supported_pixel_formats = PIXEL_FORMAT_MONO10 | PIXEL_FORMAT_MONO01; in ist3931_get_capabilities()
216 caps->current_pixel_format = PIXEL_FORMAT_MONO01; in ist3931_get_capabilities()
217 caps->current_orientation = DISPLAY_ORIENTATION_NORMAL; in ist3931_get_capabilities()
237 __ASSERT(x + desc->width <= IST3931_RAM_WIDTH, "x+width is out of range"); in ist3931_write()
238 __ASSERT(y + desc->height <= IST3931_RAM_HEIGHT, "y+height is out of range"); in ist3931_write()
240 for (uint16_t i = 0; i < desc->height; i++) { in ist3931_write()
243 ist3931_write_bus(dev, write_data_start, 0, desc->width / 8); in ist3931_write()
244 write_data_start += desc->width / 8; in ist3931_write()
280 .width = DT_INST_PROP(inst, width), \