/**
  ******************************************************************************
  * @file    display.h
  * @brief   This file contains all the function prototypes for
  *          the display.c file
  ******************************************************************************
*/

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef DISPLAY_H
#define DISPLAY_H

#include <stdint.h>
#include <stddef.h>
#include "main.h"

// External global variable
extern char G[48];
//extern _Bool Annunc[19];
extern uint32_t MainColourFore;
extern uint32_t AuxColourFore;
extern uint32_t AnnunColourFore;

// Function prototypes
void DisplayMain(void);
void DisplaySplash(void);   // power-on sign-of-life; runs without the DMM connected
//void DisplayAuxFirstHalf(void);
//void DisplayAuxSecondHalf(void);
//void DisplayAnnunciatorsHalf(void);
void ShiftUnitsRight(char* text1);
void FixUnitText(char* text1);

// Continuity beeper (added feature). The on-screen indicator is drawn by
// DisplayAnnunciators(): the lit 2ohm/4ohm annunciator becomes an inverted
// "CONT" (black on green) while contBeeping is set.
void ContinuityCheck(void);
extern volatile float   contLastOhms;     // last parsed resistance (ohms) - Live Watch
extern volatile uint8_t contIsResistance; // 1 = ohm unit detected
extern volatile uint8_t contShift;        // 1 = SHIFT annunciator lit (continuity armed)
extern volatile uint8_t contBeeping;      // 1 = buzzer currently on


// Display coords
#define Xpos_MAIN				25			// These are actually the Y position because LCD is rotated 90deg in use. Values in pixels.
#define Ypos_MAIN				0			// start at far left
#define Xpos_ANNUNC				165
#define Xpos_SPLASH				142
#define Ypos_SPLASH				220
#define Xpos_TRIGGER			150
#define Ypos_TRIGGER			910

#endif // DISPLAY_H