MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / initBoot

Function initBoot

Devices/cyd-3248s035c/Source/Configuration.cpp:9–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7using namespace tt::hal;
8
9static bool initBoot() {
10 //Set the RGB Led Pins to output and turn them off
11 ESP_ERROR_CHECK(gpio_set_direction(GPIO_NUM_4, GPIO_MODE_OUTPUT)); //Red
12 ESP_ERROR_CHECK(gpio_set_direction(GPIO_NUM_16, GPIO_MODE_OUTPUT)); //Green
13 ESP_ERROR_CHECK(gpio_set_direction(GPIO_NUM_17, GPIO_MODE_OUTPUT)); //Blue
14
15 //0 on, 1 off... yep it's backwards.
16 ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_4, 1)); //Red
17 ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_16, 1)); //Green
18 ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_17, 1)); //Blue
19
20 return driver::pwmbacklight::init(LCD_PIN_BACKLIGHT);
21}
22
23static DeviceVector createDevices() {
24 return {

Callers

nothing calls this directly

Calls 1

initFunction · 0.50

Tested by

no test coverage detected