summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/driver/usbh_device_driver.h2
-rw-r--r--include/usbh_hubbed.h13
2 files changed, 12 insertions, 3 deletions
diff --git a/include/driver/usbh_device_driver.h b/include/driver/usbh_device_driver.h
index f8837e0..137b39b 100644
--- a/include/driver/usbh_device_driver.h
+++ b/include/driver/usbh_device_driver.h
@@ -91,7 +91,7 @@ struct _usbh_driver {
void (*init)(void *drvdata);
void (*write)(void *drvdata, const usbh_packet_t *packet);
void (*read)(void *drvdata, usbh_packet_t *packet);
- enum USBH_POLL_STATUS (*poll)(void *drvdata, uint32_t t_us);
+ enum USBH_POLL_STATUS (*poll)(void *drvdata, uint32_t time_curr_us);
uint8_t (*root_speed)(void *drvdata);
// Pointer to Low-level driver data
diff --git a/include/usbh_hubbed.h b/include/usbh_hubbed.h
index 00d3b99..1b6b49a 100644
--- a/include/usbh_hubbed.h
+++ b/include/usbh_hubbed.h
@@ -62,14 +62,23 @@ typedef struct _usbh_dev_driver_info usbh_dev_driver_info_t;
struct _usbh_dev_driver {
bool (*analyze_descriptor)(void *drv, void *descriptor);
void *(*init)(void *usbh_dev);
- void (*poll)(void *drvdata, uint32_t t_us);
+ void (*poll)(void *drvdata, uint32_t time_curr_us);
void (*remove)(void *drvdata);
const usbh_dev_driver_info_t * const info;
};
typedef struct _usbh_dev_driver usbh_dev_driver_t;
void usbh_init(const void *drivers[], const usbh_dev_driver_t * const device_drivers[]);
-void usbh_poll(uint32_t t_us);
+
+/**
+ * \brief usbh_poll
+ * \param time_curr_us - use monotically rising time
+ *
+ * time_curr_us:
+ * * can overflow, in time of this writing, after 1s)
+ * * unit is microseconds
+ */
+void usbh_poll(uint32_t time_curr_us);
END_DECLS