code is working without the channel_masks now in pwm.c.
Implemented new register convention in pwm.c
Everything retested. All demanded changes are done.