Lines Matching +full:write +full:- +full:command
4 * SPDX-License-Identifier: Apache-2.0
9 * @brief Public APIs for MIPI-DBI drivers
11 * MIPI-DBI defines the following 3 interfaces:
15 * 1. 9 write clocks per byte, final bit is command/data selection bit
16 * 2. Same as above, but 16 write clocks per byte
17 * 3. 8 write clocks per byte. Command/data selected via GPIO pin
18 * The current driver interface does not support type C with 16 write clocks (option 2).
25 * @brief MIPI-DBI driver APIs
26 * @defgroup mipi_dbi_interface MIPI-DBI driver APIs
37 #include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>
142 * Configuration for MIPI DBI controller write
152 /** MIPI-DBI host driver API */
174 * @brief Write a command to the display controller
176 * Writes a command, along with an optional data buffer to the display.
178 * only a command will be sent. Note that if the SPI configuration passed
184 * @param cmd command to write to display controller
185 * @param data optional data buffer to write after command
187 * @retval 0 command write succeeded
188 * @retval -EIO I/O error
189 * @retval -ETIMEDOUT transfer timed out
190 * @retval -EBUSY controller is busy
191 * @retval -ENOSYS not implemented
199 (const struct mipi_dbi_driver_api *)dev->api; in mipi_dbi_command_write()
201 if (api->command_write == NULL) { in mipi_dbi_command_write()
202 return -ENOSYS; in mipi_dbi_command_write()
204 return api->command_write(dev, config, cmd, data, len); in mipi_dbi_command_write()
208 * @brief Read a command response from the display controller
210 * Reads a command response from the display controller.
215 * @param num_cmd number of commands to write to display controller
218 * @retval 0 command read succeeded
219 * @retval -EIO I/O error
220 * @retval -ETIMEDOUT transfer timed out
221 * @retval -EBUSY controller is busy
222 * @retval -ENOSYS not implemented
230 (const struct mipi_dbi_driver_api *)dev->api; in mipi_dbi_command_read()
232 if (api->command_read == NULL) { in mipi_dbi_command_read()
233 return -ENOSYS; in mipi_dbi_command_read()
235 return api->command_read(dev, config, cmds, num_cmd, response, len); in mipi_dbi_command_read()
239 * @brief Write a display buffer to the display controller.
242 * a "Write memory" command before writing display data, this should be
246 * @param framebuf: framebuffer to write to display
247 * @param desc: descriptor of framebuffer to write. Note that the pitch must
251 * @retval 0 buffer write succeeded.
252 * @retval -EIO I/O error
253 * @retval -ETIMEDOUT transfer timed out
254 * @retval -EBUSY controller is busy
255 * @retval -ENOSYS not implemented
264 (const struct mipi_dbi_driver_api *)dev->api; in mipi_dbi_write_display()
266 if (api->write_display == NULL) { in mipi_dbi_write_display()
267 return -ENOSYS; in mipi_dbi_write_display()
269 return api->write_display(dev, config, framebuf, desc, pixfmt); in mipi_dbi_write_display()
279 * @retval -EIO I/O error
280 * @retval -ENOSYS not implemented
281 * @retval -ENOTSUP not supported
286 (const struct mipi_dbi_driver_api *)dev->api; in mipi_dbi_reset()
288 if (api->reset == NULL) { in mipi_dbi_reset()
289 return -ENOSYS; in mipi_dbi_reset()
291 return api->reset(dev, K_MSEC(delay_ms)); in mipi_dbi_reset()
307 * @retval -EIO I/O error
308 * @retval -ENOSYS not implemented
309 * @retval -ENOTSUP not supported
315 (const struct mipi_dbi_driver_api *)dev->api; in mipi_dbi_release()
317 if (api->release == NULL) { in mipi_dbi_release()
318 return -ENOSYS; in mipi_dbi_release()
320 return api->release(dev, config); in mipi_dbi_release()
329 * read pointer of the display never overlaps with the write pointer from the
345 * @retval -EIO I/O error
346 * @retval -ENOSYS not implemented
347 * @retval -ENOTSUP not supported
354 (const struct mipi_dbi_driver_api *)dev->api; in mipi_dbi_configure_te()
356 if (api->configure_te == NULL) { in mipi_dbi_configure_te()
357 return -ENOSYS; in mipi_dbi_configure_te()
359 return api->configure_te(dev, edge, K_USEC(delay_us)); in mipi_dbi_configure_te()