Skip to content

Commit c809be1

Browse files
committed
Added volatile keyword to address for union read
It was used originally and mistakenly removed when defining the new macro UNION_READ
1 parent 2e35283 commit c809be1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mbed-hal-k64f/device/MK64F12/fsl_bitaccess.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
#endif
115115

116116
#ifndef UNION_READ
117-
#define UNION_READ(type, addr, fieldU, fieldB) ((*((type *) (addr))).fieldB)
117+
#define UNION_READ(type, addr, fieldU, fieldB) ((*((volatile type *) (addr))).fieldB)
118118
#endif
119119

120120
/*

0 commit comments

Comments
 (0)