Skip to content

Conversation

@andysan
Copy link
Contributor

@andysan andysan commented Jul 13, 2022

This pull request adds support for basic read operations on the SSD16xx display controller. It consists of two commits:

  • Support for read commands and an implementation of the display_read API.
  • The addition of a device-specific API that lets the caller read out the contents of the second ("red") RAM buffer.

Read operations require the SPI bus to be in half duplex mode. To enable read operations, set the device mode to half duplex by adding the following to the device's DTB node:

  duplex = <SPI_HALF_DUPLEX>;

If read requests will fail with -ENOTSUP if the device isn't in half duplex mode.


Tested on a couple of different SSD168x-basde displays using the SPI bit banging driver.

Update: Pushed a new version which moves the device-specific include from the first commit (incorrect) to the second commit. This fixes potential future bisection issues.

Update: Rebased on latest main.

@zephyrbot zephyrbot requested review from gmarull and jfischer-no July 13, 2022 19:34
@andysan andysan force-pushed the ssd16xx_read_for_upstream branch 2 times, most recently from aa0802e to 6eecf01 Compare July 13, 2022 20:43
jfischer-no
jfischer-no previously approved these changes Jul 15, 2022
Copy link
Contributor

@jfischer-no jfischer-no left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

jfischer-no
jfischer-no previously approved these changes Jul 19, 2022
@andysan
Copy link
Contributor Author

andysan commented Jul 20, 2022

Ping. Can I get another review on these changes so we can merge them?

@andysan andysan force-pushed the ssd16xx_read_for_upstream branch 3 times, most recently from 08771f0 to bb50cca Compare July 25, 2022 21:56
andysan added 2 commits July 25, 2022 23:00
Read operations only work on SPI controllers that support half
duplex. To enable read operations, set the device mode to half duplex
by adding the following to the device's DTB node:

  duplex = <SPI_HALF_DUPLEX>;

If read requests will fail with -ENOTSUP if the device isn't in half
duplex mode.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
Add the ssd16xx_read_ram() function that can be used to read the raw
contents of the two display RAM in the controller. This function is
similar to display_read(), but lets the caller specify the RAM to
operate on. The intention is that this can be used to read out the
contents of the old frame buffer after a partial refresh that
automatically swaps the black/red buffers.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
@andysan andysan force-pushed the ssd16xx_read_for_upstream branch from bb50cca to 93be3d2 Compare July 25, 2022 22:00
Copy link
Contributor

@mbolivar-nordic mbolivar-nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jfischer-no I am approving only after skimming the changes quickly as all seems OK from a high level. Please approve if you believe the details are correct. I do not know this part.

@andysan
Copy link
Contributor Author

andysan commented Jul 27, 2022

Can we make sure that #47712 is merged before this one? These two PRe will be conflicting and I think it would be much less pain for everyone involve if we resolve the conflicts on this smaller PR.

@carlescufi carlescufi merged commit 61306ae into zephyrproject-rtos:main Jul 27, 2022
@andysan andysan deleted the ssd16xx_read_for_upstream branch July 27, 2022 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants