Updated to v0.3.1
Renamed mqtt_send to mqttSend to better follow my usual naming convention. Made a few other small changes, including disabling the debug macro by default. Just uncomment to add it again. This is the version that will be used with the first release of Part 3 of the SDK tutorials on hackaday.io. Signed-off-by: A.M. Rowsell <amrowsell@frozenelectronics.ca>
This commit is contained in:
parent
049573ad4b
commit
8acff6e880
4 changed files with 32 additions and 21 deletions
6
mqtt.h
6
mqtt.h
|
@ -20,13 +20,13 @@
|
|||
#include "espconn.h"
|
||||
#include "os_type.h"
|
||||
|
||||
#define DEBUG 1 /**< This define enables or disables serial debug output in most places */
|
||||
//#define DEBUG 1 /**< This define enables or disables serial debug output in most places */
|
||||
|
||||
/**
|
||||
* @typedef
|
||||
* This is the enum for message types.
|
||||
*
|
||||
* This enum was taken from the NodeMCU mqtt headers. Credit is given to "zeroday" of nodemcu.com. This enum gives us both easily readable names for each message type, but also the correct value for each type. These are used in mqtt_send() to construct the correct packet type.
|
||||
* This enum was taken from the NodeMCU mqtt headers. Credit is given to "zeroday" of nodemcu.com. This enum gives us both easily readable names for each message type, but also the correct value for each type. These are used in mqttSend() to construct the correct packet type.
|
||||
*/
|
||||
typedef enum mqtt_message_enum
|
||||
{
|
||||
|
@ -138,4 +138,4 @@ uint8_t ICACHE_FLASH_ATTR *encodeLength(uint32_t trueLength);
|
|||
* @param msgType the type of message to be send, one of the mqtt_message_type
|
||||
* @return -1 in case of error, 0 otherwise
|
||||
*/
|
||||
uint8_t ICACHE_FLASH_ATTR mqtt_send(mqtt_session_t *session, uint8_t *data, uint32_t len, mqtt_message_type msgType);
|
||||
uint8_t ICACHE_FLASH_ATTR mqttSend(mqtt_session_t *session, uint8_t *data, uint32_t len, mqtt_message_type msgType);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue