FIO1PIN2 is not defined in the standard LPC214x.h header file, so the way you have defined it could be your problem. Instead, try using FIO1PIN and using the mask 0x10000.
if((FIO1PIN & 0x10000) != 0)
{
<bit was set>
}
else
{
<bit was false>
}
I do a similar operation in my tutorials for the nRF24L01 for the LPC2148 when I check for the IRQ pin status in the function bool nrf24l01_irq_pin_active() in nrf24l01.c. nrf24l01_IRQ_IOREGISTER is #define’d to FIO0PIN and nrf24l01_IRQ_PINMASK is #define’d to 0x8000 in nrf24l01.h. Check out my signature line for my website where you can find the tutorials if it might help you.
If you check LPC214x.h as it is in my tutorials, I have defines for all of the byte-level registers added (i.e., FIO1PIN2, FIO0SET1, etc.). These have been tested (for the most part) and should work, and you are free to use them if you want in your own code.