Hello,
Thanks for your feedback. I think that the change you wanted to mention is the following.

In order to set the GPIO you should use PSOR and to clear the GPIO you should use PCOR. So, you need to change the set and clear macro, the toggle macro is correct.
Regards,
Victor.