Port to C027 (using AppShield and Ethernet)

Dependencies:   C12832 EthernetInterface LM75B MMA7660 MQTT mbed-rtos mbed

Fork of IBMIoTClientEthernetExample by IBM Watson IoT

Committer:
samdanbury
Date:
Wed Aug 20 12:45:14 2014 +0000
Revision:
6:37b6d0d56190
Code completely changed to improve the structure, flow and memory usage of the application

Who changed what in which revision?

UserRevisionLine numberNew contents of line
samdanbury 6:37b6d0d56190 1 /*----------------------------------------------------------------------------
samdanbury 6:37b6d0d56190 2 * RL-ARM - RTX
samdanbury 6:37b6d0d56190 3 *----------------------------------------------------------------------------
samdanbury 6:37b6d0d56190 4 * Name: RTX_CONFIG.H
samdanbury 6:37b6d0d56190 5 * Purpose: Exported functions of RTX_Config.c
samdanbury 6:37b6d0d56190 6 * Rev.: V4.60
samdanbury 6:37b6d0d56190 7 *----------------------------------------------------------------------------
samdanbury 6:37b6d0d56190 8 *
samdanbury 6:37b6d0d56190 9 * Copyright (c) 1999-2009 KEIL, 2009-2012 ARM Germany GmbH
samdanbury 6:37b6d0d56190 10 * All rights reserved.
samdanbury 6:37b6d0d56190 11 * Redistribution and use in source and binary forms, with or without
samdanbury 6:37b6d0d56190 12 * modification, are permitted provided that the following conditions are met:
samdanbury 6:37b6d0d56190 13 * - Redistributions of source code must retain the above copyright
samdanbury 6:37b6d0d56190 14 * notice, this list of conditions and the following disclaimer.
samdanbury 6:37b6d0d56190 15 * - Redistributions in binary form must reproduce the above copyright
samdanbury 6:37b6d0d56190 16 * notice, this list of conditions and the following disclaimer in the
samdanbury 6:37b6d0d56190 17 * documentation and/or other materials provided with the distribution.
samdanbury 6:37b6d0d56190 18 * - Neither the name of ARM nor the names of its contributors may be used
samdanbury 6:37b6d0d56190 19 * to endorse or promote products derived from this software without
samdanbury 6:37b6d0d56190 20 * specific prior written permission.
samdanbury 6:37b6d0d56190 21 *
samdanbury 6:37b6d0d56190 22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
samdanbury 6:37b6d0d56190 23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
samdanbury 6:37b6d0d56190 24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
samdanbury 6:37b6d0d56190 25 * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
samdanbury 6:37b6d0d56190 26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
samdanbury 6:37b6d0d56190 27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
samdanbury 6:37b6d0d56190 28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
samdanbury 6:37b6d0d56190 29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
samdanbury 6:37b6d0d56190 30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
samdanbury 6:37b6d0d56190 31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
samdanbury 6:37b6d0d56190 32 * POSSIBILITY OF SUCH DAMAGE.
samdanbury 6:37b6d0d56190 33 *---------------------------------------------------------------------------*/
samdanbury 6:37b6d0d56190 34
samdanbury 6:37b6d0d56190 35
samdanbury 6:37b6d0d56190 36 /* Error Codes */
samdanbury 6:37b6d0d56190 37 #define OS_ERR_STK_OVF 1
samdanbury 6:37b6d0d56190 38 #define OS_ERR_FIFO_OVF 2
samdanbury 6:37b6d0d56190 39 #define OS_ERR_MBX_OVF 3
samdanbury 6:37b6d0d56190 40
samdanbury 6:37b6d0d56190 41 /* Definitions */
samdanbury 6:37b6d0d56190 42 #define BOX_ALIGN_8 0x80000000
samdanbury 6:37b6d0d56190 43 #define _declare_box(pool,size,cnt) U32 pool[(((size)+3)/4)*(cnt) + 3]
samdanbury 6:37b6d0d56190 44 #define _declare_box8(pool,size,cnt) U64 pool[(((size)+7)/8)*(cnt) + 2]
samdanbury 6:37b6d0d56190 45 #define _init_box8(pool,size,bsize) _init_box (pool,size,(bsize) | BOX_ALIGN_8)
samdanbury 6:37b6d0d56190 46
samdanbury 6:37b6d0d56190 47 /* Variables */
samdanbury 6:37b6d0d56190 48 extern U32 idle_task_stack[];
samdanbury 6:37b6d0d56190 49 extern U32 os_fifo[];
samdanbury 6:37b6d0d56190 50 extern void *os_active_TCB[];
samdanbury 6:37b6d0d56190 51
samdanbury 6:37b6d0d56190 52 /* Constants */
samdanbury 6:37b6d0d56190 53 extern U16 const os_maxtaskrun;
samdanbury 6:37b6d0d56190 54 extern U32 const os_trv;
samdanbury 6:37b6d0d56190 55 extern U8 const os_flags;
samdanbury 6:37b6d0d56190 56 extern U32 const os_rrobin;
samdanbury 6:37b6d0d56190 57 extern U32 const os_clockrate;
samdanbury 6:37b6d0d56190 58 extern U32 const os_timernum;
samdanbury 6:37b6d0d56190 59 extern U16 const idle_task_stack_size;
samdanbury 6:37b6d0d56190 60
samdanbury 6:37b6d0d56190 61 extern U8 const os_fifo_size;
samdanbury 6:37b6d0d56190 62
samdanbury 6:37b6d0d56190 63 /* Functions */
samdanbury 6:37b6d0d56190 64 extern void os_idle_demon (void);
samdanbury 6:37b6d0d56190 65 extern int os_tick_init (void);
samdanbury 6:37b6d0d56190 66 extern void os_tick_irqack (void);
samdanbury 6:37b6d0d56190 67 extern void os_tmr_call (U16 info);
samdanbury 6:37b6d0d56190 68 extern void os_error (U32 err_code);
samdanbury 6:37b6d0d56190 69
samdanbury 6:37b6d0d56190 70 /*----------------------------------------------------------------------------
samdanbury 6:37b6d0d56190 71 * end of file
samdanbury 6:37b6d0d56190 72 *---------------------------------------------------------------------------*/