source: rtems/c/src/lib/libbsp/m32r/m32rsim/include/bsp.h @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.8 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
14#ifndef _BSP_H
15#define _BSP_H
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#include <bspopts.h>
22
23#include <rtems.h>
24#include <rtems/iosupp.h>
25#include <rtems/console.h>
26#include <rtems/clockdrv.h>
27
28/* support for simulated clock tick */
29Thread clock_driver_sim_idle_body(uintptr_t);
30#define BSP_IDLE_TASK_BODY clock_driver_sim_idle_body
31
32/* Trap support interface from Newlib 1.16.0 */
33#define SYS_exit        1
34#define SYS_open        2
35#define SYS_close       3
36#define SYS_read        4
37#define SYS_write       5
38#define SYS_lseek       6
39#define SYS_unlink      7
40#define SYS_getpid      8
41#define SYS_kill        9
42#define SYS_fstat       10
43
44int __trap0 (int function, int p1, int p2, int p3, struct _reent *r);
45
46#define TRAP0(f, p1, p2, p3) \
47  __trap0 (f, (int) (p1), (int) (p2), (int) (p3), _REENT)
48
49/*
50 *  Simple spin delay in microsecond units for device drivers.
51 *  This is very dependent on the clock speed of the target.
52 */
53
54#define rtems_bsp_delay( microseconds ) \
55  { register uint32_t         _delay=(microseconds); \
56    register uint32_t         _tmp = 0; /* initialized to avoid warning */ \
57    __asm__ volatile( "0: \
58                     remo      3,31,%0 ; \
59                     cmpo      0,%0 ; \
60                     subo      1,%1,%1 ; \
61                     cmpobne.t 0,%1,0b " \
62                  : "=d" (_tmp), "=d" (_delay) \
63                  : "0"  (_tmp), "1"  (_delay) ); \
64  }
65
66#ifdef __cplusplus
67}
68#endif
69
70#endif
Note: See TracBrowser for help on using the repository browser.