What is "retris" ?
For LPC, before read/write Pin, should set INPUT/OUTPUT direction first. this mode only need when sometime need input and sometime need output like data bus line.
If only need one operation in all time, set direction once is enough.
see manual and code samples for reference.