Makes SensorBase checks use HAL check methods (#182)

This commit is contained in:
Thad House
2016-07-20 22:47:29 -07:00
committed by Peter Johnson
parent 0901ae0808
commit 512ecf6490
24 changed files with 238 additions and 103 deletions

View File

@@ -87,6 +87,10 @@ HAL_DigitalHandle HAL_InitializeDIOPort(HAL_PortHandle port_handle,
return handle;
}
HAL_Bool HAL_CheckDIOChannel(int32_t channel) {
return channel < kNumDigitalPins && channel >= 0;
}
void HAL_FreeDIOPort(HAL_DigitalHandle dio_port_handle) {
// no status, so no need to check for a proper free.
digitalPinHandles.Free(dio_port_handle, HAL_HandleEnum::DIO);