Skip to content

Commit

Permalink
Update to Atmel LWM version 1.2.1
Browse files Browse the repository at this point in the history
This imports (part of) the code from the "Lightweight Mesh Software
Stack v1.2.1" zipfile, as downloaded from the [atmel website][1].

[1]: http://www.atmel.com/tools/lightweight_mesh.aspx
  • Loading branch information
matthijskooijman committed Jul 1, 2014
1 parent 6f1fa5d commit 3b8ad1c
Show file tree
Hide file tree
Showing 31 changed files with 225 additions and 33 deletions.
95 changes: 95 additions & 0 deletions license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
LIMITED LICENSE AGREEMENT

You (“Company” or “You”) must read this Limited License Agreement (this
"Agreement") carefully and thoroughly before downloading, installing,
and/or using any software or content (“Software”) provided herewith.
BY DOWNLOADING, INSTALLING AND/OR USING ANY SOFTWARE OR CONTENT, YOU ARE
CONFIRMING YOUR ACCEPTANCE OF THE TERMS OF THIS AGREEMENT. IF YOU DO NOT
AGREE TO BE BOUND BY THE TERMS OF THIS AGREEMENT, THEN DO NOT DOWNLOAD,
INSTALL/COMPLETE INSTALLATION OF, OR USE THE SOFTWARE OR CONTENT.

1. Grant of License. Atmel grants Company a non-exclusive, non-transferable,
limited license: (a) to internally use the Software as a development platform
solely in connection with an Atmel microcontroller product (“Atmel Product”),
(b) to internally modify the source code version of the Software solely as
necessary to implement such Software in products developed by Company that
incorporate an Atmel Product (“Company Products”), and (c) to distribute the
Software solely as implemented in Company Products. Company shall not use
the Software for any purpose other than as specifically authorized herein.

2. Title. As between the parties, Atmel retains full rights, title, and
ownership including all patents, copyrights, trade secrets, trade names,
trademarks, and other intellectual property rights in and to the Software.
Company agrees to take all reasonable steps to prevent unauthorized disclosure
of the Software.

3. No Other Rights. Except as expressly stated herein, this Agreement does not
grant Company, by implication, estoppels or otherwise, any rights to patents,
copyrights, trade secrets, trade names, trademarks (whether registered or
unregistered), or any other rights, franchises, or licenses in respect of the
Software. Atmel will not provide any support or maintenance for the Software.
Company will be solely responsible for supporting its customers, including
resellers and end users.

4. No Support and Disclaimer of Warranty. Atmel is not obligated to furnish or
make available to Company any further information, software, technical
information, know-how, show-how, bug-fixes, or support. Atmel reserves the
right to make changes to the Software without further notice. ATMEL IS
PROVIDING THE SOFTWARE TO COMPANY “AS IS”, “WITH ALL FAULTS”, AND WITH NO
WARRANTY WHATSOEVER. ATMEL MAKES NO WARRANTY THAT THE SOFTWARE IS COMPLETE,
VERIFIED, OR VALIDATED. ATMEL IS MAKING NO REPRESENTATION THAT THE SOFTWARE IS
FREE FROM ANY CLAIMS OF INFRINGEMENT. ATMEL MAKES NO WARRANTY WHATSOEVER,
EXPRESS, IMPLIED, STATUTORY, CONTRACTUAL OR OTHERWISE WITH RESPECT TO THE
SOFTWARE, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT AND ANY WARRANTIES
ARISING BY VIRTUE OF CUSTOM OF TRADE OR COURSE OF DEALING.

5. Notice and Protection. Company agrees not to remove or destroy any
proprietary trademark or copyright markings or notices placed upon or contained
within the Software or any related documentation.

6. Export. Company acknowledges that the certain laws and regulations may
restrict the export and re-export of the Software. Company will not export or
re-export any Software (including the diskettes, related documentation and/or
any hardware peripherals) in any form without the appropriate United States
and foreign governmental approval.

7. Termination. The license will automatically terminate if Company fails to
comply with any of the terms and conditions of the license. Upon termination
for any reason, Company will immediately destroy or return to Atmel the
Software, including all documentation and all whole or partial copies of
the Software.

8. LIMITATION OF LIABILITY. IN NO EVENT SHALL ATMEL BE LIABLE TO COMPANY OR
ANY THIRD PARTY FOR ANY CONSEQUENTIAL, SPECIAL, INDIRECT OR INCIDENTAL
DAMAGES ARISING OUT OF OR RELATING TO THE SOFTWARE OR ANY OTHER ASPECT OF
THIS AGREEMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES. IN NO EVENT SHALL THE LIABILITY OF ATMEL ARISING OUT OF OR RELATING
TO THIS AGREEMENT EXCEED THE GREATER OF ONE THOUSAND U.S. DOLLARS (US$1,000)
OR THE PRICE PAID BY COMPANY TO ATMEL FOR THE SOFTWARE.

9. General. This Agreement and all transactions concluded hereunder shall be
governed by the laws of the State of California, as such laws are applied to
contracts entered into and performed entirely in California by California
residents. Any litigation relating to this Agreement shall be subject to the
exclusive jurisdiction of the state courts located in Santa Clara County,
California, or the federal courts located in the Northern District of
California. If any provision of this Agreement is held to be invalid, illegal
or unenforceable, that provision shall be construed in such a manner that it
becomes valid and enforceable and so as to reflect most closely the intent of
the parties in agreeing upon the provision in the first place, and the
remaining provisions of this Agreement shall continue in full force and effect
and shall not in any way be affected or impaired by any such determination of
invalidity, illegality or unenforceability.

