Added a new structure in order to get power infos

This commit is contained in:
anschrammh 2019-03-10 19:16:43 +01:00
parent ae0588206f
commit b7ddc2cb16

View File

@ -24,13 +24,22 @@ typedef enum { GPIO_0 = 0,
#define SDCARD_INIT_ERR B00000100
#define MALLOC_ERR B00000001
#define NO_ERROR 0
#define NO_CURRENT_VIEW NULL
#define LAST_VIEW -1
#define BATT_FULL 870 //8.4v
#define BATT_EMPTY 775 //7.4v
#define BATT_DIFF 95
#define USB_THRESHOLD 600
typedef enum { OR_0 = 2, OR_90 = 3, OR_180 = 0, OR_270 = 1 } Orientation;
typedef enum { BIT = 0, BYTE, KBIT, KBYTE, MBIT, MBYTE, GBIT, GBYTE } SizeUnit;
typedef enum { BATTERY = 0, USB } PowerType;
//Data structure for the view handling
typedef struct viewLink{
boolean (*viewLogicFunction)(Adafruit_SSD1306&, void*);
@ -39,6 +48,13 @@ typedef struct viewLink{
struct viewLink *next;
} ViewLink, *ViewLinkedList;
//Data structure for the battery info
typedef struct powerInfo
{
PowerType powerType;
unsigned char level;
}PowerInfo;
#endif //DEFINITION_H