163 #if defined( MBG_TGT_LINUX ) 164 #include <linux/ioctl.h> 167 #if defined( MBG_TGT_BSD ) 168 #include <sys/ioccom.h> 171 #if defined( MBG_TGT_WIN32 ) 173 #if !defined( MBG_TGT_KERNEL ) 174 #include <winioctl.h> 190 #if defined( MBG_ARCH_X86 ) && defined( DEBUG ) && DEBUG 191 #define USE_DEBUG_PORT 1 193 #define USE_DEBUG_PORT 0 197 #if defined( MBG_TGT_POSIX ) && !defined( MBG_TGT_QNX_NTO ) 198 #define MBG_HAS_POSIX_IOCTL 1 208 #if defined( MBG_TGT_WIN32 ) && defined( MBG_TGT_KERNEL ) 210 #if _USE_WIN32_PRIVATE_STATUS_CODES 221 #define _mbg_krn_errno_to_os( _n ) \ 222 ( ( (_n) == MBG_SUCCESS ) ? STATUS_SUCCESS : \ 223 ( (NTSTATUS) ( STATUS_SEVERITY_ERROR | STATUS_CUSTOM_FLAG | ( (-(_n)) & 0xFFFF ) ) ) ) 244 #define _mbg_krn_errno_to_os( _n ) \ 245 mbg_errno_to_os( _n ) 247 #endif // _USE_WIN32_PRIVATE_STATUS_CODES 249 #endif // defined( MBG_TGT_WIN32 ) && defined( MBG_TGT_KERNEL ) 253 #if defined( MBG_TGT_KERNEL ) 255 #define IOCTL_RC_SUCCESS MBG_SYS_RC_SUCCESS 257 #if defined( MBG_TGT_LINUX ) 260 #define IOCTL_RC_ERR_PERM -EPERM // MBG_ERR_PERM 262 #define IOCTL_RC_ERR_UNSUPP_IOCTL -ENODEV // MBG_ERR_INV_DEV_REQUEST ## 264 #define IOCTL_RC_ERR_INVAL_PARAM -EINVAL // MBG_ERR_INV_PARM 266 #define IOCTL_RC_ERR_NOT_SUPP_BY_DEV -ENOTTY // MBG_ERR_NOT_SUPP_BY_DEV 268 #define IOCTL_RC_ERR_NO_MEM -ENOMEM // MBG_ERR_NO_MEM 270 #define IOCTL_RC_ERR_BUSY_IRQ_UNSAFE -EBUSY // MBG_ERR_BUSY, MBG_ERR_IRQ_UNSAFE 272 #define IOCTL_RC_ERR_DEV_ACCESS -EIO // rc from low level routine 275 #define IOCTL_RC_ERR_COPY_TO_USER -EFAULT // MBG_ERR_COPY_TO_USER 276 #define IOCTL_RC_ERR_COPY_FROM_USER -EFAULT // MBG_ERR_COPY_FROM_USER 278 #elif defined( MBG_TGT_BSD ) // FIXME specific 281 #define IOCTL_RC_ERR_PERM EPERM // MBG_ERR_PERM 283 #if defined( ENOIOCTL ) // E.g. FreeBSD, ... 284 #define IOCTL_RC_ERR_UNSUPP_IOCTL ENOIOCTL // TODO or ENODEV? MBG_ERR_INV_DEV_REQUEST 286 #define IOCTL_RC_ERR_UNSUPP_IOCTL ENODEV // MBG_ERR_INV_DEV_REQUEST 289 #define IOCTL_RC_ERR_INVAL_PARAM EINVAL // MBG_ERR_INV_PARM 291 #define IOCTL_RC_ERR_NOT_SUPP_BY_DEV ENOTTY // MBG_ERR_NOT_SUPP_BY_DEV 293 #define IOCTL_RC_ERR_NO_MEM ENOMEM // MBG_ERR_NO_MEM 295 #define IOCTL_RC_ERR_BUSY_IRQ_UNSAFE EBUSY // MBG_ERR_BUSY, MBG_ERR_IRQ_UNSAFE 297 #define IOCTL_RC_ERR_DEV_ACCESS EIO // TODO or EFAULT? rc from low level routine 299 #elif defined( MBG_TGT_WIN32 ) 301 #define IOCTL_RC_ERR_PERM _mbg_krn_errno_to_os( MBG_ERR_PERM ) 303 #define IOCTL_RC_ERR_UNSUPP_IOCTL _mbg_krn_errno_to_os( MBG_ERR_INV_DEV_REQUEST ) 305 #define IOCTL_RC_ERR_INVAL_PARAM _mbg_krn_errno_to_os( MBG_ERR_INV_PARM ) 307 #define IOCTL_RC_ERR_NOT_SUPP_BY_DEV _mbg_krn_errno_to_os( MBG_ERR_NOT_SUPP_BY_DEV ) 309 #define IOCTL_RC_ERR_NO_MEM _mbg_krn_errno_to_os( MBG_ERR_NO_MEM ) 311 #define IOCTL_RC_ERR_BUSY_IRQ_UNSAFE _mbg_krn_errno_to_os( MBG_ERR_IRQ_UNSAFE ) 313 #define IOCTL_RC_ERR_DEV_ACCESS _mbg_krn_errno_to_os( rc ) 317 #endif // defined( MBG_TGT_KERNEL ) 321 #if defined( MBG_TGT_LINUX ) 327 #define _MBG_IOR _IOR 328 #define _MBG_IOW _IOW 330 #define _cmd_from_ioctl_code( _ioc ) \ 333 #elif defined( MBG_TGT_BSD ) 340 #define _MBG_IOR _IOR 341 #define _MBG_IOW _IOW 343 #elif defined( MBG_TGT_WIN32 ) 345 #if !defined( _MBG_SUPP_VAR_ACC_SIZE ) 348 #define _MBG_SUPP_VAR_ACC_SIZE 1 352 #define PCPS_TYPE 40000 355 #define _MBG_IOCTL_BIAS 0x930 357 #define _MBG_IO( _t, _n ) \ 358 CTL_CODE( PCPS_TYPE, _MBG_IOCTL_BIAS + _n, METHOD_BUFFERED, FILE_READ_ACCESS ) 360 #define _MBG_IOR( _t, _n, _sz ) \ 363 #define _MBG_IOW _MBG_IOR 365 #define _cmd_from_ioctl_code( _ioc ) \ 366 ( ( ( (_ioc) >> 2 ) & 0x0FFF ) - _MBG_IOCTL_BIAS ) 371 #if !defined( _MBG_SUPP_VAR_ACC_SIZE ) 374 #define _MBG_SUPP_VAR_ACC_SIZE 0 381 #if defined( MBG_TGT_LINUX ) 382 #if defined( MBG_ARCH_ARM ) || defined( MBG_ARCH_SPARC ) 383 #define USE_IOCTL_GENERIC_REQ 0 387 #if defined( MBG_TGT_WIN32 ) 389 #define USE_IOCTL_GENERIC_REQ 0 392 #if !defined( USE_IOCTL_GENERIC_REQ ) 393 #define USE_IOCTL_GENERIC_REQ 1 397 #if USE_IOCTL_GENERIC_REQ 428 #define _MBG_IOG( _t, _n, _s ) _MBG_IOW( _t, _n, _s ) 443 uint32_t data_size_in;
444 uint32_t data_size_out;
459 IOCTL_GENERIC_CTL ctl;
462 } IOCTL_GENERIC_BUFFER;
464 #define _MBG_IOG( _t, _n, _s ) _MBG_IO( _t, _n ) 488 #if USE_IOCTL_GENERIC_REQ 491 IOCTL_GENERIC_CTL ctl;
510 #define IOCTL_GET_PCPS_DRVR_INFO _MBG_IOR( IOTYPE, 0x00, PCPS_DRVR_INFO ) 511 #define IOCTL_GET_PCPS_DEV _MBG_IOR( IOTYPE, 0x01, PCPS_DEV ) 512 #define IOCTL_GET_PCPS_STATUS_PORT _MBG_IOR( IOTYPE, 0x02, PCPS_STATUS_PORT ) 516 #define IOCTL_PCPS_GENERIC_READ _MBG_IOG( IOTYPE, 0x03, IOCTL_GENERIC_REQ ) 517 #define IOCTL_PCPS_GENERIC_WRITE _MBG_IOG( IOTYPE, 0x04, IOCTL_GENERIC_REQ ) 518 #define IOCTL_PCPS_GENERIC_READ_GPS _MBG_IOG( IOTYPE, 0x05, IOCTL_GENERIC_REQ ) 519 #define IOCTL_PCPS_GENERIC_WRITE_GPS _MBG_IOG( IOTYPE, 0x06, IOCTL_GENERIC_REQ ) 522 #define IOCTL_GET_PCPS_TIME _MBG_IOR( IOTYPE, 0x10, PCPS_TIME ) 523 #define IOCTL_SET_PCPS_TIME _MBG_IOW( IOTYPE, 0x11, PCPS_STIME ) 525 #define IOCTL_GET_PCPS_SYNC_TIME _MBG_IOR( IOTYPE, 0x12, PCPS_TIME ) 527 #define IOCTL_GET_PCPS_TIME_SEC_CHANGE _MBG_IOR( IOTYPE, 0x13, PCPS_TIME ) 529 #define IOCTL_GET_PCPS_HR_TIME _MBG_IOR( IOTYPE, 0x14, PCPS_HR_TIME ) 532 #define IOCTL_SET_PCPS_EVENT_TIME _MBG_IOW( IOTYPE, 0x15, PCPS_TIME_STAMP ) 534 #define IOCTL_GET_PCPS_SERIAL _MBG_IOR( IOTYPE, 0x16, PCPS_SERIAL ) 535 #define IOCTL_SET_PCPS_SERIAL _MBG_IOW( IOTYPE, 0x17, PCPS_SERIAL ) 537 #define IOCTL_GET_PCPS_TZCODE _MBG_IOR( IOTYPE, 0x18, PCPS_TZCODE ) 538 #define IOCTL_SET_PCPS_TZCODE _MBG_IOW( IOTYPE, 0x19, PCPS_TZCODE ) 540 #define IOCTL_GET_PCPS_TZDL _MBG_IOR( IOTYPE, 0x1A, PCPS_TZDL ) 541 #define IOCTL_SET_PCPS_TZDL _MBG_IOW( IOTYPE, 0x1B, PCPS_TZDL ) 543 #define IOCTL_GET_REF_OFFS _MBG_IOR( IOTYPE, 0x1C, MBG_REF_OFFS ) 544 #define IOCTL_SET_REF_OFFS _MBG_IOW( IOTYPE, 0x1D, MBG_REF_OFFS ) 546 #define IOCTL_GET_MBG_OPT_INFO _MBG_IOR( IOTYPE, 0x1E, MBG_OPT_INFO ) 547 #define IOCTL_SET_MBG_OPT_SETTINGS _MBG_IOW( IOTYPE, 0x1F, MBG_OPT_SETTINGS ) 549 #define IOCTL_GET_PCPS_IRIG_RX_INFO _MBG_IOR( IOTYPE, 0x20, IRIG_INFO ) 550 #define IOCTL_SET_PCPS_IRIG_RX_SETTINGS _MBG_IOW( IOTYPE, 0x21, IRIG_SETTINGS ) 552 #define IOCTL_PCPS_CLR_UCAP_BUFF _MBG_IO( IOTYPE, 0x22 ) 553 #define IOCTL_GET_PCPS_UCAP_ENTRIES _MBG_IOR( IOTYPE, 0x23, PCPS_UCAP_ENTRIES ) 554 #define IOCTL_GET_PCPS_UCAP_EVENT _MBG_IOR( IOTYPE, 0x24, PCPS_HR_TIME ) 557 #define IOCTL_GET_GPS_TZDL _MBG_IOR( IOTYPE, 0x25, TZDL ) 558 #define IOCTL_SET_GPS_TZDL _MBG_IOW( IOTYPE, 0x26, TZDL ) 560 #define IOCTL_GET_GPS_SW_REV _MBG_IOR( IOTYPE, 0x27, SW_REV ) 562 #define IOCTL_GET_GPS_BVAR_STAT _MBG_IOR( IOTYPE, 0x28, BVAR_STAT ) 564 #define IOCTL_GET_GPS_TIME _MBG_IOR( IOTYPE, 0x29, TTM ) 565 #define IOCTL_SET_GPS_TIME _MBG_IOW( IOTYPE, 0x2A, TTM ) 567 #define IOCTL_GET_GPS_PORT_PARM _MBG_IOR( IOTYPE, 0x2B, PORT_PARM ) 568 #define IOCTL_SET_GPS_PORT_PARM _MBG_IOW( IOTYPE, 0x2C, PORT_PARM ) 570 #define IOCTL_GET_GPS_ANT_INFO _MBG_IOR( IOTYPE, 0x2D, ANT_INFO ) 572 #define IOCTL_GET_GPS_UCAP _MBG_IOR( IOTYPE, 0x2E, TTM ) 574 #define IOCTL_GET_GPS_ENABLE_FLAGS _MBG_IOR( IOTYPE, 0x2F, ENABLE_FLAGS ) 575 #define IOCTL_SET_GPS_ENABLE_FLAGS _MBG_IOW( IOTYPE, 0x30, ENABLE_FLAGS ) 577 #define IOCTL_GET_GPS_STAT_INFO _MBG_IOR( IOTYPE, 0x31, STAT_INFO ) 579 #define IOCTL_SET_GPS_CMD _MBG_IOW( IOTYPE, 0x32, GPS_CMD ) 581 #define IOCTL_GET_GPS_IDENT _MBG_IOR( IOTYPE, 0x33, IDENT ) 583 #define IOCTL_GET_GPS_POS _MBG_IOR( IOTYPE, 0x34, POS ) 584 #define IOCTL_SET_GPS_POS_XYZ _MBG_IOW( IOTYPE, 0x35, XYZ ) 585 #define IOCTL_SET_GPS_POS_LLA _MBG_IOW( IOTYPE, 0x36, LLA ) 587 #define IOCTL_GET_GPS_ANT_CABLE_LEN _MBG_IOR( IOTYPE, 0x37, ANT_CABLE_LEN ) 588 #define IOCTL_SET_GPS_ANT_CABLE_LEN _MBG_IOW( IOTYPE, 0x38, ANT_CABLE_LEN ) 590 #define IOCTL_GET_GPS_RECEIVER_INFO _MBG_IOR( IOTYPE, 0x39, RECEIVER_INFO ) 591 #define IOCTL_GET_GPS_ALL_STR_TYPE_INFO _MBG_IOG( IOTYPE, 0x3A, IOCTL_GENERIC_REQ ) // variable size 592 #define IOCTL_GET_GPS_ALL_PORT_INFO _MBG_IOG( IOTYPE, 0x3B, IOCTL_GENERIC_REQ ) // variable size 594 #define IOCTL_SET_GPS_PORT_SETTINGS_IDX _MBG_IOW( IOTYPE, 0x3C, PORT_SETTINGS_IDX ) 596 #define IOCTL_GET_PCI_ASIC_VERSION _MBG_IOR( IOTYPE, 0x3D, PCI_ASIC_VERSION ) 598 #define IOCTL_GET_PCPS_TIME_CYCLES _MBG_IOR( IOTYPE, 0x3E, PCPS_TIME_CYCLES ) 599 #define IOCTL_GET_PCPS_HR_TIME_CYCLES _MBG_IOR( IOTYPE, 0x3F, PCPS_HR_TIME_CYCLES ) 601 #define IOCTL_GET_PCPS_IRIG_TX_INFO _MBG_IOR( IOTYPE, 0x40, IRIG_INFO ) 602 #define IOCTL_SET_PCPS_IRIG_TX_SETTINGS _MBG_IOW( IOTYPE, 0x41, IRIG_SETTINGS ) 604 #define IOCTL_GET_SYNTH _MBG_IOR( IOTYPE, 0x42, SYNTH ) 605 #define IOCTL_SET_SYNTH _MBG_IOW( IOTYPE, 0x43, SYNTH ) 608 #define IOCTL_DEV_IS_GPS _MBG_IOR( IOTYPE, 0x44, int ) 609 #define IOCTL_DEV_IS_DCF _MBG_IOR( IOTYPE, 0x45, int ) 610 #define IOCTL_DEV_IS_IRIG_RX _MBG_IOR( IOTYPE, 0x46, int ) 612 #define IOCTL_DEV_HAS_HR_TIME _MBG_IOR( IOTYPE, 0x47, int ) 613 #define IOCTL_DEV_HAS_CAB_LEN _MBG_IOR( IOTYPE, 0x48, int ) 614 #define IOCTL_DEV_HAS_TZDL _MBG_IOR( IOTYPE, 0x49, int ) 615 #define IOCTL_DEV_HAS_PCPS_TZDL _MBG_IOR( IOTYPE, 0x4A, int ) 616 #define IOCTL_DEV_HAS_TZCODE _MBG_IOR( IOTYPE, 0x4B, int ) 617 #define IOCTL_DEV_HAS_TZ _MBG_IOR( IOTYPE, 0x4C, int ) 618 #define IOCTL_DEV_HAS_EVENT_TIME _MBG_IOR( IOTYPE, 0x4D, int ) 619 #define IOCTL_DEV_HAS_RECEIVER_INFO _MBG_IOR( IOTYPE, 0x4E, int ) 620 #define IOCTL_DEV_CAN_CLR_UCAP_BUFF _MBG_IOR( IOTYPE, 0x4F, int ) 621 #define IOCTL_DEV_HAS_UCAP _MBG_IOR( IOTYPE, 0x50, int ) 622 #define IOCTL_DEV_HAS_IRIG_TX _MBG_IOR( IOTYPE, 0x51, int ) 623 #define IOCTL_DEV_HAS_SERIAL_HS _MBG_IOR( IOTYPE, 0x52, int ) 624 #define IOCTL_DEV_HAS_SIGNAL _MBG_IOR( IOTYPE, 0x53, int ) 625 #define IOCTL_DEV_HAS_MOD _MBG_IOR( IOTYPE, 0x54, int ) 626 #define IOCTL_DEV_HAS_IRIG _MBG_IOR( IOTYPE, 0x55, int ) 627 #define IOCTL_DEV_HAS_REF_OFFS _MBG_IOR( IOTYPE, 0x56, int ) 628 #define IOCTL_DEV_HAS_OPT_FLAGS _MBG_IOR( IOTYPE, 0x57, int ) 629 #define IOCTL_DEV_HAS_GPS_DATA _MBG_IOR( IOTYPE, 0x58, int ) 630 #define IOCTL_DEV_HAS_SYNTH _MBG_IOR( IOTYPE, 0x59, int ) 631 #define IOCTL_DEV_HAS_GENERIC_IO _MBG_IOR( IOTYPE, 0x5A, int ) 633 #define IOCTL_PCPS_GENERIC_IO _MBG_IOG( IOTYPE, 0x5B, IOCTL_GENERIC_REQ ) 635 #define IOCTL_GET_SYNTH_STATE _MBG_IOR( IOTYPE, 0x5C, SYNTH_STATE ) 637 #define IOCTL_GET_GPS_ALL_POUT_INFO _MBG_IOG( IOTYPE, 0x5D, IOCTL_GENERIC_REQ ) // variable size 638 #define IOCTL_SET_GPS_POUT_SETTINGS_IDX _MBG_IOW( IOTYPE, 0x5E, POUT_SETTINGS_IDX ) 640 #define IOCTL_GET_MAPPED_MEM_ADDR _MBG_IOR( IOTYPE, 0x5F, PCPS_MAPPED_MEM ) 641 #define IOCTL_UNMAP_MAPPED_MEM _MBG_IOR( IOTYPE, 0x60, PCPS_MAPPED_MEM ) 643 #define IOCTL_GET_PCI_ASIC_FEATURES _MBG_IOR( IOTYPE, 0x61, PCI_ASIC_FEATURES ) 645 #define IOCTL_DEV_HAS_PCI_ASIC_FEATURES _MBG_IOR( IOTYPE, 0x62, int ) 646 #define IOCTL_DEV_HAS_PCI_ASIC_VERSION _MBG_IOR( IOTYPE, 0x63, int ) 648 #define IOCTL_DEV_IS_MSF _MBG_IOR( IOTYPE, 0x64, int ) 649 #define IOCTL_DEV_IS_LWR _MBG_IOR( IOTYPE, 0x65, int ) 650 #define IOCTL_DEV_IS_WWVB _MBG_IOR( IOTYPE, 0x66, int ) 652 #define IOCTL_GET_IRQ_STAT_INFO _MBG_IOR( IOTYPE, 0x67, PCPS_IRQ_STAT_INFO ) 653 #define IOCTL_GET_CYCLES_FREQUENCY _MBG_IOR( IOTYPE, 0x68, MBG_PC_CYCLES_FREQUENCY ) 655 #define IOCTL_DEV_HAS_FAST_HR_TIMESTAMP _MBG_IOR( IOTYPE, 0x69, int ) 656 #define IOCTL_GET_FAST_HR_TIMESTAMP_CYCLES _MBG_IOR( IOTYPE, 0x6A, PCPS_TIME_STAMP_CYCLES ) 657 #define IOCTL_GET_FAST_HR_TIMESTAMP _MBG_IOR( IOTYPE, 0x6B, PCPS_TIME_STAMP ) 659 #define IOCTL_DEV_HAS_GPS_TIME_SCALE _MBG_IOR( IOTYPE, 0x6C, int ) 660 #define IOCTL_GET_GPS_TIME_SCALE_INFO _MBG_IOR( IOTYPE, 0x6D, MBG_TIME_SCALE_INFO ) 661 #define IOCTL_SET_GPS_TIME_SCALE_SETTINGS _MBG_IOW( IOTYPE, 0x6E, MBG_TIME_SCALE_SETTINGS ) 663 #define IOCTL_DEV_HAS_GPS_UTC_PARM _MBG_IOR( IOTYPE, 0x6F, int ) 664 #define IOCTL_GET_GPS_UTC_PARM _MBG_IOR( IOTYPE, 0x70, UTC ) 665 #define IOCTL_SET_GPS_UTC_PARM _MBG_IOW( IOTYPE, 0x71, UTC ) 667 #define IOCTL_DEV_HAS_IRIG_CTRL_BITS _MBG_IOR( IOTYPE, 0x72, int ) 668 #define IOCTL_GET_IRIG_CTRL_BITS _MBG_IOR( IOTYPE, 0x73, MBG_IRIG_CTRL_BITS ) 670 #define IOCTL_DEV_HAS_LAN_INTF _MBG_IOR( IOTYPE, 0x74, int ) 671 #define IOCTL_GET_LAN_IF_INFO _MBG_IOR( IOTYPE, 0x75, LAN_IF_INFO ) 672 #define IOCTL_GET_IP4_STATE _MBG_IOR( IOTYPE, 0x76, IP4_SETTINGS ) 673 #define IOCTL_GET_IP4_SETTINGS _MBG_IOR( IOTYPE, 0x77, IP4_SETTINGS ) 674 #define IOCTL_SET_IP4_SETTINGS _MBG_IOW( IOTYPE, 0x78, IP4_SETTINGS ) 676 #define IOCTL_DEV_IS_PTP _MBG_IOR( IOTYPE, 0x79, int ) 677 #define IOCTL_DEV_HAS_PTP _MBG_IOR( IOTYPE, 0x7A, int ) 678 #define IOCTL_GET_PTP_STATE _MBG_IOR( IOTYPE, 0x7B, PTP_STATE ) 679 #define IOCTL_GET_PTP_CFG_INFO _MBG_IOR( IOTYPE, 0x7C, PTP_CFG_INFO ) 680 #define IOCTL_SET_PTP_CFG_SETTINGS _MBG_IOW( IOTYPE, 0x7D, PTP_CFG_SETTINGS ) 682 #define IOCTL_DEV_HAS_IRIG_TIME _MBG_IOR( IOTYPE, 0x7E, int ) 683 #define IOCTL_GET_IRIG_TIME _MBG_IOR( IOTYPE, 0x7F, PCPS_IRIG_TIME ) 685 #define IOCTL_GET_TIME_INFO_HRT _MBG_IOR( IOTYPE, 0x80, MBG_TIME_INFO_HRT ) 686 #define IOCTL_GET_TIME_INFO_TSTAMP _MBG_IOR( IOTYPE, 0x81, MBG_TIME_INFO_TSTAMP ) 688 #define IOCTL_DEV_HAS_RAW_IRIG_DATA _MBG_IOR( IOTYPE, 0x82, int ) 689 #define IOCTL_GET_RAW_IRIG_DATA _MBG_IOR( IOTYPE, 0x83, MBG_RAW_IRIG_DATA ) 691 #define IOCTL_DEV_HAS_PTP_UNICAST _MBG_IOR( IOTYPE, 0x84, int ) 692 #define IOCTL_PTP_UC_MASTER_CFG_LIMITS _MBG_IOR( IOTYPE, 0x85, PTP_UC_MASTER_CFG_LIMITS ) 693 #define IOCTL_GET_ALL_PTP_UC_MASTER_INFO _MBG_IOG( IOTYPE, 0x86, IOCTL_GENERIC_REQ ) // variable size 694 #define IOCTL_SET_PTP_UC_MASTER_SETTINGS_IDX _MBG_IOW( IOTYPE, 0x87, PTP_UC_MASTER_SETTINGS_IDX ) 696 #define IOCTL_DEV_HAS_PZF _MBG_IOR( IOTYPE, 0x88, int ) 697 #define IOCTL_DEV_HAS_CORR_INFO _MBG_IOR( IOTYPE, 0x89, int ) 698 #define IOCTL_DEV_HAS_TR_DISTANCE _MBG_IOR( IOTYPE, 0x8A, int ) 699 #define IOCTL_GET_CORR_INFO _MBG_IOR( IOTYPE, 0x8B, CORR_INFO ) 700 #define IOCTL_GET_TR_DISTANCE _MBG_IOR( IOTYPE, 0x8C, TR_DISTANCE ) 701 #define IOCTL_SET_TR_DISTANCE _MBG_IOW( IOTYPE, 0x8D, TR_DISTANCE ) 703 #define IOCTL_DEV_HAS_DEBUG_STATUS _MBG_IOR( IOTYPE, 0x8E, int ) 704 #define IOCTL_GET_DEBUG_STATUS _MBG_IOR( IOTYPE, 0x8F, MBG_DEBUG_STATUS ) 706 #define IOCTL_DEV_HAS_EVT_LOG _MBG_IOR( IOTYPE, 0x90, int ) 707 #define IOCTL_CLR_EVT_LOG _MBG_IO( IOTYPE, 0x91 ) 708 #define IOCTL_GET_NUM_EVT_LOG_ENTRIES _MBG_IOR( IOTYPE, 0x92, MBG_NUM_EVT_LOG_ENTRIES ) 709 #define IOCTL_GET_FIRST_EVT_LOG_ENTRY _MBG_IOR( IOTYPE, 0x93, MBG_EVT_LOG_ENTRY ) 710 #define IOCTL_GET_NEXT_EVT_LOG_ENTRY _MBG_IOR( IOTYPE, 0x94, MBG_EVT_LOG_ENTRY ) 712 #define IOCTL_DEV_IS_GNSS _MBG_IOR( IOTYPE, 0x95, int ) 713 #define IOCTL_GET_GNSS_MODE_INFO _MBG_IOR( IOTYPE, 0x96, MBG_GNSS_MODE_INFO ) 714 #define IOCTL_SET_GNSS_MODE_SETTINGS _MBG_IOW( IOTYPE, 0x97, MBG_GNSS_MODE_SETTINGS ) 715 #define IOCTL_GET_ALL_GNSS_SAT_INFO _MBG_IOG( IOTYPE, 0x98, IOCTL_GENERIC_REQ ) // variable size 717 #define IOCTL_DEV_HAS_GPIO _MBG_IOR( IOTYPE, 0x99, int ) 718 #define IOCTL_GET_GPIO_CFG_LIMITS _MBG_IOR( IOTYPE, 0x9A, MBG_GPIO_CFG_LIMITS ) 719 #define IOCTL_GET_ALL_GPIO_INFO _MBG_IOG( IOTYPE, 0x9B, IOCTL_GENERIC_REQ ) // variable size 720 #define IOCTL_SET_GPIO_SETTINGS_IDX _MBG_IOW( IOTYPE, 0x9C, MBG_GPIO_SETTINGS_IDX ) 722 #define IOCTL_DEV_HAS_XMR _MBG_IOR( IOTYPE, 0x9D, int ) 723 #define IOCTL_GET_XMR_INSTANCES _MBG_IOR( IOTYPE, 0x9E, XMULTI_REF_INSTANCES ) 724 #define IOCTL_GET_ALL_XMR_INFO _MBG_IOG( IOTYPE, 0x9F, IOCTL_GENERIC_REQ ) // variable size 725 #define IOCTL_SET_XMR_SETTINGS_IDX _MBG_IOW( IOTYPE, 0xA0, XMULTI_REF_SETTINGS_IDX ) 726 #define IOCTL_GET_ALL_XMR_STATUS _MBG_IOG( IOTYPE, 0xA1, IOCTL_GENERIC_REQ ) // variable size 727 #define IOCTL_GET_XMR_HOLDOVER_STATUS _MBG_IOR( IOTYPE, 0xA2, XMR_HOLDOVER_STATUS ) 729 #define IOCTL_GET_ALL_GPIO_STATUS _MBG_IOG( IOTYPE, 0xA3, IOCTL_GENERIC_REQ ) // variable size 730 #define IOCTL_CHK_DEV_FEAT _MBG_IOW( IOTYPE, 0xA4, IOCTL_DEV_FEAT_REQ ) 735 #define IOCTL_MBG_DBG_GET_PORT_ADDR _MBG_IOR( IOTYPE, 0xF0, uint16_t ) 736 #define IOCTL_MBG_DBG_SET_PORT_ADDR _MBG_IOW( IOTYPE, 0xF1, uint16_t ) 737 #define IOCTL_MBG_DBG_SET_BIT _MBG_IOW( IOTYPE, 0xF2, uint8_t ) 738 #define IOCTL_MBG_DBG_CLR_BIT _MBG_IOW( IOTYPE, 0xF3, uint8_t ) 739 #define IOCTL_MBG_DBG_CLR_ALL _MBG_IO( IOTYPE, 0xF4 ) 753 #define IOCTL_CODES_TABLE \ 755 _mbg_cn_table_entry( IOCTL_GET_PCPS_DRVR_INFO ), \ 756 _mbg_cn_table_entry( IOCTL_GET_PCPS_DEV ), \ 757 _mbg_cn_table_entry( IOCTL_GET_PCPS_STATUS_PORT ), \ 758 _mbg_cn_table_entry( IOCTL_PCPS_GENERIC_READ ), \ 759 _mbg_cn_table_entry( IOCTL_PCPS_GENERIC_WRITE ), \ 760 _mbg_cn_table_entry( IOCTL_PCPS_GENERIC_READ_GPS ), \ 761 _mbg_cn_table_entry( IOCTL_PCPS_GENERIC_WRITE_GPS ), \ 762 _mbg_cn_table_entry( IOCTL_GET_PCPS_TIME ), \ 763 _mbg_cn_table_entry( IOCTL_SET_PCPS_TIME ), \ 764 _mbg_cn_table_entry( IOCTL_GET_PCPS_SYNC_TIME ), \ 765 _mbg_cn_table_entry( IOCTL_GET_PCPS_TIME_SEC_CHANGE ), \ 766 _mbg_cn_table_entry( IOCTL_GET_PCPS_HR_TIME ), \ 767 _mbg_cn_table_entry( IOCTL_SET_PCPS_EVENT_TIME ), \ 768 _mbg_cn_table_entry( IOCTL_GET_PCPS_SERIAL ), \ 769 _mbg_cn_table_entry( IOCTL_SET_PCPS_SERIAL ), \ 770 _mbg_cn_table_entry( IOCTL_GET_PCPS_TZCODE ), \ 771 _mbg_cn_table_entry( IOCTL_SET_PCPS_TZCODE ), \ 772 _mbg_cn_table_entry( IOCTL_GET_PCPS_TZDL ), \ 773 _mbg_cn_table_entry( IOCTL_SET_PCPS_TZDL ), \ 774 _mbg_cn_table_entry( IOCTL_GET_REF_OFFS ), \ 775 _mbg_cn_table_entry( IOCTL_SET_REF_OFFS ), \ 776 _mbg_cn_table_entry( IOCTL_GET_MBG_OPT_INFO ), \ 777 _mbg_cn_table_entry( IOCTL_SET_MBG_OPT_SETTINGS ), \ 778 _mbg_cn_table_entry( IOCTL_GET_PCPS_IRIG_RX_INFO ), \ 779 _mbg_cn_table_entry( IOCTL_SET_PCPS_IRIG_RX_SETTINGS ), \ 780 _mbg_cn_table_entry( IOCTL_PCPS_CLR_UCAP_BUFF ), \ 781 _mbg_cn_table_entry( IOCTL_GET_PCPS_UCAP_ENTRIES ), \ 782 _mbg_cn_table_entry( IOCTL_GET_PCPS_UCAP_EVENT ), \ 783 _mbg_cn_table_entry( IOCTL_GET_GPS_TZDL ), \ 784 _mbg_cn_table_entry( IOCTL_SET_GPS_TZDL ), \ 785 _mbg_cn_table_entry( IOCTL_GET_GPS_SW_REV ), \ 786 _mbg_cn_table_entry( IOCTL_GET_GPS_BVAR_STAT ), \ 787 _mbg_cn_table_entry( IOCTL_GET_GPS_TIME ), \ 788 _mbg_cn_table_entry( IOCTL_SET_GPS_TIME ), \ 789 _mbg_cn_table_entry( IOCTL_GET_GPS_PORT_PARM ), \ 790 _mbg_cn_table_entry( IOCTL_SET_GPS_PORT_PARM ), \ 791 _mbg_cn_table_entry( IOCTL_GET_GPS_ANT_INFO ), \ 792 _mbg_cn_table_entry( IOCTL_GET_GPS_UCAP ), \ 793 _mbg_cn_table_entry( IOCTL_GET_GPS_ENABLE_FLAGS ), \ 794 _mbg_cn_table_entry( IOCTL_SET_GPS_ENABLE_FLAGS ), \ 795 _mbg_cn_table_entry( IOCTL_GET_GPS_STAT_INFO ), \ 796 _mbg_cn_table_entry( IOCTL_SET_GPS_CMD ), \ 797 _mbg_cn_table_entry( IOCTL_GET_GPS_IDENT ), \ 798 _mbg_cn_table_entry( IOCTL_GET_GPS_POS ), \ 799 _mbg_cn_table_entry( IOCTL_SET_GPS_POS_XYZ ), \ 800 _mbg_cn_table_entry( IOCTL_SET_GPS_POS_LLA ), \ 801 _mbg_cn_table_entry( IOCTL_GET_GPS_ANT_CABLE_LEN ), \ 802 _mbg_cn_table_entry( IOCTL_SET_GPS_ANT_CABLE_LEN ), \ 803 _mbg_cn_table_entry( IOCTL_GET_GPS_RECEIVER_INFO ), \ 804 _mbg_cn_table_entry( IOCTL_GET_GPS_ALL_STR_TYPE_INFO ), \ 805 _mbg_cn_table_entry( IOCTL_GET_GPS_ALL_PORT_INFO ), \ 806 _mbg_cn_table_entry( IOCTL_SET_GPS_PORT_SETTINGS_IDX ), \ 807 _mbg_cn_table_entry( IOCTL_GET_PCI_ASIC_VERSION ), \ 808 _mbg_cn_table_entry( IOCTL_GET_PCPS_TIME_CYCLES ), \ 809 _mbg_cn_table_entry( IOCTL_GET_PCPS_HR_TIME_CYCLES ), \ 810 _mbg_cn_table_entry( IOCTL_GET_PCPS_IRIG_TX_INFO ), \ 811 _mbg_cn_table_entry( IOCTL_SET_PCPS_IRIG_TX_SETTINGS ), \ 812 _mbg_cn_table_entry( IOCTL_GET_SYNTH ), \ 813 _mbg_cn_table_entry( IOCTL_SET_SYNTH ), \ 814 _mbg_cn_table_entry( IOCTL_DEV_IS_GPS ), \ 815 _mbg_cn_table_entry( IOCTL_DEV_IS_DCF ), \ 816 _mbg_cn_table_entry( IOCTL_DEV_IS_IRIG_RX ), \ 817 _mbg_cn_table_entry( IOCTL_DEV_HAS_HR_TIME ), \ 818 _mbg_cn_table_entry( IOCTL_DEV_HAS_CAB_LEN ), \ 819 _mbg_cn_table_entry( IOCTL_DEV_HAS_TZDL ), \ 820 _mbg_cn_table_entry( IOCTL_DEV_HAS_PCPS_TZDL ), \ 821 _mbg_cn_table_entry( IOCTL_DEV_HAS_TZCODE ), \ 822 _mbg_cn_table_entry( IOCTL_DEV_HAS_TZ ), \ 823 _mbg_cn_table_entry( IOCTL_DEV_HAS_EVENT_TIME ), \ 824 _mbg_cn_table_entry( IOCTL_DEV_HAS_RECEIVER_INFO ), \ 825 _mbg_cn_table_entry( IOCTL_DEV_CAN_CLR_UCAP_BUFF ), \ 826 _mbg_cn_table_entry( IOCTL_DEV_HAS_UCAP ), \ 827 _mbg_cn_table_entry( IOCTL_DEV_HAS_IRIG_TX ), \ 828 _mbg_cn_table_entry( IOCTL_DEV_HAS_SERIAL_HS ), \ 829 _mbg_cn_table_entry( IOCTL_DEV_HAS_SIGNAL ), \ 830 _mbg_cn_table_entry( IOCTL_DEV_HAS_MOD ), \ 831 _mbg_cn_table_entry( IOCTL_DEV_HAS_IRIG ), \ 832 _mbg_cn_table_entry( IOCTL_DEV_HAS_REF_OFFS ), \ 833 _mbg_cn_table_entry( IOCTL_DEV_HAS_OPT_FLAGS ), \ 834 _mbg_cn_table_entry( IOCTL_DEV_HAS_GPS_DATA ), \ 835 _mbg_cn_table_entry( IOCTL_DEV_HAS_SYNTH ), \ 836 _mbg_cn_table_entry( IOCTL_DEV_HAS_GENERIC_IO ), \ 837 _mbg_cn_table_entry( IOCTL_PCPS_GENERIC_IO ), \ 838 _mbg_cn_table_entry( IOCTL_GET_SYNTH_STATE ), \ 839 _mbg_cn_table_entry( IOCTL_GET_GPS_ALL_POUT_INFO ), \ 840 _mbg_cn_table_entry( IOCTL_SET_GPS_POUT_SETTINGS_IDX ), \ 841 _mbg_cn_table_entry( IOCTL_GET_MAPPED_MEM_ADDR ), \ 842 _mbg_cn_table_entry( IOCTL_UNMAP_MAPPED_MEM ), \ 843 _mbg_cn_table_entry( IOCTL_GET_PCI_ASIC_FEATURES ), \ 844 _mbg_cn_table_entry( IOCTL_DEV_HAS_PCI_ASIC_FEATURES ), \ 845 _mbg_cn_table_entry( IOCTL_DEV_HAS_PCI_ASIC_VERSION ), \ 846 _mbg_cn_table_entry( IOCTL_DEV_IS_MSF ), \ 847 _mbg_cn_table_entry( IOCTL_DEV_IS_LWR ), \ 848 _mbg_cn_table_entry( IOCTL_DEV_IS_WWVB ), \ 849 _mbg_cn_table_entry( IOCTL_GET_IRQ_STAT_INFO ), \ 850 _mbg_cn_table_entry( IOCTL_GET_CYCLES_FREQUENCY ), \ 851 _mbg_cn_table_entry( IOCTL_DEV_HAS_FAST_HR_TIMESTAMP ), \ 852 _mbg_cn_table_entry( IOCTL_GET_FAST_HR_TIMESTAMP_CYCLES ), \ 853 _mbg_cn_table_entry( IOCTL_GET_FAST_HR_TIMESTAMP ), \ 854 _mbg_cn_table_entry( IOCTL_DEV_HAS_GPS_TIME_SCALE ), \ 855 _mbg_cn_table_entry( IOCTL_GET_GPS_TIME_SCALE_INFO ), \ 856 _mbg_cn_table_entry( IOCTL_SET_GPS_TIME_SCALE_SETTINGS ), \ 857 _mbg_cn_table_entry( IOCTL_DEV_HAS_GPS_UTC_PARM ), \ 858 _mbg_cn_table_entry( IOCTL_GET_GPS_UTC_PARM ), \ 859 _mbg_cn_table_entry( IOCTL_SET_GPS_UTC_PARM ), \ 860 _mbg_cn_table_entry( IOCTL_DEV_HAS_IRIG_CTRL_BITS ), \ 861 _mbg_cn_table_entry( IOCTL_GET_IRIG_CTRL_BITS ), \ 862 _mbg_cn_table_entry( IOCTL_DEV_HAS_LAN_INTF ), \ 863 _mbg_cn_table_entry( IOCTL_GET_LAN_IF_INFO ), \ 864 _mbg_cn_table_entry( IOCTL_GET_IP4_STATE ), \ 865 _mbg_cn_table_entry( IOCTL_GET_IP4_SETTINGS ), \ 866 _mbg_cn_table_entry( IOCTL_SET_IP4_SETTINGS ), \ 867 _mbg_cn_table_entry( IOCTL_DEV_IS_PTP ), \ 868 _mbg_cn_table_entry( IOCTL_DEV_HAS_PTP ), \ 869 _mbg_cn_table_entry( IOCTL_GET_PTP_STATE ), \ 870 _mbg_cn_table_entry( IOCTL_GET_PTP_CFG_INFO ), \ 871 _mbg_cn_table_entry( IOCTL_SET_PTP_CFG_SETTINGS ), \ 872 _mbg_cn_table_entry( IOCTL_DEV_HAS_IRIG_TIME ), \ 873 _mbg_cn_table_entry( IOCTL_GET_IRIG_TIME ), \ 874 _mbg_cn_table_entry( IOCTL_GET_TIME_INFO_HRT ), \ 875 _mbg_cn_table_entry( IOCTL_GET_TIME_INFO_TSTAMP ), \ 876 _mbg_cn_table_entry( IOCTL_DEV_HAS_RAW_IRIG_DATA ), \ 877 _mbg_cn_table_entry( IOCTL_GET_RAW_IRIG_DATA ), \ 878 _mbg_cn_table_entry( IOCTL_DEV_HAS_PTP_UNICAST ), \ 879 _mbg_cn_table_entry( IOCTL_PTP_UC_MASTER_CFG_LIMITS ), \ 880 _mbg_cn_table_entry( IOCTL_GET_ALL_PTP_UC_MASTER_INFO ), \ 881 _mbg_cn_table_entry( IOCTL_SET_PTP_UC_MASTER_SETTINGS_IDX ), \ 882 _mbg_cn_table_entry( IOCTL_DEV_HAS_PZF ), \ 883 _mbg_cn_table_entry( IOCTL_DEV_HAS_CORR_INFO ), \ 884 _mbg_cn_table_entry( IOCTL_DEV_HAS_TR_DISTANCE ), \ 885 _mbg_cn_table_entry( IOCTL_GET_CORR_INFO ), \ 886 _mbg_cn_table_entry( IOCTL_GET_TR_DISTANCE ), \ 887 _mbg_cn_table_entry( IOCTL_SET_TR_DISTANCE ), \ 888 _mbg_cn_table_entry( IOCTL_DEV_HAS_DEBUG_STATUS ), \ 889 _mbg_cn_table_entry( IOCTL_GET_DEBUG_STATUS ), \ 890 _mbg_cn_table_entry( IOCTL_DEV_HAS_EVT_LOG ), \ 891 _mbg_cn_table_entry( IOCTL_CLR_EVT_LOG ), \ 892 _mbg_cn_table_entry( IOCTL_GET_NUM_EVT_LOG_ENTRIES ), \ 893 _mbg_cn_table_entry( IOCTL_GET_FIRST_EVT_LOG_ENTRY ), \ 894 _mbg_cn_table_entry( IOCTL_GET_NEXT_EVT_LOG_ENTRY ), \ 895 _mbg_cn_table_entry( IOCTL_DEV_IS_GNSS ), \ 896 _mbg_cn_table_entry( IOCTL_GET_GNSS_MODE_INFO ), \ 897 _mbg_cn_table_entry( IOCTL_SET_GNSS_MODE_SETTINGS ), \ 898 _mbg_cn_table_entry( IOCTL_GET_ALL_GNSS_SAT_INFO ), \ 899 _mbg_cn_table_entry( IOCTL_DEV_HAS_GPIO ), \ 900 _mbg_cn_table_entry( IOCTL_GET_GPIO_CFG_LIMITS ), \ 901 _mbg_cn_table_entry( IOCTL_GET_ALL_GPIO_INFO ), \ 902 _mbg_cn_table_entry( IOCTL_SET_GPIO_SETTINGS_IDX ), \ 903 _mbg_cn_table_entry( IOCTL_DEV_HAS_XMR ), \ 904 _mbg_cn_table_entry( IOCTL_GET_XMR_INSTANCES ), \ 905 _mbg_cn_table_entry( IOCTL_GET_ALL_XMR_INFO ), \ 906 _mbg_cn_table_entry( IOCTL_SET_XMR_SETTINGS_IDX ), \ 907 _mbg_cn_table_entry( IOCTL_GET_ALL_XMR_STATUS ), \ 908 _mbg_cn_table_entry( IOCTL_GET_XMR_HOLDOVER_STATUS ), \ 909 _mbg_cn_table_entry( IOCTL_GET_ALL_GPIO_STATUS ), \ 910 _mbg_cn_table_entry( IOCTL_CHK_DEV_FEAT ), \ 912 _mbg_cn_table_entry( IOCTL_MBG_DBG_GET_PORT_ADDR ), \ 913 _mbg_cn_table_entry( IOCTL_MBG_DBG_SET_PORT_ADDR ), \ 914 _mbg_cn_table_entry( IOCTL_MBG_DBG_SET_BIT ), \ 915 _mbg_cn_table_entry( IOCTL_MBG_DBG_CLR_BIT ), \ 916 _mbg_cn_table_entry( IOCTL_MBG_DBG_CLR_ALL ), \ 918 _mbg_cn_table_end() \ 922 #if !defined( _cmd_from_ioctl_code ) 923 #define _cmd_from_ioctl_code( _ioctl_code ) _ioctl_code 958 #if defined( __GNUC__ ) 979 switch ( ioctl_code )
1022 #if _MBG_SUPP_VAR_ACC_SIZE 1113 #if _MBG_SUPP_VAR_ACC_SIZE #define IOCTL_GET_PCPS_TZCODE
#define IOCTL_DEV_HAS_RAW_IRIG_DATA
#define IOCTL_GET_FAST_HR_TIMESTAMP_CYCLES
#define IOCTL_DEV_HAS_PCI_ASIC_VERSION
#define IOCTL_DEV_CAN_CLR_UCAP_BUFF
#define IOCTL_GET_GPS_ALL_PORT_INFO
#define IOCTL_DEV_HAS_LAN_INTF
#define IOCTL_SET_GPS_POS_LLA
uint32_t info
E.g. cmd code for the device.
#define IOCTL_GET_MBG_OPT_INFO
const char * mbgioctl_get_name(long code)
#define IOCTL_MBG_DBG_SET_BIT
#define IOCTL_DEV_HAS_SYNTH
uint32_t in_sz
Size of the input buffer.
#define IOCTL_SET_GPS_POS_XYZ
#define IOCTL_SET_GPS_UTC_PARM
#define IOCTL_GET_GPS_POS
#define IOCTL_DEV_HAS_IRIG_TX
#define IOCTL_DEV_HAS_OPT_FLAGS
uint64_t in_p
Address of the input buffer.
#define IOCTL_DEV_HAS_FAST_HR_TIMESTAMP
#define IOCTL_SET_PCPS_TIME
#define IOCTL_GET_PCPS_UCAP_EVENT
#define IOCTL_SET_GPS_ENABLE_FLAGS
#define IOCTL_UNMAP_MAPPED_MEM
A structure used to retrieve an address to be mapped into user space.
#define IOCTL_GET_PCPS_DEV
#define IOCTL_GET_IRIG_CTRL_BITS
#define IOCTL_GET_PCPS_IRIG_RX_INFO
#define IOCTL_SET_GPS_CMD
#define IOCTL_DEV_HAS_HR_TIME
#define IOCTL_GET_FAST_HR_TIMESTAMP
#define IOCTL_GET_CYCLES_FREQUENCY
MBG_REQ_PRIVL
Privilege levels for IOCTL codes.
#define IOCTL_GET_XMR_HOLDOVER_STATUS
#define IOCTL_DEV_HAS_GPS_DATA
#define IOCTL_GET_GPS_TZDL
#define IOCTL_SET_PCPS_IRIG_RX_SETTINGS
#define IOCTL_DEV_HAS_DEBUG_STATUS
#define IOCTL_DEV_IS_GNSS
#define IOCTL_GET_GPS_STAT_INFO
#define IOCTL_GET_ALL_XMR_INFO
#define IOCTL_SET_GPS_PORT_PARM
#define IOCTL_GET_PCPS_STATUS_PORT
#define IOCTL_SET_REF_OFFS
#define IOCTL_SET_IP4_SETTINGS
#define IOCTL_GET_GPS_ANT_CABLE_LEN
#define IOCTL_SET_GNSS_MODE_SETTINGS
#define IOCTL_CLR_EVT_LOG
#define IOCTL_DEV_HAS_IRIG_TIME
#define IOCTL_DEV_HAS_EVT_LOG
#define IOCTL_CHK_DEV_FEAT
#define IOCTL_GET_DEBUG_STATUS
#define IOCTL_PCPS_GENERIC_READ
#define IOCTL_GET_PTP_CFG_INFO
A structure used to pass generic IOCTL requests to the kernel driver.
#define IOCTL_GET_ALL_GNSS_SAT_INFO
#define IOCTL_GET_PCPS_TIME_SEC_CHANGE
#define IOCTL_GET_GPS_ENABLE_FLAGS
#define IOCTL_SET_PCPS_SERIAL
#define IOCTL_GET_IRIG_TIME
#define IOCTL_GET_TIME_INFO_TSTAMP
#define IOCTL_PCPS_GENERIC_IO
uint64_t out_p
Address of the output buffer.
#define IOCTL_GET_GPS_ANT_INFO
#define IOCTL_SET_PTP_CFG_SETTINGS
#define IOCTL_DEV_HAS_UCAP
#define IOCTL_GET_REF_OFFS
#define IOCTL_PCPS_CLR_UCAP_BUFF
#define IOCTL_GET_CORR_INFO
#define IOCTL_GET_PCPS_UCAP_ENTRIES
#define IOCTL_DEV_IS_WWVB
#define IOCTL_GET_PCI_ASIC_VERSION
#define IOCTL_DEV_HAS_GPS_UTC_PARM
#define IOCTL_SET_GPS_TZDL
#define IOCTL_MBG_DBG_CLR_BIT
static __mbg_inline int ioctl_get_required_privilege(ulong ioctl_code)
Determine the privilege level required to execute a specific IOCTL command.
#define IOCTL_GET_PCPS_SYNC_TIME
#define IOCTL_DEV_HAS_SIGNAL
#define IOCTL_DEV_HAS_IRIG
#define IOCTL_GET_GPIO_CFG_LIMITS
#define IOCTL_DEV_HAS_MOD
#define IOCTL_GET_GPS_BVAR_STAT
#define IOCTL_MBG_DBG_SET_PORT_ADDR
PCPS_MAPPED_MEM mapped_mem
Request buffer used to query a device feature.
#define IOCTL_GET_SYNTH_STATE
#define IOCTL_SET_GPS_POUT_SETTINGS_IDX
#define IOCTL_GET_ALL_PTP_UC_MASTER_INFO
#define IOCTL_DEV_HAS_CAB_LEN
#define IOCTL_GET_GNSS_MODE_INFO
#define IOCTL_GET_GPS_TIME
#define IOCTL_DEV_HAS_CORR_INFO
#define IOCTL_SET_GPIO_SETTINGS_IDX
#define IOCTL_GET_PCI_ASIC_FEATURES
#define IOCTL_PCPS_GENERIC_READ_GPS
#define IOCTL_GET_GPS_IDENT
#define IOCTL_GET_PCPS_IRIG_TX_INFO
#define IOCTL_DEV_IS_IRIG_RX
#define IOCTL_SET_PTP_UC_MASTER_SETTINGS_IDX
#define IOCTL_DEV_HAS_PTP
#define IOCTL_DEV_HAS_GPIO
#define IOCTL_GET_ALL_GPIO_INFO
#define IOCTL_PCPS_GENERIC_WRITE_GPS
#define IOCTL_SET_GPS_ANT_CABLE_LEN
#define IOCTL_DEV_HAS_REF_OFFS
#define IOCTL_GET_IP4_STATE
#define IOCTL_DEV_HAS_IRIG_CTRL_BITS
#define IOCTL_DEV_HAS_PZF
#define IOCTL_GET_PCPS_HR_TIME
#define IOCTL_GET_XMR_INSTANCES
#define IOCTL_SET_TR_DISTANCE
#define IOCTL_SET_GPS_TIME_SCALE_SETTINGS
uint32_t reserved
Reserved, yet not used.
#define IOCTL_DEV_HAS_PCPS_TZDL
#define IOCTL_SET_PCPS_TZCODE
#define IOCTL_GET_GPS_ALL_POUT_INFO
#define IOCTL_GET_GPS_RECEIVER_INFO
#define IOCTL_MBG_DBG_CLR_ALL
#define IOCTL_DEV_HAS_TZCODE
#define IOCTL_GET_PCPS_TIME
#define IOCTL_DEV_HAS_GPS_TIME_SCALE
#define IOCTL_GET_IRQ_STAT_INFO
#define IOCTL_GET_IP4_SETTINGS
#define IOCTL_DEV_HAS_GENERIC_IO
#define IOCTL_SET_GPS_TIME
#define IOCTL_SET_XMR_SETTINGS_IDX
#define IOCTL_GET_GPS_UTC_PARM
#define IOCTL_GET_PCPS_TZDL
#define IOCTL_DEV_HAS_RECEIVER_INFO
#define IOCTL_DEV_HAS_PTP_UNICAST
#define IOCTL_DEV_HAS_XMR
#define IOCTL_GET_TIME_INFO_HRT
#define IOCTL_GET_ALL_GPIO_STATUS
#define IOCTL_GET_MAPPED_MEM_ADDR
int mbgioctl_rc_to_mbg_errno(int sys_errno)
#define IOCTL_SET_GPS_PORT_SETTINGS_IDX
#define IOCTL_MBG_DBG_GET_PORT_ADDR
#define IOCTL_GET_GPS_PORT_PARM
uint32_t out_sz
Size of the output buffer.
#define IOCTL_PCPS_GENERIC_WRITE
#define IOCTL_DEV_HAS_TZDL
#define IOCTL_GET_NUM_EVT_LOG_ENTRIES
#define IOCTL_GET_ALL_XMR_STATUS
#define IOCTL_SET_PCPS_IRIG_TX_SETTINGS
#define IOCTL_GET_FIRST_EVT_LOG_ENTRY
#define IOCTL_GET_TR_DISTANCE
unsigned __int64 uint64_t
IOCTL_DEV_FEAT_REQ dev_feat_req
#define IOCTL_GET_PCPS_DRVR_INFO
#define IOCTL_DEV_HAS_EVENT_TIME
#define IOCTL_GET_GPS_TIME_SCALE_INFO
#define IOCTL_SET_MBG_OPT_SETTINGS
#define IOCTL_GET_GPS_ALL_STR_TYPE_INFO
#define IOCTL_GET_LAN_IF_INFO
#define IOCTL_GET_PCPS_TIME_CYCLES
#define IOCTL_GET_GPS_SW_REV
#define IOCTL_SET_PCPS_TZDL
#define IOCTL_GET_RAW_IRIG_DATA
uint32_t feat_num
Number and range depending on IOCTL_DEV_FEAT_REQ::feat_type value.
#define IOCTL_DEV_HAS_TR_DISTANCE
#define IOCTL_DEV_HAS_PCI_ASIC_FEATURES
#define IOCTL_GET_GPS_UCAP
#define IOCTL_PTP_UC_MASTER_CFG_LIMITS
#define IOCTL_GET_PCPS_SERIAL
#define IOCTL_GET_NEXT_EVT_LOG_ENTRY
uint32_t feat_type
See DEV_FEAT_TYPES.
#define IOCTL_GET_PTP_STATE
#define IOCTL_GET_PCPS_HR_TIME_CYCLES
#define IOCTL_SET_PCPS_EVENT_TIME
#define IOCTL_DEV_HAS_SERIAL_HS