Example now working in real hardware.
Corrected bug in timer.c due to incorrect encapsulation.
Corrected the way ports are addressed in the sysmods which deal with them (digitalrw, pwm and list). Substituted some functions for macros as optimization. With the correct addressing I was now able to substitute the if-else structure in PWM_init for a switch-case.