The line below looks not good, as anything make an "&" with 0x00, the result will be 0.
"else if (PRT3DR & 0x00 )// if low input"
AN2094 - PSoC® 1 - Getting Started with GPIO is a good reference for how to use PSoC1 GPIO.
If you are reading from Raspberry Pi, and using GPIOs configured as strong drive, you are connecting two outputs together. This may cause either one or both of the GPIOs to fail, if they output opposite logic.
Sir, So how should I configure the the GPIOs for my project as High? or some other way?
You will have to configure the GPIO as High Z Analog.
If you have the input at Port 3, bit 0, use the following code
if (PRT3DR & 0x01)
MAX_TX_PACKETS = 4;
MAX_TX_PACKETS = 6;
If you have the input at Port 3 bit 4 the if condition would be
PRT3DR & 0x10