#include "App.h"
#define USE_8_COLORS 0
#define USE_64_COLORS 1
#if USE_8_COLORS
#define VGA_RED GPIO_NUM_22
#define VGA_GREEN GPIO_NUM_21
#define VGA_BLUE GPIO_NUM_19
#define VGA_HSYNC GPIO_NUM_18
#define VGA_VSYNC GPIO_NUM_5
#elif USE_64_COLORS
#define VGA_RED1 GPIO_NUM_22
#define VGA_RED0 GPIO_NUM_21
#define VGA_GREEN1 GPIO_NUM_19
#define VGA_GREEN0 GPIO_NUM_18
#define VGA_BLUE1 GPIO_NUM_5
#define VGA_BLUE0 GPIO_NUM_4
#define VGA_HSYNC GPIO_NUM_23
#define VGA_VSYNC GPIO_NUM_15
#endif
#define KEYBOARD_ON_PORT0 0
#define MOUSE_ON_PORT0 0
#define KEYBOARD_ON_PORT0_MOUSE_ON_PORT1 1
#define PS2_PORT0_CLK GPIO_NUM_33
#define PS2_PORT0_DAT GPIO_NUM_32
#define PS2_PORT1_CLK GPIO_NUM_26
#define PS2_PORT1_DAT GPIO_NUM_27
void setup()
{
#if KEYBOARD_ON_PORT0_MOUSE_ON_PORT1
PS2Controller.
begin(PS2_PORT0_CLK, PS2_PORT0_DAT, PS2_PORT1_CLK, PS2_PORT1_DAT);
Keyboard.
begin(
true,
false, 0);
#elif KEYBOARD_ON_PORT0
Keyboard.
begin(PS2_PORT0_CLK, PS2_PORT0_DAT,
true,
false);
#elif MOUSE_ON_PORT0
Mouse.
begin(PS2_PORT0_CLK, PS2_PORT0_DAT);
#endif
#if USE_8_COLORS
VGAController.
begin(VGA_RED, VGA_GREEN, VGA_BLUE, VGA_HSYNC, VGA_VSYNC);
#elif USE_64_COLORS
VGAController.
begin(VGA_RED1, VGA_RED0, VGA_GREEN1, VGA_GREEN0, VGA_BLUE1, VGA_BLUE0, VGA_HSYNC, VGA_VSYNC);
#endif
}
void loop()
{
MyApp().run();
}