diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2019-11-23 13:39:52 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2020-01-09 15:55:03 +0100 |
commit | 78e8a778786bf3f9050e55d99dd2b4338e8f4a8e (patch) | |
tree | 8dde7b0f50ea497f7a79ba60909570305328cb26 /libs/bitfield-c/README.mkd | |
parent | d76433ade0b75c8cc2b45fdae52a21d7fb28f526 (diff) |
bitfield-c: use unsigned int instead of uint8_t
Use unsigned int instead of uint8_t upon destination and source array length.
This is needed to handle gathered multi-frames message data which could
be greater than 1 simple messages.
Bug-AGL: SPEC-2988
Change-Id: I107bff383c2d0771dbc2a30770ec5c195b1c22ac
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'libs/bitfield-c/README.mkd')
-rw-r--r-- | libs/bitfield-c/README.mkd | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/bitfield-c/README.mkd b/libs/bitfield-c/README.mkd index 439b3dd0..8fa723f9 100644 --- a/libs/bitfield-c/README.mkd +++ b/libs/bitfield-c/README.mkd @@ -9,10 +9,10 @@ started, here are examples using the API: ## Bitfield Manipulation -The bitfields are stored in `uint8_t[]`. +The bitfields are stored in `unsigned int[]`. - uint8_t data[4] = {0x12, 0x34, 0x56, 0x78}; - uint8_t result = get_byte(data, sizeof(data), 0); + unsigned int data[4] = {0x12, 0x34, 0x56, 0x78}; + unsigned int result = get_byte(data, sizeof(data), 0); // result = 0x12; result = get_nibble(data, sizeof(data), 0); // result = 0x1; |