Renamed "pin" to "channel" and variables with underscores now use mixed case (#194)

This commit is contained in:
Tyler Veness
2016-08-12 13:45:28 -07:00
committed by Peter Johnson
parent 227fdc1a60
commit 45b8e9ab4f
67 changed files with 941 additions and 917 deletions

View File

@@ -39,20 +39,20 @@ using namespace hal;
extern "C" {
HAL_PortHandle HAL_GetPort(int32_t pin) {
HAL_PortHandle HAL_GetPort(int32_t channel) {
// Dont allow a number that wouldn't fit in a uint8_t
if (pin < 0 || pin >= 255) return HAL_kInvalidHandle;
return createPortHandle(pin, 1);
if (channel < 0 || channel >= 255) return HAL_kInvalidHandle;
return createPortHandle(channel, 1);
}
/**
* @deprecated Uses module numbers
*/
HAL_PortHandle HAL_GetPortWithModule(int32_t module, int32_t pin) {
HAL_PortHandle HAL_GetPortWithModule(int32_t module, int32_t channel) {
// Dont allow a number that wouldn't fit in a uint8_t
if (pin < 0 || pin >= 255) return HAL_kInvalidHandle;
if (channel < 0 || channel >= 255) return HAL_kInvalidHandle;
if (module < 0 || module >= 255) return HAL_kInvalidHandle;
return createPortHandle(pin, module);
return createPortHandle(channel, module);
}
const char* HAL_GetErrorMessage(int32_t code) {