/* * UPIWIN - Micro Pi Windowing Framework Kernel * Copyright (C) 2019 Amy Bowersox/Erbosoft Metaverse Design Solutions * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *------------------------------------------------------------------------- */ #ifndef __GPIO_H_INCLUDED #define __GPIO_H_INCLUDED #include "wintype.h" #define GPIO_BUTTON_COUNT 4 /* number of GPIO buttons we have */ /* state flags for the GPIO buttons */ #define GRB_STATE_BUTTON1 (1 << 0) #define GRB_STATE_BUTTON2 (1 << 1) #define GRB_STATE_BUTTON3 (1 << 2) #define GRB_STATE_BUTTON4 (1 << 3) #define GSB_BACKLIGHT_MAX 1023 /* maximum level for backlight */ #define GSB_BACKLIGHT_DEFAULT GSB_BACKLIGHT_MAX extern HRESULT Gpio_setup(void); extern UINT32 Gpio_read_buttons(void); extern void Gpio_set_backlight(UINT32 level); #endif /* __GPIO_H_INCLUDED */