mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
Renamed "pin" to "channel" and variables with underscores now use mixed case (#194)
This commit is contained in:
committed by
Peter Johnson
parent
227fdc1a60
commit
45b8e9ab4f
@@ -8,7 +8,7 @@
|
||||
#include "HAL/handles/HandlesInternal.h"
|
||||
|
||||
namespace hal {
|
||||
HAL_PortHandle createPortHandle(uint8_t pin, uint8_t module) {
|
||||
HAL_PortHandle createPortHandle(uint8_t channel, uint8_t module) {
|
||||
// set last 8 bits, then shift to first 8 bits
|
||||
HAL_PortHandle handle = static_cast<HAL_PortHandle>(HAL_HandleEnum::Port);
|
||||
handle = handle << 24;
|
||||
@@ -16,8 +16,8 @@ HAL_PortHandle createPortHandle(uint8_t pin, uint8_t module) {
|
||||
int32_t temp = module;
|
||||
temp = (temp << 8) & 0xff00;
|
||||
handle += temp;
|
||||
// add pin to last 8 bits
|
||||
handle += pin;
|
||||
// add channel to last 8 bits
|
||||
handle += channel;
|
||||
return handle;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user