mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 13:14:32 +02:00
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:
committed by
Mahavir Jain
parent
485df5e6c5
commit
b6ad457904
@@ -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]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user