Firmware  0.4.1
Loading...
Searching...
No Matches
drv::led Namespace Reference

Classes

struct  Bug
 RAII wrapper for bug LED. More...
 

Functions

void bug (bool on)
 Turn bug LED on or off.
 
esp_err_t init ()
 Initialize LED.
 
void wifi (bool on)
 Turn WiFi LED on or off.
 

Variables

constexpr auto bug_gpio_num {GPIO_NUM_48}
 Bug LED pin used to indicate errors or updates.
 
constexpr auto bug_channel {LEDC_CHANNEL_0}
 Bug LED channel.
 
constexpr auto wifi_gpio_num {GPIO_NUM_47}
 WiFi LED used to indicate WiFi connection status.
 
constexpr auto wifi_channel {LEDC_CHANNEL_1}
 WiFi LED channel.
 

Function Documentation

◆ bug()

void drv::led::bug ( bool on)
Parameters
onLED state

◆ init()

esp_err_t drv::led::init ( )

Initialization takes place in init(). This function configures a 4kHz LEDC timer with 2 channels for the bug and WiFi LEDs. The resolution of the PWM is 8 bits.

◆ wifi()

void drv::led::wifi ( bool on)
Parameters
onLED state

Variable Documentation

◆ bug_channel

auto drv::led::bug_channel {LEDC_CHANNEL_0}
inlineconstexpr

◆ bug_gpio_num

auto drv::led::bug_gpio_num {GPIO_NUM_48}
inlineconstexpr

◆ wifi_channel

auto drv::led::wifi_channel {LEDC_CHANNEL_1}
inlineconstexpr

◆ wifi_gpio_num

auto drv::led::wifi_gpio_num {GPIO_NUM_47}
inlineconstexpr