smarter PWM API - need to pass arbitrary pointer
This commit is contained in:
parent
8f4795d9fa
commit
24733f586c
|
@ -17,7 +17,7 @@ extern int timeNowUs;
|
||||||
static int expectedTimeOfNextEvent;
|
static int expectedTimeOfNextEvent;
|
||||||
static int pinValue = -1;
|
static int pinValue = -1;
|
||||||
|
|
||||||
static void testApplyPinState(PwmConfig *state, int stateIndex) {
|
static void testApplyPinState(int stateIndex, PwmConfig *state) /* pwm_gen_callback */ {
|
||||||
pinValue = state->multiWave.getChannelState(/*channelIndex*/0, stateIndex);
|
pinValue = state->multiWave.getChannelState(/*channelIndex*/0, stateIndex);
|
||||||
|
|
||||||
printf("PWM_test: setPinValue=%d @ timeNow=%d\r\n", pinValue, timeNowUs);
|
printf("PWM_test: setPinValue=%d @ timeNow=%d\r\n", pinValue, timeNowUs);
|
||||||
|
|
Loading…
Reference in New Issue