LCD implementation of our project.

Dependencies:   mbed mbed-rtos MLX90614

UserInterface.h

Committer:
ovidiup13
Date:
2015-03-20
Revision:
0:1e597b0f8b3b
Child:
2:fcde41900fa5

File content as of revision 0:1e597b0f8b3b:

#ifndef _UI_H_
#define _UI_H_

#include <string.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "st7565LCD.h"
#include "Header.h"
#include "Item.h"
#include "Menu.h"

//define brightness and contrast
#define _DEFAULT_BRIGHTNESS 25
#define _DEFAULT_CONTRAST 20
#define _MAX_BRIGHTNESS 200
#define _MIN_BRIGHTNESS 10

//define default color
#define _DEFAULT_COLOR 20

using namespace std;

class Item;

class UI {
    public:
    //variables
        //current selected menu
        Item * current;
        //header object
        Header * header;
        //display pointer
        ST7565 * st7565;
        
    //functions
    //initialize display
    
    void init(void);
    //set colors
    void set_colors(float r, float g, float b, float aa);
    //update all screen
    void update(char c);
    //update header only
    void display(void);
    //update current menu
    void setCurrent(Item * item){
        current = item;
    }
    //set header
    void setHeader(Header * h){
        header = h;
    }
    
    UI(ST7565 *lcd){
        current = NULL;
        header = NULL;
        st7565 = lcd;
    }
};

#endif