Update esp_eddystone_api.h
Change incorrect bitshifts in big_endian_read_32() function. This was giving wrong values of of the 4 byte fieldswithin the eddystone TLM message, namely 'ADV_CNT' and 'SEC_CNT'
This commit is contained in:
parent
485df5e6c5
commit
b6ad457904
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ static inline uint16_t big_endian_read_16(const uint8_t *buffer, uint8_t pos)
|
||||||
|
|
||||||
static inline uint32_t big_endian_read_32(const uint8_t *buffer, uint8_t pos)
|
static inline uint32_t big_endian_read_32(const uint8_t *buffer, uint8_t pos)
|
||||||
{
|
{
|
||||||
return (((uint32_t)buffer[pos]) << 24) | (((uint32_t)buffer[(pos)+1]) >> 16) | (((uint32_t)buffer[(pos)+2]) >> 8) | ((uint32_t)buffer[(pos)+3]);
|
return (((uint32_t)buffer[pos]) << 24) | (((uint32_t)buffer[(pos)+1]) << 16) | (((uint32_t)buffer[(pos)+2]) << 8) | ((uint32_t)buffer[(pos)+3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue