Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-rpc by
Revision 12:a4579f43a4fd, committed 2015-12-16
- Comitter:
- ewoud
- Date:
- Wed Dec 16 21:51:32 2015 +0000
- Parent:
- 5:4490a0d9cb2a
- Commit message:
- fixed for FRMD K64F
Changed in this revision
| parse_pins.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/parse_pins.cpp Mon Aug 19 18:37:40 2013 +0300
+++ b/parse_pins.cpp Wed Dec 16 21:51:32 2015 +0000
@@ -33,51 +33,19 @@
, p33, p34, NC, NC, p37, p38, p39};
#endif
-#if defined(TARGET_LPC1768) || defined(TARGET_LPC11U24) || defined(TARGET_LPC2368) || defined(TARGET_LPC812) || defined(TARGET_LPC4088)|| defined(TARGET_LPC1114)
- 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 defined(TARGET_KL25Z) || defined(TARGET_K64F)
+ if (str[0] == 'P' && str[1] == 'T') { // PTx_n
+ 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_KL25Z)
- if (str[0] == 'P' && str[1] == 'T') { // PTx_n
- 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);
#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)
- } 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 > 39) {
- return NC;
- }
- return pin_names[pin - 5];
-#endif
} else if (str[0] == 'L') { // LEDn
switch (str[3]) {
