@@ -138,57 +138,69 @@ typedef void (*usb_dc_status_callback)(enum usb_dc_status_code cb_status,
138138/**
139139 * @brief Attach USB for device connection
140140 *
141+ * @deprecated Use @ref udc_api instead
142+ *
141143 * Function to attach USB for device connection. Upon success, the USB PLL
142144 * is enabled, and the USB device is now capable of transmitting and receiving
143145 * on the USB bus and of generating interrupts.
144146 *
145147 * @return 0 on success, negative errno code on fail.
146148 */
147- int usb_dc_attach (void );
149+ __deprecated int usb_dc_attach (void );
148150
149151/**
150152 * @brief Detach the USB device
151153 *
154+ * @deprecated Use @ref udc_api instead
155+ *
152156 * Function to detach the USB device. Upon success, the USB hardware PLL
153157 * is powered down and USB communication is disabled.
154158 *
155159 * @return 0 on success, negative errno code on fail.
156160 */
157- int usb_dc_detach (void );
161+ __deprecated int usb_dc_detach (void );
158162
159163/**
160164 * @brief Reset the USB device
161165 *
166+ * @deprecated Use @ref udc_api instead
167+ *
162168 * This function returns the USB device and firmware back to it's initial state.
163169 * N.B. the USB PLL is handled by the usb_detach function
164170 *
165171 * @return 0 on success, negative errno code on fail.
166172 */
167- int usb_dc_reset (void );
173+ __deprecated int usb_dc_reset (void );
168174
169175/**
170176 * @brief Set USB device address
171177 *
178+ * @deprecated Use @ref udc_api instead
179+ *
172180 * @param[in] addr Device address
173181 *
174182 * @return 0 on success, negative errno code on fail.
175183 */
176- int usb_dc_set_address (const uint8_t addr );
184+ __deprecated int usb_dc_set_address (const uint8_t addr );
177185
178186/**
179187 * @brief Set USB device controller status callback
180188 *
189+ * @deprecated Use @ref udc_api instead
190+ *
181191 * Function to set USB device controller status callback. The registered
182192 * callback is used to report changes in the status of the device controller.
183193 * The status code are described by the usb_dc_status_code enumeration.
184194 *
185195 * @param[in] cb Callback function
186196 */
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 );
188198
189199/**
190200 * @brief check endpoint capabilities
191201 *
202+ * @deprecated Use @ref udc_api instead
203+ *
192204 * Function to check capabilities of an endpoint. usb_dc_ep_cfg_data structure
193205 * provides the endpoint configuration parameters: endpoint address,
194206 * endpoint maximum packet size and endpoint type.
@@ -199,11 +211,13 @@ void usb_dc_set_status_callback(const usb_dc_status_callback cb);
199211 *
200212 * @return 0 on success, negative errno code on fail.
201213 */
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 );
203215
204216/**
205217 * @brief Configure endpoint
206218 *
219+ * @deprecated Use @ref udc_api instead
220+ *
207221 * Function to configure an endpoint. usb_dc_ep_cfg_data structure provides
208222 * the endpoint configuration parameters: endpoint address, endpoint maximum
209223 * packet size and endpoint type.
@@ -212,52 +226,62 @@ int usb_dc_ep_check_cap(const struct usb_dc_ep_cfg_data * const cfg);
212226 *
213227 * @return 0 on success, negative errno code on fail.
214228 */
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 );
216230
217231/**
218232 * @brief Set stall condition for the selected endpoint
219233 *
234+ * @deprecated Use @ref udc_api instead
235+ *
220236 * @param[in] ep Endpoint address corresponding to the one
221237 * listed in the device configuration table
222238 *
223239 * @return 0 on success, negative errno code on fail.
224240 */
225- int usb_dc_ep_set_stall (const uint8_t ep );
241+ __deprecated int usb_dc_ep_set_stall (const uint8_t ep );
226242
227243/**
228244 * @brief Clear stall condition for the selected endpoint
229245 *
246+ * @deprecated Use @ref udc_api instead
247+ *
230248 * @param[in] ep Endpoint address corresponding to the one
231249 * listed in the device configuration table
232250 *
233251 * @return 0 on success, negative errno code on fail.
234252 */
235- int usb_dc_ep_clear_stall (const uint8_t ep );
253+ __deprecated int usb_dc_ep_clear_stall (const uint8_t ep );
236254
237255/**
238256 * @brief Check if the selected endpoint is stalled
239257 *
258+ * @deprecated Use @ref udc_api instead
259+ *
240260 * @param[in] ep Endpoint address corresponding to the one
241261 * listed in the device configuration table
242262 * @param[out] stalled Endpoint stall status
243263 *
244264 * @return 0 on success, negative errno code on fail.
245265 */
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 );
247267
248268/**
249269 * @brief Halt the selected endpoint
250270 *
271+ * @deprecated Use @ref udc_api instead
272+ *
251273 * @param[in] ep Endpoint address corresponding to the one
252274 * listed in the device configuration table
253275 *
254276 * @return 0 on success, negative errno code on fail.
255277 */
256- int usb_dc_ep_halt (const uint8_t ep );
278+ __deprecated int usb_dc_ep_halt (const uint8_t ep );
257279
258280/**
259281 * @brief Enable the selected endpoint
260282 *
283+ * @deprecated Use @ref udc_api instead
284+ *
261285 * Function to enable the selected endpoint. Upon success interrupts are
262286 * enabled for the corresponding endpoint and the endpoint is ready for
263287 * transmitting/receiving data.
@@ -267,11 +291,13 @@ int usb_dc_ep_halt(const uint8_t ep);
267291 *
268292 * @return 0 on success, negative errno code on fail.
269293 */
270- int usb_dc_ep_enable (const uint8_t ep );
294+ __deprecated int usb_dc_ep_enable (const uint8_t ep );
271295
272296/**
273297 * @brief Disable the selected endpoint
274298 *
299+ * @deprecated Use @ref udc_api instead
300+ *
275301 * Function to disable the selected endpoint. Upon success interrupts are
276302 * disabled for the corresponding endpoint and the endpoint is no longer able
277303 * for transmitting/receiving data.
@@ -281,23 +307,27 @@ int usb_dc_ep_enable(const uint8_t ep);
281307 *
282308 * @return 0 on success, negative errno code on fail.
283309 */
284- int usb_dc_ep_disable (const uint8_t ep );
310+ __deprecated int usb_dc_ep_disable (const uint8_t ep );
285311
286312/**
287313 * @brief Flush the selected endpoint
288314 *
315+ * @deprecated Use @ref udc_api instead
316+ *
289317 * This function flushes the FIFOs for the selected endpoint.
290318 *
291319 * @param[in] ep Endpoint address corresponding to the one
292320 * listed in the device configuration table
293321 *
294322 * @return 0 on success, negative errno code on fail.
295323 */
296- int usb_dc_ep_flush (const uint8_t ep );
324+ __deprecated int usb_dc_ep_flush (const uint8_t ep );
297325
298326/**
299327 * @brief Write data to the specified endpoint
300328 *
329+ * @deprecated Use @ref udc_api instead
330+ *
301331 * This function is called to write data to the specified endpoint. The
302332 * supplied usb_ep_callback function will be called when data is transmitted
303333 * out.
@@ -313,12 +343,14 @@ int usb_dc_ep_flush(const uint8_t ep);
313343 *
314344 * @return 0 on success, negative errno code on fail.
315345 */
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 ,
317347 const uint32_t data_len , uint32_t * const ret_bytes );
318348
319349/**
320350 * @brief Read data from the specified endpoint
321351 *
352+ * @deprecated Use @ref udc_api instead
353+ *
322354 * This function is called by the endpoint handler function, after an OUT
323355 * interrupt has been received for that EP. The application must only call this
324356 * 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,
335367 *
336368 * @return 0 on success, negative errno code on fail.
337369 */
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 ,
339371 const uint32_t max_data_len , uint32_t * const read_bytes );
340372
341373/**
342374 * @brief Set callback function for the specified endpoint
343375 *
376+ * @deprecated Use @ref udc_api instead
377+ *
344378 * Function to set callback function for notification of data received and
345379 * available to application or transmit done on the selected endpoint,
346380 * 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,
352386 *
353387 * @return 0 on success, negative errno code on fail.
354388 */
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 );
356390
357391/**
358392 * @brief Read data from the specified endpoint
359393 *
394+ * @deprecated Use @ref udc_api instead
395+ *
360396 * This is similar to usb_dc_ep_read, the difference being that, it doesn't
361397 * clear the endpoint NAKs so that the consumer is not bogged down by further
362398 * 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);
372408 *
373409 * @return 0 on success, negative errno code on fail.
374410 */
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 ,
376412 uint32_t * read_bytes );
377413
378414/**
379415 * @brief Continue reading data from the endpoint
380416 *
417+ * @deprecated Use @ref udc_api instead
418+ *
381419 * Clear the endpoint NAK and enable the endpoint to accept more data
382420 * from the host. Usually called after usb_dc_ep_read_wait() when the consumer
383421 * 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,
388426 *
389427 * @return 0 on success, negative errno code on fail.
390428 */
391- int usb_dc_ep_read_continue (uint8_t ep );
429+ __deprecated int usb_dc_ep_read_continue (uint8_t ep );
392430
393431/**
394432 * @brief Get endpoint max packet size
395433 *
434+ * @deprecated Use @ref udc_api instead
435+ *
396436 * @param[in] ep Endpoint address corresponding to the one
397437 * listed in the device configuration table
398438 *
399439 * @return Endpoint max packet size (mps)
400440 */
401- int usb_dc_ep_mps (uint8_t ep );
441+ __deprecated int usb_dc_ep_mps (uint8_t ep );
402442
403443/**
404444 * @brief Start the host wake up procedure.
405445 *
446+ * @deprecated Use @ref udc_api instead
447+ *
406448 * Function to wake up the host if it's currently in sleep mode.
407449 *
408450 * @return 0 on success, negative errno code on fail.
409451 */
410- int usb_dc_wakeup_request (void );
452+ __deprecated int usb_dc_wakeup_request (void );
411453
412454/**
413455 * @}
0 commit comments