diff options
| author | nucho <javatea@it.willcomlive.jp> | 2012-05-13 16:48:20 +0900 |
|---|---|---|
| committer | nucho <javatea@it.willcomlive.jp> | 2012-05-13 18:07:13 +0900 |
| commit | 9ffce8d3c2674156dd1fcbce928c2b7cae30ff39 (patch) | |
| tree | 1a02e7662954beb8bf5b3035123ad7abb886f7c5 /src/core/gpio.cpp | |
| parent | 950ebb87e4ddc93d90ff01cb4b7edae3b395bef4 (diff) | |
some bugs are fixed
Diffstat (limited to 'src/core/gpio.cpp')
| -rwxr-xr-x | src/core/gpio.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/core/gpio.cpp b/src/core/gpio.cpp index 3b25da9..d696537 100755 --- a/src/core/gpio.cpp +++ b/src/core/gpio.cpp @@ -190,7 +190,7 @@ int digitalRead(int pin) ** *****************************************************************************/ void GPIOSetInterrupt(int pin, int sense, int single, int event) { - if (pin >= 0 && pin < 20) //arduinoPinAssign(0~19) + if (pin >= 0 && pin < 22) //arduinoPinAssign(0~21) { if (sense == 0) { LPC_GPIO[arduino_pinAssign[pin * 2]]->IS &= ~((1 << arduino_pinAssign[pin * 2 + 1])); @@ -209,8 +209,8 @@ void GPIOSetInterrupt(int pin, int sense, int single, int event) { &= ~((1 << arduino_pinAssign[pin * 2 + 1])); else LPC_GPIO[arduino_pinAssign[pin * 2]]->IEV |= ((1 << arduino_pinAssign[pin * 2 + 1])); - } else if (pin >= 20 && pin < 100) { - //(20~99:reserved) + } else if (pin >= 22 && pin < 100) { + //(22~99:reserved) } else if (pin >= 100 && pin < 200) //maryPinAssign(100~119?) { pin = pin - 100; @@ -234,11 +234,11 @@ void GPIOSetInterrupt(int pin, int sense, int single, int event) { } void GPIOIntEnable(int pin) { - if (pin >= 0 && pin < 20) //arduinoPinAssign(0~19) + if (pin >= 0 && pin < 22) //arduinoPinAssign(0~21) { LPC_GPIO[arduino_pinAssign[pin * 2]]->IE |= (1 << arduino_pinAssign[pin * 2 + 1]); - } else if (pin >= 20 && pin < 100) { //(20~99:reserved) + } else if (pin >= 22 && pin < 100) { //(20~99:reserved) } else if (pin >= 100 && pin < 200) //maryPinAssign(100~119?) { pin = pin - 100; @@ -249,11 +249,11 @@ void GPIOIntEnable(int pin) { } void GPIOIntDisable(int pin) { - if (pin >= 0 && pin < 20) //arduinoPinAssign(0~19) + if (pin >= 0 && pin < 22) //arduinoPinAssign(0~21) { LPC_GPIO[arduino_pinAssign[pin * 2]]->IE &= ~((1 << arduino_pinAssign[pin * 2 + 1])); - } else if (pin >= 20 && pin < 100) {//(20~99:reserved) + } else if (pin >= 22 && pin < 100) {//(22~99:reserved) } else if (pin >= 100 && pin < 200) //maryPinAssign(100~119?) { pin = pin - 100; @@ -266,13 +266,13 @@ void GPIOIntDisable(int pin) { int GPIOIntStatus(int pin) { int regVal = 0; - if (pin >= 0 && pin < 20) //arduinoPinAssign(0~19) + if (pin >= 0 && pin < 22) //arduinoPinAssign(0~21) { if (LPC_GPIO[arduino_pinAssign[pin * 2]]->MIS & (1 << arduino_pinAssign[pin * 2 + 1])) { regVal = 1; } - } else if (pin >= 20 && pin < 100) { //(20~99:reserved) + } else if (pin >= 22 && pin < 100) { //(22~99:reserved) } else if (pin >= 100 && pin < 200) //maryPinAssign(100~119?) { pin = pin - 100; @@ -287,11 +287,11 @@ int GPIOIntStatus(int pin) { } void GPIOIntClear(int pin) { - if (pin >= 0 && pin < 20) //arduinoPinAssign(0~19) + if (pin >= 0 && pin < 22) //arduinoPinAssign(0~21) { LPC_GPIO[arduino_pinAssign[pin * 2]]->IC |= (1 << arduino_pinAssign[pin * 2 + 1]); - } else if (pin >= 20 && pin < 100) { //(20~99:reserved) + } else if (pin >= 22 && pin < 100) { //(22~99:reserved) } else if (pin >= 100 && pin < 200) //maryPinAssign(100~119?) { |
