summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/usb.c')
-rw-r--r--stmhal/usb.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/stmhal/usb.c b/stmhal/usb.c
index dd6daf8e5d..b0a66ef9b0 100644
--- a/stmhal/usb.c
+++ b/stmhal/usb.c
@@ -40,7 +40,6 @@
#include "py/mperrno.h"
#include "bufhelper.h"
#include "usb.h"
-#include "pybioctl.h"
#if defined(USE_USB_FS)
#define USB_PHY_ID USB_PHY_FS_ID
@@ -502,14 +501,14 @@ STATIC mp_uint_t pyb_usb_vcp_write(mp_obj_t self_in, const void *buf, mp_uint_t
STATIC mp_uint_t pyb_usb_vcp_ioctl(mp_obj_t self_in, mp_uint_t request, mp_uint_t arg, int *errcode) {
mp_uint_t ret;
- if (request == MP_IOCTL_POLL) {
+ if (request == MP_STREAM_POLL) {
mp_uint_t flags = arg;
ret = 0;
- if ((flags & MP_IOCTL_POLL_RD) && USBD_CDC_RxNum() > 0) {
- ret |= MP_IOCTL_POLL_RD;
+ if ((flags & MP_STREAM_POLL_RD) && USBD_CDC_RxNum() > 0) {
+ ret |= MP_STREAM_POLL_RD;
}
- if ((flags & MP_IOCTL_POLL_WR) && USBD_CDC_TxHalfEmpty()) {
- ret |= MP_IOCTL_POLL_WR;
+ if ((flags & MP_STREAM_POLL_WR) && USBD_CDC_TxHalfEmpty()) {
+ ret |= MP_STREAM_POLL_WR;
}
} else {
*errcode = MP_EINVAL;
@@ -632,11 +631,11 @@ STATIC MP_DEFINE_CONST_DICT(pyb_usb_hid_locals_dict, pyb_usb_hid_locals_dict_tab
STATIC mp_uint_t pyb_usb_hid_ioctl(mp_obj_t self_in, mp_uint_t request, mp_uint_t arg, int *errcode) {
mp_uint_t ret;
- if (request == MP_IOCTL_POLL) {
+ if (request == MP_STREAM_POLL) {
mp_uint_t flags = arg;
ret = 0;
- if ((flags & MP_IOCTL_POLL_WR) && USBD_HID_CanSendReport(&hUSBDDevice)) {
- ret |= MP_IOCTL_POLL_WR;
+ if ((flags & MP_STREAM_POLL_WR) && USBD_HID_CanSendReport(&hUSBDDevice)) {
+ ret |= MP_STREAM_POLL_WR;
}
} else {
*errcode = MP_EINVAL;