diff --git a/board/boards/black.h b/board/boards/black.h index 6e73c25c13..4b574f6698 100644 --- a/board/boards/black.h +++ b/board/boards/black.h @@ -185,7 +185,6 @@ const board board_black = { .read_current = unused_read_current, .set_fan_enabled = unused_set_fan_enabled, .set_ir_power = unused_set_ir_power, - .set_phone_power = unused_set_phone_power, .set_siren = unused_set_siren, .read_som_gpio = unused_read_som_gpio }; diff --git a/board/boards/board_declarations.h b/board/boards/board_declarations.h index 000fbaf8e0..f0cb30290b 100644 --- a/board/boards/board_declarations.h +++ b/board/boards/board_declarations.h @@ -15,7 +15,6 @@ typedef bool (*board_check_ignition)(void); typedef uint32_t (*board_read_current)(void); typedef void (*board_set_ir_power)(uint8_t percentage); typedef void (*board_set_fan_enabled)(bool enabled); -typedef void (*board_set_phone_power)(bool enabled); typedef void (*board_set_siren)(bool enabled); typedef void (*board_set_bootkick)(BootState state); typedef bool (*board_read_som_gpio)(void); @@ -42,7 +41,6 @@ struct board { board_read_current read_current; board_set_ir_power set_ir_power; board_set_fan_enabled set_fan_enabled; - board_set_phone_power set_phone_power; board_set_siren set_siren; board_set_bootkick set_bootkick; board_read_som_gpio read_som_gpio; diff --git a/board/boards/dos.h b/board/boards/dos.h index b0a9736770..1a7bc878e5 100644 --- a/board/boards/dos.h +++ b/board/boards/dos.h @@ -217,7 +217,6 @@ const board board_dos = { .read_current = unused_read_current, .set_fan_enabled = dos_set_fan_enabled, .set_ir_power = dos_set_ir_power, - .set_phone_power = unused_set_phone_power, .set_siren = dos_set_siren, .set_bootkick = dos_set_bootkick, .read_som_gpio = dos_read_som_gpio diff --git a/board/boards/grey.h b/board/boards/grey.h index 82d9788a36..4e13b51cb0 100644 --- a/board/boards/grey.h +++ b/board/boards/grey.h @@ -27,7 +27,6 @@ const board board_grey = { .read_current = white_read_current, .set_fan_enabled = unused_set_fan_enabled, .set_ir_power = unused_set_ir_power, - .set_phone_power = unused_set_phone_power, .set_siren = unused_set_siren, .read_som_gpio = unused_read_som_gpio }; diff --git a/board/boards/pedal.h b/board/boards/pedal.h index 5af2fa07bb..bdc4de1568 100644 --- a/board/boards/pedal.h +++ b/board/boards/pedal.h @@ -89,7 +89,6 @@ const board board_pedal = { .read_current = unused_read_current, .set_fan_enabled = unused_set_fan_enabled, .set_ir_power = unused_set_ir_power, - .set_phone_power = unused_set_phone_power, .set_siren = unused_set_siren, .read_som_gpio = unused_read_som_gpio }; diff --git a/board/boards/red.h b/board/boards/red.h index 1eb590c9ac..c618c48ad4 100644 --- a/board/boards/red.h +++ b/board/boards/red.h @@ -193,7 +193,6 @@ const board board_red = { .read_current = unused_read_current, .set_fan_enabled = unused_set_fan_enabled, .set_ir_power = unused_set_ir_power, - .set_phone_power = unused_set_phone_power, .set_siren = unused_set_siren, .read_som_gpio = unused_read_som_gpio }; diff --git a/board/boards/red_v2.h b/board/boards/red_v2.h index 3103d0617f..2fa18835af 100644 --- a/board/boards/red_v2.h +++ b/board/boards/red_v2.h @@ -33,7 +33,6 @@ const board board_red_v2 = { .read_current = unused_read_current, .set_fan_enabled = unused_set_fan_enabled, .set_ir_power = unused_set_ir_power, - .set_phone_power = unused_set_phone_power, .set_siren = unused_set_siren, .read_som_gpio = unused_read_som_gpio }; diff --git a/board/boards/tres.h b/board/boards/tres.h index 7082d1b393..599516e232 100644 --- a/board/boards/tres.h +++ b/board/boards/tres.h @@ -92,7 +92,6 @@ const board board_tres = { .read_current = unused_read_current, .set_fan_enabled = tres_set_fan_enabled, .set_ir_power = tres_set_ir_power, - .set_phone_power = unused_set_phone_power, .set_siren = fake_siren_set, .set_bootkick = tres_set_bootkick, .read_som_gpio = tres_read_som_gpio diff --git a/board/boards/uno.h b/board/boards/uno.h index 3ca294f93e..d03782cc06 100644 --- a/board/boards/uno.h +++ b/board/boards/uno.h @@ -58,10 +58,6 @@ void uno_set_bootkick(BootState state) { } } -void uno_set_phone_power(bool enabled){ - set_gpio_output(GPIOB, 4, enabled); -} - void uno_set_can_mode(uint8_t mode) { uno_enable_can_transceiver(2U, false); uno_enable_can_transceiver(4U, false); @@ -141,7 +137,7 @@ void uno_init(void) { set_gpio_alternate(GPIOC, 8, GPIO_AF2_TIM3); // Turn on phone regulator - uno_set_phone_power(true); + set_gpio_output(GPIOB, 4, true); // Initialize IR PWM and set to 0% set_gpio_alternate(GPIOB, 7, GPIO_AF2_TIM4); @@ -224,7 +220,6 @@ const board board_uno = { .read_current = unused_read_current, .set_fan_enabled = uno_set_fan_enabled, .set_ir_power = uno_set_ir_power, - .set_phone_power = uno_set_phone_power, .set_siren = unused_set_siren, .set_bootkick = uno_set_bootkick, .read_som_gpio = unused_read_som_gpio diff --git a/board/boards/unused_funcs.h b/board/boards/unused_funcs.h index edc83e3e05..7bfde01391 100644 --- a/board/boards/unused_funcs.h +++ b/board/boards/unused_funcs.h @@ -9,10 +9,6 @@ void unused_set_fan_enabled(bool enabled) { UNUSED(enabled); } -void unused_set_phone_power(bool enabled) { - UNUSED(enabled); -} - void unused_set_siren(bool enabled) { UNUSED(enabled); } diff --git a/board/boards/white.h b/board/boards/white.h index 2d6a6a5093..39bad3e760 100644 --- a/board/boards/white.h +++ b/board/boards/white.h @@ -244,7 +244,6 @@ const board board_white = { .read_current = white_read_current, .set_fan_enabled = unused_set_fan_enabled, .set_ir_power = unused_set_ir_power, - .set_phone_power = unused_set_phone_power, .set_siren = unused_set_siren, .read_som_gpio = unused_read_som_gpio }; diff --git a/board/main_comms.h b/board/main_comms.h index 438839c9fe..df698fb113 100644 --- a/board/main_comms.h +++ b/board/main_comms.h @@ -152,10 +152,6 @@ int comms_control_handler(ControlPacket_t *req, uint8_t *resp) { resp[1] = ((fan_state.rpm & 0xFF00U) >> 8U); resp_len = 2; break; - // **** 0xb3: set phone power - case 0xb3: - current_board->set_phone_power(req->param1 > 0U); - break; // **** 0xc0: reset communications case 0xc0: comms_can_reset(); diff --git a/python/__init__.py b/python/__init__.py index b8e1111c3d..274e7dbe4d 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -920,10 +920,6 @@ def get_fan_rpm(self): a = struct.unpack("H", dat) return a[0] - # ****************** Phone ***************** - def set_phone_power(self, enabled): - self._handle.controlWrite(Panda.REQUEST_OUT, 0xb3, int(enabled), 0, b'') - # ****************** Siren ***************** def set_siren(self, enabled): self._handle.controlWrite(Panda.REQUEST_OUT, 0xf6, int(enabled), 0, b'')