npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@typecad/zephyr-esp32s3-rgb

v1.0.0-alpha.13

Published

TypeLED for the ESP32-S3 DevKitC onboard WS2812 RGB LED (Zephyr RTOS) — a cuttlefish library package

Downloads

98

Readme

@typecad/zephyr-esp32s3-rgb

The onboard WS2812 ("NeoPixel") RGB LED of the ESP32-S3 DevKitC, as a cuttlefish library package for the Zephyr RTOS framework.

npm install @typecad/zephyr-esp32s3-rgb
import { rgbLed } from '@typecad/zephyr-esp32s3-rgb';

rgbLed.color(0, 255, 0).show();       // green
rgbLed.color('#ff0000').show();       // red, CSS-style hex
rgbLed.brightness(64).color('#ffffff').show();  // dim white
rgbLed.off();                          // black + show

rgbLed is a preconstructed singleton — import it and chain calls. Colors buffer locally; nothing reaches the LED until show() (or off()).

What the library carries (so you don't have to)

The native Zephyr path for this LED touches devicetree bindings, pinctrl, DMA, and Kconfig before the first blink. This package moves that complexity into itself, as three declarative artifacts (see cuttlefish.library.json):

| Artifact | File | What it does | |---|---|---| | C++ shim | shims/__tc_rgbled.{h,cpp} | class RgbLed over Zephyr's led_strip_update_rgb(); the import resolves to this header | | Devicetree overlay | shims/tc-rgb.overlay | WS2812 node on GPIO48 through the I2S0 peripheral (worldsemi,ws2812-i2s, GRB color-mapping, DMA channel 3) | | Kconfig | manifest kconfig | CONFIG_LED_STRIP=y, CONFIG_I2S=y, CONFIG_DMA=y |

When your program imports the package, the cuttlefish transpiler:

  1. registers the import as a library (the package root carries a cuttlefish.library.json) and skips transpiling its TypeScript — the package's own types are the compile-time contract;
  2. emits #include "__tc_rgbled.h" into your main.cpp and writes the shim files into the generated src/ (CMake picks the .cpp up automatically);
  3. appends the overlay fragment to the generated boards/<board>.overlay;
  4. appends the Kconfig lines to the generated prj.conf.

The I2S backend is upstream Zephyr's own configuration for this board (samples/drivers/led/led_strip), adapted verbatim — it borrows the I2S0 peripheral and DMA channel 3, which nothing else in a cuttlefish Zephyr project uses. The alternative SPI backend would collide with spi.* HAL usage; the ESP32-S3's dedicated RMT peripheral has no upstream Zephyr driver.

Requirements

  • Framework: @typecad/framework-zephyr (importing under another framework fails the transpile with a clear error).
  • Board target: esp32s3_devkitc.
  • Hardware revision: DevKitC v1.0, whose RGB LED is on GPIO48. v1.1 moved it to GPIO38 — on that revision change one line in shims/tc-rgb.overlay (I2S0_O_SD_GPIO48I2S0_O_SD_GPIO38). (The mismatch with boards/board-esp32s3's led: 'GPIO48' is inherited: the Arduino core also pins v1.0's GPIO48 as RGB_BUILTIN.)
  • Validated on hardware: 2026-08-21, ESP32-S3 DevKitC (GPIO48 revision), via demo-shadcn — boot color + tap-counter color cycling through the full chain (transpile → shim → overlay → Kconfig → west build → flash).

Writing a sibling library

This package is the template: an npm package with a cuttlefish.library.json manifest (module, framework, targets, include, gateToken, shims, kconfig, overlay), a types-only TypeScript API, and the native artifacts. An Arduino counterpart (@typecad/arduino-esp32s3-rgb over neopixelWrite) would follow the same manifest with a different framework id — the mechanism is per-library, not per-framework-matrix.

Shim compliance

The shim sources are AUTOSAR C++14 by construction (fixed-width integers, static_cast only, no heap, final class) and must keep passing --autosar=strict — the repo's compliance test covers them.