4.104.115
Last change
on this file since cf03ba2 was
cf03ba2,
checked in by Joel Sherrill <joel.sherrill@…>, on 09/24/08 at 21:26:42
|
2008-09-24 Joel Sherrill <joel.sherrill@…>
- Makefile.am, console/console-io.c, include/bsp.h:
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[501d312] | 1 | /* bsp.h |
---|
| 2 | * |
---|
| 3 | * This include file contains some definitions specific to the |
---|
[8d942067] | 4 | * h8 simulator in gdb. |
---|
[501d312] | 5 | * |
---|
| 6 | * COPYRIGHT (c) 1989-1999. |
---|
| 7 | * On-Line Applications Research Corporation (OAR). |
---|
| 8 | * |
---|
| 9 | * The license and distribution terms for this file may be |
---|
| 10 | * found in the file LICENSE in this distribution or at |
---|
[366e548] | 11 | * http://www.rtems.com/license/LICENSE. |
---|
[501d312] | 12 | * |
---|
| 13 | * $Id$ |
---|
| 14 | */ |
---|
| 15 | |
---|
[34c4852] | 16 | #ifndef _BSP_H |
---|
| 17 | #define _BSP_H |
---|
[501d312] | 18 | |
---|
| 19 | #ifdef __cplusplus |
---|
| 20 | extern "C" { |
---|
| 21 | #endif |
---|
| 22 | |
---|
[9f70652b] | 23 | #include <bspopts.h> |
---|
| 24 | |
---|
[501d312] | 25 | #include <rtems.h> |
---|
[fb7a141] | 26 | #include <rtems/iosupp.h> |
---|
| 27 | #include <rtems/console.h> |
---|
| 28 | #include <rtems/clockdrv.h> |
---|
[501d312] | 29 | |
---|
[cf03ba2] | 30 | /* support for simulated clock tick */ |
---|
| 31 | Thread clock_driver_sim_idle_body(uintptr_t); |
---|
| 32 | #define BSP_IDLE_TASK_BODY clock_driver_sim_idle_body |
---|
| 33 | |
---|
[501d312] | 34 | /* |
---|
| 35 | * Simple spin delay in microsecond units for device drivers. |
---|
| 36 | * This is very dependent on the clock speed of the target. |
---|
| 37 | */ |
---|
| 38 | |
---|
[cf282090] | 39 | #define rtems_bsp_delay( microseconds ) \ |
---|
[195e6663] | 40 | { register uint32_t _delay=(microseconds); \ |
---|
| 41 | register uint32_t _tmp = 0; /* initialized to avoid warning */ \ |
---|
[501d312] | 42 | asm volatile( "0: \ |
---|
| 43 | remo 3,31,%0 ; \ |
---|
| 44 | cmpo 0,%0 ; \ |
---|
| 45 | subo 1,%1,%1 ; \ |
---|
| 46 | cmpobne.t 0,%1,0b " \ |
---|
| 47 | : "=d" (_tmp), "=d" (_delay) \ |
---|
| 48 | : "0" (_tmp), "1" (_delay) ); \ |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | #ifdef __cplusplus |
---|
| 52 | } |
---|
| 53 | #endif |
---|
| 54 | |
---|
| 55 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.