/* get a little endian short (16bits) from a pointer 
Caller should ensure parameters are valid. */
uint16_t BytesGetLe16(const void *ptr)
/* get a little endian short (16bits) from a pointer 
Caller should ensure parameters are valid. */
uint16_t BytesGetLe16(const void *ptr)
{
    const uint8_t *p = (const uint8_t *)ptr;
    return p[0] | (p[1] << 8);
}