if(PORTC_ISFR & (1 << H_isrPinNum)) //make sure the H interrupt occurs
{
PORTC_ISFR = (1 << H_isrPinNum); //write 1 to clear the flag
if(!Image_Row_Cnt) Image_Field_Over = 0;
if(Image_Row_Cnt<(Image_Row-1))
{
DMA_EN(DMA_CH0); //DMA must be enabled before it starts to work
Image_Row_Cnt++;
}
else
{
Image_Field_Over = 1;
}
}
if(PORTC_ISFR & (1<< V_isrPinNum)) //make sure V interrupt occurs
{
PORTC_ISFR = (1 << V_isrPinNum); //write 1 to clear the flag
dma_repeat(DMA_CH0,(void *)&PTB_B2_IN, (void *)Image_Data,Image_Column);
Image_Row_Cnt=0;
}
}