Lot of samples.
And here is the new one with the new OS and ugfx:
Not as many samples as before...
I guess it is an SPI/OS issue. The IRQ pin is OK as I see...
The board file has:
static bool_t init_board(GMouse* m, unsigned driverinstance) {
(void) m;
if (driverinstance)
return FALSE;
palSetPadMode(GPIOB, 13, PAL_MODE_ALTERNATE(5) ); /* SCK */
palSetPadMode(GPIOB, 14, PAL_MODE_ALTERNATE(5) ); /* MISO */
palSetPadMode(GPIOB, 15, PAL_MODE_ALTERNATE(5) ); /* MOSI */
palSetPadMode(GPIOC, 4, PAL_MODE_OUTPUT_PUSHPULL); /* CS */
palSetPadMode(GPIOC, 5, PAL_MODE_INPUT_PULLDOWN); /* IRQ */
spiStart(&SPID2, &spicfg);
return TRUE;
}
static inline bool_t getpin_pressed(GMouse* m) {
(void) m;
return (!palReadPad(GPIOC, 5));
}
And here is a video: (sorry for the quality)