DRV_EnableEvent

INT32S DRV_EnableEvent (
   PTR_T DeviceHandle, 
   PT_EnableEvent *lpEnableEvent );

Purpose

On the device indicated by the DeviceHandle, it enables or disables a specified event by specifying the corresponding EventType.

This function supports all types of events for DMA and interrupt operation.

After the event is enabled, the DRV_CheckEvent can be called to check the type of signaled event.

Parameters

Some parameters, such as event type (EventType), enabled event flag (Enabled) and data count (Count), are stored in the PT_EnableEvent structure pointed by the lpEnableEvent.

Name Direction Range Description
DeviceHandle input default The pointer retrieved from the DRV_DeviceOpen which specifies the target device.
lpEnableEvent input / output default The pointer to indicate the user-prepared structure PT_EnableEvent that stores event type (INT32U EventType), enabled event flag (INT16U Enabled) and data count (INT16U Count).

Return

   1. 0 Successful.
   2. InvalidDeviceHandle The DeviceHandle is NULL.
   3. InvalidInputParam The Count is 0.
   4. InvalidEventType The configured event type is out of range.
   5. Other value Please reference ErrorCodes