Changing NuttX fixed size type names to C99 standard names -- things will be broken for awhile

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2358 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2009-12-16 16:28:31 +00:00
parent 2698550594
commit 59ca96e726
21 changed files with 426 additions and 386 deletions

View File

@ -1,7 +1,7 @@
/************************************************************ /************************************************************************
* arch.h * arch.h
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -31,7 +31,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/* This file should never be included directed but, rather, /* This file should never be included directed but, rather,
* only indirectly through nuttx/arch.h * only indirectly through nuttx/arch.h
@ -40,25 +40,27 @@
#ifndef __ARCH_ARCH_H #ifndef __ARCH_ARCH_H
#define __ARCH_ARCH_H #define __ARCH_ARCH_H
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
/************************************************************ #include <stdint.h>
/************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Types * Public Types
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Variables * Public Variables
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Function Prototypes * Public Function Prototypes
************************************************************/ ************************************************************************/
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
@ -72,7 +74,7 @@ extern "C" {
* code to dump the stack pointer at critical locations. * code to dump the stack pointer at critical locations.
*/ */
EXTERN void up_showsp(ubyte ch) __naked; EXTERN void up_showsp(uint8_t ch) __naked;
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -1,7 +1,7 @@
/************************************************************ /************************************************************************
* irq.h * irq.h
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -31,7 +31,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/* This file should never be included directed but, rather, /* This file should never be included directed but, rather,
* only indirectly through nuttx/irq.h * only indirectly through nuttx/irq.h
@ -40,15 +40,18 @@
#ifndef __ARCH_IRQ_H #ifndef __ARCH_IRQ_H
#define __ARCH_IRQ_H #define __ARCH_IRQ_H
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <stdint.h>
#endif
/************************************************************ /************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
#define EXT_INT0_IRQ 0 #define EXT_INT0_IRQ 0
#define TIMER0_IRQ 1 #define TIMER0_IRQ 1
@ -141,9 +144,9 @@
#define XCPT_SIZE (STACK_SIZE+REGS_SIZE+1) #define XCPT_SIZE (STACK_SIZE+REGS_SIZE+1)
/************************************************************ /************************************************************************
* Public Types * Public Types
************************************************************/ ************************************************************************/
/* This struct defines the way the registers are stored */ /* This struct defines the way the registers are stored */
@ -155,31 +158,31 @@ struct xcptcontext
* the top-of-stack pointer can be derived from this size. * the top-of-stack pointer can be derived from this size.
*/ */
ubyte nbytes; uint8_t nbytes;
/* This is the saved stack. Space is allocated for the /* This is the saved stack. Space is allocated for the
* entire 256 byte IRAM (minus register and bit usage at * entire 256 byte IRAM (minus register and bit usage at
* the beginning). * the beginning).
*/ */
ubyte stack[STACK_SIZE]; uint8_t stack[STACK_SIZE];
/* These are save 8051/2 registers. These are saved /* These are save 8051/2 registers. These are saved
* separately from the stack to increase the effective * separately from the stack to increase the effective
* stack size. * stack size.
*/ */
ubyte regs[REGS_SIZE]; uint8_t regs[REGS_SIZE];
}; };
#endif /* __ASSEMBLY */ #endif /* __ASSEMBLY */
/************************************************************ /************************************************************************
* Public Variables * Public Variables
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Function Prototypes * Public Function Prototypes
************************************************************/ ************************************************************************/
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__

View File

