1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00
Commit graph

19 commits

Author SHA1 Message Date
Andy Green
0fbe31e00b spi: read 2024-11-03 07:59:12 +00:00
Andy Green
a54480ba93 lws_display: SSD1675B 2022-04-10 06:56:12 +01:00
Andy Green
c7ebe639be lws-display: UC8176 EPD driver 2022-04-10 06:56:02 +01:00
Andy Green
9b47b768f4 lws_display: SPD1656 driver
Add SPD1656 SPI driver as used in 5.65 inch 7-colour waveshare panel.
2022-03-25 08:18:30 +00:00
Andy Green
d6c4e606e7 ssd1306: adapt blit for DMA 2022-03-25 08:18:30 +00:00
Andy Green
019da2e539 ili9341: adapt blit for DMA
This is the SPI client chip in the LCD displays on ESP32 WROVER-KIT and S2
Kaluga.

Adapt it to allocate using DMA-able allocators and to use the new blit op
conventions for update sequencing
2022-03-25 08:18:30 +00:00
Andy Green
e3743d47b4 lws_spi: Add esp32 DMA support
This provides an alternative esp32-specific SPI driver with ops that can be
swapped in place of the gpio bitbang one.

The pinmux info and lws gpio driver and other data in the spi bitbang
struct are used as-is by the DMA one.

New ops are provided which are able to allocate and free DMA-able memory so
the device drivers can prepare directly usable buffers.  Bounce through to
DMA-able buffers is also transparently supported.
2022-03-25 08:18:30 +00:00
Andy Green
e3dca87f23 lws_display: add display list / DLO support
This adds optional display list support to lws_display, using DLOs (Display
List Objects).  DLOs for rectangle / rounded rectangle (with circle as the
degenerate case), PNGs, JPEG and compressed, antialiased bitmapped fonts
and text primitives are provided.

Logical DLOs are instantiated on heap and listed into an lws_display_list
owner, DLOs handle attributes like position, bounding box, colour +
opacity, and local error diffusion backing buffer.

When the display list is complete, it can be rasterized a line at a time,
with scoped error diffusion resolved, such that no allocation for the
framebuffer is required at any point.  DLOs are freed as the rasterization
moves beyond their bounding box.

Adds a platform registry binding names and other metadata to lws_display
fonts / PNGs / JPEGs.  Provides registration, destruction and best match
selection apis.
2022-03-25 08:18:29 +00:00
Andy Green
aa696773f0 lws_display: improve apis to use display_state and frac
Adapt disp ops to use lws_display_state_t instead of the const disp object.

Describe display area in pixels and mm using lws_fixed3232.
2022-03-25 08:13:48 +00:00
Andy Green
7b82498d33 esp32: update against Dec 21 idf
Freertos in idf has moved around a bit.
2021-12-23 06:20:27 +00:00
kokke
2850de1afa drivers: spi: avoid leaking uninitialized bits
Before this commit, line 84 read 'u' before it had a value, on 1st for-loop iteration. See comment on line 84 below:

82		for (n = 0; n < 8; n++) {
83			ctx->gpio->set(ctx->clk, inv);
84			u = (u << 1) | !!ctx->gpio->read(ctx->miso); /* <-- u is used uninitialized here */
85			ctx->gpio->set(ctx->mosi, !!(u & 0x80));
86			ctx->gpio->set(ctx->clk, !inv);
87		}
2021-04-15 17:41:53 +01:00
Andy Green
9e6cefcfad lws_netdev: fix rssi averaging 2020-07-21 08:16:01 +01:00
Andy Green
4939b87e66 lws_netdev: use lws_settings
Perform the AP selection using lws_settings and a generic scan state machine
2020-07-07 15:23:19 +01:00
Andy Green
65545d2d21 lws-settings 2020-07-02 10:20:17 +01:00
Andy Green
63c1e8ba00 esp32-wrover-kit
Add lws_display and minimal example support for esp32-wrover to match wsp32-heltec-wb32

Since no usable buttons that don't affect something else on wrover kit, assumes
a button to 0V on GPIO14.
2020-06-30 19:35:41 +01:00
Andy Green
ceb4e53174 lws_button: classification
Now there's an abstract button class regardless of the underlying
connection, we can add more sophicsticated analysis on top of it
for processing its usually noisy events and classifying them into
smd-ready click, long-click or double-click events.

A "regime" defines the timing limits for different press recognition
and can be specified per-button, if not given a default regime is
applied.
2020-06-27 07:57:22 +01:00
Andy Green
33f1003305 lws_pwm 2020-06-27 07:57:22 +01:00
Andy Green
d4a7c7134a lws_button and lws_led
Generic drivers for buttons and leds
2020-06-18 16:57:44 +01:00
Andy Green
15ce46d971 drivers: initial generic gpio and i2c plus bitbang
Make a start on generic peripheral and bus drivers to provide
meta-functionality regardless of platform.

On the one hand this simply provides...

 - bitbang i2c on top of esp-idf gpio apis
 - ssd1306 oled chip driver as found on Heltec WB32
 - modifications to the minimal example test for esp32 to use that

... on the other hand, those capabilities are provided by creating:

 - an abstract i2c class object
 - an abstract gpio class object
 - i2c class implementation using the abstract gpio for bitbang
 - an abstract display class object
 - an abstract display state (brightness, animated change,
    on/off/init tracking, autodim after inactive, auto-off /
    blanking after inactive)

... with the intention, eg, you only have to add a platform
implementation for the gpio to be able to use the i2c-based
display drivers and state handling, and i2c bitbang, without
any other modifications.
2020-06-10 19:17:08 +01:00