summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-08-13 18:09:29 +0700
committerhathach <[email protected]>2018-08-13 18:09:29 +0700
commitb07124c623107da46b1125b28092828f487e8c45 (patch)
tree599892f70e8914660c4615aa8c84929d3b7b7609 /src
parentd5e58ba02461f4563ded635ee1173cd3166e0bb1 (diff)
fix issue with cdc write failed sometimes
Diffstat (limited to 'src')
-rw-r--r--src/portable/nordic/nrf5x/dcd_nrf5x.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/portable/nordic/nrf5x/dcd_nrf5x.c b/src/portable/nordic/nrf5x/dcd_nrf5x.c
index b9bd6ef1a..72cd8d0b1 100644
--- a/src/portable/nordic/nrf5x/dcd_nrf5x.c
+++ b/src/portable/nordic/nrf5x/dcd_nrf5x.c
@@ -70,11 +70,12 @@ typedef struct
{
uint8_t* buffer;
uint16_t total_len;
- uint16_t actual_len;
+ volatile uint16_t actual_len;
uint8_t mps; // max packet size
// nrf52840 will auto ACK OUT packet after DMA is done
- volatile bool data_received; // indicate packet is already ACK
+ // indicate packet is already ACK
+ volatile bool data_received;
} nom_xfer_t;