Small Testprogram to have WebAccess via Webserver to a 433Mhz tranmitter to control remotly some devices from remote, with TFTP, NTP and RMF. This could be a base to develop applications.

Dependencies:   ChaNFSSD TFTPServer RMFWeb

Dependents:   RMFWeb

Committer:
ED7418
Date:
Fri Jun 06 09:06:03 2014 +0000
Revision:
0:51f1ef89ec7b
06062014

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ED7418 0:51f1ef89ec7b 1 /**
ED7418 0:51f1ef89ec7b 2 * @file
ED7418 0:51f1ef89ec7b 3 * lwIP Operating System abstraction
ED7418 0:51f1ef89ec7b 4 *
ED7418 0:51f1ef89ec7b 5 */
ED7418 0:51f1ef89ec7b 6
ED7418 0:51f1ef89ec7b 7 /*
ED7418 0:51f1ef89ec7b 8 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
ED7418 0:51f1ef89ec7b 9 * All rights reserved.
ED7418 0:51f1ef89ec7b 10 *
ED7418 0:51f1ef89ec7b 11 * Redistribution and use in source and binary forms, with or without modification,
ED7418 0:51f1ef89ec7b 12 * are permitted provided that the following conditions are met:
ED7418 0:51f1ef89ec7b 13 *
ED7418 0:51f1ef89ec7b 14 * 1. Redistributions of source code must retain the above copyright notice,
ED7418 0:51f1ef89ec7b 15 * this list of conditions and the following disclaimer.
ED7418 0:51f1ef89ec7b 16 * 2. Redistributions in binary form must reproduce the above copyright notice,
ED7418 0:51f1ef89ec7b 17 * this list of conditions and the following disclaimer in the documentation
ED7418 0:51f1ef89ec7b 18 * and/or other materials provided with the distribution.
ED7418 0:51f1ef89ec7b 19 * 3. The name of the author may not be used to endorse or promote products
ED7418 0:51f1ef89ec7b 20 * derived from this software without specific prior written permission.
ED7418 0:51f1ef89ec7b 21 *
ED7418 0:51f1ef89ec7b 22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
ED7418 0:51f1ef89ec7b 23 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
ED7418 0:51f1ef89ec7b 24 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
ED7418 0:51f1ef89ec7b 25 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
ED7418 0:51f1ef89ec7b 26 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
ED7418 0:51f1ef89ec7b 27 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
ED7418 0:51f1ef89ec7b 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
ED7418 0:51f1ef89ec7b 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
ED7418 0:51f1ef89ec7b 30 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
ED7418 0:51f1ef89ec7b 31 * OF SUCH DAMAGE.
ED7418 0:51f1ef89ec7b 32 *
ED7418 0:51f1ef89ec7b 33 * This file is part of the lwIP TCP/IP stack.
ED7418 0:51f1ef89ec7b 34 *
ED7418 0:51f1ef89ec7b 35 * Author: Adam Dunkels <adam@sics.se>
ED7418 0:51f1ef89ec7b 36 *
ED7418 0:51f1ef89ec7b 37 */
ED7418 0:51f1ef89ec7b 38
ED7418 0:51f1ef89ec7b 39 #include "lwip/opt.h"
ED7418 0:51f1ef89ec7b 40
ED7418 0:51f1ef89ec7b 41 #include "lwip/sys.h"
ED7418 0:51f1ef89ec7b 42
ED7418 0:51f1ef89ec7b 43 /* Most of the functions defined in sys.h must be implemented in the
ED7418 0:51f1ef89ec7b 44 * architecture-dependent file sys_arch.c */
ED7418 0:51f1ef89ec7b 45
ED7418 0:51f1ef89ec7b 46 #if !NO_SYS
ED7418 0:51f1ef89ec7b 47
ED7418 0:51f1ef89ec7b 48 /**
ED7418 0:51f1ef89ec7b 49 * Sleep for some ms. Timeouts are NOT processed while sleeping.
ED7418 0:51f1ef89ec7b 50 *
ED7418 0:51f1ef89ec7b 51 * @param ms number of milliseconds to sleep
ED7418 0:51f1ef89ec7b 52 */
ED7418 0:51f1ef89ec7b 53 void
ED7418 0:51f1ef89ec7b 54 sys_msleep(u32_t ms)
ED7418 0:51f1ef89ec7b 55 {
ED7418 0:51f1ef89ec7b 56 if (ms > 0) {
ED7418 0:51f1ef89ec7b 57 sys_sem_t delaysem;
ED7418 0:51f1ef89ec7b 58 err_t err = sys_sem_new(&delaysem, 0);
ED7418 0:51f1ef89ec7b 59 if (err == ERR_OK) {
ED7418 0:51f1ef89ec7b 60 sys_arch_sem_wait(&delaysem, ms);
ED7418 0:51f1ef89ec7b 61 sys_sem_free(&delaysem);
ED7418 0:51f1ef89ec7b 62 }
ED7418 0:51f1ef89ec7b 63 }
ED7418 0:51f1ef89ec7b 64 }
ED7418 0:51f1ef89ec7b 65
ED7418 0:51f1ef89ec7b 66 #endif /* !NO_SYS */