diff options
| author | hathach <[email protected]> | 2018-08-28 12:18:10 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-08-28 13:15:03 +0700 |
| commit | b0d14e2e412dded8c13f1a7e8af9e2703d746752 (patch) | |
| tree | 390881ab07835931d3e1f2a02eaf655c94a821fd | |
| parent | 030c64b9cd7ea7ea0a9686f6436ed84736ff80b4 (diff) | |
minor nrf52 driver correct
| -rw-r--r-- | src/class/cdc/cdc_device.c | 5 | ||||
| -rw-r--r-- | src/portable/nordic/nrf5x/dcd_nrf5x.c | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/class/cdc/cdc_device.c b/src/class/cdc/cdc_device.c index 2a598f051..b378689e1 100644 --- a/src/class/cdc/cdc_device.c +++ b/src/class/cdc/cdc_device.c @@ -293,16 +293,15 @@ tusb_error_t cdcd_control_request_st(uint8_t rhport, tusb_control_request_t cons }
else if (CDC_REQUEST_SET_CONTROL_LINE_STATE == p_request->bRequest )
{
+ dcd_control_status(rhport, p_request->bmRequestType_bit.direction); // ACK control request
+
// CDC PSTN v1.2 section 6.3.12
// Bit 0: Indicates if DTE is present or not.
// This signal corresponds to V.24 signal 108/2 and RS-232 signal DTR (Data Terminal Ready)
// Bit 1: Carrier control for half-duplex modems.
// This signal corresponds to V.24 signal 105 and RS-232 signal RTS (Request to Send)
-
p_cdc->line_state = (uint8_t) p_request->wValue;
- dcd_control_status(rhport, p_request->bmRequestType_bit.direction); // ACK control request
-
// Invoke callback
if ( tud_cdc_line_state_cb) tud_cdc_line_state_cb(itf, BIT_TEST_(p_request->wValue, 0), BIT_TEST_(p_request->wValue, 1));
}
diff --git a/src/portable/nordic/nrf5x/dcd_nrf5x.c b/src/portable/nordic/nrf5x/dcd_nrf5x.c index b27d6c0ae..f9a278a49 100644 --- a/src/portable/nordic/nrf5x/dcd_nrf5x.c +++ b/src/portable/nordic/nrf5x/dcd_nrf5x.c @@ -60,7 +60,8 @@ enum MAX_PACKET_SIZE = 64, // Mask of all END event (IN & OUT) for all endpoints. ENDEPIN0-7, ENDEPOUT0-7, ENDISOIN, ENDISOOUT - EDPT_END_ALL_MASK = 0x1FFBFCUL + EDPT_END_ALL_MASK = (0xff << USBD_INTEN_ENDEPIN0_Pos) | (0xff << USBD_INTEN_ENDEPOUT0_Pos) | + USBD_INTENCLR_ENDISOIN_Msk | USBD_INTEN_ENDISOOUT_Msk }; /*------------------------------------------------------------------*/ @@ -401,7 +402,7 @@ void USBD_IRQHandler(void) volatile uint32_t* regevt = &NRF_USBD->EVENTS_USBRESET; - for(int i=0; i<32; i++) + for(int i=0; i<USBD_INTEN_EPDATA_Pos+1; i++) { if ( BIT_TEST_(inten, i) && regevt[i] ) { |
