BYTE arr[16] = {0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0 };
BYTE* p_data = (BYTE*)calloc(2, sizeof(BYTE));
for (int i = 0; i < Round_lamp_nums; i++)
{
if (arr[i] == 1)
{
BYTE temp = 0;
if (i < 8)
{
temp = arr[i] << i;
p_data[0] = p_data[0] | temp;
}
else
{
temp = arr[i] << (i - 8);
p_data[1] = p_data[1] | temp;
}
}
else
{
p_data[0] = p_data[0] | 0x00;
p_data[1] = p_data[1] | 0x00;
}
}