Hi everyone. I'm getting compilation error for this code:
enum connectionStates
{
csDoNothing,
csDisconnected,
csConnecting,
csConnected,
csReadyToSend,
csReceiving,
csReceived,
csFailed
};
connectionStates conState = csConnecting; //????????? ??????????
void setState(connectionStates s)
{
conState = s;
Serial.print("con state:"); Serial.println(s);
}
it says:
GPRS:-1: error: variable or field 'setState' declared void
GPRS:-1: error: 'connectionStates' was not declared in this scope
Anyone knows why? Thanks ahead.