bool32 protect track 1 (on/off)
bool32 protect track 2 (on/off)
bool32 protect track 3 (on/off)
bool32 protect track 4 (on/off)
int32 protected bits encoded in int32_t variable
bool32 protect track 1 (on/off)
bool32 protect track 2 (on/off)
bool32 protect track 3 (on/off)
bool32 protect track 4 (on/off)
uint32_t bitmask1 = 0b11111111000000000000000000000000;
uint32_t bitmask2 = 0b00000000111111110000000000000000;
uint32_t bitmask3 = 0b00000000000000001111111100000000;
uint32_t bitmask4 = 0b00000000000000000000000011111111;
if (inlet_i1)
disp_d1 = 1;
else
disp_d1 = 0;
if (inlet_i2)
disp_d2 = 1;
else
disp_d2 = 0;
if (inlet_i3)
disp_d3 = 1;
else
disp_d3 = 0;
if (inlet_i4)
disp_d4 = 1;
else
disp_d4 = 0;
outlet_protect = ((inlet_i1) ? bitmask1 : 0) | ((inlet_i2) ? bitmask2 : 0) |
((inlet_i3) ? bitmask3 : 0) | ((inlet_i4) ? bitmask4 : 0);