From 09997428f3417c6eb137dffe1b7639455401efaa Mon Sep 17 00:00:00 2001 From: Robbe Derks Date: Mon, 28 Sep 2020 16:19:09 +0200 Subject: [PATCH] Fixed transceiver spelling --- board/board_declarations.h | 8 ++++---- board/boards/black.h | 20 ++++++++++---------- board/boards/dos.h | 20 ++++++++++---------- board/boards/grey.h | 4 ++-- board/boards/pedal.h | 18 +++++++++--------- board/boards/uno.h | 20 ++++++++++---------- board/boards/white.h | 20 ++++++++++---------- board/main.c | 2 +- board/power_saving.h | 2 +- board/spi_flasher.h | 2 +- python/__init__.py | 2 +- 11 files changed, 59 insertions(+), 59 deletions(-) diff --git a/board/board_declarations.h b/board/board_declarations.h index 5fa5ef17c..963539e00 100644 --- a/board/board_declarations.h +++ b/board/board_declarations.h @@ -1,7 +1,7 @@ // ******************** Prototypes ******************** typedef void (*board_init)(void); -typedef void (*board_enable_can_transciever)(uint8_t transciever, bool enabled); -typedef void (*board_enable_can_transcievers)(bool enabled); +typedef void (*board_enable_can_transceiver)(uint8_t transceiver, bool enabled); +typedef void (*board_enable_can_transceivers)(bool enabled); typedef void (*board_set_led)(uint8_t color, bool enabled); typedef void (*board_set_usb_power_mode)(uint8_t mode); typedef void (*board_set_gps_mode)(uint8_t mode); @@ -19,8 +19,8 @@ struct board { const char *board_type; const harness_configuration *harness_config; board_init init; - board_enable_can_transciever enable_can_transciever; - board_enable_can_transcievers enable_can_transcievers; + board_enable_can_transceiver enable_can_transceiver; + board_enable_can_transceivers enable_can_transceivers; board_set_led set_led; board_set_usb_power_mode set_usb_power_mode; board_set_gps_mode set_gps_mode; diff --git a/board/boards/black.h b/board/boards/black.h index bddf3814b..fa5a542d0 100644 --- a/board/boards/black.h +++ b/board/boards/black.h @@ -2,8 +2,8 @@ // Black Panda + Harness // // ///////////////////// // -void black_enable_can_transciever(uint8_t transciever, bool enabled) { - switch (transciever){ +void black_enable_can_transceiver(uint8_t transceiver, bool enabled) { + switch (transceiver){ case 1U: set_gpio_output(GPIOC, 1, !enabled); break; @@ -17,18 +17,18 @@ void black_enable_can_transciever(uint8_t transciever, bool enabled) { set_gpio_output(GPIOB, 10, !enabled); break; default: - puts("Invalid CAN transciever ("); puth(transciever); puts("): enabling failed\n"); + puts("Invalid CAN transceiver ("); puth(transceiver); puts("): enabling failed\n"); break; } } -void black_enable_can_transcievers(bool enabled) { +void black_enable_can_transceivers(bool enabled) { for(uint8_t i=1U; i<=4U; i++){ // Leave main CAN always on for CAN-based ignition detection if((car_harness_status == HARNESS_STATUS_FLIPPED) ? (i == 3U) : (i == 1U)){ - black_enable_can_transciever(i, true); + black_enable_can_transceiver(i, true); } else { - black_enable_can_transciever(i, enabled); + black_enable_can_transceiver(i, enabled); } } } @@ -198,8 +198,8 @@ void black_init(void) { // Initialize harness harness_init(); - // Enable CAN transcievers - black_enable_can_transcievers(true); + // Enable CAN transceivers + black_enable_can_transceivers(true); // Disable LEDs black_set_led(LED_RED, false); @@ -236,8 +236,8 @@ const board board_black = { .board_type = "Black", .harness_config = &black_harness_config, .init = black_init, - .enable_can_transciever = black_enable_can_transciever, - .enable_can_transcievers = black_enable_can_transcievers, + .enable_can_transceiver = black_enable_can_transceiver, + .enable_can_transceivers = black_enable_can_transceivers, .set_led = black_set_led, .set_usb_power_mode = black_set_usb_power_mode, .set_gps_mode = black_set_gps_mode, diff --git a/board/boards/dos.h b/board/boards/dos.h index d4bfb3f43..307ae7247 100644 --- a/board/boards/dos.h +++ b/board/boards/dos.h @@ -2,8 +2,8 @@ // Dos + Harness // // ///////////// // -void dos_enable_can_transciever(uint8_t transciever, bool enabled) { - switch (transciever){ +void dos_enable_can_transceiver(uint8_t transceiver, bool enabled) { + switch (transceiver){ case 1U: set_gpio_output(GPIOC, 1, !enabled); break; @@ -17,18 +17,18 @@ void dos_enable_can_transciever(uint8_t transciever, bool enabled) { set_gpio_output(GPIOB, 10, !enabled); break; default: - puts("Invalid CAN transciever ("); puth(transciever); puts("): enabling failed\n"); + puts("Invalid CAN transceiver ("); puth(transceiver); puts("): enabling failed\n"); break; } } -void dos_enable_can_transcievers(bool enabled) { +void dos_enable_can_transceivers(bool enabled) { for(uint8_t i=1U; i<=4U; i++){ // Leave main CAN always on for CAN-based ignition detection if((car_harness_status == HARNESS_STATUS_FLIPPED) ? (i == 3U) : (i == 1U)){ - uno_enable_can_transciever(i, true); + uno_enable_can_transceiver(i, true); } else { - uno_enable_can_transciever(i, enabled); + uno_enable_can_transceiver(i, enabled); } } } @@ -172,8 +172,8 @@ void dos_init(void) { // Initialize RTC rtc_init(); - // Enable CAN transcievers - dos_enable_can_transcievers(true); + // Enable CAN transceivers + dos_enable_can_transceivers(true); // Disable LEDs dos_set_led(LED_RED, false); @@ -213,8 +213,8 @@ const board board_dos = { .board_type = "Dos", .harness_config = &dos_harness_config, .init = dos_init, - .enable_can_transciever = dos_enable_can_transciever, - .enable_can_transcievers = dos_enable_can_transcievers, + .enable_can_transceiver = dos_enable_can_transceiver, + .enable_can_transceivers = dos_enable_can_transceivers, .set_led = dos_set_led, .set_usb_power_mode = dos_set_usb_power_mode, .set_gps_mode = dos_set_gps_mode, diff --git a/board/boards/grey.h b/board/boards/grey.h index 915c883b2..bd5b1559e 100644 --- a/board/boards/grey.h +++ b/board/boards/grey.h @@ -37,8 +37,8 @@ const board board_grey = { .board_type = "Grey", .harness_config = &white_harness_config, .init = grey_init, - .enable_can_transciever = white_enable_can_transciever, - .enable_can_transcievers = white_enable_can_transcievers, + .enable_can_transceiver = white_enable_can_transceiver, + .enable_can_transceivers = white_enable_can_transceivers, .set_led = white_set_led, .set_usb_power_mode = white_set_usb_power_mode, .set_gps_mode = grey_set_gps_mode, diff --git a/board/boards/pedal.h b/board/boards/pedal.h index 22ecb78b5..31abe9c5c 100644 --- a/board/boards/pedal.h +++ b/board/boards/pedal.h @@ -2,19 +2,19 @@ // Pedal // // ///// // -void pedal_enable_can_transciever(uint8_t transciever, bool enabled) { - switch (transciever){ +void pedal_enable_can_transceiver(uint8_t transceiver, bool enabled) { + switch (transceiver){ case 1: set_gpio_output(GPIOB, 3, !enabled); break; default: - puts("Invalid CAN transciever ("); puth(transciever); puts("): enabling failed\n"); + puts("Invalid CAN transceiver ("); puth(transceiver); puts("): enabling failed\n"); break; } } -void pedal_enable_can_transcievers(bool enabled) { - pedal_enable_can_transciever(1U, enabled); +void pedal_enable_can_transceivers(bool enabled) { + pedal_enable_can_transceiver(1U, enabled); } void pedal_set_led(uint8_t color, bool enabled) { @@ -94,8 +94,8 @@ void pedal_init(void) { // DAC outputs on A4 and A5 // apparently they don't need GPIO setup - // Enable transciever - pedal_enable_can_transcievers(true); + // Enable transceiver + pedal_enable_can_transceivers(true); // Disable LEDs pedal_set_led(LED_RED, false); @@ -110,8 +110,8 @@ const board board_pedal = { .board_type = "Pedal", .harness_config = &pedal_harness_config, .init = pedal_init, - .enable_can_transciever = pedal_enable_can_transciever, - .enable_can_transcievers = pedal_enable_can_transcievers, + .enable_can_transceiver = pedal_enable_can_transceiver, + .enable_can_transceivers = pedal_enable_can_transceivers, .set_led = pedal_set_led, .set_usb_power_mode = pedal_set_usb_power_mode, .set_gps_mode = pedal_set_gps_mode, diff --git a/board/boards/uno.h b/board/boards/uno.h index 25fd1d864..96eb6268b 100644 --- a/board/boards/uno.h +++ b/board/boards/uno.h @@ -4,8 +4,8 @@ #define BOOTKICK_TIME 3U uint8_t bootkick_timer = 0U; -void uno_enable_can_transciever(uint8_t transciever, bool enabled) { - switch (transciever){ +void uno_enable_can_transceiver(uint8_t transceiver, bool enabled) { + switch (transceiver){ case 1U: set_gpio_output(GPIOC, 1, !enabled); break; @@ -19,18 +19,18 @@ void uno_enable_can_transciever(uint8_t transciever, bool enabled) { set_gpio_output(GPIOB, 10, !enabled); break; default: - puts("Invalid CAN transciever ("); puth(transciever); puts("): enabling failed\n"); + puts("Invalid CAN transceiver ("); puth(transceiver); puts("): enabling failed\n"); break; } } -void uno_enable_can_transcievers(bool enabled) { +void uno_enable_can_transceivers(bool enabled) { for(uint8_t i=1U; i<=4U; i++){ // Leave main CAN always on for CAN-based ignition detection if((car_harness_status == HARNESS_STATUS_FLIPPED) ? (i == 3U) : (i == 1U)){ - uno_enable_can_transciever(i, true); + uno_enable_can_transceiver(i, true); } else { - uno_enable_can_transciever(i, enabled); + uno_enable_can_transceiver(i, enabled); } } } @@ -231,8 +231,8 @@ void uno_init(void) { // Initialize RTC rtc_init(); - // Enable CAN transcievers - uno_enable_can_transcievers(true); + // Enable CAN transceivers + uno_enable_can_transceivers(true); // Disable LEDs uno_set_led(LED_RED, false); @@ -279,8 +279,8 @@ const board board_uno = { .board_type = "Uno", .harness_config = &uno_harness_config, .init = uno_init, - .enable_can_transciever = uno_enable_can_transciever, - .enable_can_transcievers = uno_enable_can_transcievers, + .enable_can_transceiver = uno_enable_can_transceiver, + .enable_can_transceivers = uno_enable_can_transceivers, .set_led = uno_set_led, .set_usb_power_mode = uno_set_usb_power_mode, .set_gps_mode = uno_set_gps_mode, diff --git a/board/boards/white.h b/board/boards/white.h index aa4eb8a16..44d8f512b 100644 --- a/board/boards/white.h +++ b/board/boards/white.h @@ -2,8 +2,8 @@ // White Panda // // /////////// // -void white_enable_can_transciever(uint8_t transciever, bool enabled) { - switch (transciever){ +void white_enable_can_transceiver(uint8_t transceiver, bool enabled) { + switch (transceiver){ case 1U: set_gpio_output(GPIOC, 1, !enabled); break; @@ -14,15 +14,15 @@ void white_enable_can_transciever(uint8_t transciever, bool enabled) { set_gpio_output(GPIOA, 0, !enabled); break; default: - puts("Invalid CAN transciever ("); puth(transciever); puts("): enabling failed\n"); + puts("Invalid CAN transceiver ("); puth(transceiver); puts("): enabling failed\n"); break; } } -void white_enable_can_transcievers(bool enabled) { - uint8_t t1 = enabled ? 1U : 2U; // leave transciever 1 enabled to detect CAN ignition +void white_enable_can_transceivers(bool enabled) { + uint8_t t1 = enabled ? 1U : 2U; // leave transceiver 1 enabled to detect CAN ignition for(uint8_t i=t1; i<=3U; i++) { - white_enable_can_transciever(i, enabled); + white_enable_can_transceiver(i, enabled); } } @@ -299,8 +299,8 @@ void white_grey_common_init(void) { set_gpio_alternate(GPIOC, 11, GPIO_AF7_USART3); set_gpio_pullup(GPIOC, 11, PULL_UP); - // Enable CAN transcievers - white_enable_can_transcievers(true); + // Enable CAN transceivers + white_enable_can_transceivers(true); // Disable LEDs white_set_led(LED_RED, false); @@ -336,8 +336,8 @@ const board board_white = { .board_type = "White", .harness_config = &white_harness_config, .init = white_init, - .enable_can_transciever = white_enable_can_transciever, - .enable_can_transcievers = white_enable_can_transcievers, + .enable_can_transceiver = white_enable_can_transceiver, + .enable_can_transceivers = white_enable_can_transceivers, .set_led = white_set_led, .set_usb_power_mode = white_set_usb_power_mode, .set_gps_mode = white_set_gps_mode, diff --git a/board/main.c b/board/main.c index daf4f2028..c6e4f0fce 100644 --- a/board/main.c +++ b/board/main.c @@ -837,7 +837,7 @@ int main(void) { set_safety_mode(SAFETY_SILENT, 0); // enable CAN TXs - current_board->enable_can_transcievers(true); + current_board->enable_can_transceivers(true); #ifndef EON spi_init(); diff --git a/board/power_saving.h b/board/power_saving.h index 26503d3b1..2cb79cb61 100644 --- a/board/power_saving.h +++ b/board/power_saving.h @@ -28,7 +28,7 @@ void set_power_save_state(int state) { enable = true; } - current_board->enable_can_transcievers(enable); + current_board->enable_can_transceivers(enable); // Switch EPS/GPS if (enable) { diff --git a/board/spi_flasher.h b/board/spi_flasher.h index b0511c14e..2636bf535 100644 --- a/board/spi_flasher.h +++ b/board/spi_flasher.h @@ -290,7 +290,7 @@ void soft_flasher_start(void) { // B8,B9: CAN 1 set_gpio_alternate(GPIOB, 8, GPIO_AF9_CAN1); set_gpio_alternate(GPIOB, 9, GPIO_AF9_CAN1); - current_board->enable_can_transciever(1, true); + current_board->enable_can_transceiver(1, true); // init can llcan_set_speed(CAN1, 5000, false, false); diff --git a/python/__init__.py b/python/__init__.py index d5d21c172..936c975f0 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -461,7 +461,7 @@ class Panda(object): self._handle.controlWrite(Panda.REQUEST_OUT, 0xe5, int(enable), 0, b'') def set_can_enable(self, bus_num, enable): - # sets the can transciever enable pin + # sets the can transceiver enable pin self._handle.controlWrite(Panda.REQUEST_OUT, 0xf4, int(bus_num), int(enable), b'') def set_can_speed_kbps(self, bus, speed):