Skip to content

Commit 05e167c

Browse files
committed
Merge pull request #10 from AlessandroA/master
Added volatile keyword to address for union read
2 parents b71626d + c809be1 commit 05e167c

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)