Lines Matching refs:mTask
72 } mTask;
77 if (pinState != mTask.prevReportedState) {
78 mTask.prevReportedState = pinState;
87 int32_t currPinState = MAKE_TYPE(gpioGet(mTask.sPin), gpioGet(mTask.nPin));
89 if (mTask.on && (currPinState == prevPinState)) {
156 extiClearPendingGpio(mTask.sPin);
157 extiClearPendingGpio(mTask.nPin);
158 enableInterrupt(mTask.sPin, &mTask.sIsr, HALL_S_IRQ);
159 enableInterrupt(mTask.nPin, &mTask.nIsr, HALL_N_IRQ);
161 disableInterrupt(mTask.sPin, &mTask.sIsr, HALL_S_IRQ);
162 disableInterrupt(mTask.nPin, &mTask.nIsr, HALL_N_IRQ);
163 extiClearPendingGpio(mTask.sPin);
164 extiClearPendingGpio(mTask.nPin);
167 mTask.on = on;
168 mTask.prevReportedState = -1;
170 if (mTask.debounceTimerHandle) {
171 timTimerCancel(mTask.debounceTimerHandle);
172 mTask.debounceTimerHandle = 0;
175 return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_POWER_STATE_CHG, on, 0);
180 return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_FW_STATE_CHG, 1, 0);
186 if (mTask.on)
187 hallReportState(MAKE_TYPE(gpioGet(mTask.sPin), gpioGet(mTask.nPin)));
189 return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency);
202 if (mTask.prevReportedState != -1) {
203 sample.idata = mTask.prevReportedState;
225 mTask.id = taskId;
226 mTask.sensorHandle = sensorRegister(&mSensorInfo, &mSensorOps, NULL, true);
227 mTask.prevReportedState = -1;
228 mTask.sPin = gpioRequest(HALL_S_PIN);
229 mTask.nPin = gpioRequest(HALL_N_PIN);
230 mTask.sIsr.func = hallSouthIsr;
231 mTask.nIsr.func = hallNorthIsr;
238 disableInterrupt(mTask.sPin, &mTask.sIsr, HALL_S_IRQ);
239 disableInterrupt(mTask.nPin, &mTask.nIsr, HALL_N_IRQ);
240 extiUnchainIsr(HALL_S_IRQ, &mTask.sIsr);
241 extiUnchainIsr(HALL_N_IRQ, &mTask.nIsr);
242 extiClearPendingGpio(mTask.sPin);
243 extiClearPendingGpio(mTask.nPin);
244 gpioRelease(mTask.sPin);
245 gpioRelease(mTask.nPin);
246 sensorUnregister(mTask.sensorHandle);
247 memset(&mTask, 0, sizeof(struct SensorTask));