diff --git a/share/examples/c/tetris.c b/share/examples/c/tetris.c index b156d56..9ea5dfe 100644 --- a/share/examples/c/tetris.c +++ b/share/examples/c/tetris.c @@ -223,6 +223,13 @@ void gpanel_init() gpanel_row = 0; gpanel_col = 0; + /* Open GPIO driver. */ + gpio = open("/dev/porta", 0); + if (gpio < 0) { + perror("/dev/porta"); + exit(-1); + } + /* * Set pins as outputs. */