Hi Muhammand,
I would recommend you to use the following document created by a colleague as reference on how to initialize and configure the accelerometer:
MMA8451Q -Single Tap Detection Bare metal example project
About the LPC part, you can use the LPCOpen periph_pinint example that demonstrates use of the GPIO pin interrupts and the periph_i2c that shows how to use I2C interface in master and slave mode using POLLING/INTERRUPT method.
Hope it helps!
Best Regards,
Carlos Mendoza
Technical Support Engineer