Menu

#49 timer.device does now open using dummy IO requests

general
closed-fixed
Libraries (47)
5
2004-01-21
2003-05-22
Anonymous
No

The following code, taken from RKRM but using
UNIT_VBLANK instead of UNIT_MICROHZ, fails to open
timer.device.

struct Library *TimerBase; /* global library pointer */

struct timerequest *TimerIO;
struct timeval *time1;

/* Allocate memory for timerequest and timeval
structures */
TimerIO=(struct timerequest *)AllocMem(sizeof(struct
timerequest),
MEMF_PUBLIC |
MEMF_CLEAR);
time1=(struct timeval *)AllocMem(sizeof(struct timeval),
MEMF_PUBLIC |
MEMF_CLEAR);
if (!TimerIO | !time1)
cleanexit(" Error: Can't allocate memory for I/O
structures\n",
RETURN_FAIL);

if (error=OpenDevice(TIMERNAME,UNIT_VBLANK,TimerIO,0))
cleanexit(" Error: Can't open
Timer.device\n",RETURN_FAIL);

/* Set up pointer for timer functions */
TimerBase = (struct Library
*)TimerIO->tr_node.io_Device;

/Martin Blom, martin@blom.org

Discussion

  • Nobody/Anonymous

    Logged In: NO

    "does not", obviously ...

     
  • Iain Templeton

    Iain Templeton - 2004-01-21

    Logged In: YES
    user_id=50427

    Yes... quite true. I've fixed this in rev 1.11 of timer_init.c

     
  • Adam Chodorowski

    • assigned_to: nobody --> iaint
    • status: open --> closed-fixed
     

Log in to post a comment.