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

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/**
2 *  @file
3 *
4 *  @ingroup h8300_bsp
5 *
6 *  @brief h8 simulator definitions in gdb
7 *
8 *  This include file contains some definitions specific to the
9 *  h8 simulator in gdb.
10 */
11
12/*
13 *  COPYRIGHT (c) 1989-2013.
14 *  On-Line Applications Research Corporation (OAR).
15 *
16 *  The license and distribution terms for this file may be
17 *  found in the file LICENSE in this distribution or at
18 *  http://www.rtems.org/license/LICENSE.
19 */
20
21#ifndef _BSP_H
22#define _BSP_H
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#include <bspopts.h>
29#include <bsp/default-initial-extension.h>
30
31#include <rtems.h>
32#include <rtems/iosupp.h>
33#include <rtems/console.h>
34#include <rtems/clockdrv.h>
35
36/**
37 *  @defgroup h8300_bsp Clock Tick Support
38 *
39 *  @ingroup h8300_h8sim
40 *
41 *  @brief Clock Tick Support Package
42 */
43Thread clock_driver_sim_idle_body(uintptr_t);
44#define BSP_IDLE_TASK_BODY clock_driver_sim_idle_body
45
46/*
47 *  Simple spin delay in microsecond units for device drivers.
48 *  This is very dependent on the clock speed of the target.
49 */
50#define rtems_bsp_delay( microseconds ) \
51  { register uint32_t         _delay=(microseconds); \
52    register uint32_t         _tmp = 0; /* initialized to avoid warning */ \
53    __asm__ volatile( "0: \
54                     remo      3,31,%0 ; \
55                     cmpo      0,%0 ; \
56                     subo      1,%1,%1 ; \
57                     cmpobne.t 0,%1,0b " \
58                  : "=d" (_tmp), "=d" (_delay) \
59                  : "0"  (_tmp), "1"  (_delay) ); \
60  }
61
62#ifdef __cplusplus
63}
64#endif
65
66#endif
Note: See TracBrowser for help on using the repository browser.