Controlls of IHM01A1 by Joystick shield
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Fork of X_NUCLEO_IHM01A1 by
Revision 6:a47569fc7534, committed 2015-11-19
- Comitter:
- Davidroid
- Date:
- Thu Nov 19 10:56:34 2015 +0000
- Parent:
- 5:d3c78f12a78d
- Child:
- 7:f7e0c3621f77
- Commit message:
- Set ISR flags as static members.
Changed in this revision
--- a/Components/l6474/l6474_class.cpp Wed Nov 18 18:41:55 2015 +0000 +++ b/Components/l6474/l6474_class.cpp Thu Nov 19 10:56:34 2015 +0000 @@ -77,6 +77,10 @@ /* Number of devices. */ uint8_t L6474::numberOfDevices = 0; +/* ISR flags used to restart an interrupted SPI transfer when an error is reported. */ +bool L6474::spiPreemtionByIsr = FALSE; +bool L6474::isrFlag = FALSE; + /* SPI Transmission for Daisy-Chain Configuration. */ uint8_t L6474::spiTxBursts[L6474_CMD_ARG_MAX_NB_BYTES][MAX_NUMBER_OF_DEVICES]; uint8_t L6474::spiRxBursts[L6474_CMD_ARG_MAX_NB_BYTES][MAX_NUMBER_OF_DEVICES];
--- a/Components/l6474/l6474_class.h Wed Nov 18 18:41:55 2015 +0000
+++ b/Components/l6474/l6474_class.h Thu Nov 19 10:56:34 2015 +0000
@@ -108,9 +108,6 @@
*--------------------------------------------------------------------*/
flagInterruptCallback = 0;
errorHandlerCallback = 0;
- spiPreemtionByIsr = 0;
- isrFlag = 0;
- //devicePrm = 0;
deviceInstance = numberOfDevices;
numberOfDevices++;
memset(spiTxBursts, 0, L6474_CMD_ARG_MAX_NB_BYTES * MAX_NUMBER_OF_DEVICES * sizeof(uint8_t));
@@ -655,11 +652,11 @@
*------------------------------------------------------------------------*/
void (*flagInterruptCallback)(void);
void (*errorHandlerCallback)(uint16_t error);
- bool spiPreemtionByIsr;
- bool isrFlag;
deviceParams_t devicePrm;
uint8_t deviceInstance;
static uint8_t numberOfDevices;
+ static bool spiPreemtionByIsr;
+ static bool isrFlag;
static uint8_t spiTxBursts[L6474_CMD_ARG_MAX_NB_BYTES][MAX_NUMBER_OF_DEVICES];
static uint8_t spiRxBursts[L6474_CMD_ARG_MAX_NB_BYTES][MAX_NUMBER_OF_DEVICES];
};
