PreviousNext
Get Peripheral Info
Help > Custom DPA Handler > Events > DPA Request > Get Peripheral Info

If the user code handles user peripherals or overrides embedded peripherals then this request is used to return information about the peripheral in the peripheral information format. If the handler does not handle the DPA “Get peripheral info request” then it must return FALSE to indicated error, otherwise, it must return TRUE.

 

Example

 

case DpaEvent_DpaRequest:

else if ( IsDpaPeripheralInfoRequest() )

{

 // 1st user peripheral

 if ( _PNUM == PNUM_USER )

 {

_DpaMessage.PeripheralInfoAnswer.PerT = PERIPHERAL_TYPE_LED;

_DpaMessage.PeripheralInfoAnswer.PerTE = PERIPHERAL_TYPE_EXTENDED_READ_WRITE;

_DpaMessage.PeripheralInfoAnswer.Par1 = LED_COLOR_UNKNOWN;

 }

 return TRUE;

}