Skip to content

Commit acafdf8

Browse files
ccli8adbridge
authored andcommitted
Fix serial async transfer failed as data with is 16/32
1 parent cf1ea9c commit acafdf8

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

targets/TARGET_NUVOTON/TARGET_M451/serial_api.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,6 @@ static void uart_irq(serial_t *obj)
479479
#if DEVICE_SERIAL_ASYNCH
480480
int serial_tx_asynch(serial_t *obj, const void *tx, size_t tx_length, uint8_t tx_width, uint32_t handler, uint32_t event, DMAUsage hint)
481481
{
482-
// NOTE: tx_width is deprecated. Assume its value is databits ceiled to the nearest number among 8, 16, and 32.
483-
tx_width = (obj->serial.databits <= 8) ? 8 : (obj->serial.databits <= 16) ? 16 : 32;
484-
485482
MBED_ASSERT(tx_width == 8 || tx_width == 16 || tx_width == 32);
486483

487484
obj->serial.dma_usage_tx = hint;
@@ -536,9 +533,6 @@ int serial_tx_asynch(serial_t *obj, const void *tx, size_t tx_length, uint8_t tx
536533

537534
void serial_rx_asynch(serial_t *obj, void *rx, size_t rx_length, uint8_t rx_width, uint32_t handler, uint32_t event, uint8_t char_match, DMAUsage hint)
538535
{
539-
// NOTE: rx_width is deprecated. Assume its value is databits ceiled to the nearest number among 8, 16, and 32.
540-
rx_width = (obj->serial.databits <= 8) ? 8 : (obj->serial.databits <= 16) ? 16 : 32;
541-
542536
MBED_ASSERT(rx_width == 8 || rx_width == 16 || rx_width == 32);
543537

544538
obj->serial.dma_usage_rx = hint;

targets/TARGET_NUVOTON/TARGET_NUC472/serial_api.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -519,9 +519,6 @@ static void uart_irq(serial_t *obj)
519519
#if DEVICE_SERIAL_ASYNCH
520520
int serial_tx_asynch(serial_t *obj, const void *tx, size_t tx_length, uint8_t tx_width, uint32_t handler, uint32_t event, DMAUsage hint)
521521
{
522-
// NOTE: tx_width is deprecated. Assume its value is databits ceiled to the nearest number among 8, 16, and 32.
523-
tx_width = (obj->serial.databits <= 8) ? 8 : (obj->serial.databits <= 16) ? 16 : 32;
524-
525522
MBED_ASSERT(tx_width == 8 || tx_width == 16 || tx_width == 32);
526523

527524
obj->serial.dma_usage_tx = hint;
@@ -574,9 +571,6 @@ int serial_tx_asynch(serial_t *obj, const void *tx, size_t tx_length, uint8_t tx
574571

575572
void serial_rx_asynch(serial_t *obj, void *rx, size_t rx_length, uint8_t rx_width, uint32_t handler, uint32_t event, uint8_t char_match, DMAUsage hint)
576573
{
577-
// NOTE: rx_width is deprecated. Assume its value is databits ceiled to the nearest number among 8, 16, and 32.
578-
rx_width = (obj->serial.databits <= 8) ? 8 : (obj->serial.databits <= 16) ? 16 : 32;
579-
580574
MBED_ASSERT(rx_width == 8 || rx_width == 16 || rx_width == 32);
581575

582576
obj->serial.dma_usage_rx = hint;

0 commit comments

Comments
 (0)