@@ -325,7 +325,7 @@ static void udd_sleep_mode(bool b_idle)
325
325
/**
326
326
* \name Control endpoint low level management routine.
327
327
*
328
- * This function performs control endpoint mangement .
328
+ * This function performs control endpoint management .
329
329
* It handle the SETUP/DATA/HANDSHAKE phases of a control transaction.
330
330
*/
331
331
//@{
@@ -397,9 +397,9 @@ static void udd_ctrl_endofrequest(void);
397
397
/**
398
398
* \brief Main interrupt routine for control endpoint
399
399
*
400
- * This switchs control endpoint events to correct sub function.
400
+ * This switches control endpoint events to correct sub function.
401
401
*
402
- * \return \c 1 if an event about control endpoint is occured , otherwise \c 0.
402
+ * \return \c 1 if an event about control endpoint is occurred , otherwise \c 0.
403
403
*/
404
404
static bool udd_ctrl_interrupt (void );
405
405
@@ -410,7 +410,7 @@ static bool udd_ctrl_interrupt(void);
410
410
* \name Management of bulk/interrupt/isochronous endpoints
411
411
*
412
412
* The UDD manages the data transfer on endpoints:
413
- * - Start data tranfer on endpoint with USB Device DMA
413
+ * - Start data transfer on endpoint with USB Device DMA
414
414
* - Send a ZLP packet if requested
415
415
* - Call callback registered to signal end of transfer
416
416
* The transfer abort and stall feature are supported.
@@ -431,7 +431,7 @@ typedef struct {
431
431
uint8_t * buf ;
432
432
//! Size of buffer to send or fill
433
433
iram_size_t buf_size ;
434
- //!< Size of data transfered
434
+ //!< Size of data transferred
435
435
iram_size_t buf_cnt ;
436
436
//!< Size of data loaded (or prepared for DMA) last time
437
437
iram_size_t buf_load ;
@@ -486,7 +486,7 @@ static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_n
486
486
487
487
#ifdef UDD_EP_DMA_SUPPORTED
488
488
/**
489
- * \brief Start the next transfer if necessary or complet the job associated.
489
+ * \brief Start the next transfer if necessary or complete the job associated.
490
490
*
491
491
* \param ep endpoint number without direction flag
492
492
*/
@@ -496,9 +496,9 @@ static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_n
496
496
/**
497
497
* \brief Main interrupt routine for bulk/interrupt/isochronous endpoints
498
498
*
499
- * This switchs endpoint events to correct sub function.
499
+ * This switches endpoint events to correct sub function.
500
500
*
501
- * \return \c 1 if an event about bulk/interrupt/isochronous endpoints has occured , otherwise \c 0.
501
+ * \return \c 1 if an event about bulk/interrupt/isochronous endpoints has occurred , otherwise \c 0.
502
502
*/
503
503
static bool udd_ep_interrupt (void );
504
504
@@ -520,7 +520,7 @@ static bool udd_ep_interrupt(void);
520
520
*
521
521
* Note:
522
522
* Here, the global interrupt mask is not clear when an USB interrupt is enabled
523
- * because this one can not be occured during the USB ISR (=during INTX is masked).
523
+ * because this one can not be occurred during the USB ISR (=during INTX is masked).
524
524
* See Technical reference $3.8.3 Masking interrupt requests in peripheral modules.
525
525
*/
526
526
#ifdef UHD_ENABLE
@@ -787,7 +787,7 @@ void udd_attach(void)
787
787
udd_sleep_mode (true);
788
788
otg_unfreeze_clock ();
789
789
790
- // This section of clock check can be improved with a chek of
790
+ // This section of clock check can be improved with a check of
791
791
// USB clock source via sysclk()
792
792
// Check USB clock because the source can be a PLL
793
793
while (!Is_otg_clock_usable ());
@@ -803,7 +803,7 @@ void udd_attach(void)
803
803
#ifdef USB_DEVICE_HS_SUPPORT
804
804
udd_enable_msof_interrupt ();
805
805
#endif
806
- // Reset following interupts flag
806
+ // Reset following interrupts flag
807
807
udd_ack_reset ();
808
808
udd_ack_sof ();
809
809
udd_ack_msof ();
@@ -902,7 +902,7 @@ bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes,
902
902
}
903
903
dbg_print ("alloc(%x, %d) " , ep , MaxEndpointSize );
904
904
905
- // Bank choise
905
+ // Bank choice
906
906
switch (bmAttributes & USB_EP_TYPE_MASK ) {
907
907
case USB_EP_TYPE_ISOCHRONOUS :
908
908
nb_bank = UDD_ISOCHRONOUS_NB_BANK (ep );
@@ -1228,7 +1228,7 @@ bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
1228
1228
1229
1229
if (Is_udd_endpoint_stall_requested (ep )
1230
1230
|| ptr_job -> stall_requested ) {
1231
- // Endpoint halted then registes the callback
1231
+ // Endpoint halted then registers the callback
1232
1232
ptr_job -> busy = true;
1233
1233
ptr_job -> call_nohalt = callback ;
1234
1234
} else {
@@ -1386,7 +1386,7 @@ static void udd_ctrl_setup_received(void)
1386
1386
1387
1387
// Decode setup request
1388
1388
if (udc_process_setup () == false) {
1389
- // Setup request unknow then stall it
1389
+ // Setup request unknown then stall it
1390
1390
udd_ctrl_stall_data ();
1391
1391
udd_ack_setup_received (0 );
1392
1392
return ;
@@ -1447,7 +1447,7 @@ static void udd_ctrl_in_sent(void)
1447
1447
udd_ctrl_prev_payload_buf_cnt += udd_ctrl_payload_buf_cnt ;
1448
1448
if ((udd_g_ctrlreq .req .wLength == udd_ctrl_prev_payload_buf_cnt )
1449
1449
|| b_shortpacket ) {
1450
- // All data requested are transfered or a short packet has been sent
1450
+ // All data requested are transferred or a short packet has been sent
1451
1451
// then it is the end of data phase.
1452
1452
// Generate an OUT ZLP for handshake phase.
1453
1453
udd_ctrl_send_zlp_out ();
@@ -1516,7 +1516,7 @@ static void udd_ctrl_out_received(void)
1516
1516
// End of SETUP request:
1517
1517
// - Data IN Phase aborted,
1518
1518
// - or last Data IN Phase hidden by ZLP OUT sending quiclky,
1519
- // - or ZLP OUT received normaly .
1519
+ // - or ZLP OUT received normally .
1520
1520
udd_ctrl_endofrequest ();
1521
1521
} else {
1522
1522
// Protocol error during SETUP request
@@ -1544,7 +1544,7 @@ static void udd_ctrl_out_received(void)
1544
1544
(udd_ctrl_prev_payload_buf_cnt +
1545
1545
udd_ctrl_payload_buf_cnt ))) {
1546
1546
// End of reception because it is a short packet
1547
- // Before send ZLP, call intermediat calback
1547
+ // Before send ZLP, call intermediate callback
1548
1548
// in case of data receiv generate a stall
1549
1549
udd_g_ctrlreq .payload_size = udd_ctrl_payload_buf_cnt ;
1550
1550
if (NULL != udd_g_ctrlreq .over_under_run ) {
@@ -1565,7 +1565,7 @@ static void udd_ctrl_out_received(void)
1565
1565
if (udd_g_ctrlreq .payload_size == udd_ctrl_payload_buf_cnt ) {
1566
1566
// Overrun then request a new payload buffer
1567
1567
if (!udd_g_ctrlreq .over_under_run ) {
1568
- // No callback availabled to request a new payload buffer
1568
+ // No callback available to request a new payload buffer
1569
1569
udd_ctrl_stall_data ();
1570
1570
// Ack reception of OUT to replace NAK by a STALL
1571
1571
udd_ack_out_received (0 );
@@ -1805,7 +1805,7 @@ static void udd_ep_trans_done(udd_ep_id_t ep)
1805
1805
// transfer size of UDD_ENDPOINT_MAX_TRANS Bytes
1806
1806
next_trans = UDD_ENDPOINT_MAX_TRANS ;
1807
1807
1808
- // Set 0 to tranfer the maximum
1808
+ // Set 0 to transfer the maximum
1809
1809
udd_dma_ctrl = UOTGHS_DEVDMACONTROL_BUFF_LENGTH (0 );
1810
1810
} else {
1811
1811
udd_dma_ctrl = UOTGHS_DEVDMACONTROL_BUFF_LENGTH (next_trans );
@@ -1850,7 +1850,7 @@ static void udd_ep_trans_done(udd_ep_id_t ep)
1850
1850
}
1851
1851
cpu_irq_restore (flags );
1852
1852
1853
- // Here a ZLP has been recieved
1853
+ // Here a ZLP has been received
1854
1854
// and the DMA transfer must be not started.
1855
1855
// It is the end of transfer
1856
1856
ptr_job -> buf_size = ptr_job -> buf_cnt ;
@@ -1991,13 +1991,13 @@ static bool udd_ep_interrupt(void)
1991
1991
}
1992
1992
dbg_print ("dma%x: " , ep );
1993
1993
udd_disable_endpoint_dma_interrupt (ep );
1994
- // Save number of data no transfered
1994
+ // Save number of data no transferred
1995
1995
nb_remaining = (udd_endpoint_dma_get_status (ep ) &
1996
1996
UOTGHS_DEVDMASTATUS_BUFF_COUNT_Msk )
1997
1997
>> UOTGHS_DEVDMASTATUS_BUFF_COUNT_Pos ;
1998
1998
if (nb_remaining ) {
1999
1999
// Transfer no complete (short packet or ZLP) then:
2000
- // Update number of data transfered
2000
+ // Update number of data transferred
2001
2001
ptr_job -> buf_cnt -= nb_remaining ;
2002
2002
// Set transfer complete to stop the transfer
2003
2003
ptr_job -> buf_size = ptr_job -> buf_cnt ;
@@ -2056,7 +2056,7 @@ static bool udd_ep_interrupt(void)
2056
2056
udd_disable_endpoint_interrupt (ep );
2057
2057
2058
2058
Assert (ptr_job -> stall_requested );
2059
- // A stall has been requested during backgound transfer
2059
+ // A stall has been requested during background transfer
2060
2060
ptr_job -> stall_requested = false;
2061
2061
udd_disable_endpoint_bank_autoswitch (ep );
2062
2062
udd_enable_stall_handshake (ep );
0 commit comments