RPC_Serial_RPC_Sawtooth
Fork of mbed-rpc by
Revision 17:d9ede21e1672, committed 2018-04-19
- Comitter:
- quxiaorui
- Date:
- Thu Apr 19 08:56:01 2018 +0000
- Parent:
- 16:33e21ae4d434
- Commit message:
- test
Changed in this revision
parse_pins.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 33e21ae4d434 -r d9ede21e1672 parse_pins.cpp --- a/parse_pins.cpp Tue May 03 00:16:10 2016 +0100 +++ b/parse_pins.cpp Thu Apr 19 08:56:01 2018 +0000 @@ -38,28 +38,7 @@ , NC, NC, NC, NC, NC, NC, NC, NC, p41, p42, p43, p44, p45, p46}; #endif -#if defined(TARGET_LPC1768) || defined(TARGET_LPC11U24) || defined(TARGET_LPC2368) || defined(TARGET_LPC812) || defined(TARGET_LPC4088) || defined(TARGET_LPC4088_DM) || defined(TARGET_LPC1114) || defined(TARGET_RZ_A1H) || defined(TARGET_VK_RZ_A1H) - if (str[0] == 'P') { // Pn_n - uint32_t port = str[1] - '0'; - uint32_t pin = str[3] - '0'; // Pn_n - uint32_t pin2 = str[4] - '0'; // Pn_nn - if (pin2 <= 9) { - pin = pin * 10 + pin2; - } - return port_pin((PortName)port, pin); -#elif defined(TARGET_KL25Z) || defined(TARGET_KL27Z) || defined(TARGET_KL05Z) || defined(TARGET_KL46Z) || defined(TARGET_K22F) || defined(TARGET_K64F) - if (str[0] == 'P' && str[1] == 'T') { // PTxn - uint32_t port = str[2] - 'A'; - uint32_t pin = str[3] - '0'; // PTxn - uint32_t pin2 = str[4] - '0'; // PTxnn - - if (pin2 <= 9) { - pin = pin * 10 + pin2; - } - return port_pin((PortName)port, pin); - -#elif defined(TARGET_NUCLEO_F072RB) || defined(TARGET_NUCLEO_F303K8) || defined(TARGET_NUCLEO_F411RE) if (str[0] == 'P') { // PX_XX e.g.PA_2 PC_15 uint32_t port = str[1] - 'A'; uint32_t pin = str[3] - '0'; @@ -70,33 +49,6 @@ } return port_pin((PortName)port, pin); -#endif - - - -#if defined(TARGET_LPC1768) || defined(TARGET_LPC11U24) || defined(TARGET_LPC2368) - } else if (str[0] == 'p') { // pn - uint32_t pin = str[1] - '0'; // pn - uint32_t pin2 = str[2] - '0'; // pnn - if (pin2 <= 9) { - pin = pin * 10 + pin2; - } - if (pin < 5 || pin > 30) { - return NC; - } - return pin_names[pin - 5]; -#elif defined(TARGET_LPC4088) || defined(TARGET_LPC4088_DM) - } else if (str[0] == 'p') { // pn - uint32_t pin = str[1] - '0'; // pn - uint32_t pin2 = str[2] - '0'; // pnn - if (pin2 <= 9) { - pin = pin * 10 + pin2; - } - if (pin < 1 || pin > 46) { - return NC; - } - return pin_names[pin - 1]; -#endif } else if (str[0] == 'L') { // LEDn switch (str[3]) { case '1' : return LED1;