Skip to content

unable to call wiringPiSPIDataRW? #9

@Tuckie

Description

@Tuckie

How are you supposed to pass the data variable into wiringPiSPIDataRW by reference? I've tried a variety of ctypes with no luck.
Trying something like:

mydata = (ctypes.c_ubyte * 2)()
returncode = wiringpi.wiringPiSPIDataRW(pin,ctypes.byref(mydata), 2)

All I get is:
TypeError: in method 'wiringPiSPIDataRW', argument 2 of type 'char *'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions