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
|
Line | |
---|
1 | /* bsp.h |
---|
2 | * |
---|
3 | * This include file contains some definitions specific to the |
---|
4 | * h8 simulator in gdb. |
---|
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 |
---|
11 | * http://www.rtems.com/license/LICENSE. |
---|
12 | * |
---|
13 | * $Id$ |
---|
14 | */ |
---|
15 | |
---|
16 | #ifndef _BSP_H |
---|
17 | #define _BSP_H |
---|
18 | |
---|
19 | #ifdef __cplusplus |
---|
20 | extern "C" { |
---|
21 | #endif |
---|
22 | |
---|
23 | #include <bspopts.h> |
---|
24 | |
---|
25 | #include <rtems.h> |
---|
26 | #include <rtems/iosupp.h> |
---|
27 | #include <rtems/console.h> |
---|
28 | #include <rtems/clockdrv.h> |
---|
29 | |
---|
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 | |
---|
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 | |
---|
39 | #define rtems_bsp_delay( microseconds ) \ |
---|
40 | { register uint32_t _delay=(microseconds); \ |
---|
41 | register uint32_t _tmp = 0; /* initialized to avoid warning */ \ |
---|
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.