15 #if SPI_MSG_FAILURE_DEBUG
16 extern unsigned long g_SPImsgIocRxFailures[];
17 extern unsigned long g_SPImsgModRxFailures[];
18 extern unsigned long g_SPImsgSuccesses[];
25 unsigned char readRetriesRemaining() {
return triesRemaining; };
26 bool checkCommsOk(){
return (triesRemaining>0);};
27 bool setMaxRetries(
unsigned char z_maxRetries);
28 void init(){triesRemaining = maxTries;};
29 #if SPI_MSG_FAILURE_DEBUG
30 void setMessageState(
bool msgOk,
bool msgRxOk)
32 void setMessageState(
bool msgOk)
35 if (triesRemaining > 0)
38 triesRemaining = maxTries;
42 #if SPI_MSG_FAILURE_DEBUG
51 #if SPI_MSG_FAILURE_DEBUG
52 unsigned long getFailureCount() {
return failures; };
53 unsigned long getSuccessCount() {
return successes; };
54 unsigned long getModRxFailureCount() {
return mod_rx_failures; };
55 void resetFailureCount() { failures = 0; successes = 0; mod_rx_failures = 0; };
59 unsigned char triesRemaining;
60 unsigned char maxTries;
61 #if SPI_MSG_FAILURE_DEBUG
62 unsigned long failures;
63 unsigned long successes;
64 unsigned long mod_rx_failures;