{"id":28719969,"url":"https://github.com/magiccube/esp32-s3-hal","last_synced_at":"2025-09-03T10:36:15.314Z","repository":{"id":271110058,"uuid":"912418156","full_name":"MagicCube/esp32-s3-hal","owner":"MagicCube","description":"The Arduino version of hardware abstraction layer for Espressif ESP32-S3.","archived":false,"fork":false,"pushed_at":"2025-06-22T06:44:30.000Z","size":11255,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-22T07:28:38.334Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MagicCube.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-05T14:21:43.000Z","updated_at":"2025-06-22T06:44:33.000Z","dependencies_parsed_at":"2025-06-22T07:36:51.143Z","dependency_job_id":null,"html_url":"https://github.com/MagicCube/esp32-s3-hal","commit_stats":null,"previous_names":["magiccube/esp32-s3-hal"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MagicCube/esp32-s3-hal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MagicCube%2Fesp32-s3-hal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MagicCube%2Fesp32-s3-hal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MagicCube%2Fesp32-s3-hal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MagicCube%2Fesp32-s3-hal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MagicCube","download_url":"https://codeload.github.com/MagicCube/esp32-s3-hal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MagicCube%2Fesp32-s3-hal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273431161,"owners_count":25104487,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-15T06:06:20.554Z","updated_at":"2025-09-03T10:36:15.288Z","avatar_url":"https://github.com/MagicCube.png","language":"C++","readme":"# esp32-s3-hal\n\nAn Arduino version of the hardware abstraction layer for the ESP32-S3.\nMXFramework is also built-in.\n\n## Usage\n\n### Add Board\n\nCopy the [`boards/esp32-s3-wroom-1-n16r8`](./boards/esp32-s3-wroom-1-n16r8) file to the `boards` folder under your project.\n\n### Add Library\n\n#### Step 1: Add platform packages\n\n```ini\nplatform_packages =\n  platformio/framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git\n  platformio/framework-arduinoespressif32-libs@https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1\n```\n\n#### Step 2: Add libraries and dependencies\n\n```ini\nlib_deps =\n  ESP32_IO_Expander = https://github.com/esp-arduino-libs/ESP32_IO_Expander.git#v0.1.0\n  ESP32_Display_Panel = https://github.com/esp-arduino-libs/ESP32_Display_Panel.git#v0.1.8\n  esp32-s3-hal = https://github.com/MagicCube/esp32-s3-hal.git\n  lvgl/lvgl@~9.2.2\n```\n\n#### Step 3: Add build flags\n\n```ini\nbuild_flags =\n  -D DEVICE_KEVIN_S3_SP_V3\n  ;-D DEVICE_JC3636W518C\n  -D LV_CONF_PATH=\"${platformio.libdeps_dir}/${PIOENV}/include/lv_conf.h\"\n```\n\n\u003e Notes:\n\u003e\n\u003e * Choose one of `DEVICE_KEVIN_S3_SP_V3` or `DEVICE_JC3636W518C` to define the device.\n\u003e * `LV_CONF_PATH` is used to specify the path to the LVGL configuration file.\n\n### For Multi-Device Support\n\n```ini\n; PlatformIO Project Configuration File\n;\n;   Build options: build flags, source filter\n;   Upload options: custom upload port, speed and extra flags\n;   Library options: dependencies, extra library storages\n;   Advanced options: extra scripting\n;\n; Please visit documentation for the other options and examples\n; https://docs.platformio.org/page/projectconf.html\n\n[platformio]\ndefault_envs = jc3636w518c\n\n[common]\nlib_deps =\n  lvgl/lvgl@~9.2.2\n  esp32-s3-hal = https://github.com/MagicCube/esp32-s3-hal.git\nbuild_flags =\n  -D LV_CONF_PATH=\"${platformio.libdeps_dir}/${PIOENV}/esp32-s3-hal/include/lv_conf.h\"\n\n[esp32_s3_wroom_1_n16r8]\nplatform = espressif32\nboard = esp32-s3-wroom-1-n16r8\nframework = arduino\nplatform_packages =\n  platformio/framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git\n  platformio/framework-arduinoespressif32-libs@https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1\nbuild_flags =\n  ${common.build_flags}\nlib_deps =\n  ${common.lib_deps}\n  ESP32_IO_Expander = https://github.com/esp-arduino-libs/ESP32_IO_Expander.git#v0.1.0\n  ESP32_Display_Panel = https://github.com/esp-arduino-libs/ESP32_Display_Panel.git#v0.1.8\n\n[env:jc3636w518c]\nextends= esp32_s3_wroom_1_n16r8\nbuild_flags =\n  -D DEVICE_JC3636W518C\n  ${esp32_s3_wroom_1_n16r8.build_flags}\n\n[env:kevin_s3_sp_v3]\nextends = esp32_s3_wroom_1_n16r8\nbuild_flags =\n  -D DEVICE_KEVIN_S3_SP_V3\n  ${esp32_s3_wroom_1_n16r8.build_flags}\n```\n\n## Example Code\n\n```cpp\n#include \u003cArduino.h\u003e\n#include \u003caudio.h\u003e\n#include \u003cdisplay.h\u003e\n#include \u003clv_integration.h\u003e\n#include \u003clvgl.h\u003e\n#include \u003cmx.h\u003e\n\nvoid hal_setup() {\n  Serial.begin(115200);\n  Audio.begin();\n  Audio.playSystemSound(SYSTEM_SOUND_STARTUP);\n  Display.begin();\n#ifdef DISPLAY_ST77916\n  Display.rotate(180);\n#endif\n}\n\nvoid setup() {\n  hal_setup();\n  lv_setup();\n}\n\ntime_t last_serial_output = 0;\nvoid serial_loop() {\n  if (millis() - last_serial_output \u003e 5 * 1000) {\n    // Serial.print(\".\");\n    // Print free memory\n    Serial.print(\"Free memory: \");\n    Serial.println(esp_get_free_heap_size());\n\n    last_serial_output = millis();\n  }\n}\n\nvoid loop() {\n  serial_loop();\n  mx_loop();\n\n  // Always keep `lv_loop()` at the end of the loop\n  lv_loop();\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiccube%2Fesp32-s3-hal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagiccube%2Fesp32-s3-hal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiccube%2Fesp32-s3-hal/lists"}