@@ -559,134 +559,6 @@ void queue_reset(queue_t queue);
559559
560560// /@}
561561
562- // / \name Device Registration
563- // /@{
564-
565- /* *
566- * \enum v5_device_e
567- * \brief
568- * List of possible v5 devices
569- *
570- * This list contains all current V5 Devices, and mirrors V5_DeviceType from the
571- * api.
572- */
573- typedef enum v5_device_e {
574- E_DEVICE_NONE = 0 , // /< No device is plugged into the port
575- E_DEVICE_MOTOR = 2 , // /< A motor is plugged into the port
576- E_DEVICE_ROTATION = 4 , // /< A rotation sensor is plugged into the port
577- E_DEVICE_IMU = 6 , // /< An inertial sensor is plugged into the port
578- E_DEVICE_DISTANCE = 7 , // /< A distance sensor is plugged into the port
579- E_DEVICE_RADIO = 8 , // /< A radio is plugged into the port
580- E_DEVICE_VISION = 11 , // /< A vision sensor is plugged into the port
581- E_DEVICE_ADI = 12 , // /< This port is an ADI expander
582- E_DEVICE_OPTICAL = 16 , // /< An optical sensor is plugged into the port
583- E_DEVICE_GPS = 20 , // /< A GPS sensor is plugged into the port
584- E_DEVICE_AIVISION = 29 , // /< An AI Vision sensor is plugged into the port
585- E_DEVICE_SERIAL = 129 , // /< A serial device is plugged into the port
586- E_DEVICE_GENERIC __attribute__ ((deprecated (" use E_DEVICE_SERIAL instead" ))) = E_DEVICE_SERIAL ,
587- E_DEVICE_UNDEFINED = 255 // /< The device type is not defined, or is not a valid device
588- } v5_device_e_t ;
589-
590- /* *
591- * Registers a device in the given zero-indexed port
592- *
593- * Registers a device of the given type in the given port into the registry, if
594- * that type of device is detected to be plugged in to that port.
595- *
596- * This function uses the following values of errno when an error state is
597- * reached:
598- * ENXIO - The given value is not within the range of V5 ports (0-20), or a
599- * a different device than specified is plugged in.
600- * EADDRINUSE - The port is already registered to another device.
601- *
602- * \param port
603- * The port number to register the device
604- * \param device
605- * The type of device to register
606- *
607- * \return 1 upon success, PROS_ERR upon failure
608- *
609- * \b Example:
610- * \code
611- * void opcontrol(void) {
612- * registry_bind_port(1, E_DEVICE_MOTOR);
613- * }
614- * \endcode
615- */
616- int registry_bind_port (uint8_t port, v5_device_e_t device_type);
617-
618- /* *
619- * Deregisters a devices from the given zero-indexed port
620- *
621- * Removes the device registed in the given port, if there is one.
622- *
623- * This function uses the following values of errno when an error state is
624- * reached:
625- * ENXIO - The given value is not within the range of V5 ports (0-20).
626- *
627- * \param port
628- * The port number to deregister
629- *
630- * \return 1 upon success, PROS_ERR upon failure
631- *
632- * \b Example:
633- * \code
634- * void opcontrol(void) {
635- * registry_bind_port(1, E_DEVICE_MOTOR);
636- * registry_unbind_port(1);
637- * }
638- * \endcode
639- */
640- int registry_unbind_port (uint8_t port);
641-
642- /* *
643- * Returns the type of device registered to the zero-indexed port.
644- *
645- * This function uses the following values of errno when an error state is
646- * reached:
647- * ENXIO - The given value is not within the range of V5 ports (0-20).
648- *
649- * \param port
650- * The V5 port number from 0-20
651- *
652- * \return The type of device that is registered into the port (NOT what is
653- * plugged in)
654- *
655- * \b Example:
656- * \code
657- * void opcontrol(void) {
658- * registry_bind_port(1, E_DEVICE_MOTOR);
659- * printf("port 1 is registered to a motor: %d", registry_get_bound_type(1) == E_DEVICE_MOTOR);
660- * }
661- * \endcode
662- */
663- v5_device_e_t registry_get_bound_type (uint8_t port);
664-
665- /* *
666- * Returns the type of the device plugged into the zero-indexed port.
667- *
668- * This function uses the following values of errno when an error state is
669- * reached:
670- * ENXIO - The given value is not within the range of V5 ports (0-20).
671- *
672- * \param port
673- * The V5 port number from 0-20
674- *
675- * \return The type of device that is plugged into the port (NOT what is
676- * registered)
677- *
678- * \b Example:
679- * \code
680- * void opcontrol(void) {
681- * registry_bind_port(1, E_DEVICE_MOTOR);
682- * printf("port 1 is registered to a motor: %d", registry_get_plugged_type(1) == E_DEVICE_MOTOR);
683- * }
684- * \endcode
685- */
686- v5_device_e_t registry_get_plugged_type (uint8_t port);
687-
688- // /@}
689-
690562// / \name Startup options
691563// /@{
692564
0 commit comments