CHIP_SWAP_ACCESS
const uint8_t r = (uint8_t)(CHIP_SWAP_ACCESS(val) >> shift);
CHIP_TYPE cval = CHIP_SWAP_ACCESS(((CHIP_TYPE)val) << shift);