1 #ifndef libpropeller_pwm2_h__
2 #define libpropeller_pwm2_h__
30 volatile void * asm_reference = NULL;
31 __asm__
volatile (
"mov %[asm_reference], #PWM2_Entry \n\t"
32 : [asm_reference]
"+r" (asm_reference));
50 waitcnt(Periodxy * 2 + CNT);
70 Pinxmask = (1 << pinX);
71 Ctrxval = ((4 << 26) + pinX);
87 Pinymask = (1 << pinY);
88 Ctryval = ((4 << 26) + pinY);
98 Dutyx = ((percent * Periodxy) / 100);
109 Dutyy = ((percent * Periodxy) / 100);
119 Periodxy = (CLKFREQ / frequency);
125 int Percentx, Percenty;
127 int volatile Periodxy;
128 int volatile Dutyx, Pinxmask, Ctrxval;
129 int volatile Dutyy, Pinymask, Ctryval;
131 static const int kDefaultFrequency = 12000;
134 #endif // libpropeller_pwm2_h__