Changes HAL Port from a pointer to a handle (#93)

HAL Port is using a special handle, where the module and pin are bit
shifted straight into the handle. This is one of the few special cases
we have, but for the way port is used it is much cleaner and uses much
less memory.  Plus it is generic and not specific to one type.
This commit is contained in:
Thad House
2016-06-05 15:23:58 -07:00
committed by Peter Johnson
parent 5a82f73d9b
commit fc515f4572
44 changed files with 288 additions and 233 deletions

View File

@@ -7,7 +7,6 @@
#include "AnalogInput.h"
#include "HAL/HAL.h"
#include "HAL/Port.h"
#include "LiveWindow/LiveWindow.h"
#include "Resource.h"
#include "Timer.h"
@@ -45,7 +44,7 @@ AnalogInput::AnalogInput(uint32_t channel) {
m_channel = channel;
void* port = getPort(channel);
HalPortHandle port = getPort(channel);
int32_t status = 0;
m_port = initializeAnalogInputPort(port, &status);
wpi_setErrorWithContext(status, getHALErrorMessage(status));