Skip to content

Commit 52a0c6b

Browse files
authored
SDSIO: Correct receive in sdsio_socket and sdsio_vcom drivers. (#44)
1 parent 359d39c commit 52a0c6b

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

ARM.SDS.pdsc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
SDSIO:
1717
- Improve read functionality. Introduce an .index.txt file to track the index of the .sds file to read from
1818
- Remove automatic file open after .sds file index is reset in read mode
19+
- Correct receive in sdsio_socket and sdsio_vcom drivers.
1920
Examples:
2021
- Add sds_player example
2122
</release>
@@ -87,7 +88,7 @@
8788
</component>
8889

8990
<!-- SDS I/O (Socket) -->
90-
<component Cclass="SDS" Cgroup="IO" Csub="Socket" Capiversion="1.0.0" Cversion="1.0.0" condition="SDS IO via Socket">
91+
<component Cclass="SDS" Cgroup="IO" Csub="Socket" Capiversion="1.0.0" Cversion="1.0.1" condition="SDS IO via Socket">
9192
<description>Blocking read/write via Socket (IoT Utility:Socket) </description>
9293
<RTE_Components_h>
9394
#define RTE_SDS_IO /* Synchronous Data Stream Input/Output */
@@ -100,7 +101,7 @@
100101
</component>
101102

102103
<!-- SDS I/O (VCOM - MDK_USB) -->
103-
<component Cclass="SDS" Cgroup="IO" Csub="VCOM" Cvariant="MDK USB" Capiversion="1.0.0" Cversion="1.0.0" condition="SDS IO via VCOM - MDK USB">
104+
<component Cclass="SDS" Cgroup="IO" Csub="VCOM" Cvariant="MDK USB" Capiversion="1.0.0" Cversion="1.0.1" condition="SDS IO via VCOM - MDK USB">
104105
<description>Blocking read/write via USB Virtual COM Port (Keil::USB:Device:CDC)</description>
105106
<RTE_Components_h>
106107
#define RTE_SDS_IO /* Synchronous Data Stream Input/Output */

sds/source/sdsio/socket/sdsio_socket.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022-2023 Arm Limited. All rights reserved.
2+
* Copyright (c) 2022-2024 Arm Limited. All rights reserved.
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -169,7 +169,7 @@ static uint32_t sdsioReceive (header_t *header, void *data, uint32_t data_size)
169169
} else {
170170
size = data_size;
171171
}
172-
while (cnt < data_size) {
172+
while (cnt < size) {
173173
status = iotSocketRecv(socket,
174174
(uint8_t *)data + cnt,
175175
(size - cnt));

sds/source/sdsio/vcom/mdk/sdsio_vcom.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023 Arm Limited. All rights reserved.
2+
* Copyright (c) 2024 Arm Limited. All rights reserved.
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -170,7 +170,7 @@ static uint32_t sdsioReceive (header_t *header, void *data, uint32_t data_size)
170170
} else {
171171
size = data_size;
172172
}
173-
while (cnt < data_size) {
173+
while (cnt < size) {
174174
status = USBD_CDC_ACM_ReadData(SDSIO_USB_DEVICE_INDEX,
175175
(uint8_t *)data + cnt,
176176
(int32_t)(size - cnt));

0 commit comments

Comments
 (0)