The TMP235_Read_Temp function returns a 16 bit value which is (to my memory) big endian. However, the L4 line of STM32's are natively little endian. Thus converting the value before it gets returned from TMP235_Read_Temp might save us from making silly mistakes. The old TSAT-6 code did this conversion too, but it did it as the CAN message was being created.
Luckily I've written a BE to LE conversion function already. At the time of writing this it is located in Core/Inc/utils.h. However, in the future I might add it to the TSAT Utilities Kit since it is a nice-to-have.
The
TMP235_Read_Temp
function returns a 16 bit value which is (to my memory) big endian. However, the L4 line of STM32's are natively little endian. Thus converting the value before it gets returned fromTMP235_Read_Temp
might save us from making silly mistakes. The old TSAT-6 code did this conversion too, but it did it as the CAN message was being created.Luckily I've written a BE to LE conversion function already. At the time of writing this it is located in
Core/Inc/utils.h
. However, in the future I might add it to the TSAT Utilities Kit since it is a nice-to-have.