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

4.115
Last change on this file since 1dd369f was 1dd369f, checked in by Ralf Corsepius <ralf.corsepius@…>, on 02/11/11 at 11:59:23

2011-02-11 Ralf Corsépius <ralf.corsepius@…>

  • include/bsp.h: Use "asm" instead of "asm" for improved c99-compliance.
  • 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
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/* support for simulated clock tick */
31Thread 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.