@@ -138,57 +138,69 @@ typedef void (*usb_dc_status_callback)(enum usb_dc_status_code cb_status,
138
138
/**
139
139
* @brief Attach USB for device connection
140
140
*
141
+ * @deprecated Use @ref udc_api instead
142
+ *
141
143
* Function to attach USB for device connection. Upon success, the USB PLL
142
144
* is enabled, and the USB device is now capable of transmitting and receiving
143
145
* on the USB bus and of generating interrupts.
144
146
*
145
147
* @return 0 on success, negative errno code on fail.
146
148
*/
147
- int usb_dc_attach (void );
149
+ __deprecated int usb_dc_attach (void );
148
150
149
151
/**
150
152
* @brief Detach the USB device
151
153
*
154
+ * @deprecated Use @ref udc_api instead
155
+ *
152
156
* Function to detach the USB device. Upon success, the USB hardware PLL
153
157
* is powered down and USB communication is disabled.
154
158
*
155
159
* @return 0 on success, negative errno code on fail.
156
160
*/
157
- int usb_dc_detach (void );
161
+ __deprecated int usb_dc_detach (void );
158
162
159
163
/**
160
164
* @brief Reset the USB device
161
165
*
166
+ * @deprecated Use @ref udc_api instead
167
+ *
162
168
* This function returns the USB device and firmware back to it's initial state.
163
169
* N.B. the USB PLL is handled by the usb_detach function
164
170
*
165
171
* @return 0 on success, negative errno code on fail.
166
172
*/
167
- int usb_dc_reset (void );
173
+ __deprecated int usb_dc_reset (void );
168
174
169
175
/**
170
176
* @brief Set USB device address
171
177
*
178
+ * @deprecated Use @ref udc_api instead
179
+ *
172
180
* @param[in] addr Device address
173
181
*
174
182
* @return 0 on success, negative errno code on fail.
175
183
*/
176
- int usb_dc_set_address (const uint8_t addr );
184
+ __deprecated int usb_dc_set_address (const uint8_t addr );
177
185
178
186
/**
179
187
* @brief Set USB device controller status callback
180
188
*
189
+ * @deprecated Use @ref udc_api instead
190
+ *
181
191
* Function to set USB device controller status callback. The registered
182
192
* callback is used to report changes in the status of the device controller.
183
193
* The status code are described by the usb_dc_status_code enumeration.
184
194
*
185
195
* @param[in] cb Callback function
186
196
*/
187
- void usb_dc_set_status_callback (const usb_dc_status_callback cb );
197
+ __deprecated void usb_dc_set_status_callback (const usb_dc_status_callback cb );
188
198
189
199
/**
190
200
* @brief check endpoint capabilities
191
201
*
202
+ * @deprecated Use @ref udc_api instead
203
+ *
192
204
* Function to check capabilities of an endpoint. usb_dc_ep_cfg_data structure
193
205
* provides the endpoint configuration parameters: endpoint address,
194
206
* endpoint maximum packet size and endpoint type.
@@ -199,11 +211,13 @@ void usb_dc_set_status_callback(const usb_dc_status_callback cb);
199
211
*
200
212
* @return 0 on success, negative errno code on fail.
201
213
*/
202
- int usb_dc_ep_check_cap (const struct usb_dc_ep_cfg_data * const cfg );
214
+ __deprecated int usb_dc_ep_check_cap (const struct usb_dc_ep_cfg_data * const cfg );
203
215
204
216
/**
205
217
* @brief Configure endpoint
206
218
*
219
+ * @deprecated Use @ref udc_api instead
220
+ *
207
221
* Function to configure an endpoint. usb_dc_ep_cfg_data structure provides
208
222
* the endpoint configuration parameters: endpoint address, endpoint maximum
209
223
* packet size and endpoint type.
@@ -212,52 +226,62 @@ int usb_dc_ep_check_cap(const struct usb_dc_ep_cfg_data * const cfg);
212
226
*
213
227
* @return 0 on success, negative errno code on fail.
214
228
*/
215
- int usb_dc_ep_configure (const struct usb_dc_ep_cfg_data * const cfg );
229
+ __deprecated int usb_dc_ep_configure (const struct usb_dc_ep_cfg_data * const cfg );
216
230
217
231
/**
218
232
* @brief Set stall condition for the selected endpoint
219
233
*
234
+ * @deprecated Use @ref udc_api instead
235
+ *
220
236
* @param[in] ep Endpoint address corresponding to the one
221
237
* listed in the device configuration table
222
238
*
223
239
* @return 0 on success, negative errno code on fail.
224
240
*/
225
- int usb_dc_ep_set_stall (const uint8_t ep );
241
+ __deprecated int usb_dc_ep_set_stall (const uint8_t ep );
226
242
227
243
/**
228
244
* @brief Clear stall condition for the selected endpoint
229
245
*
246
+ * @deprecated Use @ref udc_api instead
247
+ *
230
248
* @param[in] ep Endpoint address corresponding to the one
231
249
* listed in the device configuration table
232
250
*
233
251
* @return 0 on success, negative errno code on fail.
234
252
*/
235
- int usb_dc_ep_clear_stall (const uint8_t ep );
253
+ __deprecated int usb_dc_ep_clear_stall (const uint8_t ep );
236
254
237
255
/**
238
256
* @brief Check if the selected endpoint is stalled
239
257
*
258
+ * @deprecated Use @ref udc_api instead
259
+ *
240
260
* @param[in] ep Endpoint address corresponding to the one
241
261
* listed in the device configuration table
242
262
* @param[out] stalled Endpoint stall status
243
263
*
244
264
* @return 0 on success, negative errno code on fail.
245
265
*/
246
- int usb_dc_ep_is_stalled (const uint8_t ep , uint8_t * const stalled );
266
+ __deprecated int usb_dc_ep_is_stalled (const uint8_t ep , uint8_t * const stalled );
247
267
248
268
/**
249
269
* @brief Halt the selected endpoint
250
270
*
271
+ * @deprecated Use @ref udc_api instead
272
+ *
251
273
* @param[in] ep Endpoint address corresponding to the one
252
274
* listed in the device configuration table
253
275
*
254
276
* @return 0 on success, negative errno code on fail.
255
277
*/
256
- int usb_dc_ep_halt (const uint8_t ep );
278
+ __deprecated int usb_dc_ep_halt (const uint8_t ep );
257
279
258
280
/**
259
281
* @brief Enable the selected endpoint
260
282
*
283
+ * @deprecated Use @ref udc_api instead
284
+ *
261
285
* Function to enable the selected endpoint. Upon success interrupts are
262
286
* enabled for the corresponding endpoint and the endpoint is ready for
263
287
* transmitting/receiving data.
@@ -267,11 +291,13 @@ int usb_dc_ep_halt(const uint8_t ep);
267
291
*
268
292
* @return 0 on success, negative errno code on fail.
269
293
*/
270
- int usb_dc_ep_enable (const uint8_t ep );
294
+ __deprecated int usb_dc_ep_enable (const uint8_t ep );
271
295
272
296
/**
273
297
* @brief Disable the selected endpoint
274
298
*
299
+ * @deprecated Use @ref udc_api instead
300
+ *
275
301
* Function to disable the selected endpoint. Upon success interrupts are
276
302
* disabled for the corresponding endpoint and the endpoint is no longer able
277
303
* for transmitting/receiving data.
@@ -281,23 +307,27 @@ int usb_dc_ep_enable(const uint8_t ep);
281
307
*
282
308
* @return 0 on success, negative errno code on fail.
283
309
*/
284
- int usb_dc_ep_disable (const uint8_t ep );
310
+ __deprecated int usb_dc_ep_disable (const uint8_t ep );
285
311
286
312
/**
287
313
* @brief Flush the selected endpoint
288
314
*
315
+ * @deprecated Use @ref udc_api instead
316
+ *
289
317
* This function flushes the FIFOs for the selected endpoint.
290
318
*
291
319
* @param[in] ep Endpoint address corresponding to the one
292
320
* listed in the device configuration table
293
321
*
294
322
* @return 0 on success, negative errno code on fail.
295
323
*/
296
- int usb_dc_ep_flush (const uint8_t ep );
324
+ __deprecated int usb_dc_ep_flush (const uint8_t ep );
297
325
298
326
/**
299
327
* @brief Write data to the specified endpoint
300
328
*
329
+ * @deprecated Use @ref udc_api instead
330
+ *
301
331
* This function is called to write data to the specified endpoint. The
302
332
* supplied usb_ep_callback function will be called when data is transmitted
303
333
* out.
@@ -313,12 +343,14 @@ int usb_dc_ep_flush(const uint8_t ep);
313
343
*
314
344
* @return 0 on success, negative errno code on fail.
315
345
*/
316
- int usb_dc_ep_write (const uint8_t ep , const uint8_t * const data ,
346
+ __deprecated int usb_dc_ep_write (const uint8_t ep , const uint8_t * const data ,
317
347
const uint32_t data_len , uint32_t * const ret_bytes );
318
348
319
349
/**
320
350
* @brief Read data from the specified endpoint
321
351
*
352
+ * @deprecated Use @ref udc_api instead
353
+ *
322
354
* This function is called by the endpoint handler function, after an OUT
323
355
* interrupt has been received for that EP. The application must only call this
324
356
* function through the supplied usb_ep_callback function. This function clears
@@ -335,12 +367,14 @@ int usb_dc_ep_write(const uint8_t ep, const uint8_t *const data,
335
367
*
336
368
* @return 0 on success, negative errno code on fail.
337
369
*/
338
- int usb_dc_ep_read (const uint8_t ep , uint8_t * const data ,
370
+ __deprecated int usb_dc_ep_read (const uint8_t ep , uint8_t * const data ,
339
371
const uint32_t max_data_len , uint32_t * const read_bytes );
340
372
341
373
/**
342
374
* @brief Set callback function for the specified endpoint
343
375
*
376
+ * @deprecated Use @ref udc_api instead
377
+ *
344
378
* Function to set callback function for notification of data received and
345
379
* available to application or transmit done on the selected endpoint,
346
380
* NULL if callback not required by application code. The callback status
@@ -352,11 +386,13 @@ int usb_dc_ep_read(const uint8_t ep, uint8_t *const data,
352
386
*
353
387
* @return 0 on success, negative errno code on fail.
354
388
*/
355
- int usb_dc_ep_set_callback (const uint8_t ep , const usb_dc_ep_callback cb );
389
+ __deprecated int usb_dc_ep_set_callback (const uint8_t ep , const usb_dc_ep_callback cb );
356
390
357
391
/**
358
392
* @brief Read data from the specified endpoint
359
393
*
394
+ * @deprecated Use @ref udc_api instead
395
+ *
360
396
* This is similar to usb_dc_ep_read, the difference being that, it doesn't
361
397
* clear the endpoint NAKs so that the consumer is not bogged down by further
362
398
* upcalls till he is done with the processing of the data. The caller should
@@ -372,12 +408,14 @@ int usb_dc_ep_set_callback(const uint8_t ep, const usb_dc_ep_callback cb);
372
408
*
373
409
* @return 0 on success, negative errno code on fail.
374
410
*/
375
- int usb_dc_ep_read_wait (uint8_t ep , uint8_t * data , uint32_t max_data_len ,
411
+ __deprecated int usb_dc_ep_read_wait (uint8_t ep , uint8_t * data , uint32_t max_data_len ,
376
412
uint32_t * read_bytes );
377
413
378
414
/**
379
415
* @brief Continue reading data from the endpoint
380
416
*
417
+ * @deprecated Use @ref udc_api instead
418
+ *
381
419
* Clear the endpoint NAK and enable the endpoint to accept more data
382
420
* from the host. Usually called after usb_dc_ep_read_wait() when the consumer
383
421
* is fine to accept more data. Thus these calls together act as a flow control
@@ -388,26 +426,30 @@ int usb_dc_ep_read_wait(uint8_t ep, uint8_t *data, uint32_t max_data_len,
388
426
*
389
427
* @return 0 on success, negative errno code on fail.
390
428
*/
391
- int usb_dc_ep_read_continue (uint8_t ep );
429
+ __deprecated int usb_dc_ep_read_continue (uint8_t ep );
392
430
393
431
/**
394
432
* @brief Get endpoint max packet size
395
433
*
434
+ * @deprecated Use @ref udc_api instead
435
+ *
396
436
* @param[in] ep Endpoint address corresponding to the one
397
437
* listed in the device configuration table
398
438
*
399
439
* @return Endpoint max packet size (mps)
400
440
*/
401
- int usb_dc_ep_mps (uint8_t ep );
441
+ __deprecated int usb_dc_ep_mps (uint8_t ep );
402
442
403
443
/**
404
444
* @brief Start the host wake up procedure.
405
445
*
446
+ * @deprecated Use @ref udc_api instead
447
+ *
406
448
* Function to wake up the host if it's currently in sleep mode.
407
449
*
408
450
* @return 0 on success, negative errno code on fail.
409
451
*/
410
- int usb_dc_wakeup_request (void );
452
+ __deprecated int usb_dc_wakeup_request (void );
411
453
412
454
/**
413
455
* @}
0 commit comments