How to implement Shift Register Method for Bouncing Problem?

int main(void)
{

setup_GPIOs();

uint8_t caseSW = 2;

while(1)
{

if(GPIOPinRead(GPIO_PORTJ_BASE, GPIO_PIN_0) == 0)
{
bCase++;

if(bCase % 2 == 0)
{
caseSW = 0;

}
else
{
caseSW = 1;
}
}

switch(caseSW)
{
case 0:
GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_0, GPIOPinRead(GPIO_PORTN_BASE, GPIO_PIN_0) ^ GPIO_PIN_0);
break;
case 1:
GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_1, GPIOPinRead(GPIO_PORTN_BASE, GPIO_PIN_1) ^ GPIO_PIN_1);
break;
default:
GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_0, 0);
GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_1, 0);
break;
}

}
}

  • Hi ı have a bouncing problem there and ı'd like to implement a shift register filter. How can ı do that? I could not find any clear example on the internet.