For a class project I am using C++ to read the values of the buttons on the Zedboard to control various things with the LEDs. I have the following values for the address of the GPIO and offsets for the d-pad style buttons:
const unsigned gpio_address = 0x400d0000;
const int gpio_pbtnl_offset = 0x16C; // Offset for left push button
const int gpio_pbtnr_offset = 0x170; // Offset for right push button
const int gpio_pbtnu_offset = 0x174; // Offset for up push button
const int gpio_pbtnd_offset = 0x178; // Offset for down push button
const int gpio_pbtnc_offset = 0x17C; // Offset for center push button
I was given these values by my instructor in a previous lab. I am able to use these values to access the button states of these 5 buttons. I need to find the offset values to use for the other two buttons, which are labeled BTN8 (PB1) and BTN9 (PB2) on the board, and I have no clue how to do so. Any help on what these values are or how to find them would be greatly appreciated, as I'd rather not go through all 256 possibilities!