source: rtems/c/src/lib/libbsp/h8300/h8sim/include/bsp.h @ ccceaf3

4.104.115
Last change on this file since ccceaf3 was ccceaf3, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 18, 2008 at 5:42:45 PM

2008-09-18 Joel Sherrill <joel.sherrill@…>

  • include/bsp.h: Remove unnecessary boilerplate comments.
  • Property mode set to 100644
File size: 1.2 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
20extern "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/*
31 *  Simple spin delay in microsecond units for device drivers.
32 *  This is very dependent on the clock speed of the target.
33 */
34
35#define rtems_bsp_delay( microseconds ) \
36  { register uint32_t         _delay=(microseconds); \
37    register uint32_t         _tmp = 0; /* initialized to avoid warning */ \
38    asm volatile( "0: \
39                     remo      3,31,%0 ; \
40                     cmpo      0,%0 ; \
41                     subo      1,%1,%1 ; \
42                     cmpobne.t 0,%1,0b " \
43                  : "=d" (_tmp), "=d" (_delay) \
44                  : "0"  (_tmp), "1"  (_delay) ); \
45  }
46
47#ifdef __cplusplus
48}
49#endif
50
51#endif
Note: See TracBrowser for help on using the repository browser.