From 097bce6aa4df5f4bacef3976cd7b7fab26a72c4a Mon Sep 17 00:00:00 2001 From: inmarket Date: Sun, 12 Oct 2014 00:55:32 +1000 Subject: [PATCH] Board File can now request extra data bytes in the GMouse structure. --- drivers/ginput/touch/MCU/gmouse_lld_MCU.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/ginput/touch/MCU/gmouse_lld_MCU.c b/drivers/ginput/touch/MCU/gmouse_lld_MCU.c index 87b39ae4..222b759b 100644 --- a/drivers/ginput/touch/MCU/gmouse_lld_MCU.c +++ b/drivers/ginput/touch/MCU/gmouse_lld_MCU.c @@ -15,6 +15,11 @@ // Get the hardware interface #include "gmouse_lld_MCU_board.h" +// If the board file doesn't specify how many extra bytes it wants - assume 0 +#ifndef BOARD_DATA_SIZE + #define BOARD_DATA_SIZE 0 +#endif + const GMouseVMT const GMOUSE_DRIVER_VMT[1] = {{ { GDRIVER_TYPE_TOUCH, @@ -23,7 +28,7 @@ const GMouseVMT const GMOUSE_DRIVER_VMT[1] = {{ // Extra flags for testing only //GMOUSE_VFLG_DEFAULTFINGER|GMOUSE_VFLG_CAL_EXTREMES - Possible //GMOUSE_VFLG_NOPOLL|GMOUSE_VFLG_DYNAMICONLY|GMOUSE_VFLG_SELFROTATION|GMOUSE_VFLG_CAL_LOADFREE - unlikely - sizeof(GMouse), + sizeof(GMouse)+BOARD_DATA_SIZE, _gmouseInitDriver, _gmousePostInitDriver, _gmouseDeInitDriver }, Z_MAX, // z_max