source: rtems/c/src/lib/libbsp/m32c/m32cbsp/include/bsp.h @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on Mar 20, 2014 at 9:10:47 PM

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