while position_play if position_play 16 position_play CurrentIndex SD_

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
while(1)
{
position_play++;
if (position_play == 16)
{
position_play = 0;
CurrentIndex++;
SD_READ(CurrentSector + CurrentIndex);
}
XDCS_SET();
for(R2 = 0; R2 < 32; R2++)
SPI_I2S_SendData(SPI2, BUFFER[(position_play * 32) + R2]);
while (!GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_12)){}
XDCS_RESET();
}