source: rtems/c/src/lib/libbsp/avr/avrtest/include/bsp.h @ b7765d62

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

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#define BSP_SMALL_MEMORY 1
31
32/* support for simulated clock tick */
33Thread clock_driver_sim_idle_body(uintptr_t);
34#define BSP_IDLE_TASK_BODY clock_driver_sim_idle_body
35
36/*
37 *  Simple spin delay in microsecond units for device drivers.
38 *  This is very dependent on the clock speed of the target.
39 */
40
41#define rtems_bsp_delay( microseconds ) \
42  { register uint32_t         _delay=(microseconds); \
43    register uint32_t         _tmp = 0; /* initialized to avoid warning */ \
44    __asm__ volatile( "0: \
45                     remo      3,31,%0 ; \
46                     cmpo      0,%0 ; \
47                     subo      1,%1,%1 ; \
48                     cmpobne.t 0,%1,0b " \
49                  : "=d" (_tmp), "=d" (_delay) \
50                  : "0"  (_tmp), "1"  (_delay) ); \
51  }
52
53#ifdef __cplusplus
54}
55#endif
56
57#endif
Note: See TracBrowser for help on using the repository browser.