Etherios Cloud Connector very first porting for mbed. Tested in an LPC1768

Etherios Cloud Connector for Embedded v2.1.0.3 library for mbed. Early porting.

This port is centered mainly in the platform code. So it should work properly with the provided examples of send_data, device_request, data_points, RCI and firmware_update (stub implementation, not a real one... yet ;-)). Filesystem is not implemented yet, and some examples might need changes.

To run, it needs the following libraries: - mbed - mbed-rtos - EthernetInterface

Find more information (and the source code!) about Etherios Cloud Connector for Embedded here: http://www.etherios.com/products/devicecloud/support/connector and in: http://www.etherios.com

Committer:
spastor
Date:
Tue Dec 03 14:10:48 2013 +0000
Revision:
1:908afea5a49d
Parent:
0:1c358ea10753
Use internal Thread.h instead of Threads.h

Who changed what in which revision?

UserRevisionLine numberNew contents of line
spastor 0:1c358ea10753 1 /*
spastor 0:1c358ea10753 2 * Copyright (c) 2013 Digi International Inc.,
spastor 0:1c358ea10753 3 * All rights not expressly granted are reserved.
spastor 0:1c358ea10753 4 *
spastor 0:1c358ea10753 5 * This Source Code Form is subject to the terms of the Mozilla Public
spastor 0:1c358ea10753 6 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
spastor 0:1c358ea10753 7 * You can obtain one at http://mozilla.org/MPL/2.0/.
spastor 0:1c358ea10753 8 *
spastor 0:1c358ea10753 9 * Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
spastor 0:1c358ea10753 10 * =======================================================================
spastor 0:1c358ea10753 11 */
spastor 0:1c358ea10753 12
spastor 0:1c358ea10753 13 #define ELEMENT_ID_VARIABLE(rci) ((rci)->shared.element.id)
spastor 0:1c358ea10753 14 #define set_element_id(rci, value) (ELEMENT_ID_VARIABLE(rci) = (value))
spastor 0:1c358ea10753 15 #define get_element_id(rci) (ELEMENT_ID_VARIABLE(rci))
spastor 0:1c358ea10753 16 #define invalidate_element_id(rci) set_element_id(rci, INVALID_ID)
spastor 0:1c358ea10753 17 #define have_element_id(rci) (get_element_id(rci) != INVALID_ID)
spastor 0:1c358ea10753 18
spastor 0:1c358ea10753 19 static connector_group_element_t const * get_current_element(rci_t const * const rci)
spastor 0:1c358ea10753 20 {
spastor 0:1c358ea10753 21 ASSERT(have_group_id(rci));
spastor 0:1c358ea10753 22 ASSERT(have_element_id(rci));
spastor 0:1c358ea10753 23
spastor 0:1c358ea10753 24 {
spastor 0:1c358ea10753 25 connector_group_t const * const group = get_current_group(rci);
spastor 0:1c358ea10753 26 unsigned int const id = get_element_id(rci);
spastor 0:1c358ea10753 27
spastor 0:1c358ea10753 28 ASSERT(id < group->elements.count);
spastor 0:1c358ea10753 29
spastor 0:1c358ea10753 30 return (group->elements.data + id);
spastor 0:1c358ea10753 31 }
spastor 0:1c358ea10753 32 }
spastor 0:1c358ea10753 33