Interface Description
This section describes the major interface struct wd_drv_dio_if (for details, see WD User-Mode Driver Layer Interfaces: WD Southbound Interfaces) and the array struct wd_drv_dio_if hw_dio_tbl[]. The struct wd_drv_dio_if interface abstracts the key functions (open/close/send/recv) of the WD basic layer. Hardware can adapt to the WD framework by implementing these functions. The precautions for using these interfaces are described in the following scenarios.
Pay attention to the following when using these interfaces:
- In the drv directory, you need to add a code file to implement the open, close, send, and recv functions defined in the struct wd_drv_dio_if structure.
- In wd_adapter.c, extend the hw_dio_tbl array, add an array member based on the function added in step 1, and specify hw_type of the member. Note that the hw_type string must match the API of the device registered with the UACCE. You can run the cat /sys/class/uacce/*/attrs/api command to list the APIs of the devices that are registered with the UACCE.