SE3 PSE Binome2023-6
Aller à la navigation
Aller à la recherche
Conception de la manette
Code C
bool GetNextReport(USB_JoystickReport_Data_t* const ReportData)
{
bool InputChanged = false;
/* Clear the report contents */
memset(ReportData, 0, sizeof(USB_JoystickReport_Data_t));
if (~(PINF>>PIN7) & 1) ReportData->Button |= (1 << 1);
if (~(PINF>>PIN6) & 1) ReportData->Button |= (1 << 0);
if (~(PIND>>PIN1) & 1) ReportData->Y = 100;
if (~(PIND>>PIN2) & 1) ReportData->X = 100;
if (~(PIND>>PIN3) & 1) ReportData->X = -100;
if (~(PIND>>PIN5) & 1) ReportData->Y = -100;
InputChanged = 1;
return InputChanged;
}
Montage de la carte :
Fichiers: Fichier:ManetteUSBLilianPierre.zip
gerber: Fichiers: Fichier:SE3-pad-job.gbrjob.zip gerber: Fichiers: Fichier:SE3-pad-LGPC.zip