[Cryptech-Commits] [sw/stm32] 02/02: Cleanup

git at cryptech.is git at cryptech.is
Thu Sep 7 20:51:42 UTC 2017


This is an automated email from the git hooks/post-receive script.

paul at psgd.org pushed a commit to branch master
in repository sw/stm32.

commit ceee42024b728a878063548ea245c47a951be29f
Author: Paul Selkirk <paul at psgd.org>
AuthorDate: Thu Aug 31 17:38:05 2017 -0400

    Cleanup
---
 stm-init.c | 8 --------
 stm-init.h | 4 ++--
 stm-uart.c | 2 +-
 3 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/stm-init.c b/stm-init.c
index d36bdff..c06554b 100644
--- a/stm-init.c
+++ b/stm-init.c
@@ -115,10 +115,6 @@ static void MX_GPIO_Init(void)
 }
 #endif
 
-#ifdef CMSIS_RTOS
-#include "cmsis_os.h"
-#endif
-
 /**
  * @brief  This function is executed in case of error occurrence.
  * @param  None
@@ -129,10 +125,6 @@ void Error_Handler(void)
 #ifdef HAL_GPIO_MODULE_ENABLED
   HAL_GPIO_WritePin(LED_PORT, LED_RED, GPIO_PIN_SET);
 #endif
-#ifdef CMSIS_RTOS
-  //osThreadSetPriority(osThreadGetId(), osPriorityIdle);
-  osThreadTerminate(osThreadGetId());
-#endif
 
   while (1) { ; }
 }
diff --git a/stm-init.h b/stm-init.h
index 2c3ec99..ff1c4c2 100644
--- a/stm-init.h
+++ b/stm-init.h
@@ -39,7 +39,7 @@
 
 /* Functions used to make GPIO pin setup (in stm-init.c) easier */
 
-inline void gpio_output(GPIO_TypeDef* output_port, uint16_t output_pins, GPIO_PinState output_level)
+static inline void gpio_output(GPIO_TypeDef* output_port, uint16_t output_pins, GPIO_PinState output_level)
 {
     GPIO_InitTypeDef GPIO_InitStruct;
 
@@ -54,7 +54,7 @@ inline void gpio_output(GPIO_TypeDef* output_port, uint16_t output_pins, GPIO_Pi
     HAL_GPIO_Init(output_port, &GPIO_InitStruct);
 }
 
-inline void gpio_input(GPIO_TypeDef* input_port, uint16_t input_pin, GPIO_PinState input_pull)
+static inline void gpio_input(GPIO_TypeDef* input_port, uint16_t input_pin, GPIO_PinState input_pull)
 {
     GPIO_InitTypeDef GPIO_InitStruct;
 
diff --git a/stm-uart.c b/stm-uart.c
index ecec238..f54d95e 100644
--- a/stm-uart.c
+++ b/stm-uart.c
@@ -124,7 +124,7 @@ void uart_set_default(stm_uart_port_t port)
         default_uart = port;
 }
 
-inline UART_HandleTypeDef *_which_uart(stm_uart_port_t port)
+static inline UART_HandleTypeDef *_which_uart(stm_uart_port_t port)
 {
     if (port == STM_UART_USER) {
         return &huart_user;



More information about the Commits mailing list