Skip to content
Snippets Groups Projects
Commit cb44cc64 authored by Joakim Nohlgård's avatar Joakim Nohlgård
Browse files

Merge pull request #3113 from kaspar030/fix_bitfield

sys: bitfield.h: some fixes
parents 4906dbca 3965e889
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
......@@ -38,7 +39,7 @@ extern "C" {
* @note SIZE should be a constant expression. This avoids variable length
* arrays.
*/
#define BITFIELD(NAME, SIZE) (uint8_t NAME[((SIZE) + 7) / 8])
#define BITFIELD(NAME, SIZE) uint8_t NAME[((SIZE) + 7) / 8]
/**
* @brief Set the bit to 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment