![Neousys Technology Nuvo 2500 Series Скачать руководство пользователя страница 116](http://html1.mh-extra.com/html/neousys-technology/nuvo-2500-series/nuvo-2500-series_user-manual_1667801116.webp)
Nuvo-2500 Series User’s Manual
Copyright © 2015 Neousys Technology Inc. All Right Reserved.
Page 116 of 154
5.4.1.2 CAN_RegisterStatus
Syntax
BOOL CAN_RegisterStatus(DWORD idx, void (__stdcall
*pfnHandler)(DWORD status));
Description
Registers a callback function, which is called when the CAN controller has received
a status interrupt.
Parameter
idx [in]
Specifies the index of CAN bus controllers. Currently there are only one CAN
bus controller.
pfnHandler [in]
Specifies the callback function. The prototype for this function is descripted as
follow.
void __stdcall CAN0_Status(DWORD status);
Return Value
Returns TRUE if registration successes, FALSE if registration failed.
Usage
void __stdcall CAN0_Status(DWORD status)
{
printf("%08x\r\n", status);
}
void main(int argc, char *argv[])
{
if ( ! CAN_RegisterStatus(0, CAN0_Status) )
{
printf("CAN_RegisterStatus is FAILED !\r\n");
}
}