tres: fix fan spin on startup (#1297)

* tres: fix fan spin on startup

* new init
This commit is contained in:
Adeeb Shihadeh 2023-03-21 11:19:12 -07:00 committed by GitHub
parent f658ecdd75
commit d70fa4e120
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

View File

@ -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();

View File

@ -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,