Motorola MCP750 Specifications Page 320

  • Download
  • Add to my manuals
  • Print
  • Page
    / 344
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 319
D
evice Driver Programming
A
-2
#include <sys/bridge.h>
#include <sys/pci_info.h>
extern int shmctl();
extern int shmdt();
extern int errno;
#defineMAX_PCI_BUS 64/* typical max pci buses (very large system) */
#define MAX_PCI_DEV32/* max pci devs per bus */
#define NATL_INSTR0x1093/* vendor id for National instruments */
#define DIO96 0x0160/* device id for National instruments dio96 */
/* DIO96 register definition is not swapped for accesses, */
/* because of the PowerPC address invariant translation */
/* keeps byte oriented strings addressed in the same order */
typedef volatile struct dio96_device_reg {/* base addr 1 defs */
struct i82C55 {
u_charport_A;/* port A read/write */
u_char port_B;/* port B read/write */
u_charport_C;/* port C read/write */
u_char config_reg;/* configuration register */
} ppi_A, ppi_B, ppi_C, ppi_D;
struct i8253 {
u_char counter_0;/* counter 0 */
u_char counter_1;/* counter 1 */
u_charresrvd;/* reserved */
u_charconfig_reg;/* configuration register */
} tc_A;
u_char int_control_1;/* interrupt control reg 1 */
u_char int_control_2;/* interrupt control reg 2 */
u_char int_clear_reg;/* interrupt clear register */
u_char resrvd;
} DIO96_t;
/***********************************************************************
* Search the bus for the vendor/device/function ID and return the
* "PCI_TAG" of this device (see pci_info.h)
*
* tag to start bus search from. Can be the
* vid PCI vendor id to match.
* didPCI device id to match.
* func function # to match . (most devices only function 0)
*
* returns tag for device, if successful, otherwise returns -1.
*
***********************************************************************/
u_long
pci_get_devtag(pci_tag_t tag, u_short vid, u_short did, u_char func )
{
Page view 319
1 2 ... 315 316 317 318 319 320 321 322 323 324 325 ... 343 344

Comments to this Manuals

No comments