diff --git a/.github/workflows/platformio.yml b/.github/workflows/platformio.yml index 2d4b0a1..f529d17 100644 --- a/.github/workflows/platformio.yml +++ b/.github/workflows/platformio.yml @@ -2,7 +2,7 @@ name: PlatformIO CI on: push: - branches: [main, dev, feature/*] + branches: [main, dev] pull_request: branches: [main, dev] diff --git a/platformio.ini b/platformio.ini index 2572b93..76c2f3d 100644 --- a/platformio.ini +++ b/platformio.ini @@ -70,7 +70,7 @@ lib_ignore = [env:esp8266] platform = espressif8266 -board = esp8266 +board = esp01_1m framework = arduino monitor_speed = 115200 upload_speed = 921600 @@ -103,7 +103,7 @@ lib_ignore = [env:stm32f103] platform = ststm32 board = nucleo_f103rb -framework = stm32cube +framework = arduino monitor_speed = 9600 upload_speed = 115200 build_flags = diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..940aa06 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,44 @@ +/** + * Minimal LLP Protocol sketch — compiles on all supported platforms. + * Demonstrates frame building and parsing for CI verification. + */ + +#include +#include +#include + +static llp_parser_t parser; + +void setup() { + llp_parser_init(&parser); + + const char* msg = "Hello LLP"; + + uint8_t final_payload[32]; + uint8_t tx_buffer[64]; + + size_t payload_len = llp_build_final_payload( + final_payload, + sizeof(final_payload), + (const uint8_t*)msg, + (uint16_t)strlen(msg) + ); + + size_t frame_len = llp_build_frame( + tx_buffer, + sizeof(tx_buffer), + final_payload, + (uint16_t)payload_len + ); + + for (size_t i = 0; i < frame_len; i++) { + llp_parser_process_byte( + &parser, + tx_buffer[i], + millis() + ); + } +} + +void loop() { +}