Important changes to forums

We’re making some changes to the Mbed forums. From 10th December 2019 all new discussions will take place on our new forum site. You can continue to reply to existing threads for the next two weeks. After that we will archive this forum so you can return to useful posts in the future.

read_u16 seems to be broken

06 Oct 2010

See details here.

07 Oct 2010

Hi

Is the workaround to just lop off the least signficant nibble then eg. read_u16() & 0xfff0

Regards
Daniel

PS It would be nice to get a comment from the mbed team on this; I can't see a reason why you'd want to mirror the most significant nibble in the least significant one either.

08 Oct 2010 . Edited: 08 Oct 2010

Hi,

 

The read_u16 semantics define it ti return a normalised value, between 0 an 2^16-1. 

 

The implementation of this can be optimised for a 12-bit value to repeat the top nibble at the bottom, so thats how it has been implemented!

Thanks,
Chris

 

 

 

You need to log in to post a reply