Skip to content

Commit dc400ee

Browse files
committed
fix union struct according #5
1 parent 61278a3 commit dc400ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/MCP3x6x.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ class MCP3x6x {
9090
typedef union __attribute__((__packed__)) {
9191
struct {
9292
struct {
93-
bool por; //!< status: power on reset
94-
bool crccfg; //!< status: crc
95-
bool dr; //!< status: data ready
93+
bool por : 1; //!< status: power on reset
94+
bool crccfg : 1; //!< status: crc
95+
bool dr : 1; //!< status: data ready
9696
};
9797
uint8_t : 1; //!< !addr[0]
9898
uint8_t addr : 2; //!< addresse

0 commit comments

Comments
 (0)