| 7 | using namespace tt::hal; |
| 8 | |
| 9 | static 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 | |
| 23 | static DeviceVector createDevices() { |
| 24 | return { |