@ -1,7 +1,7 @@
/************************************************************ /************************************************************************
* up_assert.c * up_assert.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -31,38 +31,39 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
#include <sched.h> #include <sched.h>
#include <debug.h> #include <debug.h>
#include <8052.h> #include <8052.h>
#include "os_internal.h" #include "os_internal.h"
#include "up_internal.h" #include "up_internal.h"
#include "up_mem.h" #include "up_mem.h"
/************************************************************ /************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Data * Private Data
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Name: _up_assert * Name: _up_assert
************************************************************/ ************************************************************************/
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */ static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
{ {
@ -87,15 +88,15 @@ static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
} }
} }
/************************************************************ /************************************************************************
* Public Functions * Public Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Name: up_assert * Name: up_assert
************************************************************/ ************************************************************************/
void up_assert(const ubyte *filename, int lineno) void up_assert(const uint8_t *filename, int lineno)
{ {
#if CONFIG_TASK_NAME_SIZE > 0 #if CONFIG_TASK_NAME_SIZE > 0
_TCB *rtcb = (_TCB*)g_readytorun.head; _TCB *rtcb = (_TCB*)g_readytorun.head;
@ -115,11 +116,11 @@ void up_assert(const ubyte *filename, int lineno)
_up_assert(EXIT_FAILURE); _up_assert(EXIT_FAILURE);
} }
/************************************************************ /************************************************************************
* Name: up_assert_code * Name: up_assert_code
************************************************************/ ************************************************************************/
void up_assert_code(const ubyte *filename, int lineno, int errorcode) void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
{ {
#if CONFIG_TASK_NAME_SIZE > 0 #if CONFIG_TASK_NAME_SIZE > 0
_TCB *rtcb = (_TCB*)g_readytorun.head; _TCB *rtcb = (_TCB*)g_readytorun.head;

View File

@ -1,7 +1,7 @@
/************************************************************ /************************************************************************
* up_blocktask.c * up_blocktask.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -31,37 +31,39 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <stdbool.h>
#include <sched.h> #include <sched.h>
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include "os_internal.h" #include "os_internal.h"
#include "up_internal.h" #include "up_internal.h"
/************************************************************ /************************************************************************
* Private Definitions * Private Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Data * Private Data
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Funtions * Private Funtions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Funtions * Public Funtions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Name: up_block_task * Name: up_block_task
* *
* Description: * Description:
@ -79,7 +81,7 @@
* task_state: Specifies which waiting task list should be * task_state: Specifies which waiting task list should be
* hold the blocked task TCB. * hold the blocked task TCB.
* *
************************************************************/ ************************************************************************/
void up_block_task(FAR _TCB *tcb, tstate_t task_state) void up_block_task(FAR _TCB *tcb, tstate_t task_state)
{ {
@ -93,7 +95,7 @@ void up_block_task(FAR _TCB *tcb, tstate_t task_state)
else else
{ {
FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head; FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
boolean switch_needed; bool switch_needed;
dbg("Blocking TCB=%p\n", tcb); dbg("Blocking TCB=%p\n", tcb);

View File

@ -1,7 +1,7 @@
/************************************************************ /************************************************************************
* up_assert.c * up_assert.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -31,32 +31,36 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdint.h>
#include <debug.h> #include <debug.h>
#include <8052.h> #include <8052.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <arch/irq.h> #include <arch/irq.h>
#include "up_internal.h" #include "up_internal.h"
#include "up_mem.h" #include "up_mem.h"
/************************************************************ /************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Data * Private Data
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
#if defined(CONFIG_FRAME_DUMP) && defined(CONFIG_ARCH_BRINGUP) #if defined(CONFIG_FRAME_DUMP) && defined(CONFIG_ARCH_BRINGUP)
static void up_putspace(void) __naked static void up_putspace(void) __naked
@ -75,7 +79,7 @@ static void _up_putcolon(void) __naked
_endasm; _endasm;
} }
static void _up_dump16(__code char *ptr, ubyte msb, ubyte lsb) static void _up_dump16(__code char *ptr, uint8_t msb, uint8_t lsb)
{ {
up_puts(ptr); up_puts(ptr);
up_puthex(msb); up_puthex(msb);
@ -83,7 +87,7 @@ static void _up_dump16(__code char *ptr, ubyte msb, ubyte lsb)
up_putnl(); up_putnl();
} }
static void _up_dump8(__code char *ptr, ubyte b) static void _up_dump8(__code char *ptr, uint8_t b)
{ {
up_puts(ptr); up_puts(ptr);
up_puthex(b); up_puthex(b);
@ -91,16 +95,16 @@ static void _up_dump8(__code char *ptr, ubyte b)
} }
#endif #endif
/************************************************************ /************************************************************************
* Public Functions * Public Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Name: up_puthex, up_puthex16, up_putnl, up_puts * Name: up_puthex, up_puthex16, up_putnl, up_puts
************************************************************/ ************************************************************************/
#if defined(CONFIG_ARCH_BRINGUP) #if defined(CONFIG_ARCH_BRINGUP)
void up_puthex(ubyte hex) __naked void up_puthex(uint8_t hex) __naked
{ {
hex; /* To avoid unreferenced argument warning */ hex; /* To avoid unreferenced argument warning */
_asm _asm
@ -133,26 +137,26 @@ void up_puts(__code char *ptr)
} }
#endif #endif
/************************************************************ /************************************************************************
* Name: up_dumpstack * Name: up_dumpstack
************************************************************/ ************************************************************************/
#if defined(CONFIG_FRAME_DUMP) && defined(CONFIG_ARCH_BRINGUP) #if defined(CONFIG_FRAME_DUMP) && defined(CONFIG_ARCH_BRINGUP)
void up_dumpstack(void) void up_dumpstack(void)
{ {
NEAR ubyte *start = (NEAR ubyte *)(STACK_BASE & 0xf0); NEAR uint8_t *start = (NEAR uint8_t *)(STACK_BASE & 0xf0);
NEAR ubyte *end = (NEAR ubyte *)SP; NEAR uint8_t *end = (NEAR uint8_t *)SP;
ubyte i; uint8_t i;
while (start < end) while (start < end)
{ {
up_puthex((ubyte)start); up_puthex((uint8_t)start);
_up_putcolon(); _up_putcolon();
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
{ {
up_putspace(); up_putspace();
if (start < (NEAR ubyte *)(STACK_BASE) || if (start < (NEAR uint8_t *)(STACK_BASE) ||
start > end) start > end)
{ {
up_putspace(); up_putspace();
@ -169,16 +173,16 @@ void up_dumpstack(void)
} }
#endif #endif
/************************************************************ /************************************************************************
* Name: up_dumpframe * Name: up_dumpframe
************************************************************/ ************************************************************************/
#if defined(CONFIG_FRAME_DUMP) && defined(CONFIG_ARCH_BRINGUP) #if defined(CONFIG_FRAME_DUMP) && defined(CONFIG_ARCH_BRINGUP)
void up_dumpframe(FAR struct xcptcontext *context) void up_dumpframe(FAR struct xcptcontext *context)
{ {
#ifdef CONFIG_FRAME_DUMP_SHORT #ifdef CONFIG_FRAME_DUMP_SHORT
FAR ubyte *stack = &context->stack[context->nbytes - FRAME_SIZE]; FAR uint8_t *stack = &context->stack[context->nbytes - FRAME_SIZE];
FAR ubyte *regs = context->regs; FAR uint8_t *regs = context->regs;
_up_dump16(" RET ", stack[FRAME_RETMS], stack[FRAME_RETLS]); _up_dump16(" RET ", stack[FRAME_RETMS], stack[FRAME_RETLS]);
_up_dump8 (" IE ", stack[FRAME_IE]); _up_dump8 (" IE ", stack[FRAME_IE]);
@ -186,9 +190,9 @@ void up_dumpframe(FAR struct xcptcontext *context)
_up_dump8 (" PSW ", regs[REGS_PSW]); _up_dump8 (" PSW ", regs[REGS_PSW]);
_up_dump8 (" SP ", context->nbytes + (STACK_BASE-1)); _up_dump8 (" SP ", context->nbytes + (STACK_BASE-1));
#else #else
FAR ubyte *stack = &context->stack[context->nbytes - FRAME_SIZE]; FAR uint8_t *stack = &context->stack[context->nbytes - FRAME_SIZE];
FAR ubyte *regs = context->regs; FAR uint8_t *regs = context->regs;
ubyte i, j, k; uint8_t i, j, k;
_up_dump8 (" NBYTES ", context->nbytes); _up_dump8 (" NBYTES ", context->nbytes);
@ -225,9 +229,9 @@ void up_dumpframe(FAR struct xcptcontext *context)
} }
#endif #endif
/************************************************************ /************************************************************************
* Name: up_dumpframe * Name: up_dumpframe
************************************************************/ ************************************************************************/
/* The 805x family has a tiny, 256 stack and can be easily /* The 805x family has a tiny, 256 stack and can be easily
* overflowed. The following macro can be used to instrument * overflowed. The following macro can be used to instrument
@ -235,7 +239,7 @@ void up_dumpframe(FAR struct xcptcontext *context)
*/ */
#ifdef CONFIG_ARCH_PJRC #ifdef CONFIG_ARCH_PJRC
void up_showsp(ubyte ch) __naked void up_showsp(uint8_t ch) __naked
{ {
ch; ch;
_asm _asm

View File

@ -1,7 +1,7 @@
/************************************************************ /************************************************************************
* up_delay.c * up_delay.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -31,51 +31,51 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h> #include <stdint.h>
#include "up_internal.h" #include "up_internal.h"
/************************************************************ /************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Types * Private Types
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Function Prototypes * Private Function Prototypes
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Variables * Private Variables
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Funtions * Public Funtions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Name: up_delay * Name: up_delay
* *
* Description: * Description:
* Delay inline for the requested number of milliseconds. * Delay inline for the requested number of milliseconds.
* NOT multi-tasking friendly. * NOT multi-tasking friendly.
* *
************************************************************/ ************************************************************************/
void up_delay(ubyte milliseconds) __naked void up_delay(uint8_t milliseconds) __naked
{ {
_asm _asm
mov r0, dpl mov r0, dpl

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************************
* up_exit.c * up_exit.c
* *
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -31,38 +31,40 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************************/
/**************************************************************************** /****************************************************************************************
* Included Files * Included Files
****************************************************************************/ ****************************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <sched.h> #include <sched.h>
#include <debug.h> #include <debug.h>
#include <8052.h> #include <8052.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include "os_internal.h" #include "os_internal.h"
#include "up_internal.h" #include "up_internal.h"
/**************************************************************************** /****************************************************************************************
* Private Definitions * Private Definitions
****************************************************************************/ ****************************************************************************************/
/**************************************************************************** /****************************************************************************************
* Private Data * Private Data
****************************************************************************/ ****************************************************************************************/
/**************************************************************************** /****************************************************************************************
* Private Functions * Private Functions
****************************************************************************/ ****************************************************************************************/
/**************************************************************************** /****************************************************************************************
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************************/
/**************************************************************************** /****************************************************************************************
* Name: _exit * Name: _exit
* *
* Description: * Description:
@ -71,7 +73,7 @@
* be deleted is the currently executing task. It is more complex because * be deleted is the currently executing task. It is more complex because
* a context switch must be perform to the next ready to run task. * a context switch must be perform to the next ready to run task.
* *
****************************************************************************/ ****************************************************************************************/
void _exit(int status) void _exit(int status)
{ {

View File

@ -1,7 +1,7 @@
/************************************************************ /************************************************************
* up_idle.c * up_idle.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -31,36 +31,38 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include "up_internal.h" #include "up_internal.h"
/************************************************************ /************************************************************
* Private Definitions * Private Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************
* Private Data * Private Data
************************************************************/ ************************************************************************/
#if defined(CONFIG_ARCH_LEDS) && defined(CONFIG_ARCH_BRINGUP) #if defined(CONFIG_ARCH_LEDS) && defined(CONFIG_ARCH_BRINGUP)
static ubyte g_ledtoggle = 0; static /**************** g_ledtoggle = 0;
#endif #endif
/************************************************************ /************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************
* Public Functions * Public Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************
* Name: up_idle * Name: up_idle
@ -75,7 +77,7 @@ static ubyte g_ledtoggle = 0;
* this is where power management operations might be * this is where power management operations might be
* performed. * performed.
* *
************************************************************/ ************************************************************************/
void up_idle(void) void up_idle(void)
{ {

View File

@ -1,7 +1,7 @@
/************************************************************ /************************************************************************
* up_initialize.c * up_initialize.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -31,25 +31,28 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/fs.h> #include <nuttx/fs.h>
#include "up_internal.h" #include "up_internal.h"
/************************************************************ /************************************************************************
* Private Definitions * Private Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Data * Private Data
************************************************************/ ************************************************************************/
/* This is the top of the stack containing the interrupt /* This is the top of the stack containing the interrupt
* stack frame. It is set when processing an interrupt. It * stack frame. It is set when processing an interrupt. It
@ -58,7 +61,7 @@
* interrupt. * interrupt.
*/ */
ubyte g_irqtos; uint8_t g_irqtos;
/* Registers are saved in the following global array during /* Registers are saved in the following global array during
* interrupt processing. If a context switch is performed * interrupt processing. If a context switch is performed
@ -68,7 +71,7 @@ ubyte g_irqtos;
* directly into (_TCB*)g_readytorun.head->xcp.regs). * directly into (_TCB*)g_readytorun.head->xcp.regs).
*/ */
ubyte g_irqregs[REGS_SIZE]; uint8_t g_irqregs[REGS_SIZE];
/* If during execution of an interrup handler, a context /* If during execution of an interrup handler, a context
* switch must be performed, the follwing will be set to * switch must be performed, the follwing will be set to
@ -83,18 +86,18 @@ FAR struct xcptcontext *g_irqcontext;
* to comput them. * to comput them.
*/ */
const ubyte g_ntobit[8] = const uint8_t g_ntobit[8] =
{ 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Functions * Public Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Name: up_initialize * Name: up_initialize
* *
* Description: * Description:
@ -112,7 +115,7 @@ const ubyte g_ntobit[8] =
* libraries have been initialized. OS services and driver * libraries have been initialized. OS services and driver
* services are available. * services are available.
* *
************************************************************/ ************************************************************************/
void up_initialize(void) void up_initialize(void)
{ {

View File

@ -1,7 +1,7 @@
/************************************************************ /************************************************************************
* up_initialstate.c * up_initialstate.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -31,34 +31,36 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <sched.h> #include <sched.h>
#include "up_internal.h" #include "up_internal.h"
/************************************************************ /************************************************************************
* Private Definitions * Private Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Data * Private Data
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Functions * Public Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Name: up_initial_state * Name: up_initial_state
* *
* Description: * Description:
@ -70,12 +72,12 @@
* and/or stack so that execution will begin at tcb->start * and/or stack so that execution will begin at tcb->start
* on the next context switch. * on the next context switch.
* *
************************************************************/ ************************************************************************/
void up_initial_state(FAR _TCB *tcb) void up_initial_state(FAR _TCB *tcb)
{ {
FAR ubyte *frame = tcb->xcp.stack; FAR uint8_t *frame = tcb->xcp.stack;
FAR ubyte *regs = tcb->xcp.regs; FAR uint8_t *regs = tcb->xcp.regs;
/* This is the form of initial stack frame /* This is the form of initial stack frame
* *
@ -94,8 +96,8 @@ void up_initial_state(FAR _TCB *tcb)
* (SP) <- (SP) -1 * (SP) <- (SP) -1
*/ */
frame[FRAME_RETLS] = (((uint16)tcb->start) & 0xff); frame[FRAME_RETLS] = (((uint16_t))tcb->start) & 0xff);
frame[FRAME_RETMS] = (((uint16)tcb->start) >> 8); frame[FRAME_RETMS] = (((uint16_t))tcb->start) >> 8);
/* The context save area for registers a, ie, and dpstr /* The context save area for registers a, ie, and dpstr
* follows the return address in the stack frame. * follows the return address in the stack frame.

View File

@ -1,7 +1,7 @@
/************************************************************************** /**************************************************************************
* up_internal.h * up_internal.h
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -41,6 +41,8 @@
**************************************************************************/ **************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <stdint.h>
#include <stdbool.h>
#include <arch/irq.h> #include <arch/irq.h>
#if defined(CONFIG_ARCH_BOARD_PJRC_87C52) #if defined(CONFIG_ARCH_BOARD_PJRC_87C52)
@ -70,7 +72,7 @@
* interrupt. * interrupt.
*/ */
extern ubyte g_irqtos; extern uint8_t g_irqtos;
/* Registers are saved in the following global array during /* Registers are saved in the following global array during
* interrupt processing. If a context switch is performed * interrupt processing. If a context switch is performed
@ -80,7 +82,7 @@ extern ubyte g_irqtos;
* directly into (_TCB*)g_readytorun.head->xcp.regs). * directly into (_TCB*)g_readytorun.head->xcp.regs).
*/ */
extern ubyte g_irqregs[REGS_SIZE]; extern uint8_t g_irqregs[REGS_SIZE];
/* If during execution of an interrup handler, a context /* If during execution of an interrup handler, a context
* switch must be performed, the follwing will be set to * switch must be performed, the follwing will be set to
@ -95,7 +97,7 @@ extern FAR struct xcptcontext *g_irqcontext;
* to comput them. * to comput them.
*/ */
extern const ubyte g_ntobit[8]; extern const uint8_t g_ntobit[8];
#endif /* __ASSEMBLY */ #endif /* __ASSEMBLY */
@ -106,21 +108,21 @@ extern const ubyte g_ntobit[8];
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#if CONFIG_MM_REGIONS > 1 #if CONFIG_MM_REGIONS > 1
extern void up_addregion(void); extern void up_addregion(void);
#endif #endif
extern void up_delay(ubyte milliseconds) __naked; extern void up_delay(uint8_t milliseconds) __naked;
extern void up_irqinitialize(void); extern void up_irqinitialize(void);
extern void up_restorecontext(FAR struct xcptcontext *context) _naked; extern void up_restorecontext(FAR struct xcptcontext *context) _naked;
extern void up_restoreregisters(FAR ubyte *regs) _naked; extern void up_restoreregisters(FAR uint8_t *regs) _naked;
extern ubyte up_savecontext(FAR struct xcptcontext *context) __naked; extern uint8_t up_savecontext(FAR struct xcptcontext *context) __naked;
extern void up_saveregisters(FAR ubyte *regs) _naked; extern void up_saveregisters(FAR uint8_t *regs) _naked;
extern void up_saveirqcontext(FAR struct xcptcontext *context); extern void up_saveirqcontext(FAR struct xcptcontext *context);
extern void up_timerinit(void); extern void up_timerinit(void);
/* Defined in up_debug.c */ /* Defined in up_debug.c */
#if defined(CONFIG_ARCH_BRINGUP) #if defined(CONFIG_ARCH_BRINGUP)
extern void up_puthex(ubyte hex) __naked; extern void up_puthex(uint8_t hex) __naked;
extern void up_puthex16(int hex) __naked; extern void up_puthex16(int hex) __naked;
extern void up_putnl(void) __naked; extern void up_putnl(void) __naked;
extern void up_puts(__code char *ptr); extern void up_puts(__code char *ptr);
@ -138,8 +140,8 @@ extern void up_dumpframe(FAR struct xcptcontext *context);
#ifdef CONFIG_ARCH_LEDS #ifdef CONFIG_ARCH_LEDS
extern void up_ledinit(void); extern void up_ledinit(void);
extern void up_ledon(ubyte led); extern void up_ledon(uint8_t led);
extern void up_ledoff(ubyte led); extern void up_ledoff(uint8_t led);
#else #else
# define up_ledinit() # define up_ledinit()
# define up_ledon(led) # define up_ledon(led)

View File

@ -1,7 +1,7 @@
/************************************************************ /************************************************************************
* up_interruptcontext.c * up_interruptcontext.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -31,38 +31,40 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <stdbool.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include "up_internal.h" #include "up_internal.h"
/************************************************************ /************************************************************************
* Private Types * Private Types
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Function Prototypes * Private Function Prototypes
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Global Functions * Global Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Name: up_interrupt_context * Name: up_interrupt_context
* *
* Description: Return TRUE is we are currently executing in * Description: Return true is we are currently executing in
* the interrupt handler context. * the interrupt handler context.
************************************************************/ ************************************************************************/
boolean up_interrupt_context(void) bool up_interrupt_context(void)
{ {
return g_irqtos != 0; return g_irqtos != 0;
} }

View File

@ -1,7 +1,7 @@
/************************************************************ /************************************************************************
* up_irq.c * up_irq.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -31,43 +31,46 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include <debug.h>
#include <8052.h> #include <8052.h>
#include "up_internal.h" #include "up_internal.h"
#include <debug.h>
extern int g_nints; extern int g_nints;
/************************************************************
/************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Data * Public Data
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Data * Private Data
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Funtions * Public Funtions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Name: irq_initialize * Name: irq_initialize
************************************************************/ ************************************************************************/
void up_irqinitialize(void) void up_irqinitialize(void)
{ {
@ -88,13 +91,13 @@ void up_irqinitialize(void)
#endif #endif
} }
/************************************************************ /************************************************************************
* Name: irqsave * Name: irqsave
* *
* Description: * Description:
* Disable all IRQs * Disable all IRQs
* *
************************************************************/ ************************************************************************/
irqstate_t irqsave(void) irqstate_t irqsave(void)
{ {
@ -103,26 +106,26 @@ irqstate_t irqsave(void)
return ret; return ret;
} }
/************************************************************ /************************************************************************
* Name: irqrestore * Name: irqrestore
* *
* Description: * Description:
* Restore a previous interrupt state * Restore a previous interrupt state
* *
************************************************************/ ************************************************************************/
void irqrestore(irqstate_t flags) void irqrestore(irqstate_t flags)
{ {
IE = flags; IE = flags;
} }
/************************************************************ /************************************************************************
* Name: up_disable_irq * Name: up_disable_irq
* *
* Description: * Description:
* Disable the IRQ specified by 'irq' * Disable the IRQ specified by 'irq'
* *
************************************************************/ ************************************************************************/
void up_disable_irq(int irq) void up_disable_irq(int irq)
{ {
@ -132,13 +135,13 @@ void up_disable_irq(int irq)
} }
} }
/************************************************************ /************************************************************************
* Name: up_enable_irq * Name: up_enable_irq
* *
* Description: * Description:
* Enable the IRQ specified by 'irq' * Enable the IRQ specified by 'irq'
* *
************************************************************/ ************************************************************************/
void up_enable_irq(int irq) void up_enable_irq(int irq)
{ {

View File

@ -1,5 +1,5 @@
/************************************************************ /************************************************************************
* up_putc.c * up_irqtest.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -31,21 +31,25 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <8052.h> #include <8052.h>
#include "up_internal.h" #include "up_internal.h"
/************************************************************ /************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
#define up_extint0 ((vector_t)PM2_VECTOR_EXTINT0) #define up_extint0 ((vector_t)PM2_VECTOR_EXTINT0)
#define up_timer0 ((vector_t)PM2_VECTOR_TIMER0) #define up_timer0 ((vector_t)PM2_VECTOR_TIMER0)
@ -54,31 +58,31 @@
#define up_uart ((vector_t)PM2_VECTOR_UART) #define up_uart ((vector_t)PM2_VECTOR_UART)
#define up_timer2 ((vector_t)PM2_VECTOR_TIMER2) #define up_timer2 ((vector_t)PM2_VECTOR_TIMER2)
/************************************************************ /************************************************************************
* Private Types * Private Types
************************************************************/ ************************************************************************/
typedef void (*vector_t)(void); typedef void (*vector_t)(void);
/************************************************************ /************************************************************************
* Public Variables * Public Variables
************************************************************/ ************************************************************************/
boolean g_irqtest; bool g_irqtest;
ubyte g_irqtos; uint8_t g_irqtos;
ubyte g_irqregs[REGS_SIZE]; uint8_t g_irqregs[REGS_SIZE];
int g_nirqs; int g_nirqs;
FAR struct xcptcontext *g_irqcontext; FAR struct xcptcontext *g_irqcontext;
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Name: utility functions * Name: utility functions
************************************************************/ ************************************************************************/
static void _up_putc(ubyte ch) __naked static void _up_putc(uint8_t ch) __naked
{ {
ch; /* To avoid unreferenced argument warning */ ch; /* To avoid unreferenced argument warning */
_asm _asm
@ -87,7 +91,7 @@ static void _up_putc(ubyte ch) __naked
_endasm; _endasm;
} }
void _up_puthex(ubyte hex) __naked void _up_puthex(uint8_t hex) __naked
{ {
hex; /* To avoid unreferenced argument warning */ hex; /* To avoid unreferenced argument warning */
_asm _asm
@ -119,7 +123,7 @@ void _up_puts(__code char *ptr)
} }
} }
void _up_delay(ubyte milliseconds) __naked void _up_delay(uint8_t milliseconds) __naked
{ {
_asm _asm
mov r0, dpl mov r0, dpl
@ -136,17 +140,17 @@ void _up_delay(ubyte milliseconds) __naked
_endasm; _endasm;
} }
/************************************************************ /************************************************************************
* Public Functions * Public Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Name: os_start * Name: os_start
* *
* Description: * Description:
* "Fake" OS entry point. * "Fake" OS entry point.
* *
************************************************************/ ************************************************************************/
void os_start(void) void os_start(void)
{ {
@ -158,7 +162,7 @@ void os_start(void)
/* Then verify all of the interrupt */ /* Then verify all of the interrupt */
g_irqtest = FALSE; g_irqtest = false;
up_extint0(); up_extint0();
up_timer0(); up_timer0();
@ -183,7 +187,7 @@ void os_start(void)
/* Start timer interrupts */ /* Start timer interrupts */
g_irqtest = TRUE; g_irqtest = true;
g_nirqs = 0; g_nirqs = 0;
IE = 0x82; /* Enable interrupts */ IE = 0x82; /* Enable interrupts */
@ -207,13 +211,13 @@ void os_start(void)
for(;;); for(;;);
} }
/************************************************************ /************************************************************************
* Name: irq_dispatch * Name: irq_dispatch
* *
* Description: * Description:
* "Fake" IRQ dispatcher * "Fake" IRQ dispatcher
* *
***********************************************************/ ***********************************************************************/
void irq_dispatch(int irq, FAR void *context) void irq_dispatch(int irq, FAR void *context)
{ {
@ -230,13 +234,13 @@ void irq_dispatch(int irq, FAR void *context)
} }
} }
/************************************************************ /************************************************************************
* Name: up_dumpstack / up_dumpframe * Name: up_dumpstack / up_dumpframe
* *
* Description: * Description:
* "Fake" debug routines if needed. * "Fake" debug routines if needed.
* *
************************************************************/ ************************************************************************/
void up_dumpstack(void) void up_dumpstack(void)
{ {
@ -246,24 +250,24 @@ void up_dumpframe(FAR struct xcptcontext *context)
{ {
} }
/************************************************************ /************************************************************************
* Name: up_ledinit, up_ledon, up_ledoff * Name: up_ledinit, up_ledon, up_ledoff
* *
* Description: * Description:
* "Fake" LED routines if needed * "Fake" LED routines if needed
* *
************************************************************/ ************************************************************************/
void up_ledinit(void) void up_ledinit(void)
{ {
} }
void up_ledon(ubyte led) void up_ledon(uint8_t led)
{ {
led; led;
} }
void up_ledoff(ubyte led) void up_ledoff(uint8_t led)
{ {
led; led;
} }

View File

@ -1,7 +1,7 @@
/************************************************************ /************************************************************************
* up_putc.c * up_putc.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -31,20 +31,19 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include "up_internal.h" #include "up_internal.h"
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
static void _up_putc(int ch) __naked static void _up_putc(int ch) __naked
{ {
@ -66,9 +65,9 @@ cout: jnb ti, cout
#endif #endif
} }
/************************************************************ /************************************************************************
* Public Functions * Public Functions
************************************************************/ ************************************************************************/
int up_putc(int ch) int up_putc(int ch)
{ {

View File

@ -1,7 +1,7 @@
/************************************************************ /************************************************************************
* up_releasepending.c * up_releasepending.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -31,37 +31,39 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <sched.h> #include <sched.h>
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include "os_internal.h" #include "os_internal.h"
#include "up_internal.h" #include "up_internal.h"
/************************************************************ /************************************************************************
* Private Definitions * Private Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Data * Private Data
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Funtions * Private Funtions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Funtions * Public Funtions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Name: up_release_pending * Name: up_release_pending
* *
* Description: * Description:
@ -70,7 +72,7 @@
* context switch if a new task is placed at the head of * context switch if a new task is placed at the head of
* the ready to run list. * the ready to run list.
* *
************************************************************/ ************************************************************************/
void up_release_pending(void) void up_release_pending(void)
{ {

View File

@ -38,10 +38,14 @@
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
#include <sched.h> #include <sched.h>
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include "os_internal.h" #include "os_internal.h"
#include "up_internal.h" #include "up_internal.h"
@ -81,7 +85,7 @@
* *
****************************************************************************/ ****************************************************************************/
void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority) void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
{ {
/* Verify that the caller is sane */ /* Verify that the caller is sane */
@ -95,12 +99,12 @@ void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority)
else else
{ {
FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head; FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
boolean switch_needed; bool switch_needed;
dbg("TCB=%p PRI=%d\n", tcb, priority); dbg("TCB=%p PRI=%d\n", tcb, priority);
/* Remove the tcb task from the ready-to-run list. /* Remove the tcb task from the ready-to-run list.
* sched_removereadytorun will return TRUE if we just * sched_removereadytorun will return true if we just
* remove the head of the ready to run list. * remove the head of the ready to run list.
*/ */
@ -108,10 +112,10 @@ void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority)
/* Setup up the new task priority */ /* Setup up the new task priority */
tcb->sched_priority = (ubyte)priority; tcb->sched_priority = (uint8_t)priority;
/* Return the task to the specified blocked task list. /* Return the task to the specified blocked task list.
* sched_addreadytorun will return TRUE if the task was * sched_addreadytorun will return true if the task was
* added to the new list. We will need to perform a context * added to the new list. We will need to perform a context
* switch only if the EXCLUSIVE or of the two calls is non-zero * switch only if the EXCLUSIVE or of the two calls is non-zero
* (i.e., one and only one the calls changes the head of the * (i.e., one and only one the calls changes the head of the

View File

@ -1,7 +1,7 @@
/************************************************************************** /**************************************************************************
* up_restorecontext.c * up_restorecontext.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -38,6 +38,7 @@
**************************************************************************/ **************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <stdint.h>
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include "up_internal.h" #include "up_internal.h"
@ -90,7 +91,7 @@
* *
**************************************************************************/ **************************************************************************/
void up_restoreregisters(FAR ubyte *regs) _naked void up_restoreregisters(FAR uint8_t *regs) _naked
{ {
_asm _asm
movx a, @dptr movx a, @dptr

View File

@ -1,7 +1,7 @@
/************************************************************************** /**************************************************************************
* up_savecontext.c * up_savecontext.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -38,7 +38,7 @@
**************************************************************************/ **************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h> #include <stdint.h>
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include "up_internal.h" #include "up_internal.h"
@ -84,13 +84,13 @@
* *
**************************************************************************/ **************************************************************************/
static void up_savestack(FAR struct xcptcontext *context, ubyte tos) static void up_savestack(FAR struct xcptcontext *context, uint8_t tos)
{ {
/* Copy the current stack frame from internal RAM to XRAM. */ /* Copy the current stack frame from internal RAM to XRAM. */
ubyte nbytes = tos - (STACK_BASE-1); uint8_t nbytes = tos - (STACK_BASE-1);
NEAR ubyte *src = (NEAR ubyte*)STACK_BASE; NEAR uint8_t *src = (NEAR uint8_t*)STACK_BASE;
FAR ubyte *dest = context->stack; FAR uint8_t *dest = context->stack;
context->nbytes = nbytes; context->nbytes = nbytes;
while (nbytes--) while (nbytes--)
@ -116,13 +116,13 @@ static void up_savestack(FAR struct xcptcontext *context, ubyte tos)
* *
**************************************************************************/ **************************************************************************/
static void up_saveregs(FAR struct xcptcontext *context, ubyte tos) static void up_saveregs(FAR struct xcptcontext *context, uint8_t tos)
{ {
/* Copy the irq register save area into the TCB */ /* Copy the irq register save area into the TCB */
FAR ubyte *src = g_irqregs; FAR uint8_t *src = g_irqregs;
FAR ubyte *dest = context->regs; FAR uint8_t *dest = context->regs;
ubyte nbytes = REGS_SIZE; uint8_t nbytes = REGS_SIZE;
while (nbytes--) while (nbytes--)
{ {
@ -154,7 +154,7 @@ static void up_saveregs(FAR struct xcptcontext *context, ubyte tos)
* *
**************************************************************************/ **************************************************************************/
void up_saveregisters(FAR ubyte *regs) _naked void up_saveregisters(FAR uint8_t *regs) _naked
{ {
_asm _asm
mov a, b mov a, b
@ -210,7 +210,7 @@ void up_saveregisters(FAR ubyte *regs) _naked
* *
**************************************************************************/ **************************************************************************/
ubyte up_savecontext(FAR struct xcptcontext *context) _naked uint8_t up_savecontext(FAR struct xcptcontext *context) _naked
{ {
_asm _asm
/* Create the stack frame that we want when it is time to restore /* Create the stack frame that we want when it is time to restore

View File

@ -1,7 +1,7 @@
/************************************************************ /************************************************************************
* up_timerisr.c * up_timerisr.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -31,46 +31,49 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <8052.h> #include <8052.h>
#include "clock_internal.h" #include "clock_internal.h"
#include "up_internal.h" #include "up_internal.h"
/************************************************************ /************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Types * Private Types
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Function Prototypes * Private Function Prototypes
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Global Functions * Global Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Function: up_timerisr * Function: up_timerisr
* *
* Description: * Description:
* The timer ISR will perform a variety of services for * The timer ISR will perform a variety of services for
* various portions of the systems. * various portions of the systems.
* *
************************************************************/ ************************************************************************/
int up_timerisr(int irq, FAR ubyte *frame) int up_timerisr(int irq, FAR uint8_t *frame)
{ {
/* Process timer interrupt */ /* Process timer interrupt */
@ -78,14 +81,14 @@ int up_timerisr(int irq, FAR ubyte *frame)
return 0; return 0;
} }
/************************************************************ /************************************************************************
* Function: up_timerinit * Function: up_timerinit
* *
* Description: * Description:
* This function is called during start-up to initialize * This function is called during start-up to initialize
* the timer interrupt. * the timer interrupt.
* *
************************************************************/ ************************************************************************/
void up_timerinit(void) void up_timerinit(void)
{ {

View File

@ -1,7 +1,7 @@
/************************************************************ /************************************************************************
* up_unblocktask.c * up_unblocktask.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@ -31,15 +31,14 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <sched.h> #include <sched.h>
#include <debug.h> #include <debug.h>
@ -49,23 +48,23 @@
#include "os_internal.h" #include "os_internal.h"
#include "up_internal.h" #include "up_internal.h"
/************************************************************ /************************************************************************
* Private Definitions * Private Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Data * Private Data
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Funtions * Private Funtions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Funtions * Public Funtions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Name: up_unblock_task * Name: up_unblock_task
* *
* Description: * Description:
@ -79,7 +78,7 @@
* the ready-to-run list and, if it is the highest priority * the ready-to-run list and, if it is the highest priority
* ready to run taks, executed. * ready to run taks, executed.
* *
************************************************************/ ************************************************************************/
void up_unblock_task(FAR _TCB *tcb) void up_unblock_task(FAR _TCB *tcb)
{ {