diff Discovery/Src/display.c @ 312:e84a2486933e

Merged in janlmulder/ostc4/cleanup-4 (pull request #25) Fix stopwatch and divetime not in sync
author heinrichsweikamp <bitbucket@heinrichsweikamp.com>
date Fri, 31 May 2019 06:22:50 +0000
parents 5ca177d2df5d
children f7318457df4d
line wrap: on
line diff
--- a/Discovery/Src/display.c	Fri May 17 06:38:56 2019 +0000
+++ b/Discovery/Src/display.c	Fri May 31 06:22:50 2019 +0000
@@ -34,7 +34,7 @@
 }
 
 
-void send(uint8_t *pData, uint16_t inputlength)
+static void send(uint8_t *pData, uint16_t inputlength)
 {
 	HAL_GPIO_WritePin(DISPLAY_CSB_GPIO_PORT,DISPLAY_CSB_PIN,GPIO_PIN_RESET); // chip select
 
@@ -48,7 +48,7 @@
 }
 
 
-uint16_t convert8to9to8(uint8_t *pInput, uint8_t *pOutput,uint16_t inputlength)
+static uint16_t convert8to9to8(uint8_t *pInput, uint8_t *pOutput,uint16_t inputlength)
 {
 	uint16_t outputlength;
 	uint8_t readbit =  0x80;//0b1000000;
@@ -227,55 +227,6 @@
 }
 
 
-void display_power_off(void)
-{
-	uint8_t aTxBuffer[1];
-	uint8_t bTxBuffer[9];
-	uint16_t i,length;
-
-	for(i=0;i<9;i++)
-		bTxBuffer[i] = 0;
-
-	aTxBuffer[0] = DISPLAY_OFF;
-	length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,1);
-	send((uint8_t*)bTxBuffer, length);
-	HAL_Delay(5);
-
-	aTxBuffer[0] = SLEEP_IN;
-	length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,1);
-	send((uint8_t*)bTxBuffer, length);
-}
-
-
-void display_sleep(void)
-{
-	uint8_t aTxBuffer[1];
-	uint8_t bTxBuffer[9];
-	uint16_t i,length;
-
-	for(i=0;i<9;i++)
-		bTxBuffer[i] = 0;
-
-	aTxBuffer[0] = SLEEP_IN;
-	length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,1);
-	send((uint8_t*)bTxBuffer, length);
-}
-
-
-void display_sleep_release(void)
-{
-	uint8_t aTxBuffer[1];
-	uint8_t bTxBuffer[9];
-	uint16_t i,length;
-
-	for(i=0;i<9;i++)
-		bTxBuffer[i] = 0;
-
-	aTxBuffer[0] = SLEEP_OUT;
-	length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,1);
-	send((uint8_t*)bTxBuffer, length);
-}
-
 static void Display_Error_Handler(void)
 {
   while(1)