[PARPORT] Extension suggestions for libieee1284

From: Max Vorobiev (pcwizard@zelmail.ru)
Date: Tue Jun 04 2002 - 14:13:06 EDT

  • Next message: Stefan Riha: "[PARPORT] who is the developer"

    Goo day.

    Here are some extesion suggestions for libieee1284 daisy chaining support.

    ============================================================
    int ieee1284_daisy_init(struct parport *port);

    Semantics: initialization of daisy chain; resets any previous choosen mode;
                    rescan daisy chain; assign daisy numbers [0-3] to devices.
    Parameters: [in] port - port we need to enumerate devices on.
    Ret. value: in success case, number of IEEE1284.3 devices, detected on port;
                in case if failure, error:
                E1284_NOTIMPL - daisy chaining not supported for this system
                E1284_INIT - There was a problem initializing the port.
                E1284_INVALIDPORT - The port parameter is invalid.
                E1284_NOMEM - There is not enouth memory.

    Usage notes:
            - Should be called after ieee_1284_open.

    Implementation notes:
            - Require additional IOCTL code for ppdev.
    ============================================================
    int ieee1284_daisy_select(struct parport *port, int daisy, int mode);

    Semantics: select daisy device in chain we want to control;
                    select IEEE1284 mode for communication.
    Parameters: [in] port - port device connected to.
                    [in] daisy - daisy chain number [0-3] for device.
                    [in] mode - mode to communicate : COMPAT, EPP, ECP, BECP
    Ret. value: code of result E1284_xxxx

    Usage notes:
            - Should be called after daisy_init
            - Negotiation call not required after this one. Mode for write_ and
            read_ methods sets by ieee1284_daisy_select.

    Implementation notes:
            - Require additional IOCTL code for ppdev.
    =============================================================
    int ieee1284_daisy_deselect_all(struct parport *port);

    Semantics: cancel daisy device selection; port talks to last-in-chain device.
    Parameters: [in] port - port device connected to.
    Ret. value: code of result E1284_xxxx

    Usage notes:
            - Should be called afer daisy_init
            - Connection mode to last device becomes COMPAT

    Implementation notes:
            - Require additional IOCTL code for ppdev.
    =============================================================
    void ieee1284_daisy_fini(struct parport *port);

    Semantics: safe release of daisy chain information; forget about detected
    devices.
    Parameters: [in] port - port device connected to.

    Usage notes:
            - For ieee1284_daisy_init release.

    Implementation notes:
            - Require additional IOCTL code for ppdev.
    =============================================================

    On Fri, May 31, 2002 at 05:45:25PM +0400, Max Vorobiev wrote:
    > How can I select device in daisy chain to communicate with then I use
    > libieee1284?

    Currently you have to do it 'by hand', i.e. with the SPP
    data/control/status signals.

    > As I understand get_deviceid doen't support daisy chaining currently. Am I
    > right?

    That's right. And there's no 'ieee1284_daisy_select' function in
    libieee1284. (Suggest a prototype for it!)

    > But how can I select device at "opening" state? I cann't find any
    > clues with interface.

    Suggest something.



    -- To unsubscribe, send mail to: linux-parport-request@torque.net --
    -- with the single word "unsubscribe" in the body of the message. --



    This archive was generated by hypermail 2b29 : Tue Jun 04 2002 - 14:19:07 EDT