16 bit integer values for Client characteristics?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

In my BLE profile I want to use uint16 and sint16 characteristic values as well as uint8.

   

However, the provided  function "CyBle_GattsWriteAttributeValue(..)" uses attribute values that are only defined as type uint8.

   

Can I use uint16 values or do I need to restrict data to a uint8 and cast/shift into 8 bit values as needed?

   

 

   

-Tim

0 Likes
1 Solution
Anonymous
Not applicable

Hi,

   

Can I use uint16 values or do I need to restrict data to a uint8 and cast/shift into 8 bit values as needed?

   

A) Yes you need to shift and use uint8 .

   

Thanks,

   

Krishna.

View solution in original post

0 Likes
1 Reply
Anonymous
Not applicable

Hi,

   

Can I use uint16 values or do I need to restrict data to a uint8 and cast/shift into 8 bit values as needed?

   

A) Yes you need to shift and use uint8 .

   

Thanks,

   

Krishna.

0 Likes