Modified to run on Renesas GR Peach

Fork of mbed-rpc by mbed official

Files at this revision

API Documentation at this revision

Comitter:
webOnBoard
Date:
Wed Oct 07 20:35:13 2015 +0000
Parent:
3:1ecadde1c929
Commit message:
Modified for GRPeach

Changed in this revision

Arguments.cpp Show annotated file Show diff for this revision Revisions of this file
Arguments.h Show annotated file Show diff for this revision Revisions of this file
parse_pins.cpp Show diff for this revision Revisions of this file
parse_pins.h Show diff for this revision Revisions of this file
--- a/Arguments.cpp	Thu May 30 17:07:09 2013 +0100
+++ b/Arguments.cpp	Wed Oct 07 20:35:13 2015 +0000
@@ -69,7 +69,7 @@
 
 template<> PinName Arguments::getArg<PinName>(void) {
     index++;
-    return parse_pins(argv[index]);
+    //return parse_pins(argv[index]);
 }
 
 template<> int Arguments::getArg<int>(void) {
--- a/Arguments.h	Thu May 30 17:07:09 2013 +0100
+++ b/Arguments.h	Wed Oct 07 20:35:13 2015 +0000
@@ -17,7 +17,6 @@
 #define ARGUMENTS_H
 
 #include "platform.h"
-#include "parse_pins.h"
 
 namespace mbed {
 
--- a/parse_pins.cpp	Thu May 30 17:07:09 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/* mbed Microcontroller Library
- * Copyright (c) 2006-2013 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "port_api.h"
-
-namespace mbed {
-
-PinName parse_pins(const char *str) {
-#if defined(TARGET_LPC1768) || defined(TARGET_LPC11U24) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088)
-    static const PinName pin_names[] = {p5, p6, p7, p8, p9, p10, p11, p12, p13, p14
-                                , p15, p16, p17, p18, p19, p20, p21, p22, p23
-                                , p24, p25, p26, p27, p28, p29, p30};
-#endif
-
-#if defined(TARGET_LPC1768) || defined(TARGET_LPC11U24) || defined(TARGET_LPC2368) || defined(TARGET_LPC812) || defined(TARGET_LPC4088)
-    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)
-        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) || 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 > 30) {
-            return NC;
-        }
-        return pin_names[pin - 5];
-#endif
-
-    } else if (str[0] == 'L') {  // LEDn
-        switch (str[3]) {
-            case '1' : return LED1;
-            case '2' : return LED2;
-            case '3' : return LED3;
-            case '4' : return LED4;
-        }
-
-    } else if (str[0] == 'U') {  // USB?X
-        switch (str[3]) {
-            case 'T' : return USBTX;
-            case 'R' : return USBRX;
-        }
-    }
-
-    return NC;
-}
-
-}
--- a/parse_pins.h	Thu May 30 17:07:09 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/* mbed Microcontroller Library
- * Copyright (c) 2006-2013 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef MBED_PINMAP_H
-#define MBED_PINMAP_H
-
-#include "PinNames.h"
-
-namespace mbed {
-
-PinName parse_pins(const char *str);
-
-}
-
-#endif