change indent from 4 -> 2 spaces

This commit is contained in:
hathach 2020-04-10 15:01:12 +07:00
parent cec747776d
commit 933e3cdfc7
1 changed files with 507 additions and 505 deletions

View File

@ -70,7 +70,6 @@ static xfer_ctl_t xfer_status[EP_MAX][2];
// Setup the control endpoint 0.
static void bus_reset(void)
{
for (int ep_num = 0; ep_num < USB_OUT_EP_NUM; ep_num++) {
USB0.out_ep_reg[ep_num].doepctl |= USB_DO_SNAK0_M; // DOEPCTL0_SNAK
}
@ -124,7 +123,6 @@ static void bus_reset(void)
static void enum_done_processing(void)
{
ESP_EARLY_LOGV(TAG, "dcd_irq_handler - Speed enumeration done! Sending DCD_EVENT_BUS_RESET then");
// On current silicon on the Full Speed core, speed is fixed to Full Speed.
// However, keep for debugging and in case Low Speed is ever supported.
@ -187,9 +185,9 @@ void dcd_init(uint8_t rhport)
USB0.gotgint = ~0U; //clear OTG ints
USB0.gintsts = ~0U; //clear pending ints
USB0.gintmsk = USB_MODEMISMSK_M |
#if USE_SOF
#if USE_SOF
USB_SOFMSK_M |
#endif
#endif
USB_RXFLVIMSK_M |
USB_ERLYSUSPMSK_M |
USB_USBSUSPMSK_M |
@ -243,7 +241,6 @@ void dcd_connect(uint8_t rhport)
bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const *desc_edpt)
{
ESP_LOGV(TAG, "DCD endpoint opened");
(void)rhport;
@ -630,7 +627,6 @@ static void handle_epout_ints(void)
static void handle_epin_ints(void)
{
// GINTSTS will be cleared with DAINT == 0
// DAINT for a given EP clears when DIEPINTx is cleared.
// IEPINT will be cleared when DAINT's out bits are cleared.
@ -700,11 +696,17 @@ void dcd_irq_handler(uint32_t rhport)
}
#endif
if ((int_status & USB_RXFLVI_M) /*& (int_msk & USB_RXFLVIMSK_M)*/) {
if (int_status & USB_RXFLVI_M) {
ESP_EARLY_LOGV(TAG, "dcd_irq_handler - rx!");
// disable RXFLVI interrupt until we read data from FIFO
USB0.gintmsk &= ~USB_RXFLVIMSK_M;
read_rx_fifo();
// re-enable RXFLVI
USB0.gintmsk |= USB_RXFLVIMSK_M;
USB0.gintsts = USB_RXFLVI_M;
}
@ -738,15 +740,15 @@ void dcd_irq_handler(uint32_t rhport)
USB_PTXFEMP_M;
}
void dcd_int_enable(uint8_t rhport)
void dcd_int_enable (uint8_t rhport)
{
(void)rhport;
esp_intr_alloc(ETS_USB_INTR_SOURCE, ESP_INTR_FLAG_LOWMED, (intr_handler_t)dcd_irq_handler, NULL, &usb_ih);
(void) rhport;
esp_intr_alloc(ETS_USB_INTR_SOURCE, ESP_INTR_FLAG_LOWMED, (intr_handler_t) dcd_irq_handler, NULL, &usb_ih);
}
void dcd_int_disable(uint8_t rhport)
void dcd_int_disable (uint8_t rhport)
{
(void)rhport;
(void) rhport;
esp_intr_free(usb_ih);
}