Program that uses the QuickStart Library to interface a SmartMesh IP mote: Connects to the default network and starts publishing a random walk value every 5 seconds.

Dependencies:   mbed millis

Fork of QSL_SimplePublish by Jon-Håkon Bøe Røli

QSL SimplePublish

SmartMesh IP QuickStart Library

Committer:
jhbr
Date:
Thu Sep 01 15:00:28 2016 +0000
Revision:
1:89766ea2e99d
Parent:
dn_serial_mt.h@0:d3f5fdf2e6da
Moved QSL and C Library files to separate folders

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jhbr 0:d3f5fdf2e6da 1 /*
jhbr 0:d3f5fdf2e6da 2 Copyright (c) 2014, Dust Networks. All rights reserved.
jhbr 0:d3f5fdf2e6da 3
jhbr 0:d3f5fdf2e6da 4 Serial connector.
jhbr 0:d3f5fdf2e6da 5
jhbr 0:d3f5fdf2e6da 6 \license See attached DN_LICENSE.txt.
jhbr 0:d3f5fdf2e6da 7 */
jhbr 0:d3f5fdf2e6da 8
jhbr 0:d3f5fdf2e6da 9 #ifndef DN_SERIAL_H
jhbr 0:d3f5fdf2e6da 10 #define DN_SERIAL_H
jhbr 0:d3f5fdf2e6da 11
jhbr 0:d3f5fdf2e6da 12 #include "dn_common.h"
jhbr 0:d3f5fdf2e6da 13
jhbr 0:d3f5fdf2e6da 14 //=========================== defines =========================================
jhbr 0:d3f5fdf2e6da 15
jhbr 0:d3f5fdf2e6da 16 #define DN_SERIAL_API_MASK_RESPONSE 0x01
jhbr 0:d3f5fdf2e6da 17 #define DN_SERIAL_API_MASK_PACKETID 0x02
jhbr 0:d3f5fdf2e6da 18 #define DN_SERIAL_API_MASK_SYNC 0x08
jhbr 0:d3f5fdf2e6da 19
jhbr 0:d3f5fdf2e6da 20 #define DN_SERIAL_PACKETID_NOTSET 0x02
jhbr 0:d3f5fdf2e6da 21
jhbr 0:d3f5fdf2e6da 22 // return code
jhbr 0:d3f5fdf2e6da 23 #define DN_SERIAL_RC_OK 0x00
jhbr 0:d3f5fdf2e6da 24
jhbr 0:d3f5fdf2e6da 25 //=========================== typedef =========================================
jhbr 0:d3f5fdf2e6da 26
jhbr 0:d3f5fdf2e6da 27 typedef void (*dn_serial_request_cbt)(uint8_t cmdId, uint8_t flags, uint8_t* payload, uint8_t len);
jhbr 0:d3f5fdf2e6da 28 typedef void (*dn_serial_reply_cbt)(uint8_t cmdId, uint8_t rc, uint8_t* payload, uint8_t len);
jhbr 0:d3f5fdf2e6da 29
jhbr 0:d3f5fdf2e6da 30 //=========================== variables =======================================
jhbr 0:d3f5fdf2e6da 31
jhbr 0:d3f5fdf2e6da 32 //=========================== prototypes ======================================
jhbr 0:d3f5fdf2e6da 33
jhbr 0:d3f5fdf2e6da 34 void dn_serial_mt_init(dn_serial_request_cbt requestCb);
jhbr 0:d3f5fdf2e6da 35 dn_err_t dn_serial_mt_sendRequest(
jhbr 0:d3f5fdf2e6da 36 uint8_t cmdId,
jhbr 0:d3f5fdf2e6da 37 uint8_t extraFlags,
jhbr 0:d3f5fdf2e6da 38 uint8_t* payload,
jhbr 0:d3f5fdf2e6da 39 uint8_t length,
jhbr 0:d3f5fdf2e6da 40 dn_serial_reply_cbt replyCb
jhbr 0:d3f5fdf2e6da 41 );
jhbr 0:d3f5fdf2e6da 42
jhbr 0:d3f5fdf2e6da 43 #endif
jhbr 0:d3f5fdf2e6da 44