comparison core/PulseIn.cpp @ 310:02c4ca0e3718 prerelease

Renamed pinModeFrame -> pinMode
author andrewm
date Fri, 27 May 2016 18:29:20 +0100
parents 1feb9c23ac57
children 493a07f6ec09
comparison
equal deleted inserted replaced
309:6b717992c8d2 310:02c4ca0e3718
11 _digitalInput = digitalInput; 11 _digitalInput = digitalInput;
12 _pulseIsOn = false; 12 _pulseIsOn = false;
13 _pulseOnState = direction == 1 ? 1 : 0; 13 _pulseOnState = direction == 1 ? 1 : 0;
14 _array.resize(context->digitalFrames); 14 _array.resize(context->digitalFrames);
15 _lastContext = (uint64_t)-1; 15 _lastContext = (uint64_t)-1;
16 pinModeFrame(context, 0, digitalInput, INPUT); //context is used to allocate the number of elements in the array 16 pinMode(context, 0, digitalInput, INPUT); //context is used to allocate the number of elements in the array
17 } 17 }
18 18
19 void PulseIn::check(BelaContext* context){ 19 void PulseIn::check(BelaContext* context){
20 if(_digitalInput == -1){ //must be init'ed before calling check(); 20 if(_digitalInput == -1){ //must be init'ed before calling check();
21 throw(1); 21 throw(1);