Skip to content

Commit 758fa2a

Browse files
committed
ctrl2 &= ~(BIT(16));
1 parent 50f0981 commit 758fa2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bsp/w60x/drivers/drv_rtc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static int wm_set_timestamp(time_t timestamp)
5555
gmtime_r(&timestamp, &tblock);
5656

5757
ctrl2 = tls_reg_read32(HR_PMU_RTC_CTRL2); /* disable */
58-
ctrl2 &= (int)(~(1 << 16));
58+
ctrl2 &= ~(BIT(16));
5959
tls_reg_write32(HR_PMU_RTC_CTRL2, ctrl2);
6060

6161
ctrl1 |= tblock.tm_sec;
@@ -70,7 +70,7 @@ static int wm_set_timestamp(time_t timestamp)
7070
tls_reg_write32(HR_PMU_RTC_CTRL2, ctrl2);
7171

7272
ctrl2 = tls_reg_read32(HR_PMU_RTC_CTRL2);/* enable */
73-
ctrl2 |= (1 << 16);
73+
ctrl2 |= BIT(16);
7474
tls_reg_write32(HR_PMU_RTC_CTRL2, ctrl2);
7575

7676
return RT_EOK;

0 commit comments

Comments
 (0)