Thanks for your answer but I need some example codes please.
Code for writing to the registers, there are examples in the ap note. It is
simple by just using the name of the register in a typical assign statement,
and use of a mask so that you only alter the bit(s) of interest.
Register bit definitions are shown in the Register Technical Reference Manual (TRM).
A copy of this is on Cypress web site for each family of parts. You should read
the chapter on GPIO in the TRM so that you know all the registers to use.
The TRM also in help, documents menu of PSOC Designer.