From bc76c7263ecc30721bd06057c47715e15ae72bea Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 21 Aug 2021 23:14:54 +0200 Subject: [PATCH] reduce some globals scope --- armsrc/lfops.c | 2 +- armsrc/optimized_ikeys.c | 2 +- armsrc/usart.c | 6 +++--- common_arm/usb_cdc.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/armsrc/lfops.c b/armsrc/lfops.c index 023493b3a..e9be77169 100644 --- a/armsrc/lfops.c +++ b/armsrc/lfops.c @@ -145,7 +145,7 @@ Initial values if not in flash { 29 , 17 , 15 , 40 , 0 , 0 , 15 }, // Leading 0 { 29 , 17 , 15 , 31 , 47 , 63 , 15 } // 1 of 4 */ -t55xx_configurations_t T55xx_Timing = { +static t55xx_configurations_t T55xx_Timing = { { #ifdef WITH_FLASH // PM3RDV4 diff --git a/armsrc/optimized_ikeys.c b/armsrc/optimized_ikeys.c index b5600cf52..38b939262 100644 --- a/armsrc/optimized_ikeys.c +++ b/armsrc/optimized_ikeys.c @@ -64,7 +64,7 @@ From "Dismantling iclass": #include "mbedtls/des.h" #include "optimized_cipherutils.h" -uint8_t pi[35] = { +static uint8_t pi[35] = { 0x0F, 0x17, 0x1B, 0x1D, 0x1E, 0x27, 0x2B, 0x2D, 0x2E, 0x33, 0x35, 0x39, 0x36, 0x3A, 0x3C, 0x47, 0x4B, 0x4D, 0x4E, 0x53, 0x55, 0x56, 0x59, 0x5A, diff --git a/armsrc/usart.c b/armsrc/usart.c index c26a28ea8..5b3a09fc0 100644 --- a/armsrc/usart.c +++ b/armsrc/usart.c @@ -11,9 +11,9 @@ #include "usart.h" #include "proxmark3_arm.h" -volatile AT91PS_USART pUS1 = AT91C_BASE_US1; -volatile AT91PS_PIO pPIO = AT91C_BASE_PIOA; -volatile AT91PS_PDC pPDC = AT91C_BASE_PDC_US1; +static volatile AT91PS_USART pUS1 = AT91C_BASE_US1; +static volatile AT91PS_PIO pPIO = AT91C_BASE_PIOA; +static volatile AT91PS_PDC pPDC = AT91C_BASE_PDC_US1; uint32_t g_usart_baudrate = 0; uint8_t g_usart_parity = 0; diff --git a/common_arm/usb_cdc.c b/common_arm/usb_cdc.c index 34400f4d5..260cdcb50 100644 --- a/common_arm/usb_cdc.c +++ b/common_arm/usb_cdc.c @@ -129,7 +129,7 @@ AT91SAM7S256 USB Device Port #define SET_LINE_CODING 0x2021 #define SET_CONTROL_LINE_STATE 0x2221 -AT91PS_UDP pUdp = AT91C_BASE_UDP; +static AT91PS_UDP pUdp = AT91C_BASE_UDP; static uint8_t btConfiguration = 0; static uint8_t btConnection = 0; static uint8_t btReceiveBank = AT91C_UDP_RX_DATA_BK0; @@ -442,7 +442,7 @@ typedef struct { uint8_t DataBits; } AT91S_CDC_LINE_CODING, *AT91PS_CDC_LINE_CODING; -AT91S_CDC_LINE_CODING line = { // purely informative, actual values don't matter +static AT91S_CDC_LINE_CODING line = { // purely informative, actual values don't matter USART_BAUD_RATE, // baudrate 0, // 1 Stop Bit 0, // None Parity