uint8_t len = end - start + 1;
uint8_t mask = ((1U << len) - 1) << start;
return reg | mask;if you do this it gets you the right idea
i m not able to understand
uint8_t len = end - start + 1;
uint8_t mask = ((1U << len) - 1) << start;
return reg | mask;
if you do this it gets you the right idea