uses pushing box to publish to google spreadsheets with a state machine instead of a while loop

Dependents:   DCS_FINAL_CODE

Fork of GSM_PUSHING_BOX_STATE_MACHINE by DCS_TEAM

Committer:
es_marble
Date:
Thu Mar 05 21:24:56 2015 +0000
Revision:
3:dac922a18af6
Parent:
1:c1458b739eb6
Child:
4:3264bc92993c
v3 Jo

Who changed what in which revision?

UserRevisionLine numberNew contents of line
danilob 0:41904adca656 1 #ifndef GSMQUEUE_H
danilob 0:41904adca656 2 #define GSMQUEUE_H
danilob 0:41904adca656 3
danilob 0:41904adca656 4 /* gsmqueue.cpp
danilob 0:41904adca656 5 * Contains functions to read from the DMA buffer in a queue fashion
danilob 0:41904adca656 6 */
danilob 0:41904adca656 7
danilob 0:41904adca656 8 //Memory block of char size alocated for DMA
danilob 0:41904adca656 9 #define BUFFER_LENGTH 255 //cannot exeede an int max value
danilob 0:41904adca656 10
danilob 0:41904adca656 11 #define QUEUETAIL (char*)DMA_TCD0_DADDR
danilob 0:41904adca656 12
danilob 0:41904adca656 13
danilob 0:41904adca656 14 //Initialize variables
danilob 0:41904adca656 15 void queueInit();
danilob 0:41904adca656 16
danilob 0:41904adca656 17 //Find an occurrence of the given string in the buffer.
danilob 0:41904adca656 18 //Only advance queueHead until a matching string is found.
danilob 0:41904adca656 19 bool findInQueue(char* str, int strLen);
danilob 0:41904adca656 20
danilob 0:41904adca656 21 //Increment queue index by 1, auxiliar function
danilob 0:41904adca656 22 char* incrementIndex(char* pointerToIncrement);
danilob 0:41904adca656 23
danilob 0:41904adca656 24 //will eliminate all elements form queue.
danilob 0:41904adca656 25 void flushQueue();
danilob 0:41904adca656 26
danilob 0:41904adca656 27 //Print queue elements
danilob 0:41904adca656 28 void printQueue(); //for debugging
danilob 0:41904adca656 29
danilob 0:41904adca656 30 //Parse through characters until first integer is found
danilob 0:41904adca656 31 int parseInt();
danilob 0:41904adca656 32
es_marble 3:dac922a18af6 33 //Returns true if the character is numeric
es_marble 3:dac922a18af6 34 bool isNumeric(char* qPos);
es_marble 3:dac922a18af6 35
es_marble 1:c1458b739eb6 36 //Reset the GSM DMA idle bit to 0
es_marble 1:c1458b739eb6 37 void resetGSMIdleBit();
es_marble 1:c1458b739eb6 38
es_marble 1:c1458b739eb6 39 //Get the GSM DMA idle bit (if 1, indicates we already received a response)
es_marble 1:c1458b739eb6 40 bool getGSMIdleBit();
es_marble 1:c1458b739eb6 41
danilob 0:41904adca656 42 #endif