std-training
std-training copied to clipboard
The LED doesn't light up
The LED doesn't light up
I find that the gpio of led changed from gpio_8 to gpio_7.
If we're talking about the LED on the GPIO7 pin (ESP32-C3-DevKit-RUST-1 board), you can try:
const LED_PIN: i32 = 7;
unsafe {
gpio_reset_pin(LED_PIN);
assert_eq!(gpio_set_direction(LED_PIN, gpio_mode_t_GPIO_MODE_OUTPUT), ESP_OK);
assert_eq!(gpio_set_level(LED_PIN, 1), ESP_OK);
}