File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
applications/main/infrared Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,9 @@ typedef enum {
37
37
#define INFRARED_ERROR_CODE_MASK (0xFFFFFF00)
38
38
#define INFRARED_ERROR_INDEX_MASK (0x000000FF)
39
39
40
- #define INFRARED_ERROR_GET_CODE (error ) (error & INFRARED_ERROR_CODE_MASK)
41
- #define INFRARED_ERROR_GET_INDEX (error ) (error & INFRARED_ERROR_INDEX_MASK)
42
- #define INFRARED_ERROR_SET_INDEX (code , index ) (code |= (index & INFRARED_ERROR_INDEX_MASK))
40
+ #define INFRARED_ERROR_GET_CODE (error ) (( error) & INFRARED_ERROR_CODE_MASK)
41
+ #define INFRARED_ERROR_GET_INDEX (error ) (( error) & INFRARED_ERROR_INDEX_MASK)
42
+ #define INFRARED_ERROR_SET_INDEX (code , index ) (( code) |= (( index) & INFRARED_ERROR_INDEX_MASK))
43
43
44
44
#define INFRARED_ERROR_PRESENT (error ) (INFRARED_ERROR_GET_CODE(error) != InfraredErrorCodeNone)
45
- #define INFRARED_ERROR_CHECK (error , test_code ) (INFRARED_ERROR_GET_CODE(error) == test_code)
45
+ #define INFRARED_ERROR_CHECK (error , test_code ) (INFRARED_ERROR_GET_CODE(error) == ( test_code) )
You can’t perform that action at this time.
0 commit comments