mbed os with nrf51 internal bandgap enabled to read battery level

Dependents:   BLE_file_test BLE_Blink ExternalEncoder

Committer:
elessair
Date:
Sun Oct 23 15:10:02 2016 +0000
Revision:
0:f269e3021894
Initial commit

Who changed what in which revision?

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