/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2024-05-09     LJ       the first version
 */
#ifndef APPLICATIONS_OLED_GUI_H_
#define APPLICATIONS_OLED_GUI_H_

#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>

#include <string.h>
#include <stdio.h>
#include "ssd1306.h"
#include <inout.h>
#include <LTE.h>
#include <mb85rs.h>
#include <gui.h>
//#include <modbus_rtu.h>
#include <mqtt.h>
#include <adc.h>
#include <inout.h>

typedef struct
{
    rt_uint8_t index;
    rt_uint8_t up; //上键
    rt_uint8_t down; //下键
    rt_uint8_t back; //返回键
    rt_uint8_t enter; //确认键
    void (*menu)();
} key_table;

#define  KEY_previous  GET_PIN(C, 14)//上一页
#define  KEY_next      GET_PIN(C, 13)//下一页
#define  KEY_back     GET_PIN(B, 9)//返回
#define  KEY_enter      GET_PIN(B, 8)//确认

//初始化
void oled_init();

//菜单页面管理
void oled_menu();


#endif /* APPLICATIONS_OLED_GUI_H_ */
