Switches all HAL Handle errors to be zero (#100)

As discussed, we don't really need the error checking specifically, as
we are just going to throw exceptions anyway, so this will make sure you
can check for 0 and be sure you catch any handle errors.
This commit is contained in:
Thad House
2016-06-17 20:21:25 -07:00
committed by Peter Johnson
parent fc515f4572
commit c3908660b1
10 changed files with 15 additions and 20 deletions

View File

@@ -30,7 +30,7 @@ void* initializeAnalogInputPort(HalPortHandle port_handle, int32_t* status) {
if (*status != 0) return nullptr;
int16_t pin = getPortHandlePin(port_handle);
if (pin == HAL_HANDLE_INVALID_TYPE) {
if (pin == InvalidHandleIndex) {
*status = PARAMETER_OUT_OF_RANGE;
return nullptr;
}