ARPDAS_QNX6 1.0
subbusd_int.h
Go to the documentation of this file.
00001 #ifndef SUBBUSD_INT_H_INCLUDED
00002 #define SUBBUSD_INT_H_INCLUDED
00003 #include <sys/dispatch.h>
00004 #include "subbusd.h"
00005 
00006 /** \file
00007   * \brief Defines interface between QNX6 resource manager and subbus hardware
00008   *
00009   * A different hardware architecture can be supported by reimplementing these
00010   * functions.
00011   */
00012 
00013 typedef struct carddef {
00014   struct carddef *next;
00015   char cardID[ CardID_MAX ];
00016   unsigned short address;
00017   unsigned int reg_id;
00018   unsigned int bitno;
00019   struct sigevent event;
00020   int owner;
00021 } card_def;
00022 
00023 typedef struct {
00024   unsigned short address;
00025   unsigned short bits;
00026   card_def *def[8];
00027 } region;
00028 #define MAX_REGIONS 4
00029 
00030 
00031 extern card_def *carddefs;
00032 extern region regions[MAX_REGIONS];
00033 extern void incoming_sbreq( int rcvid, subbusd_req_t *req );
00034 extern void init_subbus(dispatch_t *dpp );
00035 extern void shutdown_subbus(void);
00036 extern int expint_attach( int rcvid, char *cardID, unsigned short address,
00037                       int region, struct sigevent *event, card_def **card );
00038 extern int expint_detach( int rcvid, char *cardID, unsigned short *addr,
00039                       unsigned int *bn );
00040 
00041 extern char *cache_hw_range, *cache_sw_range;
00042 extern void sb_cache_init(void);
00043 extern int sb_cache_write( unsigned short addr, unsigned short data );
00044 extern int sb_cache_read( unsigned short addr, unsigned short *data );
00045 
00046 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines