Skip to content

Commit 032ce63

Browse files
authored
Merge pull request #5562 from OpenNuvoton/nuvoton
[nuvoton] Sync to 4.1.0 and update drivers.
2 parents e665bac + 8803bf4 commit 032ce63

File tree

45 files changed

+723
-417
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+723
-417
lines changed

bsp/nuvoton/libraries/m2354/rtt_port/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ config SOC_SERIES_M2354
470470
menuconfig BSP_USING_SDH
471471
bool "Enable Secure Digital Host Controller(SDH)"
472472
select RT_USING_DFS
473+
select DFS_USING_POSIX
473474

474475
if BSP_USING_SDH
475476
config BSP_USING_SDH0

bsp/nuvoton/libraries/m2354/rtt_port/drv_crc.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ static rt_uint32_t nu_crc_run(
4444
{
4545
uint32_t u32CalChecksum = 0;
4646
uint32_t i = 0;
47+
rt_err_t result;
4748

48-
rt_mutex_take(&s_CRC_mutex, RT_WAITING_FOREVER);
49+
result = rt_mutex_take(&s_CRC_mutex, RT_WAITING_FOREVER);
50+
RT_ASSERT(result == RT_EOK);
4951

5052
/* Configure CRC controller */
5153
CRC_Open(u32OpMode, u32Attr, u32Seed, CRC_CPU_WDATA_8);
@@ -85,17 +87,17 @@ static rt_uint32_t nu_crc_run(
8587

8688
/* Get checksum value */
8789
u32CalChecksum = CRC_GetChecksum();
88-
rt_mutex_release(&s_CRC_mutex);
90+
91+
result = rt_mutex_release(&s_CRC_mutex);
92+
RT_ASSERT(result == RT_EOK);
8993

9094
return u32CalChecksum;
9195
}
9296

9397
rt_err_t nu_crc_init(void)
9498
{
9599
SYS_ResetModule(CRC_RST);
96-
97-
rt_mutex_init(&s_CRC_mutex, NU_CRYPTO_CRC_NAME, RT_IPC_FLAG_PRIO);
98-
return RT_EOK;
100+
return rt_mutex_init(&s_CRC_mutex, NU_CRYPTO_CRC_NAME, RT_IPC_FLAG_PRIO);
99101
}
100102

101103
rt_uint32_t nu_crc_update(struct hwcrypto_crc *ctx, const rt_uint8_t *in, rt_size_t length)

0 commit comments

Comments
 (0)