Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing #45 pinModeAlt mode is checked in wrong ints #46

Merged
merged 1 commit into from
Sep 22, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/wiringPi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ IMPLEMENT(wiringPiSetupPhys) {

// Func : void pinModeAlt(int pin, int mode)
// Description : This is an un-documented special to let you set any pin to any mode.
// Modes are WPI_MODE_PINS, WPI_MODE_PHYS, WPI_MODE_GPIO.
// Modes are FSEL_INPT, FSEL_OUTP, FSEL_ALT0, FSEL_ALT1, FSEL_ALT2, FSEL_ALT3, FSEL_ALT4, FSEL_ALT5.

IMPLEMENT(pinModeAlt) {
SCOPE_OPEN();
Expand All @@ -172,7 +172,7 @@ IMPLEMENT(pinModeAlt) {
int pin = GET_ARGUMENT_AS_INT32(0);
int mode = GET_ARGUMENT_AS_INT32(1);

CHECK_ARGUMENT_IN_INTS(1, mode, (WPI_MODE_PINS, WPI_MODE_PHYS, WPI_MODE_GPIO));
CHECK_ARGUMENT_IN_INTS(1, mode, (FSEL_INPT, FSEL_OUTP, FSEL_ALT0, FSEL_ALT1, FSEL_ALT2, FSEL_ALT3, FSEL_ALT4, FSEL_ALT5));

::pinModeAlt(pin, mode);

Expand Down