|
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
20 #define NCO_PWM_1 0b00100 << 26
24 static unsigned int pwstack[(160 + (50 * 4)) / 4];
26 static volatile unsigned int tCycle, ticksA, ticksB, ctra, ctrb;
38 pwcog =
cogstart(pw, NULL, pwstack,
sizeof(pwstack)) + 1;
42 void pwm_set(
int pin,
int channel,
int tHigh)
69 unsigned int dt = tCycle;
78 pin =
CTRA & 0b111111;
82 pin =
CTRA & 0b111111;
89 pin =
CTRB & 0b111111;
93 pin =
CTRB & 0b111111;
#define PHSB
Counter B phase accumulation register.
#define PHSA
Counter A phase accumulation register.
#define FRQA
Counter A frequency register.
#define FRQB
Counter B frequency register.
#define DIRB
Unused in P8X32A.
#define CTRB
Counter B control register.
#define waitcnt(a)
Wait until system counter reaches a value.
#define cogstop(a)
Stop a COG.
#define CNT
The system clock count.
#define DIRA
Use to set pins to input (0) or output (1).
int cogstart(void(*func)(void *), void *par, void *stack, size_t stacksize)
Start a new propeller LMM function/thread in another COG.
#define CTRA
Counter A control register.