|
Hi to everybody, I need to put the SAM9263 in shutdown mode from an user application.
I have implemented the shutdown is implemented as a KernelIoControl. The source code used to invoked the function call in my subproject is as following: if (!KernelIoControl(IOCTL_HAL_SHUTDOWN, NULL, 0, NULL, 0, NULL)) wsprintf (szDbg, TEXT ("Failed to IOCTL_HAL_SHUTDOWN.\r\n")); else wsprintf (szDbg, TEXT ("Succeed in IOCTL_HAL_SHUTDOWN.\r\n"));
but the system call doesn’t work.
I have checked the file /public/common/oak/oalicotl/oalioctl.cpp and the system call for the shutdown IOCTL_HAL_SHUTDOWN seems not be specified:
switch (dwIoControlCode) { case IOCTL_HAL_GET_CACHE_INFO: case IOCTL_HAL_GET_DEVICE_INFO: case IOCTL_HAL_GET_DEVICEID: case IOCTL_HAL_GET_UUID: case IOCTL_PROCESSOR_INFORMATION: // request is to service the ioctl - forward the call to OAL code
// OAL code will set the last error if there is a failure
fRet = (*g_pfnExtOALIoctl)(dwIoControlCode, pInBuf, nInBufSize, pOutBuf, nOutBufSize, pBytesReturned);
break;
default:
SetLastError(ERROR_NOT_SUPPORTED);
break;
...and the KernelIOControl fails because IOCTL_HAL_SHUTDOWN is not supported.
somebody has already faced this problem? many thanks in advance bob
|