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 20:51:04 2015 +0000
Revision:
1:c1458b739eb6
Parent:
0:41904adca656
Child:
2:8352ad91f2ee
Child:
3:dac922a18af6
Jo v2

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
danilob 0:41904adca656 12 #define QUEUETAIL (char*)DMA_TCD0_DADDR
danilob 0:41904adca656 13
danilob 0:41904adca656 14
danilob 0:41904adca656 15 //Initialize variables
danilob 0:41904adca656 16 void queueInit();
danilob 0:41904adca656 17
danilob 0:41904adca656 18 //Find an occurrence of the given string in the buffer.
danilob 0:41904adca656 19 //Only advance queueHead until a matching string is found.
danilob 0:41904adca656 20 bool findInQueue(char* str, int strLen);
danilob 0:41904adca656 21
danilob 0:41904adca656 22 //Increment queue index by 1, auxiliar function
danilob 0:41904adca656 23 char* incrementIndex(char* pointerToIncrement);
danilob 0:41904adca656 24
danilob 0:41904adca656 25 //will eliminate all elements form queue.
danilob 0:41904adca656 26 void flushQueue();
danilob 0:41904adca656 27
danilob 0:41904adca656 28 //Print queue elements
danilob 0:41904adca656 29 void printQueue(); //for debugging
danilob 0:41904adca656 30
danilob 0:41904adca656 31 //Parse through characters until first integer is found
danilob 0:41904adca656 32 int parseInt();
danilob 0:41904adca656 33
es_marble 1:c1458b739eb6 34 //Reset the GSM DMA idle bit to 0
es_marble 1:c1458b739eb6 35 void resetGSMIdleBit();
es_marble 1:c1458b739eb6 36
es_marble 1:c1458b739eb6 37 //Get the GSM DMA idle bit (if 1, indicates we already received a response)
es_marble 1:c1458b739eb6 38 bool getGSMIdleBit();
es_marble 1:c1458b739eb6 39
danilob 0:41904adca656 40 #endif