Ejemplo n.º 1
0
int main() {
	while(1){
		//Set the LED's to the switch state
		int LEDState = checkSwitchState() + checkButtonState();
		XGpio_WriteReg(XPAR_LEDS_8BIT_BASEADDR,RegOffset, LEDState);
	}
    return 0;
}
Ejemplo n.º 2
0
// clear button value
static inline void clearAutofire()
{
    for (int i = 0; i < MAX_PLAYER; i++) {
        for (int j = 0; j < MAX_AUTOFIRE_BUTTONS; j++) {
            if (autofireOn[P_1 + i][F_1 + j] && autofires[P_1 + i][F_1 + j].value
                    && *(autofires[P_1 + i][F_1 + j].value) && checkButtonState(P_1 + i, F_1 + j)) {
                *(autofires[P_1 + i][F_1 + j].value) = 0;
            }
        }
    }
}