diff --git a/firmware/Core/Inc/gps/gps_pps_interrupt.h b/firmware/Core/Inc/gps/gps_pps_interrupt.h index 9ec046c6f..f5107377a 100644 --- a/firmware/Core/Inc/gps/gps_pps_interrupt.h +++ b/firmware/Core/Inc/gps/gps_pps_interrupt.h @@ -4,9 +4,9 @@ #include "stm32l4xx_hal.h" -uint32_t pps_counter; +extern uint32_t pps_counter; -uint8_t gps_pps_enabled; +extern uint8_t gps_pps_enabled; void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin); @@ -14,14 +14,4 @@ void GPIO_EXTI_Init(void); void Disable_GPIO_EXTI(void); -uint8_t get_gps_pps_enabled(void); - -void set_gps_pps_enabled(void); - -void set_gps_pps_disabled(void); - -uint32_t get_pps_counter(void); - -void reset_pps_counter(void); - #endif // __INCLUDE_GUARD__GPS_PPS_INTERRUPT_H \ No newline at end of file diff --git a/firmware/Core/Src/gps/gps_pps_interrupt.c b/firmware/Core/Src/gps/gps_pps_interrupt.c index 81c07bf1a..fceff9dfd 100644 --- a/firmware/Core/Src/gps/gps_pps_interrupt.c +++ b/firmware/Core/Src/gps/gps_pps_interrupt.c @@ -25,23 +25,3 @@ void Disable_GPIO_EXTI(void) { HAL_NVIC_DisableIRQ(EXTI9_5_IRQn); gps_pps_enabled = 0; } - -uint8_t get_gps_pps_enabled(void) { - return gps_pps_enabled; -} - -void set_gps_pps_enabled(void) { - gps_pps_enabled = 1; -} - -void set_gps_pps_disabled(void) { - gps_pps_enabled = 0; -} - -uint32_t get_pps_counter(void) { - return pps_counter; -} - -void reset_pps_counter(void) { - pps_counter = 0; -} diff --git a/firmware/Core/Src/telecommands/gps_telecommand_defs.c b/firmware/Core/Src/telecommands/gps_telecommand_defs.c index e0ef55094..c7f97ec1a 100644 --- a/firmware/Core/Src/telecommands/gps_telecommand_defs.c +++ b/firmware/Core/Src/telecommands/gps_telecommand_defs.c @@ -19,20 +19,20 @@ uint8_t TCMDEXEC_gps_set_enabled_pps_tracking(const char *args_str, TCMD_TelecommandChannel_enum_t tcmd_channel, char *response_output_buf, uint16_t response_output_buf_len) { // Check if EXTI is active - if (get_gps_pps_enabled()) { + if (gps_pps_enabled) { // Disable EXTI tracking Disable_GPIO_EXTI(); - set_gps_pps_disabled(); + gps_pps_enabled = 0; snprintf( response_output_buf, response_output_buf_len, "PPS tracking disabled"); return 0; } // Check if EXTI is inactive - else if (!get_gps_pps_enabled()) { + else if (!gps_pps_enabled) { // Enable EXTI tracking GPIO_EXTI_Init(); - set_gps_pps_enabled(); + gps_pps_enabled = 1; snprintf( response_output_buf, response_output_buf_len, "PPS tracking enabled");