Fork of my MQTTGateway

Dependencies:   mbed-http

Committer:
vpcola
Date:
Sat Apr 08 14:45:51 2017 +0000
Revision:
0:f1d3878b8dd9
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vpcola 0:f1d3878b8dd9 1 /**
vpcola 0:f1d3878b8dd9 2 * Copyright (c) 2015 Digi International Inc.,
vpcola 0:f1d3878b8dd9 3 * All rights not expressly granted are reserved.
vpcola 0:f1d3878b8dd9 4 *
vpcola 0:f1d3878b8dd9 5 * This Source Code Form is subject to the terms of the Mozilla Public
vpcola 0:f1d3878b8dd9 6 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
vpcola 0:f1d3878b8dd9 7 * You can obtain one at http://mozilla.org/MPL/2.0/.
vpcola 0:f1d3878b8dd9 8 *
vpcola 0:f1d3878b8dd9 9 * Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
vpcola 0:f1d3878b8dd9 10 * =======================================================================
vpcola 0:f1d3878b8dd9 11 */
vpcola 0:f1d3878b8dd9 12
vpcola 0:f1d3878b8dd9 13 #ifndef __ADDRESSES_H_
vpcola 0:f1d3878b8dd9 14 #define __ADDRESSES_H_
vpcola 0:f1d3878b8dd9 15
vpcola 0:f1d3878b8dd9 16 #include <stdint.h>
vpcola 0:f1d3878b8dd9 17 #include <string.h>
vpcola 0:f1d3878b8dd9 18
vpcola 0:f1d3878b8dd9 19 #include "Utils/Utils.h"
vpcola 0:f1d3878b8dd9 20
vpcola 0:f1d3878b8dd9 21 /* Some commonly used addresses */
vpcola 0:f1d3878b8dd9 22 #define ADDR64_BROADCAST ((uint64_t)0x000000000000FFFF)
vpcola 0:f1d3878b8dd9 23 #define ADDR64_COORDINATOR ((uint64_t)0x0000000000000000)
vpcola 0:f1d3878b8dd9 24 #define ADDR64_UNASSIGNED ((uint64_t)0xFFFFFFFFFFFFFFFF)
vpcola 0:f1d3878b8dd9 25
vpcola 0:f1d3878b8dd9 26 #define ADDR16_UNKNOWN ((uint16_t)0xFFFE)
vpcola 0:f1d3878b8dd9 27 #define ADDR16_BROADCAST ((uint16_t)0xFFFF)
vpcola 0:f1d3878b8dd9 28
vpcola 0:f1d3878b8dd9 29 /** Macro used to create a 16bit data type from 2 bytes */
vpcola 0:f1d3878b8dd9 30 #define ADDR16(msb,lsb) UINT16(msb,lsb)
vpcola 0:f1d3878b8dd9 31
vpcola 0:f1d3878b8dd9 32 uint64_t addr64_from_uint8_t(const uint8_t * const data, bool big_endian = true);
vpcola 0:f1d3878b8dd9 33
vpcola 0:f1d3878b8dd9 34 #endif /* __ADDRESSES_H_ */