Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MBed_Adafruit-GPS-Library SDFileSystem mbed GSM_Library
Fork of DCS by
Diff: gsmqueue.h
- Revision:
- 1:8614e190908b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gsmqueue.h Fri Mar 06 22:36:44 2015 +0000 @@ -0,0 +1,43 @@ +#ifndef GSMQUEUE_H +#define GSMQUEUE_H + +/* gsmqueue.cpp + * Contains functions to read from the DMA buffer in a queue fashion + */ + +//Memory block of char size alocated for DMA +#define BUFFER_LENGTH 255 //cannot exeede an int max value + +#define QUEUETAIL (char*)DMA_TCD0_DADDR + + +//Initialize variables +void queueInit(); + +//Find an occurrence of the given string in the buffer. +//Only advance queueHead until a matching string is found. +bool findInQueue(char* str); + +//Increment queue index by 1, auxiliar function +char* incrementIndex(char* pointerToIncrement); + +//will eliminate all elements form queue. +void flushQueue(); + +//Print queue elements +void printQueue(); //for debugging + +//Parse through characters until first integer is found +int parseInt(); + +//Returns true if the character is numeric +bool isNumeric(char* qPos); + +//Reset the GSM DMA idle bit to 0 +void resetGSMIdleBit(); + +//Get the GSM DMA idle bit (if 1, indicates we already received a response) +bool getGSMIdleBit(); + + +#endif \ No newline at end of file
