mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-20 17:44:20 +08:00
[fix][usb]return data type as rt_ssize_t
rt_ssize_t can give negative error code, which follows the unix style correctly
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
* 2012-12-12 heyuanjie87 change endpoint and function handler
|
||||
* 2013-04-26 aozima add DEVICEQUALIFIER support.
|
||||
* 2017-11-15 ZYH fix ep0 transform error
|
||||
* 2023-10-11 ChuShicheng change rt_size_t to rt_ssize_t
|
||||
*/
|
||||
|
||||
#ifndef __USB_DEVICE_H__
|
||||
@@ -86,9 +87,9 @@ struct udcd_ops
|
||||
rt_err_t (*ep_clear_stall)(rt_uint8_t address);
|
||||
rt_err_t (*ep_enable)(struct uendpoint* ep);
|
||||
rt_err_t (*ep_disable)(struct uendpoint* ep);
|
||||
rt_size_t (*ep_read_prepare)(rt_uint8_t address, void *buffer, rt_size_t size);
|
||||
rt_size_t (*ep_read)(rt_uint8_t address, void *buffer);
|
||||
rt_size_t (*ep_write)(rt_uint8_t address, void *buffer, rt_size_t size);
|
||||
rt_ssize_t (*ep_read_prepare)(rt_uint8_t address, void *buffer, rt_size_t size);
|
||||
rt_ssize_t (*ep_read)(rt_uint8_t address, void *buffer);
|
||||
rt_ssize_t (*ep_write)(rt_uint8_t address, void *buffer, rt_size_t size);
|
||||
rt_err_t (*ep0_send_status)(void);
|
||||
rt_err_t (*suspend)(void);
|
||||
rt_err_t (*wakeup)(void);
|
||||
|
||||
Reference in New Issue
Block a user