EPICS Device Support Library - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

EPICS Device Support Library

Description:

EPICS Device Support Library. Motivating factors. Quick tour of the API. Some examples ... Examples (Unfortunately Only a Few in EPICS Base) ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 13
Provided by: hil745
Category:

less

Transcript and Presenter's Notes

Title: EPICS Device Support Library


1
EPICS Device Support Library
  • Motivating factors
  • Quick tour of the API
  • Some examples

2
Motivating Factors
  • Detect conflicting use of memory mapped IO and
    interrupt resources
  • Print address maps and interrupt vector maps
  • Abstract interface improves portability of device
    drivers

3
Type Codes for Address Spaces We Use
  • typedef enum
  • atVMEA16,
  • atVMEA24,
  • atVMEA32,
  • atISA, / memory mapped ISA access (until now
    only on PC) /
  • atLast / atLast must be the last enum in this
    list /
  • epicsAddressType

4
Register / Map Address Range of Memory Mapped IO
  • long devRegisterAddress(
  • const char pOwnerName,
  • epicsAddressType addrType,
  • void baseAddress,
  • unsigned long size, / bytes /
  • void pLocalAddress)

5
Unregister Address Range of Memory Mapped IO
  • long devUnregisterAddress(
  • epicsAddressType addrType,
  • void baseAddress,
  • const char pOwnerName)

6
Type Codes For Interrupt Vector Spaces
  • typedef enum intCPU, intVME, intVXI
    epicsInterruptType

7
Connect to an Interrupt
  • long devConnectInterrupt(
  • epicsInterruptType intType,
  • unsigned vectorNumber,
  • void (pFunction)(),
  • void parameter)

8
Disconnect from an Interrupt
  • /
  • The parameter pFunction should be set to the C
    function pointer that
  • was connected. It is used as a key to prevent
    a driver from inadvertently
  • removing an interrupt handler that it didn't
    install
  • /
  • long devDisconnectInterrupt(
  • epicsInterruptType intType,
  • unsigned vectorNumber,
  • void (pFunction)())

9
Enable and Disable Interrupt Levels
  • long devEnableInterruptLevel(
  • epicsInterruptType intType,
  • unsigned level)
  • long devDisableInterruptLevel(
  • epicsInterruptType intType, unsigned level)

10
Print Address Map
  • long devAddressMap(void)

11
Print Interrupt Vector Map
  • veclist()

12
Examples (Unfortunately Only a Few in EPICS Base)
  • ltepicsgt\base\src\drv\ansi\drvAb.c(895)
    status devRegisterAddress("drvAb",atVMEA24,(void
    )p6008,
  • ltepicsgt\base\src\drv\ansi\drvEpvxi.c(513) status
    devRegisterAddress(
  • ltepicsgt\base\src\drv\ansi\drvEpvxi.c(525) status
    devRegisterAddress(
  • ltepicsgt\base\src\drv\old\drvBitBus.c(317) if
    (devRegisterAddress("Xycom Bitbus", atVMEA16,
    (void)BaseAddr, sizeof(XycomBBRegsStruct), NULL)
    ! 0)
  • ltepicsgt\base\src\drv\old\drvBitBus.c(327) if
    (devRegisterAddress("PEP Bitbus", atVMEA16,
    (void)BaseAddr, sizeof(PepBBRegsStruct), NULL)
    ! 0)
Write a Comment
User Comments (0)
About PowerShow.com