source: rtems/c/src/lib/libbsp/m68k/gen68340/include/bsp.h @ 1fec9e0

4.115
Last change on this file since 1fec9e0 was 1fec9e0, checked in by Gedare Bloom <gedare@…>, on 04/16/12 at 02:22:36

m68k: replace m68k_isr with rtems_isr

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*
2 * Board Support Package for `Generic' Motorola MC68340
3 *
4 * Based on the `gen68360' board support package, and covered by the
5 * original distribution terms.
6 *
7 *  $Id$
8 */
9
10/*  bsp.h
11 *
12 *  COPYRIGHT (c) 1989-1999.
13 *  On-Line Applications Research Corporation (OAR).
14 *
15 *  The license and distribution terms for this file may be
16 *  found in the file LICENSE in this distribution or at
17 *  http://www.rtems.com/license/LICENSE.
18 */
19
20#ifndef _BSP_H
21#define _BSP_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include <bspopts.h>
28
29#include <rtems.h>
30#include <rtems/console.h>
31#include <rtems/iosupp.h>
32#include <rtems/clockdrv.h>
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=123; \
42    __asm__ volatile( "0: \
43                     nbcd      %0 ; \
44                     nbcd      %0 ; \
45                     dbf       %1,0b" \
46                  : "=d" (_tmp), "=d" (_delay) \
47                  : "0"  (_tmp), "1"  (_delay) ); \
48  }
49
50/* Constants */
51
52/* Structures */
53
54extern rtems_isr_entry M68Kvec[];   /* vector table address */
55
56/* functions */
57
58rtems_isr_entry set_vector(
59  rtems_isr_entry     handler,
60  rtems_vector_number vector,
61  int                 type
62);
63
64#ifdef __cplusplus
65}
66#endif
67
68#endif
Note: See TracBrowser for help on using the repository browser.