Small documentation related fix in the PPC and STM8 ports.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1741 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
gdisirio 2010-03-14 12:15:37 +00:00
parent c7837bab2e
commit e97e0ca715
2 changed files with 28 additions and 16 deletions

View File

@ -93,6 +93,7 @@ struct eabi_frame {
regppc_t shole; /**< Stack hole for LR storage. */ regppc_t shole; /**< Stack hole for LR storage. */
}; };
#if !defined(__DOXYGEN__)
/** /**
* @brief Interrupt saved context. * @brief Interrupt saved context.
* @details This structure represents the stack frame saved during a * @details This structure represents the stack frame saved during a
@ -124,7 +125,9 @@ struct extctx {
regppc_t r12; regppc_t r12;
regppc_t padding; regppc_t padding;
}; };
#endif
#if !defined(__DOXYGEN__)
/** /**
* @brief System saved context. * @brief System saved context.
* @details This structure represents the inner stack frame during a context * @details This structure represents the inner stack frame during a context
@ -156,7 +159,9 @@ struct intctx {
regppc_t r31; regppc_t r31;
regppc_t padding; regppc_t padding;
}; };
#endif
#if !defined(__DOXYGEN__)
/** /**
* @brief Platform dependent part of the @p Thread structure. * @brief Platform dependent part of the @p Thread structure.
* @details This structure usually contains just the saved stack pointer * @details This structure usually contains just the saved stack pointer
@ -165,6 +170,7 @@ struct intctx {
struct context { struct context {
struct intctx *sp; struct intctx *sp;
}; };
#endif
/** /**
* @brief Platform dependent part of the @p chThdInit() API. * @brief Platform dependent part of the @p chThdInit() API.

View File

@ -53,6 +53,7 @@ typedef uint8_t stkalign_t;
*/ */
typedef void (*stm8func_t)(void); typedef void (*stm8func_t)(void);
#if !defined(__DOXYGEN__)
/** /**
* @brief Interrupt saved context. * @brief Interrupt saved context.
* @details This structure represents the stack frame saved during a * @details This structure represents the stack frame saved during a
@ -72,7 +73,9 @@ struct extctx {
uint8_t pch; uint8_t pch;
uint8_t pcl; uint8_t pcl;
}; };
#endif
#if !defined(__DOXYGEN__)
/** /**
* @brief System saved context. * @brief System saved context.
* @details This structure represents the inner stack frame during a context * @details This structure represents the inner stack frame during a context
@ -84,20 +87,9 @@ struct intctx {
uint8_t _next; uint8_t _next;
stm8func_t pc; /* Function pointer sized return address. */ stm8func_t pc; /* Function pointer sized return address. */
}; };
#endif
/** #if !defined(__DOXYGEN__)
* @brief Start context.
* @details This context is the stack organization for the trampoline code
* @p _port_thread_start().
*/
struct startctx {
uint8_t _next;
stm8func_t ts; /* Trampoline address. */
void *arg; /* Thread argument. */
stm8func_t pc; /* Thread function address. */
stm8func_t ret; /* chThdExit() address. */
};
/** /**
* @brief Platform dependent part of the @p Thread structure. * @brief Platform dependent part of the @p Thread structure.
* @details This structure usually contains just the saved stack pointer * @details This structure usually contains just the saved stack pointer
@ -106,6 +98,20 @@ struct startctx {
struct context { struct context {
struct intctx *sp; struct intctx *sp;
}; };
#endif
/**
* @brief Start context.
* @details This context is the stack organization for the trampoline code
* @p _port_thread_start().
*/
struct stm8_startctx {
uint8_t _next;
stm8func_t ts; /* Trampoline address. */
void *arg; /* Thread argument. */
stm8func_t pc; /* Thread function address. */
stm8func_t ret; /* chThdExit() address. */
};
/** /**
* @brief Platform dependent part of the @p chThdInit() API. * @brief Platform dependent part of the @p chThdInit() API.
@ -113,9 +119,9 @@ struct context {
* by an @p intctx structure. * by an @p intctx structure.
*/ */
#define SETUP_CONTEXT(workspace, wsize, pf, arg) { \ #define SETUP_CONTEXT(workspace, wsize, pf, arg) { \
struct startctx *scp; \ struct stm8_startctx *scp; \
scp = (struct startctx *)((uint8_t *)workspace + wsize - \ scp = (struct stm8_startctx *)((uint8_t *)workspace + wsize - \
sizeof(struct startctx)); \ sizeof(struct stm8_startctx)); \
scp->ts = _port_thread_start; \ scp->ts = _port_thread_start; \
scp->arg = arg; \ scp->arg = arg; \
scp->pc = (stm8func_t)pf; \ scp->pc = (stm8func_t)pf; \