How to use Filter Polling method for channel A and channel B? | Cypress Semiconductor
How to use Filter Polling method for channel A and channel B?
Hello Every One,
I am trying to implement polling method for channel A and channel B of my filter.
I am following and example project. This project is written for Channel A only. I have some confusion in it. I wrote the following code for channel A and B. Kindly tell me if am i am doing it write:
I am doing the following:
Filter_INT_CTRL_REG |= (1 << Filter_CHANNEL_A);
Filter_INT_CTRL_REG |= (2 << Filter_CHANNEL_B); (IS THIS COMMAND IS CORRECT FOR CHANNEL B?)
/* Enable Global Interrupts */
while (Filter_IsInterruptChannelA() == 0) ;
VDAC_ChA_SetValue(Filter_Read8(Filter_CHANNEL_A) + 128u);
while (Filter_IsInterruptChannelB() == 0);
VDAC_ChB_SetValue(Filter_Read8(Filter_CHANNEL_B) + 128u);
} /* End of main
Looking forward for your reply.