reduce the scope of function / vars where possible

Originally by johfstee , but without modifying the
interrupt handler decls in src/interrupts.c
This commit is contained in:
fenugrec 2022-08-26 21:57:55 -04:00
parent 9f07a4b223
commit 65cd7d76c9
2 changed files with 14 additions and 14 deletions

View File

@ -44,17 +44,17 @@ THE SOFTWARE.
#include "util.h" #include "util.h"
void HAL_MspInit(void); void HAL_MspInit(void);
void SystemClock_Config(void); static void SystemClock_Config(void);
static bool send_to_host_or_enqueue(struct gs_host_frame *frame); static bool send_to_host_or_enqueue(struct gs_host_frame *frame);
static void send_to_host(void); static void send_to_host(void);
can_data_t hCAN = {0}; static can_data_t hCAN = {0};
USBD_HandleTypeDef hUSB = {0}; static USBD_HandleTypeDef hUSB = {0};
led_data_t hLED = {0}; static led_data_t hLED = {0};
queue_t *q_frame_pool = NULL; static queue_t *q_frame_pool = NULL;
queue_t *q_from_host = NULL; static queue_t *q_from_host = NULL;
queue_t *q_to_host = NULL; static queue_t *q_to_host = NULL;
int main(void) int main(void)
{ {

View File

@ -30,13 +30,13 @@ THE SOFTWARE.
#include "config.h" #include "config.h"
#include "util.h" #include "util.h"
uint8_t *USBD_FS_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length); static uint8_t *USBD_FS_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *USBD_FS_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length); static uint8_t *USBD_FS_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *USBD_FS_ManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length); static uint8_t *USBD_FS_ManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *USBD_FS_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length); static uint8_t *USBD_FS_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *USBD_FS_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length); static uint8_t *USBD_FS_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *USBD_FS_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length); static uint8_t *USBD_FS_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *USBD_FS_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length); static uint8_t *USBD_FS_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
#ifdef USB_SUPPORT_USER_STRING_DESC #ifdef USB_SUPPORT_USER_STRING_DESC
uint8_t *USBD_FS_USRStringDesc(USBD_SpeedTypeDef speed, uint8_t idx, uint16_t *length); uint8_t *USBD_FS_USRStringDesc(USBD_SpeedTypeDef speed, uint8_t idx, uint16_t *length);