mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 13:40:34 +08:00
Posix: removed PX4_DEVIOC* definitions
The following should not have been defined: PX4_DIOC_GETPRIV PX4_DEVIOCSPUBBLOCK PX4_DEVIOCGPUBBLOCK PX4_DEVIOCGDEVICEID The actual defines are in drv_device.h and are: DEVIOCSPUBBLOCK DEVIOCGPUBBLOCK DEVIOCGDEVICEID DIOC_GETPRIV is defined by Nuttx, so mapped to SIOCDEVPRIVATE for POSIX Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -298,19 +298,20 @@ VDev::ioctl(px4_dev_handle_t *handlep, int cmd, unsigned long arg)
|
||||
switch (cmd) {
|
||||
|
||||
/* fetch a pointer to the driver's private data */
|
||||
case PX4_DIOC_GETPRIV:
|
||||
case DIOC_GETPRIV:
|
||||
*(void **)(uintptr_t)arg = (void *)this;
|
||||
ret = PX4_OK;
|
||||
break;
|
||||
case PX4_DEVIOCSPUBBLOCK:
|
||||
case DEVIOCSPUBBLOCK:
|
||||
_pub_blocked = (arg != 0);
|
||||
ret = PX4_OK;
|
||||
break;
|
||||
case PX4_DEVIOCGPUBBLOCK:
|
||||
case DEVIOCGPUBBLOCK:
|
||||
ret = _pub_blocked;
|
||||
break;
|
||||
case PX4_DEVIOCGDEVICEID:
|
||||
case DEVIOCGDEVICEID:
|
||||
ret = (int)_device_id.devid;
|
||||
printf("IOCTL DEVIOCGDEVICEID %d\n", ret);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user