-#define PWM_PIO_FUNCTION_A 1
-
-#if CPU_ARM_AT91SAM7X256 || CPU_ARM_AT91SAM7X128
- #if PWM_PIO_FUNCTION_A
- #define PWM0 19 // PB19
- #define PWM1 20 // PB20
- #define PWM2 21 // PB21
- #define PWM3 22 // PB22
- #else
- #define PWM0 27 // PB27
- #define PWM1 28 // PB28
- #define PWM2 29 // PB29
- #define PWM3 30 // PB30
- #endif
-
-
-#elif CPU_ARM_AT91SAM7S256
+#if CPU_ARM_SAM7X
+ #define PWM0 19 // PB19
+ #define PWM1 20 // PB20
+ #define PWM2 21 // PB21
+ #define PWM3 22 // PB22
+
+ #define PWM_PIO_PDR PIOB_PDR
+ #define PWM_PIO_PER PIOB_PER
+ #define PWM_PIO_CODR PIOB_CODR
+ #define PWM_PIO_OER PIOB_OER
+ #define PWM_PIO_ABSR PIOB_ASR
+
+#elif CPU_ARM_SAM7S_LARGE