THIS AGREEMENT IS THE ENTIRE AND EXCLUSIVE AGREEMENT BETWEEN ATMEL AND
COMPANY AND SUPERSEDES ALL PRIOR ORAL AND WRITTEN AGREEMENTS AND
COMMUNICATIONS BETWEEN THE PARTIES PERTAINING TO THE SUBJECT MATTER OF THIS
AGREEMENT. NO DIFFERENT OR ADDITIONAL TERMS WILL BE ENFORCEABLE AGAINST ATMEL
UNLESS ATMEL GIVES ITS EXPRESS WRITTEN CONSENT, INCLUDING AN EXPRESS WAIVER
OF THE TERMS OF THIS AGREEMENT.

Atmel Corporation
1600 Technology Drive
San Jose, CA 95110
http://www.atmel.com
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwk.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
*
* \asf_license_stop
*
* $Id: nwk.c 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwk.c 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwk.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ extern "C" {
*
* \asf_license_stop
*
* $Id: nwk.h 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwk.h 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwkCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ extern "C" {
*
* \asf_license_stop
*
* $Id: nwkCommand.h 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwkCommand.h 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwkDataReq.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
*
* \asf_license_stop
*
* $Id: nwkDataReq.c 9165 2014-02-03 23:47:21Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwkDataReq.c 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwkDataReq.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ extern "C" {
*
* \asf_license_stop
*
* $Id: nwkDataReq.h 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwkDataReq.h 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwkFrame.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
*
* \asf_license_stop
*
* $Id: nwkFrame.c 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwkFrame.c 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwkFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ extern "C" {
*
* \asf_license_stop
*
* $Id: nwkFrame.h 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwkFrame.h 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwkGroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
*
* \asf_license_stop
*
* $Id: nwkGroup.c 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwkGroup.c 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwkGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ extern "C" {
*
* \asf_license_stop
*
* $Id: nwkGroup.h 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwkGroup.h 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwkRoute.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
*
* \asf_license_stop
*
* $Id: nwkRoute.c 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwkRoute.c 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwkRoute.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ extern "C" {
*
* \asf_license_stop
*
* $Id: nwkRoute.h 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwkRoute.h 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwkRouteDiscovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
*
* \asf_license_stop
*
* $Id: nwkRouteDiscovery.c 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwkRouteDiscovery.c 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwkRouteDiscovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ extern "C" {
*
* \asf_license_stop
*
* $Id: nwkRouteDiscovery.h 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwkRouteDiscovery.h 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
11 changes: 7 additions & 4 deletions src/lwm/nwk/nwkRx.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
*
* \asf_license_stop
*
* $Id: nwkRx.c 9169 2014-02-05 21:57:15Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwkRx.c 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down Expand Up @@ -84,7 +87,7 @@ typedef struct NwkDuplicateRejectionEntry_t

/*- Prototypes -------------------------------------------------------------*/
static void nwkRxDuplicateRejectionTimerHandler(SYS_Timer_t *timer);
static bool nwkRxSeriveDataInd(NWK_DataInd_t *ind);
static bool nwkRxServiceDataInd(NWK_DataInd_t *ind);

/*- Variables --------------------------------------------------------------*/
static NwkDuplicateRejectionEntry_t nwkRxDuplicateRejectionTable[NWK_DUPLICATE_REJECTION_TABLE_SIZE];
Expand All @@ -105,7 +108,7 @@ void nwkRxInit(void)
nwkRxDuplicateRejectionTimer.mode = SYS_TIMER_INTERVAL_MODE;
nwkRxDuplicateRejectionTimer.handler = nwkRxDuplicateRejectionTimerHandler;

NWK_OpenEndpoint(NWK_SERVICE_ENDPOINT_ID, nwkRxSeriveDataInd);
NWK_OpenEndpoint(NWK_SERVICE_ENDPOINT_ID, nwkRxServiceDataInd);
}

/*************************************************************************//**
Expand Down Expand Up @@ -251,7 +254,7 @@ static bool nwkRxRejectDuplicate(NwkFrameHeader_t *header)

/*************************************************************************//**
*****************************************************************************/
static bool nwkRxSeriveDataInd(NWK_DataInd_t *ind)
static bool nwkRxServiceDataInd(NWK_DataInd_t *ind)
{
#ifdef NWK_ENABLE_SECURE_COMMANDS
if (0 == (ind->options & NWK_IND_OPT_SECURED))
Expand Down
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwkRx.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ extern "C" {
*
* \asf_license_stop
*
* $Id: nwkRx.h 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwkRx.h 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwkSecurity.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
*
* \asf_license_stop
*
* $Id: nwkSecurity.c 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwkSecurity.c 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwkSecurity.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ extern "C" {
*
* \asf_license_stop
*
* $Id: nwkSecurity.h 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwkSecurity.h 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwkTx.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
*
* \asf_license_stop
*
* $Id: nwkTx.c 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwkTx.c 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/nwk/nwkTx.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ extern "C" {
*
* \asf_license_stop
*
* $Id: nwkTx.h 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: nwkTx.h 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/phy/atmegarfr2.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ extern "C" {
*
* \asf_license_stop
*
* $Id: atmegarfr2.h 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: atmegarfr2.h 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/phy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
*
* \asf_license_stop
*
* $Id: phy.c 9200 2014-02-18 21:10:58Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: phy.c 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/phy/phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ extern "C" {
*
* \asf_license_stop
*
* $Id: phy.h 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: phy.h 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
5 changes: 4 additions & 1 deletion src/lwm/sys/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
*
* \asf_license_stop
*
* $Id: sys.c 9157 2014-01-28 19:32:53Z ataradov $
* Modification and other use of this code is subject to Atmel's Limited
* License Agreement (license.txt).
*
* $Id: sys.c 9267 2014-03-18 21:46:19Z ataradov $
*
*/

Expand Down
Loading

0 comments on commit 3b8ad1c

Please sign in to comment.