I am trying to implement a multiplication with a scale factor. I am not seeing correct results in CCS. Is this type of multiplication possible to do?
uint16_t scaleFactorMult(uint16_t data){
uint64_t cellVolt = 0;
uint16_t channelVolt;
uint64_t xTwo12 = 0;
uint64_t xTwo9 = 0;
uint64_t xTwo7 = 0;
uint64_t xTwo5 = 0;
xTwo12 |= data << 12u;
xTwo9 |= data << 9u;
xTwo7 |= data << 7u;
xTwo5 |= data << 5u;
cellVolt |= xTwo12;
cellVolt |= xTwo9;
cellVolt |= xTwo7;
cellVolt |= xTwo5;
}