Skip to content

Commit

Permalink
cuatro: disable LED for now
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh committed Aug 24, 2024
1 parent 30d0434 commit 866bd9c
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions board/boards/cuatro.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
// ////////////////////////// //

void cuatro_set_led(uint8_t color, bool enabled) {
// try no LED
UNUSED(enabled);
switch (color) {
case LED_RED:
set_gpio_output(GPIOD, 15, !enabled);
set_gpio_output(GPIOD, 15, 1);
break;
case LED_GREEN:
set_gpio_output(GPIOD, 14, !enabled);
set_gpio_output(GPIOD, 14, 1);
break;
case LED_BLUE:
set_gpio_output(GPIOE, 2, !enabled);
set_gpio_output(GPIOE, 2, 1);
break;
default:
break;
Expand Down Expand Up @@ -70,6 +72,19 @@ void cuatro_set_bootkick(BootState state) {
void cuatro_init(void) {
red_chiplet_init();

// LED init
set_gpio_pullup(GPIOD, 14, PULL_NONE);
set_gpio_mode(GPIOD, 14, MODE_OUTPUT);
set_gpio_output_type(GPIOD, 14, OUTPUT_TYPE_OPEN_DRAIN);

set_gpio_pullup(GPIOD, 15, PULL_NONE);
set_gpio_mode(GPIOD, 15, MODE_OUTPUT);
set_gpio_output_type(GPIOD, 15, OUTPUT_TYPE_OPEN_DRAIN);

set_gpio_pullup(GPIOE, 2, PULL_NONE);
set_gpio_mode(GPIOE, 2, MODE_OUTPUT);
set_gpio_output_type(GPIOE, 2, OUTPUT_TYPE_OPEN_DRAIN);

// Power readout
set_gpio_mode(GPIOC, 5, MODE_ANALOG);
set_gpio_mode(GPIOA, 6, MODE_ANALOG);
Expand Down

0 comments on commit 866bd9c

Please sign in to comment.