diff --git a/Makefile b/Makefile index 0a3f02f..3d83d75 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,9 @@ STEP4.2 : ${SRC}/FourPointTwo.c bin STEP4.3 : ${SRC}/FourPointThree.c bin gcc -o ${BIN}/STEP4.3.out ${SRC}/FourPointThree.c ${CLIBS} ${CFLAGS} +STEP5.2 : src/lufa-LUFA-170418/PolytechLille/Manette/Manette.c bin + gcc -o ${BIN}/STEP5.2.out src/lufa-LUFA-170418/PolytechLille/Manette/Manette.c ${CLIBS} ${FLAGS} + obj : @-mkdir ${OBJ} diff --git a/src/lufa-LUFA-170418/LUFA/Drivers/Board/AVR8/PINGUI/Buttons.h b/src/lufa-LUFA-170418/LUFA/Drivers/Board/AVR8/PINGUI/Buttons.h index 2861a44..813a32b 100644 --- a/src/lufa-LUFA-170418/LUFA/Drivers/Board/AVR8/PINGUI/Buttons.h +++ b/src/lufa-LUFA-170418/LUFA/Drivers/Board/AVR8/PINGUI/Buttons.h @@ -67,6 +67,7 @@ #if !defined(__INCLUDE_FROM_BUTTONS_H) #error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead. #endif + // HID_Interface;HID_ReportOUTEndpoint; /* Public Interface - May be used in end-application: */ /* Macros: */ @@ -93,6 +94,7 @@ static inline void Buttons_Disable_SEL(void) { DDRB &= ~BUTTONS_SEL; + //HID_Interface1;HID_ReportOUTEndpoint; PORTB &= ~BUTTONS_SEL; } @@ -223,6 +225,7 @@ static inline uint8_t Buttons_GetStatus_HAUT(void) { return ((PINF & BUTTONS_HAUT) ^ BUTTONS_HAUT); + } diff --git a/src/lufa-LUFA-170418/LUFA/Drivers/Board/AVR8/PINGUI/Joystick.h b/src/lufa-LUFA-170418/LUFA/Drivers/Board/AVR8/PINGUI/Joystick.h index d91ef2a..4bdf3d0 100644 --- a/src/lufa-LUFA-170418/LUFA/Drivers/Board/AVR8/PINGUI/Joystick.h +++ b/src/lufa-LUFA-170418/LUFA/Drivers/Board/AVR8/PINGUI/Joystick.h @@ -139,12 +139,12 @@ static inline uint8_t Joystick_GetStatus(void) { adc_init(joy_X_ADC); - uinit8_t Xquatrebits = adc_read(); + uint8_t Xquatrebits = adc_read()/2; Xquatrebits&=0xF0; //pour les quatres bits de poids fort pour axe X adc_init(joy_Y_ADC); - uinit8_t Yquatrebits = adc_read(); + uint8_t Yquatrebits = adc_read(); Yquatrebits&=0xF0; - Yquatrebits=Yquatrebits>>4 //pour les quatres bits de poids faible pour axe Y, on place en fort et on decale de 4 bits into le poids faible + Yquatrebits=Yquatrebits>>4; //pour les quatres bits de poids faible pour axe Y, on place en fort et on decale de 4 bits into le poids faible return (uint8_t)(Xquatrebits+Yquatrebits); } #endif -- libgit2 0.21.2