Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asynchronous Graphics Library #2357

Merged
merged 6 commits into from
Aug 12, 2021
Merged

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Aug 11, 2021

An asynchronous graphics management library intended for SPI-based displays.

On first use several required python modules must be installed. Try building a sample application:

cd $SMING_HOME
make fetch Graphics
cd Libraries/Graphics/samples/Basic_Graphics
make python-requirements
make

Currently only the ILI9341 display has a driver, but you can use the virtual screen for testing.
This is a display device for use by the Host Emulator. The 'display' is a python application which communicates
with the Sming :cpp:class:Graphics::Display::Virtual display driver using a TCP socket.
Graphics processing is handled using SDL2.

To start the virtual screen server type make virtual-screen from your project directory.
The default TCP port is 7780. If you need to change this, use::

make virtual-screen VSPORT=7780

The screen server's IP address is shown in the caption bar.
Build and run your project in host mode as follows::

make SMING_ARCH=Host
make run VSADDR=192.1.2.3

Add device `onTransfer` callback, invoked at the start of each request
    Example use case is for ILI9341 display which has an additional CMD/DATA control line.
    Callbacks should be in `startRequest()` not `nextTransaction()`

Add fast re-queuing support
    Where available, next packet is queued **before** invoking completion callback.
    Completion callback can return false to re-queue request immediately.

Replace `Request::prepare` with `Device::wait` method

Update Host controller
    Useful for debugging upper layers
    Use thread for host SPI, add stats

Add `HSPI_ENABLE_STATS` build variable
Add checks to ensure both Controller and Device are initialised
Check for aligned reads, avoids overwriting end of misaligned buffers
Add `MemCheckState` class (moved from TFT_S1D13781 library)
@slaff
Copy link
Contributor

slaff commented Aug 11, 2021

@mikee47 Look at the failing CI tests. Some compilers require small code changes.

@slaff slaff merged commit 7872602 into SmingHub:develop Aug 12, 2021
@mikee47 mikee47 deleted the feature/graphics-library branch August 12, 2021 12:05
@slaff slaff mentioned this pull request Aug 12, 2021
5 tasks
slaff pushed a commit that referenced this pull request Sep 27, 2021
An asynchronous graphics management library intended for SPI-based displays.

On first use several required python modules must be installed. Try building a sample application:

```
cd $SMING_HOME
make fetch Graphics
cd Libraries/Graphics/samples/Basic_Graphics
make python-requirements
make
```

Currently only the ILI9341 display has a driver, but you can use the virtual screen for testing.
This is a display device for use by the Host Emulator. The 'display' is a python application which communicates
with the Sming :cpp:class:`Graphics::Display::Virtual` display driver using a TCP socket.
Graphics processing is handled using SDL2.

To start the virtual screen server type ``make virtual-screen`` from your project directory.
The default TCP port is 7780. If you need to change this, use::

    make virtual-screen VSPORT=7780

The screen server's IP address is shown in the caption bar.
Build and run your project in host mode as follows::

    make SMING_ARCH=Host
    make run VSADDR=192.1.2.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants