diff Discovery/Src/ostc.c @ 300:5ca177d2df5d cleanup-4

cleanup: remove commented/unused code, make static without any functional change. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author Jan Mulder <jlmulder@xs4all.nl>
date Fri, 17 May 2019 21:19:04 +0200
parents f6c52eb0e25d
children 37ee61f93124
line wrap: on
line diff
--- a/Discovery/Src/ostc.c	Fri May 17 06:38:56 2019 +0000
+++ b/Discovery/Src/ostc.c	Fri May 17 21:19:04 2019 +0200
@@ -40,7 +40,9 @@
 
 
 UART_HandleTypeDef UartHandle;
+#ifdef USART_PIEZO
 UART_HandleTypeDef UartPiezoTxHandle;
+#endif
 UART_HandleTypeDef UartIR_HUD_Handle;
 
 __IO ITStatus UartReady = RESET;
@@ -90,42 +92,6 @@
     HAL_SPI_Init(&cpu2DmaSpi);
 }
 
-
-void MX_GPIO_Backlight_max_static_only_Init(void)
-{
-    GPIO_InitTypeDef GPIO_InitStruct;
-    TIM_BACKLIGHT_GPIO_ENABLE();
-
-    GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
-    GPIO_InitStruct.Pull = GPIO_NOPULL;//GPIO_PULLUP; /* should be normally high */
-    GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
-
-    GPIO_InitStruct.Pin = TIM_BACKLIGHT_PIN;
-    HAL_GPIO_Init(TIM_BACKLIGHT_GPIO_PORT, &GPIO_InitStruct);
-
-    HAL_GPIO_WritePin(TIM_BACKLIGHT_GPIO_PORT,TIM_BACKLIGHT_PIN,GPIO_PIN_SET);
-}
-
-
-void MX_GPIO_One_Button_only_Init(void)
-{
-    GPIO_InitTypeDef GPIO_InitStruct;
-    BUTTON_NEXT_GPIO_ENABLE();
-
-    GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
-    GPIO_InitStruct.Pull = GPIO_NOPULL;//GPIO_PULLUP; /* should be normally high */
-    GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
-
-    GPIO_InitStruct.Pin = BUTTON_NEXT_PIN;
-    HAL_GPIO_Init(BUTTON_NEXT_GPIO_PORT, &GPIO_InitStruct);
-}
-
-
-GPIO_PinState MX_GPIO_Read_The_One_Button(void)
-{
-    return HAL_GPIO_ReadPin(BUTTON_NEXT_GPIO_PORT, BUTTON_NEXT_PIN);
-}
-
 void MX_GPIO_Init(void)
 {
     GPIO_InitTypeDef GPIO_InitStruct;
@@ -263,26 +229,6 @@
 #endif
 }
 
-
-void MX_SmallCPU_NO_Reset_Helper(void)
-{
-#ifdef SMALLCPU_NRESET_PIN
-    GPIO_InitTypeDef GPIO_InitStruct;
-
-    GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
-    GPIO_InitStruct.Pull = GPIO_NOPULL;
-    GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
-
-    SMALLCPU_NRESET_GPIO_ENABLE();
-    HAL_GPIO_Init(SMALLCPU_NRESET_GPIO_PORT, &GPIO_InitStruct);
-    HAL_GPIO_WritePin(SMALLCPU_NRESET_GPIO_PORT,SMALLCPU_NRESET_PIN,GPIO_PIN_SET);
-//	HAL_Delay(100);
-//  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
-//  HAL_GPIO_Init(SMALLCPU_NRESET_GPIO_PORT, &GPIO_InitStruct);
-#endif
-}
-
-
 void MX_SmallCPU_Reset_To_Standard(void)
 {
 #ifdef SMALLCPU_NRESET_PIN
@@ -303,23 +249,6 @@
 #endif
 }
 
-
-uint8_t MX_UART_ButtonAdjust(uint8_t *array)
-{
-#ifdef USART_PIEZO
-    uint8_t answer[4];
-    HAL_UART_Transmit(&UartPiezoTxHandle,array,4,1000);
-    HAL_UART_Receive(&UartPiezoTxHandle,answer,4,2000);
-    if(	(answer[0] == array[0])
-        &&(answer[1] == array[1])
-        &&(answer[2] == array[2])
-        &&(answer[3] == array[3]))
-    return 1;
-#endif
-    return 0;
-}
-
-
 void MX_UART_Init(void)
 {
   /*##-1- Configure the UART peripheral ######################################*/
@@ -375,8 +304,6 @@
         UartReady = SET;
 }
 
-
-
 //void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
 void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
 {