VAPI API Reference Documentation
2.18.x

version.c shows how to use the VAPI_VERSION macro to maintain backward compatibility

/* compilation time usage */
...

#ifdef VAPI_RELEASE
#if VAPI_RELEASE >= (VAPI_VERSION(2, 6, 0))
        /* from vapi 2.6.0 VAPI_BootDevice has a new parameter (IN SHwCfg * pstSHwCfg)*/
        result = VAPI_BootDevice(device_id, firmware_buf, firmware_size, NULL, NULL);
#else
        result = VAPI_BootDevice(device_id, firmware_buf, firmware_size, NULL);
#endif
#endif
...

/* run time usage */
        printf("VAPI version: %s\n",VAPI_GetVersion());

        if (VAPI_RELEASE >= (VAPI_VERSION(2,4,0))
        {
                ...
        }





Mindspeed Technologies ®
Mindspeed Proprietary and Confidential