Commit 2caf5343aa996e6f19cbe2b7cae27bcefb98a2db
1 parent
93cb7e97
On ajoute le cinquieme bouton mais il reste enfonce (le bouton STOP) donc je lai…
… ajoute en commentaire
Showing
3 changed files
with
8 additions
and
4 deletions
Show diff stats
No preview for this file type
src/lufa-LUFA-170418/LUFA/Drivers/Board/AVR8/PINGUI/Buttons.h
... | ... | @@ -103,7 +103,7 @@ |
103 | 103 | static inline void Buttons_Init_STOP(void) |
104 | 104 | { |
105 | 105 | DDRB &= ~BUTTONS_STOP; |
106 | - PORTB |= BUTTONS_STOP; | |
106 | + // PORTB |= BUTTONS_STOP; | |
107 | 107 | } |
108 | 108 | |
109 | 109 | |
... | ... | @@ -112,15 +112,17 @@ |
112 | 112 | static inline void Buttons_Disable_STOP(void) |
113 | 113 | { |
114 | 114 | DDRB &= ~BUTTONS_STOP; |
115 | - PORTB |= BUTTONS_STOP; | |
115 | + PORTB &= ~BUTTONS_STOP; | |
116 | 116 | } |
117 | 117 | |
118 | + | |
118 | 119 | |
119 | 120 | |
120 | 121 | |
121 | 122 | //BUTTON BAS |
122 | 123 | |
123 | 124 | |
125 | + | |
124 | 126 | static inline void Buttons_Init_BAS(void) |
125 | 127 | { |
126 | 128 | DDRF &= ~BUTTONS_BAS; |
... | ... | @@ -191,7 +193,7 @@ |
191 | 193 | static inline uint8_t Buttons_GetStatus_STOP(void) ATTR_WARN_UNUSED_RESULT; |
192 | 194 | static inline uint8_t Buttons_GetStatus_STOP(void) |
193 | 195 | { |
194 | - return ((PINB & BUTTONS_STOP) ^ BUTTONS_STOP); | |
196 | + return (PINB & BUTTONS_STOP); | |
195 | 197 | } |
196 | 198 | //BAS |
197 | 199 | ... | ... |
src/lufa-LUFA-170418/PolytechLille/Manette/Manette.c
... | ... | @@ -179,6 +179,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn |
179 | 179 | |
180 | 180 | uint8_t ButtonStatus_LCL_BAS = Buttons_GetStatus_BAS(); |
181 | 181 | uint8_t ButtonStatus_LCL_DROITE = Buttons_GetStatus_DROITE(); |
182 | +// uint8_t ButtonStatus_LCL_STOP = Buttons_GetStatus_STOP(); | |
182 | 183 | |
183 | 184 | JoystickReport->X = JoyStatus_LCL >> 4; |
184 | 185 | JoystickReport->Y = JoyStatus_LCL & 0x0F; |
... | ... | @@ -190,7 +191,8 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn |
190 | 191 | { JoystickReport->Button |= ( 1<<2);} |
191 | 192 | if (ButtonStatus_LCL_DROITE & BUTTONS_DROITE) |
192 | 193 | { JoystickReport->Button |= ( 1<<3);} |
193 | - | |
194 | +// if (ButtonStatus_LCL_STOP & BUTTONS_STOP) | |
195 | +// { JoystickReport->Button |= ( 1<<4);} | |
194 | 196 | |
195 | 197 | // if (JoyStatus_LCL & JOY_LEFT) |
196 | 198 | // JoystickReport->X = -100; | ... | ... |