#include <nitroWiFi/wcm.h>
s32 WCM_Init( void* buf , s32 len );
The synchronous function that initializes the WCM library. Call this API once before calling other APIs in the WCM library. If initialization is successful, the internal state of the WCM library becomes WCM_PHASE_WAIT
. Option settings etc. are all initialized to their default settings. Also, to implement the keep-alive functionality, if the OS library's Tick and Alarm features have not been enabled, the OS_InitTick and OS_InitAlarm functions will be called automatically to enable these features.
buf |
Specifies a pointer to the work buffer used internally by the WCM library. This work buffer must be 32-byte aligned. After initialization completes without problems, do not use the passed buffer for any other purpose until the WCM library is ended using WCM_Finish function. |
len |
The size of the work buffer specified with buf . Must specify the size larger than WCM_WORK_SIZE . |
Returns one of the following process results.
WCM_RESULT_SUCCESS |
Indicates that the initialization process completed without problems. |
WCM_RESULT_FAILURE |
Indicates that initialization failed because the WCM library was already initialized, the passed parameters were invalid, etc. |
WCM_RESULT_NOT_ENOUGH_MEM |
Indicates that the passed work buffer is smaller than WCM_WORK_SIZE and there is not enough memory to run the WCM library. |
09/02/2005 Added text about usage of OS alarm feature.
07/22/2005 Initial version.