DCS_TEAM / Mbed 2 deprecated DCS

Dependencies:   MBed_Adafruit-GPS-Library SDFileSystem mbed GSM_Library

Fork of DCS by Brandon Crofts

Committer:
bjcrofts
Date:
Fri Mar 06 22:36:44 2015 +0000
Revision:
1:8614e190908b
hoy

Who changed what in which revision?

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