On 5 April 2012 01:32, Peter Crosthwaite
<peter.crosthwa...@petalogix.com> wrote:
> 3: add support for flagging sdi/sdo bits as tristated:
>
> --- a/hw/ssi.h
> +++ b/hw/ssi.h
> @@ -28,7 +28,11 @@ typedef struct SSISlaveClass {
>     DeviceClass parent_class;
>
>     int (*init)(SSISlave *dev);
> -    uint32_t (*transfer)(SSISlave *dev, uint32_t val);
> +    /* transfer data. If z if provided, *z is the tristate mask
> +     * It is initially populated with tristate value for tx, and
> +     * on return should be populated with tristate for rx
> +     */
> +    uint32_t (*transfer)(SSISlave *dev, uint32_t val, uint32_t *z);
>  } SSISlaveClass;

I'm not sure what you intend the tristate masks to be used for?
If the sending device puts the line into high-impedance presumably
the receiving device is just going to read something random which
it's supposed to ignore, so the sender could just send whatever
it likes. We're not modelling multiple devices sending at once,
which is the only case I can think of where you'd need to care
which bits each device was tristating for.

-- PMM

Reply via email to