File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,12 @@ config UDC_BUF_FORCE_NOCACHE
42
42
Place the buffer pools in the nocache memory region if the driver
43
43
cannot handle buffers in cached memory.
44
44
45
+ config UDC_ENABLE_SOF
46
+ bool "SOF interrupt processing"
47
+ help
48
+ Enabled SoF interrupts can cause a very high CPU load on high-speed
49
+ controllers because the interrupt rate would be 125 µs.
50
+
45
51
config UDC_WORKQUEUE
46
52
bool "Use a dedicate work queue for UDC drivers"
47
53
help
Original file line number Diff line number Diff line change @@ -156,6 +156,29 @@ int udc_submit_event(const struct device *dev,
156
156
int udc_submit_ep_event (const struct device * dev ,
157
157
struct net_buf * const buf ,
158
158
const int err );
159
+
160
+ /**
161
+ * @brief Helper function to send UDC SOF event to a higher level.
162
+ *
163
+ * Type of this event is hardcoded to UDC_EVT_SOF.
164
+ *
165
+ * @param[in] dev Pointer to device struct of the driver instance
166
+ */
167
+ #if defined(CONFIG_UDC_ENABLE_SOF )
168
+ static inline void udc_submit_sof_event (const struct device * dev )
169
+ {
170
+ struct udc_data * data = dev -> data ;
171
+ struct udc_event drv_evt = {
172
+ .type = UDC_EVT_SOF ,
173
+ .dev = dev ,
174
+ };
175
+
176
+ (void )data -> event_cb (dev , & drv_evt );
177
+ }
178
+ #else
179
+ #define udc_submit_sof_event (dev ) ARG_UNUSED(dev)
180
+ #endif
181
+
159
182
/**
160
183
* @brief Helper function to enable endpoint.
161
184
*
You can’t perform that action at this time.
0 commit comments