From 592c190069d1b3b3cd3722bbe278f1d4998764f4 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 1 Aug 2018 11:31:32 +0700 Subject: [PATCH] PR review clean up --- ports/nrf/usb/usb_desc.c | 10 +++++----- ports/nrf/usb/usb_msc_flash.c | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ports/nrf/usb/usb_desc.c b/ports/nrf/usb/usb_desc.c index 3f64956d28..31f80b80d2 100644 --- a/ports/nrf/usb/usb_desc.c +++ b/ports/nrf/usb/usb_desc.c @@ -88,22 +88,22 @@ uint16_t const * const string_desc_arr [] = TUD_DESC_STRCONV('A','d','a','f','r','u','i','t',' ','I','n','d','u','s','t','r','i','e','s'), // 2 Product - TUD_DESC_STRCONV('C','i','r','c','u','i','t','P','Y',' ','n','R','F','5','2'), + TUD_DESC_STRCONV('C','i','r','c','u','i','t','P','y',' ','n','R','F','5','2'), // 3 Serials TODO use chip ID TUD_DESC_STRCONV('1', '2', '3', '4', '5'), // 4 CDC Interface - TUD_DESC_STRCONV('C','i','r','c','u','i','t','P','Y',' ','S','e','r','i','a','l'), + TUD_DESC_STRCONV('C','i','r','c','u','i','t','P','y',' ','S','e','r','i','a','l'), // 5 MSC Interface - TUD_DESC_STRCONV('C','i','r','c','u','i','t','P','Y',' ','S','t','o','r','a','g','e'), + TUD_DESC_STRCONV('C','i','r','c','u','i','t','P','y',' ','S','t','o','r','a','g','e'), // 6 HID Interface - TUD_DESC_STRCONV('C','i','r','c','u','i','t','P','Y',' ','H','I','D'), + TUD_DESC_STRCONV('C','i','r','c','u','i','t','P','y',' ','H','I','D'), // Custom Interface -// TUD_DESC_STRCONV('C','i','r','c','u','i','t','P','Y',' ','C','u','s','t','o','m') +// TUD_DESC_STRCONV('C','i','r','c','u','i','t','P','y',' ','C','u','s','t','o','m') }; diff --git a/ports/nrf/usb/usb_msc_flash.c b/ports/nrf/usb/usb_msc_flash.c index 384ef55780..2d0e9bec7f 100644 --- a/ports/nrf/usb/usb_msc_flash.c +++ b/ports/nrf/usb/usb_msc_flash.c @@ -92,7 +92,9 @@ int32_t tud_msc_scsi_cb (uint8_t lun, uint8_t const scsi_cmd[16], void* buffer, } // return len must not larger than bufsize - if ( resplen > bufsize ) resplen = bufsize; + if ( resplen > bufsize ) { + resplen = bufsize; + } // copy response to stack's buffer if any if ( response && resplen ) {