Cleaning up files

Fixing warnings
Add powerDisplayToggle
This commit is contained in:
Ben V. Brown
2017-07-24 23:03:56 +10:00
parent f89fd5c651
commit 8a503f84e2
7 changed files with 32 additions and 21 deletions

View File

@@ -14,21 +14,22 @@
void Oled_DisplayOn(void);
void Oled_DisplayOff(void);
const u8* Oled_DrawArea(u8 x0, u8 y0, u8 wide, u8 high,const u8* ptr);
const u8* Oled_DrawArea(u8 x0, u8 y0, u8 wide, u8 high, const u8* ptr);
void Set_ShowPos(u8 x, u8 y);
void Oled_DisplayFlip();
void GPIO_Init_OLED(void);
void Init_Oled(uint8_t leftHanded);
const u8* Data_Command(u8 len,const u8* ptr);
void Clear_Screen(void);//Clear the screen
const u8* Data_Command(u8 len, const u8* ptr);
void Clear_Screen(void); //Clear the screen
/*Functions for writing to the screen*/
void OLED_DrawString(const char* string, const uint8_t length);
void OLED_DrawChar(char c, uint8_t x);
void OLED_DrawExtendedChar(uint8_t id, uint8_t x);
void OLED_DrawTwoNumber(uint8_t in, uint8_t x);
void OLED_BlankSlot(uint8_t xStart,uint8_t width);
void OLED_BlankSlot(uint8_t xStart, uint8_t width);
void OLED_DrawThreeNumber(uint16_t in, uint8_t x);
void OLED_DrawIDLELogo();
void OLED_DrawSymbol(uint8_t x,uint8_t symbol);
void OLED_DrawSymbol(uint8_t x, uint8_t symbol);
const u8* Oled_DrawArea(u8 x0, u8 y0, u8 wide, u8 high, const u8* ptr);
#endif
/******************************** END OF FILE *********************************/

View File

@@ -11,6 +11,7 @@
#define SETTINGS_H_
#include <stdint.h>
#include "stm32f10x_flash.h"
#include "Oled.h"
#define SETTINGSVERSION 13 /*Change this if you change the struct below to prevent people getting out of sync*/
//Display Speeds
#define DISPLAYMODE_FAST (0x00)
@@ -29,7 +30,8 @@ struct {
uint32_t SleepTemp; //temp to drop to in sleep
uint8_t version; //Used to track if a reset is needed on firmware upgrade
uint8_t SleepTime; //minutes timeout to sleep
uint8_t cutoutSetting:5; //(3 bits) The voltage we cut out at for under voltage
uint8_t cutoutSetting:4; //(3 bits) The voltage we cut out at for under voltage
uint8_t powerDisplay:1; //Toggle to swap the arrows with a power readout instead
uint8_t displayTempInF:1; //If we need to convert the C reading to F
uint8_t flipDisplay:1; //If true we want to invert the display for lefties
uint8_t sensitivity:6; //Sensitivity of accelerometer (5 bits)