mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00

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.
25 lines
654 B
CMake
25 lines
654 B
CMake
cmake_minimum_required(VERSION 3.5)
|
|
|
|
if (ESP_PLATFORM)
|
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
|
project(lws-minimal-esp32)
|
|
enable_testing()
|
|
|
|
target_link_libraries(lws-minimal-esp32.elf websockets)
|
|
|
|
option(LWS_WITH_DRIVERS "With generic drivers for gpio, i2c, display etc" ON)
|
|
set(LWS_WITH_DRIVERS ON)
|
|
|
|
add_subdirectory(libwebsockets)
|
|
|
|
add_test(NAME flashing COMMAND idf.py flash)
|
|
set_tests_properties(flashing PROPERTIES
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
TIMEOUT 120)
|
|
|
|
add_test(NAME boot COMMAND /usr/local/bin/sai-expect)
|
|
set_tests_properties(boot PROPERTIES
|
|
DEPENDS flashing
|
|
TIMEOUT 20)
|
|
|
|
endif()
|