mirror of https://github.com/commaai/panda.git
tres: fix fan spin on startup (#1297)
* tres: fix fan spin on startup * new init
This commit is contained in:
parent
f658ecdd75
commit
d70fa4e120
|
@ -70,13 +70,10 @@ void red_chiplet_init(void) {
|
|||
set_gpio_pullup(GPIOD, 3, PULL_NONE);
|
||||
set_gpio_mode(GPIOD, 3, MODE_OUTPUT);
|
||||
|
||||
//B0: 5VOUT_S
|
||||
// B0: 5VOUT_S
|
||||
set_gpio_pullup(GPIOB, 0, PULL_NONE);
|
||||
set_gpio_mode(GPIOB, 0, MODE_ANALOG);
|
||||
|
||||
// Turn on USB load switch.
|
||||
red_chiplet_set_fan_or_usb_load_switch(true);
|
||||
|
||||
// Initialize harness
|
||||
harness_init();
|
||||
|
||||
|
|
|
@ -2,6 +2,14 @@
|
|||
// Red Panda V2 with chiplet + Harness //
|
||||
// ///////////////////// //
|
||||
|
||||
void red_panda_v2_init(void) {
|
||||
// common chiplet init
|
||||
red_chiplet_init();
|
||||
|
||||
// Turn on USB load switch
|
||||
red_chiplet_set_fan_or_usb_load_switch(true);
|
||||
}
|
||||
|
||||
const board board_red_v2 = {
|
||||
.board_type = "Red_v2",
|
||||
.board_tick = unused_board_tick,
|
||||
|
@ -17,7 +25,7 @@ const board board_red_v2 = {
|
|||
.adc_scale = 5539U,
|
||||
.fan_stall_recovery = false,
|
||||
.fan_enable_cooldown_time = 0U,
|
||||
.init = red_chiplet_init,
|
||||
.init = red_panda_v2_init,
|
||||
.enable_can_transceiver = red_chiplet_enable_can_transceiver,
|
||||
.enable_can_transceivers = red_chiplet_enable_can_transceivers,
|
||||
.set_led = red_set_led,
|
||||
|
|
Loading…
Reference in New Issue