mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
Adds port constants to the HAL (#130)
This commit is contained in:
committed by
Peter Johnson
parent
0e127679c1
commit
b45e0917ae
@@ -14,6 +14,7 @@
|
||||
#include "HAL/AnalogAccumulator.h"
|
||||
#include "HAL/HAL.h"
|
||||
#include "HAL/cpp/priority_mutex.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "handles/HandlesInternal.h"
|
||||
|
||||
using namespace hal;
|
||||
@@ -83,7 +84,7 @@ bool checkAnalogModule(uint8_t module) { return module == 1; }
|
||||
* @return Analog channel is valid
|
||||
*/
|
||||
bool checkAnalogInputChannel(uint32_t pin) {
|
||||
if (pin < kAnalogInputPins) return true;
|
||||
if (pin < kNumAnalogInputs) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user