This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

dereference the TWI receive data

Hello, i have one problem.i am working on the TWI using Handler.it is working. but i have very strange issue regarding to the dereference the value. image description

please check in the image _buffer is the variable. he shows the -27a somthing look like
memory address.but when i move my mouse on the top of this variable then i got the Data in the JlinkSDBServer window (right bottom).the data is correct which is 0xE5. but i am expecting to have this (0xE5) in the _buffer instead of the some strange memory address.

thank you.

Parents
  • Hi,

    Your IDE interprets the data as a signed char.

    The unsigned value is 0xE5, while the signed value is (0xe5 - 0x100) = -27. In addition; The IDE is kind enough to also interpret it as a character 'å' (possibly utf-8).

    Cheers, Håkon

Reply
  • Hi,

    Your IDE interprets the data as a signed char.

    The unsigned value is 0xE5, while the signed value is (0xe5 - 0x100) = -27. In addition; The IDE is kind enough to also interpret it as a character 'å' (possibly utf-8).

    Cheers, Håkon

Children
No Data