Release 260111

This commit is contained in:
Comma Device
2026-01-11 18:23:29 +08:00
commit 3721ecbf8a
2601 changed files with 855070 additions and 0 deletions

20
panda/board/drivers/led.h Normal file
View File

@@ -0,0 +1,20 @@
#define LED_RED 0U
#define LED_GREEN 1U
#define LED_BLUE 2U
void led_set(uint8_t color, bool enabled) {
if (color < 3U) {
set_gpio_output(current_board->led_GPIO[color], current_board->led_pin[color], !enabled);
}
}
void led_init(void) {
for (uint8_t i = 0U; i<3U; i++){
set_gpio_pullup(current_board->led_GPIO[i], current_board->led_pin[i], PULL_NONE);
set_gpio_mode(current_board->led_GPIO[i], current_board->led_pin[i], MODE_OUTPUT);
set_gpio_output_type(current_board->led_GPIO[i], current_board->led_pin[i], OUTPUT_TYPE_OPEN_DRAIN);
led_set(i, false);
}
}