Commit c477b71
committed
Use uint8_t in RTC BCD conversion helpers
Change `BCD2DEC` and `DEC2BCD` in the GD32F4/H7 RTC code to return `uint8_t` and use explicit unsigned casts/constants in the arithmetic. This tightens type usage for byte-sized BCD values and avoids implicit signed/int conversions.1 parent 6dbdf07 commit c477b71
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
0 commit comments