Removed a bunch of warnings + re added SPI_FULL_SPEED default value in the BoardConfig.h
This commit is contained in:
parent
ef8d944dd3
commit
e732cf48aa
@ -22,7 +22,7 @@ class BoardConfig
|
|||||||
const Pin SPI_mosi = GPIO_13_MOSI,
|
const Pin SPI_mosi = GPIO_13_MOSI,
|
||||||
const Pin SPI_miso = GPIO_12_MISO,
|
const Pin SPI_miso = GPIO_12_MISO,
|
||||||
const Pin SPI_clk = GPIO_14_CLK,
|
const Pin SPI_clk = GPIO_14_CLK,
|
||||||
const uint32_t spiSpeed = 0//SPI_FULL_SPEED
|
const uint32_t spiSpeed = SPI_FULL_SPEED
|
||||||
);
|
);
|
||||||
|
|
||||||
Pin getI2C_sda() const;
|
Pin getI2C_sda() const;
|
||||||
|
@ -192,7 +192,7 @@ HttpClient::HTTP_CODE HttpClient::isReplyAvailable(uint16_t timeout)
|
|||||||
if(_httpCode == HTTP_CODE::UNDEFINED_CODE)
|
if(_httpCode == HTTP_CODE::UNDEFINED_CODE)
|
||||||
{
|
{
|
||||||
uint16_t safeSize = bytesCount > 99 ? 99 : bytesCount;
|
uint16_t safeSize = bytesCount > 99 ? 99 : bytesCount;
|
||||||
uint8_t bytesRed = buffer[peekBytes((uint8_t*)buffer,safeSize)] = '\0';
|
buffer[peekBytes((uint8_t*)buffer,safeSize)] = '\0';
|
||||||
//We look for the end of the first line ie : HTTP/1.1 200 OK\r\n
|
//We look for the end of the first line ie : HTTP/1.1 200 OK\r\n
|
||||||
char *pNewLine = strstr(buffer, "\r\n");
|
char *pNewLine = strstr(buffer, "\r\n");
|
||||||
//If we found the new line, we can retrieve the code
|
//If we found the new line, we can retrieve the code
|
||||||
@ -367,7 +367,7 @@ void HttpClient::sendHeader(HttpMIMEType contentType, uint64_t contentLength, Di
|
|||||||
|
|
||||||
if(contentLength > 0)
|
if(contentLength > 0)
|
||||||
{
|
{
|
||||||
printf("Content-Length: %u\r\n", contentLength);
|
printf("Content-Length: %llu\r\n", contentLength);
|
||||||
printf("Content-Type: %s\r\n", httpMIMETypeToString(contentType, mime));
|
printf("Content-Type: %s\r\n", httpMIMETypeToString(contentType, mime));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,13 +237,15 @@ void ScreenManager::run()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
_error = OK;
|
_error = OK;
|
||||||
break;
|
break;
|
||||||
case VIEW_NOT_FOUND:
|
case VIEW_NOT_FOUND:
|
||||||
(*_viewNotFound.viewLogicFunction)(_displayRef, _viewNotFound.pData);
|
(*_viewNotFound.viewLogicFunction)(_displayRef, _viewNotFound.pData);
|
||||||
break;
|
break;
|
||||||
case VIEW_FUNC_UNDEFINED:
|
case VIEW_FUNC_UNDEFINED:
|
||||||
(*_viewFuncUndefined.viewLogicFunction)(_displayRef, _viewFuncUndefined.pData);
|
(*_viewFuncUndefined.viewLogicFunction)(_displayRef, _viewFuncUndefined.pData);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
_displayRef.display();
|
_displayRef.display();
|
||||||
@ -408,7 +410,7 @@ void ScreenManager::clearViews()
|
|||||||
{
|
{
|
||||||
ViewLink *toDelete = cursor;
|
ViewLink *toDelete = cursor;
|
||||||
cursor = cursor->next;
|
cursor = cursor->next;
|
||||||
free(cursor);
|
free(toDelete);
|
||||||
}
|
}
|
||||||
//Do not forget to mark the list as empty
|
//Do not forget to mark the list as empty
|
||||||
_viewLinkedList = NULL;
|
_viewLinkedList = NULL;
|
||||||
|
@ -3,12 +3,7 @@
|
|||||||
//#define DEBUG_CL
|
//#define DEBUG_CL
|
||||||
|
|
||||||
TCPClient::TCPClient(WiFiClient client, uint8_t id, uint16_t dataBufferSize) : _client(client),
|
TCPClient::TCPClient(WiFiClient client, uint8_t id, uint16_t dataBufferSize) : _client(client),
|
||||||
_clientState(NEW),
|
|
||||||
_error(OK),
|
|
||||||
_data(NULL),
|
|
||||||
_dataSize(0),
|
|
||||||
_dataBufferSize(dataBufferSize+1),
|
_dataBufferSize(dataBufferSize+1),
|
||||||
_newDataAvailable(false),
|
|
||||||
_id(id)
|
_id(id)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_CL
|
#ifdef DEBUG_CL
|
||||||
@ -22,10 +17,9 @@ _id(id)
|
|||||||
_error = MALLOC_ERR;
|
_error = MALLOC_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
TCPClient::TCPClient(const TCPClient &Object) : _client(Object._client),
|
TCPClient::TCPClient(const TCPClient &Object) : _clientState(Object._clientState),
|
||||||
_clientState(Object._clientState),
|
|
||||||
_error(Object._error),
|
_error(Object._error),
|
||||||
_data(NULL),
|
_client(Object._client),
|
||||||
_dataSize(Object._dataSize),
|
_dataSize(Object._dataSize),
|
||||||
_dataBufferSize(Object._dataBufferSize),
|
_dataBufferSize(Object._dataBufferSize),
|
||||||
_newDataAvailable(Object._newDataAvailable),
|
_newDataAvailable(Object._newDataAvailable),
|
||||||
|
@ -17,14 +17,14 @@ class TCPClient
|
|||||||
bool operator==(TCPClient& Object);
|
bool operator==(TCPClient& Object);
|
||||||
void closeConnection();
|
void closeConnection();
|
||||||
protected:
|
protected:
|
||||||
enum ClientState {NEW, HANDLED, DISCARDED} _clientState;
|
enum ClientState {NEW, HANDLED, DISCARDED} _clientState = NEW;
|
||||||
enum Error {OK = 0, MALLOC_ERR = 1} _error;
|
enum Error {OK = 0, MALLOC_ERR = 1} _error = OK;
|
||||||
|
|
||||||
WiFiClient _client;
|
WiFiClient _client;
|
||||||
uint8_t *_data; //The actual data
|
uint8_t *_data = NULL; //The actual data
|
||||||
uint16_t _dataSize; //The logical size of the data contained
|
uint16_t _dataSize = 0; //The logical size of the data contained
|
||||||
uint16_t _dataBufferSize; //The physical size of the buffer
|
uint16_t _dataBufferSize; //The physical size of the buffer
|
||||||
boolean _newDataAvailable;
|
boolean _newDataAvailable = false;
|
||||||
uint8_t _id;
|
uint8_t _id;
|
||||||
|
|
||||||
void freeDataBuffer(uint16_t size);
|
void freeDataBuffer(uint16_t size);
|
||||||
|
Loading…
Reference in New Issue
Block a user