Lines Matching refs:mTask
62 } mTask;
68 bool pinState = gpioGet(mTask.pin);
70 if (mTask.on) {
75 if (sample.idata != mTask.prevReportedValue) {
76 mTask.prevReportedValue = sample.idata;
93 if (mTask.debounceTimerHandle)
94 timTimerCancel(mTask.debounceTimerHandle);
96 mTask.debounceTimerHandle = timTimerSet(HALL_DEBOUNCE_TIMER_DELAY, 0, 50, debounceTimerCallback, (void*)pinState, true /* oneShot */);
139 extiClearPendingGpio(mTask.pin);
140 enableInterrupt(mTask.pin, &mTask.isr);
142 disableInterrupt(mTask.pin, &mTask.isr);
143 extiClearPendingGpio(mTask.pin);
146 mTask.on = on;
147 mTask.prevReportedValue = -1;
149 if (mTask.debounceTimerHandle) {
150 timTimerCancel(mTask.debounceTimerHandle);
151 mTask.debounceTimerHandle = 0;
154 return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_POWER_STATE_CHG, on, 0);
159 return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_FW_STATE_CHG, 1, 0);
165 if (mTask.on) {
167 bool pinState = gpioGet(mTask.pin);
173 return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency);
186 if (mTask.prevReportedValue != -1) {
187 sample.idata = mTask.prevReportedValue;
209 mTask.id = taskId;
210 mTask.sensorHandle = sensorRegister(&mSensorInfo, &mSensorOps, NULL, true);
211 mTask.prevReportedValue = -1;
212 mTask.pin = gpioRequest(HALL_PIN);
213 mTask.isr.func = hallIsr;
220 disableInterrupt(mTask.pin, &mTask.isr);
221 extiUnchainIsr(HALL_IRQ, &mTask.isr);
222 extiClearPendingGpio(mTask.pin);
223 gpioRelease(mTask.pin);
224 sensorUnregister(mTask.sensorHandle);