Skip to content

Commit

Permalink
NONE and CLIENT should be the same thing in white/grey pandas
Browse files Browse the repository at this point in the history
  • Loading branch information
rbiasini committed Oct 1, 2019
1 parent 8c1df55 commit e97b283
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions board/boards/white.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void white_set_led(uint8_t color, bool enabled) {
break;
case LED_BLUE:
set_gpio_output(GPIOC, 6, !enabled);
break;
break;
default:
break;
}
Expand All @@ -43,6 +43,7 @@ void white_set_led(uint8_t color, bool enabled) {
void white_set_usb_power_mode(uint8_t mode){
bool valid_mode = true;
switch (mode) {
case USB_POWER_NONE:
case USB_POWER_CLIENT:
// B2,A13: set client mode
set_gpio_output(GPIOB, 2, 0);
Expand Down Expand Up @@ -125,7 +126,7 @@ void white_set_can_mode(uint8_t mode){

// A8,A15: normal CAN3 mode
set_gpio_alternate(GPIOA, 8, GPIO_AF11_CAN3);
set_gpio_alternate(GPIOA, 15, GPIO_AF11_CAN3);
set_gpio_alternate(GPIOA, 15, GPIO_AF11_CAN3);
break;
case CAN_MODE_GMLAN_CAN3:
// A8,A15: disable CAN3 mode
Expand All @@ -143,7 +144,7 @@ void white_set_can_mode(uint8_t mode){
// B5,B6: normal CAN2 mode
set_gpio_alternate(GPIOB, 5, GPIO_AF9_CAN2);
set_gpio_alternate(GPIOB, 6, GPIO_AF9_CAN2);
break;
break;
default:
puts("Tried to set unsupported CAN mode: "); puth(mode); puts("\n");
break;
Expand Down Expand Up @@ -310,4 +311,4 @@ const board board_white = {
.set_can_mode = white_set_can_mode,
.usb_power_mode_tick = white_usb_power_mode_tick,
.check_ignition = white_check_ignition
};
};

0 comments on commit e97b283

Please sign in to comment.