diff --git a/lesson/ooc/lesson_04_ooc_pin/project/basic.uvprojx b/lesson/ooc/lesson_04_ooc_pin/project/basic.uvprojx index 7b74082ec7bf1eb5dabd7848bb82d01f8079e76b..c4b690ae5f2ecd1bb597d0076e5142c020f9f4fb 100644 --- a/lesson/ooc/lesson_04_ooc_pin/project/basic.uvprojx +++ b/lesson/ooc/lesson_04_ooc_pin/project/basic.uvprojx @@ -10,7 +10,7 @@ Basic 0x4 ARM-ADS - 5060960::V5.06 update 7 (build 960)::.\ARMCC + 5060061::V5.06 update 1 (build 61)::.\ARMCC 0 @@ -186,6 +186,7 @@ 0 0 0 + 0 0 0 8 diff --git a/lesson/ooc/lesson_04_ooc_pin/user/eio_pin.c b/lesson/ooc/lesson_04_ooc_pin/user/eio_pin.c index 8be2041f7bf8ec82bb04f2feb000b1a28ba786eb..96c9d49c7bb7dd9d4af9a536a5318a750acb156e 100644 --- a/lesson/ooc/lesson_04_ooc_pin/user/eio_pin.c +++ b/lesson/ooc/lesson_04_ooc_pin/user/eio_pin.c @@ -132,9 +132,9 @@ static bool _check_pin_name_valid(const char *name) goto exit; } - if (!((name[0] < 'A' && name[0] > 'D') && - (name[2] < '0' && name[2] > '1') && - (name[3] < '0' && name[3] > '9'))) + if (!((name[0] >= 'A' && name[0] <= 'D') && + (name[2] >= '0' && name[2] <= '1') && + (name[3] >= '0' && name[3] <= '9'))) { ret = false; goto exit;