Add standard pin-names validation script & tests

pull/14381/head
George Psimenos 2020-12-08 10:18:20 +00:00
parent 500ddf596a
commit 885cdef5f7
143 changed files with 2479 additions and 21 deletions

View File

@ -19,6 +19,7 @@
^hal/storage_abstraction
^hal/tests/TESTS/mbed_hal/trng/pithy
^hal/tests/TESTS/mbed_hal/trng/pithy
^hal/tests/TESTS/pin_names/test_files
^platform/cxxsupport
^platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV
^platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM

View File

@ -321,3 +321,25 @@ matrix:
CFLAGS+="-DLFS_NO_ASSERT -DLFS_NO_DEBUG -DLFS_NO_WARN -DLFS_NO_ERROR"
| tee sizes
- ccache -s
- <<: extended-pinvalidate
stage: "Extended"
name: "pinvalidate"
env: NAME=pinvalidate
language: python
python: 3.7
install:
# Install python modules
- python -m pip install --upgrade pip==18.1
- python -m pip install --upgrade setuptools==40.4.3
- pip install tabulate argparse
- pip list --verbose
# Fetch remaining information needed for branch comparison
- git fetch --all --unshallow --tags
- git fetch origin "${TRAVIS_BRANCH}"
script:
- >-
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \
| ( grep '.*[\\|\/]PinNames.h$' || true ) \
| while read file; do python ./hal/tests/TESTS/pin_names/pinvalidate.py -vfp "${file}"; done
- git diff --exit-code --diff-filter=d --color

View File

@ -43,7 +43,7 @@ static const PinList ff_arduino_uno_list = {
ff_arduino_uno_pins
};
static_assert(sizeof(ff_arduino_pins) / sizeof(ff_arduino_pins[0]) == sizeof(ff_arduino_names) / sizeof(ff_arduino_names[0]),
static_assert(sizeof(ff_arduino_uno_pins) / sizeof(ff_arduino_uno_pins[0]) == sizeof(ff_arduino_uno_names) / sizeof(ff_arduino_uno_names[0]),
"Arrays must have the same length");
const PinList *pinmap_ff_arduino_uno_pins()

View File

@ -1,13 +0,0 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR)
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../.. CACHE INTERNAL "")
set(TEST_TARGET mbed-hal-gpio)
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake)
project(${TEST_TARGET})
mbed_greentea_add_test(TEST_NAME ${TEST_TARGET})

View File

@ -24,14 +24,10 @@
Requirements specified in docs/design-documents/hal/0005-pin-names-Arduino-Uno-standard.md
*/
#if !(defined (TARGET_FF_ARDUINO) || (TARGET_FF_ARDUINO_UNO))
#if !(defined (TARGET_FF_ARDUINO_UNO))
#error [NOT_SUPPORTED] Test needs Arduino Uno form factor
#else
#if defined (TARGET_FF_ARDUINO)
#warning ARDUINO form factor should not be used any more => use ARDUINO_UNO
#endif
using namespace utest::v1;
template <PinName TestedPin>
@ -190,8 +186,6 @@ void I2C_test()
}
I2C i2c(SDA_pin, SCL_pin);
// Basic API call
i2c.read(0);
}

View File

@ -0,0 +1,875 @@
"""
Copyright (c) 2020 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.
"""
import argparse
import json
import pathlib
import hashlib
import re
import sys
from tabulate import tabulate
from itertools import chain
from enum import Enum
class ReturnCode(Enum):
"""Return codes."""
SUCCESS = 0
ERROR = 1
INVALID_OPTIONS = 2
class TestCaseError(Exception):
"""An exception for test case failure."""
class ArgumentParserWithDefaultHelp(argparse.ArgumentParser):
"""Subclass that always shows the help message on invalid arguments."""
def error(self, message):
"""Error handler."""
sys.stderr.write("error: {}\n".format(message))
self.print_help()
raise SystemExit(ReturnCode.INVALID_OPTIONS.value)
def find_target_by_path(target_path):
"""Find a target by path."""
mbed_os_root = pathlib.Path(__file__).absolute().parents[4]
targets = dict()
with open(target_path) as pin_names_file:
pin_names_file_content = pin_names_file.read()
target_list_match = re.search(
"\/* MBED TARGET LIST: ([0-9A-Z_,* \n]+)*\/",
pin_names_file_content
)
target_list = []
if target_list_match:
target_list = list(
re.findall(
r"([0-9A-Z_]{3,})",
target_list_match.group(1),
re.MULTILINE,
)
)
if not target_list:
print("WARNING: MBED TARGET LIST marker invalid or not found in file " + target_path)
print("Target could not be determined. Only the generic test suite will run. You can manually specify additional suites.")
with (
mbed_os_root.joinpath("targets", "targets.json")
).open() as targets_json_file:
target_data = json.load(targets_json_file)
# find target in targets.json
for target in target_data:
if "public" in target_data[target]:
if not target_data[target]["public"]:
continue
if target in target_list:
targets[target] = target_path
if len(targets) == 0:
targets[target_path] = target_path
return targets
def find_target_by_name(target_name=""):
"""Find a target by name."""
mbed_os_root = pathlib.Path(__file__).absolute().parents[4]
targets = dict()
for f in mbed_os_root.joinpath('targets').rglob("PinNames.h"):
with open(f) as pin_names_file:
pin_names_file_content = pin_names_file.read()
target_list_match = re.search(
"\/* MBED TARGET LIST: ([0-9A-Z_,* \n]+)*\/",
pin_names_file_content
)
target_list = []
if target_list_match:
target_list = list(
re.findall(
r"([0-9A-Z_]{3,})",
target_list_match.group(1),
re.MULTILINE,
)
)
if target_name:
if target_name in target_list:
targets[target_name] = f
break
else:
for target in target_list:
targets[target] = f
return targets
def check_markers(test_mode=False):
"""Validate markers in PinNames.h files"""
mbed_os_root = pathlib.Path(__file__).absolute().parents[4]
errors = []
with (
mbed_os_root.joinpath("targets", "targets.json")
).open() as targets_json_file:
targets_json = json.load(targets_json_file)
if test_mode:
search_dir = pathlib.Path(__file__).parent.joinpath('test_files').absolute()
else:
search_dir = mbed_os_root.joinpath('targets')
for f in search_dir.rglob("PinNames.h"):
with open(f) as pin_names_file:
pin_names_file_content = pin_names_file.read()
target_list_match = re.search(
"\/* MBED TARGET LIST: ([0-9A-Z_,* \n]+)*\/",
pin_names_file_content
)
marker_target_list = []
if target_list_match:
marker_target_list = list(
re.findall(
r"([0-9A-Z_]{3,})",
target_list_match.group(1),
re.MULTILINE,
)
)
if not marker_target_list:
print("WARNING: MBED TARGET LIST marker invalid or not found in file " + str(f))
errors.append({ "file": str(f), "error": "marker invalid or not found"})
continue
for target in marker_target_list:
target_is_valid = False
if target in targets_json:
target_is_valid = True
if "public" in targets_json[target]:
if targets_json[target]["public"] == False:
target_is_valid = False
if not target_is_valid:
print("WARNING: MBED TARGET LIST in file " + str(f) + " includes target '" + target + "' which doesn't exist in targets.json or is not public")
errors.append({ "file": str(f), "error": "target not found"})
return errors
def check_duplicate_pinnames_files(test_mode=False):
"""Check for duplicate PinNames.h files"""
mbed_os_root = pathlib.Path(__file__).absolute().parents[4]
errors = []
file_hash_dict = dict()
if test_mode:
search_dir = pathlib.Path(__file__).parent.joinpath('test_files').absolute()
else:
search_dir = mbed_os_root.joinpath('targets')
for f in search_dir.rglob("PinNames.h"):
with open(f) as pin_names_file:
pin_names_file_content = pin_names_file.read()
file_hash_dict[str(f)] = hashlib.md5(pin_names_file_content.encode('utf-8')).hexdigest()
rev_dict = {}
for key, value in file_hash_dict.items():
rev_dict.setdefault(value, set()).add(key)
duplicates = [key for key, values in rev_dict.items()
if len(values) > 1]
for duplicate in duplicates:
print("WARNING: Duplicate files")
for file_path, file_hash in file_hash_dict.items():
if file_hash == duplicate:
errors.append({ "file": file_path, "error": "duplicate file"})
print("\t" + file_path)
return errors
def check_duplicate_markers(test_mode=False):
"""Check target markers in PinNames.h files for duplicates."""
mbed_os_root = pathlib.Path(__file__).absolute().parents[4]
errors = []
markers = dict()
if test_mode:
search_dir = pathlib.Path(__file__).parent.joinpath('test_files').absolute()
else:
search_dir = mbed_os_root.joinpath('targets')
for f in search_dir.rglob("PinNames.h"):
with open(f) as pin_names_file:
pin_names_file_content = pin_names_file.read()
target_list_match = re.search(
"\/* MBED TARGET LIST: ([0-9A-Z_,* \n]+)*\/",
pin_names_file_content
)
marker_target_list = []
if target_list_match:
marker_target_list = list(
re.findall(
r"([0-9A-Z_]{3,})",
target_list_match.group(1),
re.MULTILINE,
)
)
for target in marker_target_list:
if target in markers:
print("WARNING: target duplicate in " + str(f) + ", " + target + " first listed in " + markers[target])
errors.append({ "file": str(f), "error": "duplicate marker"})
else:
markers[target] = str(f)
return errors
def target_has_arduino_form_factor(target_name):
"""Check if the target has the Arduino form factor."""
mbed_os_root = pathlib.Path(__file__).absolute().parents[4]
with (
mbed_os_root.joinpath("targets", "targets.json")
).open() as targets_json_file:
target_data = json.load(targets_json_file)
if target_name in target_data:
if "supported_form_factors" in target_data[target_name]:
form_factors = target_data[target_name]["supported_form_factors"]
if "ARDUINO_UNO" in form_factors:
return True
return False
def pin_name_to_dict(pin_name_file_content):
pin_name_enum_dict = dict()
pin_name_enum_match = re.search(
"typedef enum {\n([^}]*)\n} PinName;", pin_name_file_content
)
if pin_name_enum_match:
pin_name_enum_body = pin_name_enum_match.group(1)
pin_name_enum_dict = dict(
re.findall(
r"^\s*([a-zA-Z0-9_]+)\s*=\s*([a-zA-Z0-9_]+)",
pin_name_enum_body,
re.MULTILINE,
)
)
pin_name_define_dict = dict(
re.findall(
r"^#define\s+([a-zA-Z0-9_]+)\s+([a-zA-Z0-9_]+)",
pin_name_file_content,
re.MULTILINE,
)
)
return {**pin_name_enum_dict, **pin_name_define_dict}
def identity_assignment_check(pin_name_dict):
invalid_items = []
for key, val in pin_name_dict.items():
if val == key:
message = "cannot assign value to itself"
invalid_items.append({"key": key, "val": val, "message": message})
return invalid_items
def nc_assignment_check(pin_name_dict):
invalid_items = []
for key, val in pin_name_dict.items():
if re.match(r"^((LED|BUTTON)\d*|USBTX|USBRX)$", key):
if val == "NC":
message = "cannot be NC"
invalid_items.append(
{"key": key, "val": val, "message": message}
)
return invalid_items
def duplicate_assignment_check(pin_name_dict):
used_pins = []
used_pins_friendly = []
invalid_items = []
for key, val in pin_name_dict.items():
if re.match(r"^((LED|BUTTON)\d*|USBTX|USBRX)$", key):
if val == "NC":
continue
# resolve to literal
realval = val
depth = 0
while not re.match(
"(0x[0-9a-fA-F]+|[1-9][0-9]*|0[1-7][0-7]+|0b[01]+)[uUlL]{0,2}",
realval,
):
try:
realval = pin_name_dict[realval]
depth += 1
except KeyError:
break
if depth > 10:
break
if realval in used_pins:
message = (
"already assigned to "
+ used_pins_friendly[used_pins.index(realval)]
)
invalid_items.append(
{"key": key, "val": val, "message": message}
)
continue
used_pins.append(realval)
used_pins_friendly.append(key + " = " + val)
return invalid_items
def arduino_duplicate_assignment_check(pin_name_dict):
used_pins = []
used_pins_friendly = []
invalid_items = []
for key, val in pin_name_dict.items():
if re.match(r"^ARDUINO_UNO_[AD]\d+$", key):
if val == "NC":
continue
# resolve to literal
realval = val
depth = 0
while not re.match(
"(0x[0-9a-fA-F]+|[1-9][0-9]*|0[1-7][0-7]+|0b[01]+)[uUlL]{0,2}",
realval,
):
try:
realval = pin_name_dict[realval]
depth += 1
except KeyError:
break
if depth > 10:
break
if realval in used_pins:
message = (
"already assigned to "
+ used_pins_friendly[used_pins.index(realval)]
)
invalid_items.append(
{"key": key, "val": val, "message": message}
)
continue
used_pins.append(realval)
used_pins_friendly.append(key + " = " + val)
return invalid_items
def arduino_existence_check(pin_name_dict):
analog_pins = (f"ARDUINO_UNO_A{i}" for i in range(6))
digital_pins = (f"ARDUINO_UNO_D{i}" for i in range(16))
return [
{"key": pin, "val": "", "message": pin + " not defined"}
for pin in chain(analog_pins, digital_pins)
if pin not in pin_name_dict
]
def arduino_nc_assignment_check(pin_name_dict):
invalid_items = []
for key, val in pin_name_dict.items():
if re.match(r"^ARDUINO_UNO_[AD]\d+$", key):
if val == "NC":
message = "cannot be NC"
invalid_items.append(
{"key": key, "val": val, "message": message}
)
return invalid_items
def legacy_assignment_check(pin_name_content):
invalid_items = []
legacy_assignments = dict(
re.findall(
r"^\s*((?:LED|BUTTON)\d*)\s*=\s*([a-zA-Z0-9_]+)",
pin_name_content,
re.MULTILINE,
)
)
for key, val in legacy_assignments.items():
message = "legacy assignment; LEDs and BUTTONs must be #define'd"
invalid_items.append({"key": key, "val": val, "message": message})
return invalid_items
def print_summary(report):
targets = set([case["platform_name"] for case in report])
table = []
for target in targets:
error_count = 0
for case in report:
if (
case["platform_name"] == target
and case["result"] == "FAILED"
):
error_count += 1
table.append(
[target, "FAILED" if error_count else "PASSED", error_count]
)
return tabulate(
table,
headers=["Platform name", "Result", "Error count"],
tablefmt="grid",
)
def print_suite_summary(report):
targets = set([case["platform_name"] for case in report])
table = []
for target in targets:
suites = set([
case["suite_name"]
for case in report
if case["platform_name"] == target
])
for suite in suites:
result = "PASSED"
error_count = 0
for case in report:
if case["platform_name"] != target:
continue
if case["suite_name"] != suite:
continue
if case["result"] == "FAILED":
result = "FAILED"
error_count += 1
table.append([target, suite, result, error_count])
return tabulate(
table,
headers=["Platform name", "Test suite", "Result", "Error count"],
tablefmt="grid",
)
def print_report(report, print_error_detail, tablefmt="grid"):
table = []
for case in report:
errors_str = []
for error in case["errors"]:
errors_str.append("\n")
if error["key"]:
errors_str.append(error["key"])
if error["val"]:
errors_str.append(" = ")
errors_str.append(error["val"])
if error["message"]:
errors_str.append(" <-- ")
errors_str.append(error["message"])
if not errors_str:
errors_str = "None"
if print_error_detail:
table.append(
(
case["platform_name"],
case["suite_name"],
case["case_name"],
case["result"],
len(case["errors"]),
"None" if not errors_str else "".join(errors_str).lstrip(),
)
)
else:
table.append(
(
case["platform_name"],
case["suite_name"],
case["case_name"],
case["result"],
len(case["errors"]),
)
)
return tabulate(
table,
headers=[
"Platform name",
"Test suite",
"Test case",
"Result",
"Error count",
"Errors",
],
tablefmt=tablefmt,
)
def print_pretty_html_report(report):
output = []
output.append("<html><head><style>table, td, tr { border: 2px solid black; border-collapse: collapse; padding: 5px; font-family: Helvetica, serif; }</style></head>")
output.append('<body><p><button onclick=\'e=document.getElementsByTagName("details");for(var i=0;i<e.length;i++){e[i].setAttribute("open","true")};\'>Expand all errors</button></p><table>')
output.append("<tr><th>Platform name</th><th>Test suite</th><th>Test case</th><th>Result</th><th>Error count</th><th>Errors</th></tr>")
for case in report:
output.append("<tr>")
if case["errors"]:
error_details = ["<details><summary>View errors</summary><table>"]
for error in case["errors"]:
error_details.append("<tr>")
if error["key"]:
error_details.append("<td>")
error_details.append(error["key"])
error_details.append("</td>")
if error["val"]:
error_details.append("<td>")
error_details.append(error["val"])
error_details.append("</td>")
if error["message"]:
error_details.append("<td>")
error_details.append(error["message"])
error_details.append("</td>")
error_details.append("</tr>")
error_details.append("</table></details>")
else:
error_details = []
output.append("<td>")
output.append(case["platform_name"])
output.append("</td>")
output.append("<td>")
output.append(case["suite_name"])
output.append("</td>")
output.append("<td>")
output.append(case["case_name"])
output.append("</td>")
if case["result"] == "PASSED":
color = "green"
count_color = "black"
else:
color = "red"
count_color = "red"
output.append("<td style='color:")
output.append(color)
output.append("'>")
output.append(case["result"])
output.append("</td>")
output.append("<td style='color:")
output.append(count_color)
output.append("'>")
output.append(str(len(case["errors"])))
output.append("</td>")
output.append("<td>")
output.extend(error_details)
output.append("</td>")
output.append("</tr>")
output.append("</table></body></table>")
return "".join(output)
def has_passed_all_test_cases(report):
"""Check that all test cases passed."""
for case in report:
if case["result"] == "FAILED":
return False
return True
test_cases = [
{
"suite_name": "generic",
"case_name": "identity",
"case_function": identity_assignment_check,
"case_input": "dict",
},
{
"suite_name": "generic",
"case_name": "nc",
"case_function": nc_assignment_check,
"case_input": "dict",
},
{
"suite_name": "generic",
"case_name": "duplicate",
"case_function": duplicate_assignment_check,
"case_input": "dict",
},
{
"suite_name": "generic",
"case_name": "legacy",
"case_function": legacy_assignment_check,
"case_input": "content",
},
{
"suite_name": "arduino_uno",
"case_name": "duplicate",
"case_function": arduino_duplicate_assignment_check,
"case_input": "dict",
},
{
"suite_name": "arduino_uno",
"case_name": "existence",
"case_function": arduino_existence_check,
"case_input": "dict",
},
{
"suite_name": "arduino_uno",
"case_name": "nc",
"case_function": arduino_nc_assignment_check,
"case_input": "dict",
},
]
def validate_pin_names(args):
"""Entry point for validating the Pin names."""
suites = []
if args.suite_names:
suites = args.suite_names.split(",")
targets = dict()
if args.paths:
paths = args.paths.split(",")
for path in paths:
targets = {**targets, **find_target_by_path(path)}
elif args.targets:
target_names = args.targets.split(",")
for target_name in target_names:
targets = {**targets, **find_target_by_name(target_name)}
elif args.all:
targets = find_target_by_name()
elif args.check_markers:
check_markers()
check_duplicate_pinnames_files()
check_duplicate_markers()
return
report = []
for target, path in targets.items():
pin_name_content = open(path).read()
pin_name_dict = pin_name_to_dict(pin_name_content)
arduino_support = target_has_arduino_form_factor(target)
for case in test_cases:
if suites:
if case["suite_name"] not in suites:
continue
else:
if not arduino_support and case["suite_name"] == "arduino_uno":
continue
if case["case_input"] == "dict":
case_input = pin_name_dict
elif case["case_input"] == "content":
case_input = pin_name_content
case_output = case["case_function"](case_input)
case_result = "FAILED" if case_output else "PASSED"
platform_name = target
if not args.full_name and args.output_format == "prettytext":
if len(platform_name) > 40:
platform_name = "..." + platform_name[-40:]
report.append(
{
"platform_name": platform_name,
"suite_name": case["suite_name"],
"case_name": case["case_name"],
"result": case_result,
"errors": case_output,
}
)
generate_output(report, args.output_format, args.verbose, args.output_file)
if not has_passed_all_test_cases(report):
raise TestCaseError("One or more test cases failed")
def generate_output(report, output_format, verbosity, output_file):
"""Generate the output."""
if output_format == "json":
output = json.dumps(report)
elif output_format == "html":
output = print_pretty_html_report(report)
else:
if verbosity == 0:
output = print_summary(report)
elif verbosity == 1:
output = print_suite_summary(report)
elif verbosity == 2:
output = print_report(report, False)
elif verbosity > 2:
output = print_report(report, True)
if output_file:
with open(output_file, "w") as out_file:
out_file.write(output)
else:
print(output)
def parse_args():
"""Parse the command line args."""
parser = ArgumentParserWithDefaultHelp(
description="Pin names validation",
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
parser.add_argument(
"-n",
"--suite_names",
help="Run specific test suite. Use comma to seperate multiple suites.",
)
parser.add_argument(
"-v",
"--verbose",
action="count",
default=0,
help=(
"Verbosity of the report (none to -vvv)."
" Only applies for 'prettytext' output format."
),
)
parser.add_argument(
"-f",
"--full_name",
action="store_true",
help=(
"Don't truncate long platform names in"
" human-readable output formats"
),
)
parser.add_argument(
"-o",
"--output_format",
default="prettytext",
help="Set the output format: prettytext (default), json or html",
)
parser.add_argument(
"-w",
"--output_file",
help="File to write output to, instead of printing to stdout",
)
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument(
"-t",
"--targets",
help=(
"Target name. Use comma to seperate multiple targets."
"THIS FEATURE IS EXPERIMENTAL!"
),
)
group.add_argument(
"-p",
"--paths",
help="Path to PinNames.h file. Use comma to seperate multiple paths.",
)
group.add_argument(
"-a", "--all", action="store_true", help="Run tests on all targets."
)
group.add_argument(
"-m",
"--check-markers",
action="store_true",
help="Check all PinNames.h for the MBED TARGET LIST marker."
)
parser.set_defaults(func=validate_pin_names)
args_namespace = parser.parse_args()
# We want to fail gracefully, with a consistent
# help message, in the no argument case.
# So here's an obligatory hasattr hack.
if not hasattr(args_namespace, "func"):
parser.error("No arguments given!")
else:
return args_namespace
def run_pin_validate():
"""Application main algorithm."""
args = parse_args()
args.func(args)
def _main():
"""Run pinvalidate."""
try:
run_pin_validate()
except Exception as error:
print(error)
return ReturnCode.ERROR.value
else:
return ReturnCode.SUCCESS.value
if __name__ == "__main__":
sys.exit(_main())

View File

@ -0,0 +1,205 @@
"""
Copyright (c) 2020 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.
"""
import pytest
from pinvalidate import *
@pytest.fixture
def pin_name_content():
pin_name_file = open("./test_files/PinNames_test.h")
return pin_name_file.read()
@pytest.fixture
def pin_name_dict(pin_name_content):
return pin_name_to_dict(pin_name_content)
def test_marker_check():
expect = [
{'file': '/Users/geopsi01/Development/mbed-os/hal/tests/TESTS/pin_names/test_files/nonexistent_target/PinNames.h', 'error': 'target not found'},
{'file': '/Users/geopsi01/Development/mbed-os/hal/tests/TESTS/pin_names/test_files/misformatted_marker/PinNames.h', 'error': 'marker invalid or not found'},
{'file': '/Users/geopsi01/Development/mbed-os/hal/tests/TESTS/pin_names/test_files/missing_marker/PinNames.h', 'error': 'marker invalid or not found'}
]
assert check_markers(test_mode=True) == expect
def test_duplicate_pinnames_files_check():
expect = [
{'file': '/Users/geopsi01/Development/mbed-os/hal/tests/TESTS/pin_names/test_files/PinNames.h', 'error': 'duplicate file'},
{'file': '/Users/geopsi01/Development/mbed-os/hal/tests/TESTS/pin_names/test_files/duplicate_marker/PinNames.h', 'error': 'duplicate file'}
]
assert check_duplicate_pinnames_files(test_mode=True) == expect
def test_duplicate_markers_check():
expect = [
{'file': '/Users/geopsi01/Development/mbed-os/hal/tests/TESTS/pin_names/test_files/duplicate_file/PinNames.h', 'error': 'duplicate marker'},
{'file': '/Users/geopsi01/Development/mbed-os/hal/tests/TESTS/pin_names/test_files/duplicate_marker/PinNames.h', 'error': 'duplicate marker'}
]
assert check_duplicate_markers(test_mode=True) == expect
def test_pin_name_to_dict(pin_name_dict):
expect = {
"PA_0": "0x00",
"PA_1": "0x01",
"PA_2": "0x02",
"PA_3": "0x03",
"PA_4": "0x04",
"PA_5": "0x05",
"PA_6": "0x06",
"PA_7": "0x07",
"PA_8": "0x08",
"PA_9": "0x09",
"PA_10": "0x0A",
"PA_11": "0x0B",
"PA_12": "0x0C",
"PA_13": "0x0D",
"PA_14": "0x0E",
"PA_15": "0x0F",
"PB_0": "0x10",
"PB_1": "0x11",
"PB_2": "0x12",
"PB_3": "0x13",
"PB_4": "0x14",
"PB_5": "0x15",
"PB_6": "0x16",
"PB_7": "0x17",
"PB_8": "0x18",
"PB_9": "0x19",
"PB_10": "0x1A",
"PB_11": "0x1B",
"PB_12": "0x1C",
"PB_13": "0x1D",
"PB_14": "0x1E",
"PB_15": "0x1F",
"PC_0": "0x20",
"PC_1": "0x21",
"PC_2": "0x22",
"PC_3": "0x23",
"PC_4": "0x24",
"PC_5": "0x25",
"PC_6": "0x26",
"PC_7": "0x27",
"PC_8": "0x28",
"PC_9": "0x29",
"PC_10": "0x2A",
"PC_11": "0x2B",
"PC_12": "0x2C",
"PC_13": "0x2D",
"PC_14": "0x2E",
"PC_15": "0x2F",
"PD_0": "0x30",
"PD_1": "0x31",
"PD_2": "0x32",
"PD_3": "0x33",
"PD_4": "0x34",
"PD_5": "0x35",
"PD_6": "0x36",
"PD_7": "0x37",
"PD_8": "0x38",
"PD_9": "0x39",
"PD_10": "0x3A",
"PD_11": "0x3B",
"PD_12": "0x3C",
"PD_13": "0x3D",
"PD_14": "0x3E",
"PD_15": "0x3F",
"ARDUINO_UNO_A0": "PC_5",
"ARDUINO_UNO_A1": "PC_4",
"ARDUINO_UNO_A2": "PC_3",
"ARDUINO_UNO_A3": "PC_2",
"ARDUINO_UNO_A4": "PC_1",
"ARDUINO_UNO_A5": "PC_0",
"ARDUINO_UNO_D0": "PA_1",
"ARDUINO_UNO_D1": "PA_0",
"ARDUINO_UNO_D2": "PD_14",
"ARDUINO_UNO_D3": "PB_0",
"ARDUINO_UNO_D4": "PA_3",
"ARDUINO_UNO_D5": "PB_4",
"ARDUINO_UNO_D6": "PB_1",
"ARDUINO_UNO_D8": "PB_1",
"ARDUINO_UNO_D9": "PA_15",
"ARDUINO_UNO_D10": "PA_2",
"ARDUINO_UNO_D11": "NC",
"ARDUINO_UNO_D12": "PA_6",
"ARDUINO_UNO_D13": "PA_5",
"ARDUINO_UNO_D14": "PB_9",
"ARDUINO_UNO_D15": "PB_8",
"USBTX": "PB_6",
"USBRX": "PB_7",
"LED1": "PA_5",
"BUTTON1": "PC_2",
"LED2": "PB_14",
"LED3": "PC_9",
"BUTTON2": "PC_13",
"LED4": "LED3",
"LED5": "PC_9",
"LED6": "LED6",
"LED7": "NC",
"BUTTON3": "PC_13",
"BUTTON4": "BUTTON1",
"BUTTON5": "NC",
"BUTTON6": "BUTTON6",
}
assert pin_name_dict == expect
def test_identity_assignment_check(pin_name_dict):
expected_errors = [
{'key': 'LED6', 'val': 'LED6', 'message': 'cannot assign value to itself'},
{'key': 'BUTTON6', 'val': 'BUTTON6', 'message': 'cannot assign value to itself'},
]
assert identity_assignment_check(pin_name_dict) == expected_errors
def test_nc_assignment_check(pin_name_dict):
expected_errors = [
{'key': 'LED7','message': 'cannot be NC','val': 'NC'},
{'key': 'BUTTON5','message': 'cannot be NC','val': 'NC'},
]
assert nc_assignment_check(pin_name_dict) == expected_errors
def test_duplicate_assignment_check(pin_name_dict):
expected_errors = [
{'key': 'LED4', 'val': 'LED3', 'message': 'already assigned to LED3 = PC_9'},
{'key': 'LED5', 'val': 'PC_9', 'message': 'already assigned to LED3 = PC_9'},
{'key': 'BUTTON3', 'val': 'PC_13', 'message': 'already assigned to BUTTON2 = PC_13'},
{'key': 'BUTTON4', 'val': 'BUTTON1', 'message': 'already assigned to BUTTON1 = PC_2'},
]
assert duplicate_assignment_check(pin_name_dict) == expected_errors
def test_legacy_assignment_check(pin_name_content):
expected_errors = [
{'key': 'LED1', 'val': 'PA_5', 'message': 'legacy assignment; LEDs and BUTTONs must be #define\'d'},
{'key': 'BUTTON1', 'val': 'PC_2', 'message': 'legacy assignment; LEDs and BUTTONs must be #define\'d'},
]
assert legacy_assignment_check(pin_name_content) == expected_errors
def test_arduino_duplicate_assignment_check(pin_name_dict):
expected_errors = [
{'key': 'ARDUINO_UNO_D8', 'val': 'PB_1', 'message': 'already assigned to ARDUINO_UNO_D6 = PB_1'},
]
assert arduino_duplicate_assignment_check(pin_name_dict) == expected_errors
def test_arduino_existence_check(pin_name_dict):
expected_errors = [
{'key': 'ARDUINO_UNO_D7', 'val': '', 'message': 'ARDUINO_UNO_D7 not defined'},
]
assert arduino_existence_check(pin_name_dict) == expected_errors
def test_arduino_nc_assignment_check(pin_name_dict):
expected_errors = [
{'key': 'ARDUINO_UNO_D11', 'val': 'NC', 'message': 'cannot be NC'},
]
assert arduino_nc_assignment_check(pin_name_dict) == expected_errors

View File

@ -0,0 +1,149 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* 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.
*/
/* MBED TARGET LIST: LPC1768 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H
#include "cmsis.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
PIN_INPUT,
PIN_OUTPUT
} PinDirection;
#define PORT_SHIFT 5
typedef enum {
// LPC Pin Names
P0_0 = LPC_GPIO0_BASE,
P0_1, P0_2, P0_3, P0_4, P0_5, P0_6, P0_7, P0_8, P0_9, P0_10, P0_11, P0_12, P0_13, P0_14, P0_15, P0_16, P0_17, P0_18, P0_19, P0_20, P0_21, P0_22, P0_23, P0_24, P0_25, P0_26, P0_27, P0_28, P0_29, P0_30, P0_31,
P1_0, P1_1, P1_2, P1_3, P1_4, P1_5, P1_6, P1_7, P1_8, P1_9, P1_10, P1_11, P1_12, P1_13, P1_14, P1_15, P1_16, P1_17, P1_18, P1_19, P1_20, P1_21, P1_22, P1_23, P1_24, P1_25, P1_26, P1_27, P1_28, P1_29, P1_30, P1_31,
P2_0, P2_1, P2_2, P2_3, P2_4, P2_5, P2_6, P2_7, P2_8, P2_9, P2_10, P2_11, P2_12, P2_13, P2_14, P2_15, P2_16, P2_17, P2_18, P2_19, P2_20, P2_21, P2_22, P2_23, P2_24, P2_25, P2_26, P2_27, P2_28, P2_29, P2_30, P2_31,
P3_0, P3_1, P3_2, P3_3, P3_4, P3_5, P3_6, P3_7, P3_8, P3_9, P3_10, P3_11, P3_12, P3_13, P3_14, P3_15, P3_16, P3_17, P3_18, P3_19, P3_20, P3_21, P3_22, P3_23, P3_24, P3_25, P3_26, P3_27, P3_28, P3_29, P3_30, P3_31,
P4_0, P4_1, P4_2, P4_3, P4_4, P4_5, P4_6, P4_7, P4_8, P4_9, P4_10, P4_11, P4_12, P4_13, P4_14, P4_15, P4_16, P4_17, P4_18, P4_19, P4_20, P4_21, P4_22, P4_23, P4_24, P4_25, P4_26, P4_27, P4_28, P4_29, P4_30, P4_31,
// mbed DIP Pin Names
p5 = P0_9,
p6 = P0_8,
p7 = P0_7,
p8 = P0_6,
p9 = P0_0,
p10 = P0_1,
p11 = P0_18,
p12 = P0_17,
p13 = P0_15,
p14 = P0_16,
p15 = P0_23,
p16 = P0_24,
p17 = P0_25,
p18 = P0_26,
p19 = P1_30,
p20 = P1_31,
p21 = P2_5,
p22 = P2_4,
p23 = P2_3,
p24 = P2_2,
p25 = P2_1,
p26 = P2_0,
p27 = P0_11,
p28 = P0_10,
p29 = P0_5,
p30 = P0_4,
// Other mbed Pin Names
#ifdef MCB1700
LED1 = P1_28,
LED2 = P1_29,
LED3 = P1_31,
LED4 = P2_2,
#else
LED1 = P1_18,
LED2 = P1_20,
LED3 = P1_21,
LED4 = P1_23,
#endif
USBTX = P0_2,
USBRX = P0_3,
// Arch Pro Pin Names
D0 = P4_29,
D1 = P4_28,
D2 = P0_4,
D3 = P0_5,
D4 = P2_2,
D5 = P2_3,
D6 = P2_4,
D7 = P2_5,
D8 = P0_0,
D9 = P0_1,
D10 = P0_6,
D11 = P0_9,
D12 = P0_8,
D13 = P0_7,
D14 = P0_27,
D15 = P0_28,
A0 = P0_23,
A1 = P0_24,
A2 = P0_25,
A3 = P0_26,
A4 = P1_30,
A5 = P1_31,
// Not connected
NC = (int)0xFFFFFFFF,
I2C_SCL0 = NC,
I2C_SDA0 = NC,
I2C_SCL1 = p10,
I2C_SDA1 = p9,
I2C_SCL2 = P0_11, // pin used by application board
I2C_SDA2 = P0_10, // pin used by application board
I2C_SCL = I2C_SCL2,
I2C_SDA = I2C_SDA2,
} PinName;
typedef enum {
PullUp = 0,
PullDown = 3,
PullNone = 2,
Repeater = 1,
OpenDrain = 4,
PullDefault = PullDown
} PinMode;
// version of PINCON_TypeDef using register arrays
typedef struct {
__IO uint32_t PINSEL[11];
uint32_t RESERVED0[5];
__IO uint32_t PINMODE[10];
__IO uint32_t PINMODE_OD[5];
} PINCONARRAY_TypeDef;
#define PINCONARRAY ((PINCONARRAY_TypeDef *)LPC_PINCON_BASE)
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,148 @@
/*
* Copyright (c) 2020 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* 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_PINNAMES_H
#define MBED_PINNAMES_H
#include "cmsis.h"
#include "PinNamesTypes.h"
typedef enum {
// valid pin definitions
PA_0 = 0x00,
PA_1 = 0x01,
PA_2 = 0x02,
PA_3 = 0x03,
PA_4 = 0x04,
PA_5 = 0x05,
PA_6 = 0x06,
PA_7 = 0x07,
PA_8 = 0x08,
PA_9 = 0x09,
PA_10 = 0x0A,
PA_11 = 0x0B,
PA_12 = 0x0C,
PA_13 = 0x0D,
PA_14 = 0x0E,
PA_15 = 0x0F,
// valid pin definitions
PB_0 = 0x10,
PB_1 = 0x11,
PB_2 = 0x12,
PB_3 = 0x13,
PB_4 = 0x14,
PB_5 = 0x15,
PB_6 = 0x16,
PB_7 = 0x17,
PB_8 = 0x18,
PB_9 = 0x19,
PB_10 = 0x1A,
PB_11 = 0x1B,
PB_12 = 0x1C,
PB_13 = 0x1D,
PB_14 = 0x1E,
PB_15 = 0x1F,
// valid pin definitions
PC_0 = 0x20,
PC_1 = 0x21,
PC_2 = 0x22,
PC_3 = 0x23,
PC_4 = 0x24,
PC_5 = 0x25,
PC_6 = 0x26,
PC_7 = 0x27,
PC_8 = 0x28,
PC_9 = 0x29,
PC_10 = 0x2A,
PC_11 = 0x2B,
PC_12 = 0x2C,
PC_13 = 0x2D,
PC_14 = 0x2E,
PC_15 = 0x2F,
// valid pin definitions
PD_0 = 0x30,
PD_1 = 0x31,
PD_2 = 0x32,
PD_3 = 0x33,
PD_4 = 0x34,
PD_5 = 0x35,
PD_6 = 0x36,
PD_7 = 0x37,
PD_8 = 0x38,
PD_9 = 0x39,
PD_10 = 0x3A,
PD_11 = 0x3B,
PD_12 = 0x3C,
PD_13 = 0x3D,
PD_14 = 0x3E,
PD_15 = 0x3F,
// valid (except D7, D8) Arduino Uno(Rev3) header pin definitions
ARDUINO_UNO_A0 = PC_5, // ADC / GPIO
ARDUINO_UNO_A1 = PC_4, // ADC / GPIO
ARDUINO_UNO_A2 = PC_3, // ADC / GPIO
ARDUINO_UNO_A3 = PC_2, // ADC / GPIO
ARDUINO_UNO_A4 = PC_1, // ADC / GPIO
ARDUINO_UNO_A5 = PC_0, // ADC / GPIO
ARDUINO_UNO_D0 = PA_1, // UART RX / GPIO
ARDUINO_UNO_D1 = PA_0, // UART RX / GPIO
ARDUINO_UNO_D2 = PD_14, // GPIO
ARDUINO_UNO_D3 = PB_0, // PWM / GPIO
ARDUINO_UNO_D4 = PA_3, // GPIO
ARDUINO_UNO_D5 = PB_4, // PWM / GPIO
ARDUINO_UNO_D6 = PB_1, // PWM / GPIO
//ARDUINO_UNO_D7 = PA_4,// invalid - missing definition (GPIO)
ARDUINO_UNO_D8 = PB_1, // invalid - duplicate pin (GPIO)
ARDUINO_UNO_D9 = PA_15, // PWM / GPIO
ARDUINO_UNO_D10 = PA_2, // SPI CS / PWM / GPIO
ARDUINO_UNO_D11 = NC, // invalid - NC assignment
ARDUINO_UNO_D12 = PA_6, // SPI MISO / PWM / GPIO
ARDUINO_UNO_D13 = PA_5, // SPI SCK / GPIO
ARDUINO_UNO_D14 = PB_9, // I2C SDA / GPIO
ARDUINO_UNO_D15 = PB_8, // I2C SCL / GPIO
// valid STDIO definitions for console print
USBTX = PB_6,
USBRX = PB_7,
// invalid legacy LED/BUTTON definitions
// these should be a #define, not in an enum
LED1 = PA_5,
BUTTON1 = PC_2,
} PinName;
// valid standardized LED and button definitions
#define LED2 PB_14
#define LED3 PC_9
#define BUTTON2 PC_13
// invalid LED definitions
#define LED4 LED3 // duplicate
#define LED5 PC_9 // duplicate
#define LED6 LED6 // identity
#define LED7 NC // NC
// invalid button definitions
#define BUTTON3 PC_13 // duplicate
#define BUTTON4 BUTTON1 // duplicate
#define BUTTON5 NC // NC
#define BUTTON6 BUTTON6 // identity
#endif

View File

@ -0,0 +1,149 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* 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.
*/
/* MBED TARGET LIST: K64F, LPC1768 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H
#include "cmsis.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
PIN_INPUT,
PIN_OUTPUT
} PinDirection;
#define PORT_SHIFT 5
typedef enum {
// LPC Pin Names
P0_0 = LPC_GPIO0_BASE,
P0_1, P0_2, P0_3, P0_4, P0_5, P0_6, P0_7, P0_8, P0_9, P0_10, P0_11, P0_12, P0_13, P0_14, P0_15, P0_16, P0_17, P0_18, P0_19, P0_20, P0_21, P0_22, P0_23, P0_24, P0_25, P0_26, P0_27, P0_28, P0_29, P0_30, P0_31,
P1_0, P1_1, P1_2, P1_3, P1_4, P1_5, P1_6, P1_7, P1_8, P1_9, P1_10, P1_11, P1_12, P1_13, P1_14, P1_15, P1_16, P1_17, P1_18, P1_19, P1_20, P1_21, P1_22, P1_23, P1_24, P1_25, P1_26, P1_27, P1_28, P1_29, P1_30, P1_31,
P2_0, P2_1, P2_2, P2_3, P2_4, P2_5, P2_6, P2_7, P2_8, P2_9, P2_10, P2_11, P2_12, P2_13, P2_14, P2_15, P2_16, P2_17, P2_18, P2_19, P2_20, P2_21, P2_22, P2_23, P2_24, P2_25, P2_26, P2_27, P2_28, P2_29, P2_30, P2_31,
P3_0, P3_1, P3_2, P3_3, P3_4, P3_5, P3_6, P3_7, P3_8, P3_9, P3_10, P3_11, P3_12, P3_13, P3_14, P3_15, P3_16, P3_17, P3_18, P3_19, P3_20, P3_21, P3_22, P3_23, P3_24, P3_25, P3_26, P3_27, P3_28, P3_29, P3_30, P3_31,
P4_0, P4_1, P4_2, P4_3, P4_4, P4_5, P4_6, P4_7, P4_8, P4_9, P4_10, P4_11, P4_12, P4_13, P4_14, P4_15, P4_16, P4_17, P4_18, P4_19, P4_20, P4_21, P4_22, P4_23, P4_24, P4_25, P4_26, P4_27, P4_28, P4_29, P4_30, P4_31,
// mbed DIP Pin Names
p5 = P0_9,
p6 = P0_8,
p7 = P0_7,
p8 = P0_6,
p9 = P0_0,
p10 = P0_1,
p11 = P0_18,
p12 = P0_17,
p13 = P0_15,
p14 = P0_16,
p15 = P0_23,
p16 = P0_24,
p17 = P0_25,
p18 = P0_26,
p19 = P1_30,
p20 = P1_31,
p21 = P2_5,
p22 = P2_4,
p23 = P2_3,
p24 = P2_2,
p25 = P2_1,
p26 = P2_0,
p27 = P0_11,
p28 = P0_10,
p29 = P0_5,
p30 = P0_4,
// Other mbed Pin Names
#ifdef MCB1700
LED1 = P1_28,
LED2 = P1_29,
LED3 = P1_31,
LED4 = P2_2,
#else
LED1 = P1_18,
LED2 = P1_20,
LED3 = P1_21,
LED4 = P1_23,
#endif
USBTX = P0_2,
USBRX = P0_3,
// Arch Pro Pin Names
D0 = P4_29,
D1 = P4_28,
D2 = P0_4,
D3 = P0_5,
D4 = P2_2,
D5 = P2_3,
D6 = P2_4,
D7 = P2_5,
D8 = P0_0,
D9 = P0_1,
D10 = P0_6,
D11 = P0_9,
D12 = P0_8,
D13 = P0_7,
D14 = P0_27,
D15 = P0_28,
A0 = P0_23,
A1 = P0_24,
A2 = P0_25,
A3 = P0_26,
A4 = P1_30,
A5 = P1_31,
// Not connected
NC = (int)0xFFFFFFFF,
I2C_SCL0 = NC,
I2C_SDA0 = NC,
I2C_SCL1 = p10,
I2C_SDA1 = p9,
I2C_SCL2 = P0_11, // pin used by application board
I2C_SDA2 = P0_10, // pin used by application board
I2C_SCL = I2C_SCL2,
I2C_SDA = I2C_SDA2,
} PinName;
typedef enum {
PullUp = 0,
PullDown = 3,
PullNone = 2,
Repeater = 1,
OpenDrain = 4,
PullDefault = PullDown
} PinMode;
// version of PINCON_TypeDef using register arrays
typedef struct {
__IO uint32_t PINSEL[11];
uint32_t RESERVED0[5];
__IO uint32_t PINMODE[10];
__IO uint32_t PINMODE_OD[5];
} PINCONARRAY_TypeDef;
#define PINCONARRAY ((PINCONARRAY_TypeDef *)LPC_PINCON_BASE)
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,149 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* 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.
*/
/* MBED TARGET LIST: LPC1768 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H
#include "cmsis.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
PIN_INPUT,
PIN_OUTPUT
} PinDirection;
#define PORT_SHIFT 5
typedef enum {
// LPC Pin Names
P0_0 = LPC_GPIO0_BASE,
P0_1, P0_2, P0_3, P0_4, P0_5, P0_6, P0_7, P0_8, P0_9, P0_10, P0_11, P0_12, P0_13, P0_14, P0_15, P0_16, P0_17, P0_18, P0_19, P0_20, P0_21, P0_22, P0_23, P0_24, P0_25, P0_26, P0_27, P0_28, P0_29, P0_30, P0_31,
P1_0, P1_1, P1_2, P1_3, P1_4, P1_5, P1_6, P1_7, P1_8, P1_9, P1_10, P1_11, P1_12, P1_13, P1_14, P1_15, P1_16, P1_17, P1_18, P1_19, P1_20, P1_21, P1_22, P1_23, P1_24, P1_25, P1_26, P1_27, P1_28, P1_29, P1_30, P1_31,
P2_0, P2_1, P2_2, P2_3, P2_4, P2_5, P2_6, P2_7, P2_8, P2_9, P2_10, P2_11, P2_12, P2_13, P2_14, P2_15, P2_16, P2_17, P2_18, P2_19, P2_20, P2_21, P2_22, P2_23, P2_24, P2_25, P2_26, P2_27, P2_28, P2_29, P2_30, P2_31,
P3_0, P3_1, P3_2, P3_3, P3_4, P3_5, P3_6, P3_7, P3_8, P3_9, P3_10, P3_11, P3_12, P3_13, P3_14, P3_15, P3_16, P3_17, P3_18, P3_19, P3_20, P3_21, P3_22, P3_23, P3_24, P3_25, P3_26, P3_27, P3_28, P3_29, P3_30, P3_31,
P4_0, P4_1, P4_2, P4_3, P4_4, P4_5, P4_6, P4_7, P4_8, P4_9, P4_10, P4_11, P4_12, P4_13, P4_14, P4_15, P4_16, P4_17, P4_18, P4_19, P4_20, P4_21, P4_22, P4_23, P4_24, P4_25, P4_26, P4_27, P4_28, P4_29, P4_30, P4_31,
// mbed DIP Pin Names
p5 = P0_9,
p6 = P0_8,
p7 = P0_7,
p8 = P0_6,
p9 = P0_0,
p10 = P0_1,
p11 = P0_18,
p12 = P0_17,
p13 = P0_15,
p14 = P0_16,
p15 = P0_23,
p16 = P0_24,
p17 = P0_25,
p18 = P0_26,
p19 = P1_30,
p20 = P1_31,
p21 = P2_5,
p22 = P2_4,
p23 = P2_3,
p24 = P2_2,
p25 = P2_1,
p26 = P2_0,
p27 = P0_11,
p28 = P0_10,
p29 = P0_5,
p30 = P0_4,
// Other mbed Pin Names
#ifdef MCB1700
LED1 = P1_28,
LED2 = P1_29,
LED3 = P1_31,
LED4 = P2_2,
#else
LED1 = P1_18,
LED2 = P1_20,
LED3 = P1_21,
LED4 = P1_23,
#endif
USBTX = P0_2,
USBRX = P0_3,
// Arch Pro Pin Names
D0 = P4_29,
D1 = P4_28,
D2 = P0_4,
D3 = P0_5,
D4 = P2_2,
D5 = P2_3,
D6 = P2_4,
D7 = P2_5,
D8 = P0_0,
D9 = P0_1,
D10 = P0_6,
D11 = P0_9,
D12 = P0_8,
D13 = P0_7,
D14 = P0_27,
D15 = P0_28,
A0 = P0_23,
A1 = P0_24,
A2 = P0_25,
A3 = P0_26,
A4 = P1_30,
A5 = P1_31,
// Not connected
NC = (int)0xFFFFFFFF,
I2C_SCL0 = NC,
I2C_SDA0 = NC,
I2C_SCL1 = p10,
I2C_SDA1 = p9,
I2C_SCL2 = P0_11, // pin used by application board
I2C_SDA2 = P0_10, // pin used by application board
I2C_SCL = I2C_SCL2,
I2C_SDA = I2C_SDA2,
} PinName;
typedef enum {
PullUp = 0,
PullDown = 3,
PullNone = 2,
Repeater = 1,
OpenDrain = 4,
PullDefault = PullDown
} PinMode;
// version of PINCON_TypeDef using register arrays
typedef struct {
__IO uint32_t PINSEL[11];
uint32_t RESERVED0[5];
__IO uint32_t PINMODE[10];
__IO uint32_t PINMODE_OD[5];
} PINCONARRAY_TypeDef;
#define PINCONARRAY ((PINCONARRAY_TypeDef *)LPC_PINCON_BASE)
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,149 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* 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.
*/
/* MBED TARGET LIST LPC1768 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H
#include "cmsis.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
PIN_INPUT,
PIN_OUTPUT
} PinDirection;
#define PORT_SHIFT 5
typedef enum {
// LPC Pin Names
P0_0 = LPC_GPIO0_BASE,
P0_1, P0_2, P0_3, P0_4, P0_5, P0_6, P0_7, P0_8, P0_9, P0_10, P0_11, P0_12, P0_13, P0_14, P0_15, P0_16, P0_17, P0_18, P0_19, P0_20, P0_21, P0_22, P0_23, P0_24, P0_25, P0_26, P0_27, P0_28, P0_29, P0_30, P0_31,
P1_0, P1_1, P1_2, P1_3, P1_4, P1_5, P1_6, P1_7, P1_8, P1_9, P1_10, P1_11, P1_12, P1_13, P1_14, P1_15, P1_16, P1_17, P1_18, P1_19, P1_20, P1_21, P1_22, P1_23, P1_24, P1_25, P1_26, P1_27, P1_28, P1_29, P1_30, P1_31,
P2_0, P2_1, P2_2, P2_3, P2_4, P2_5, P2_6, P2_7, P2_8, P2_9, P2_10, P2_11, P2_12, P2_13, P2_14, P2_15, P2_16, P2_17, P2_18, P2_19, P2_20, P2_21, P2_22, P2_23, P2_24, P2_25, P2_26, P2_27, P2_28, P2_29, P2_30, P2_31,
P3_0, P3_1, P3_2, P3_3, P3_4, P3_5, P3_6, P3_7, P3_8, P3_9, P3_10, P3_11, P3_12, P3_13, P3_14, P3_15, P3_16, P3_17, P3_18, P3_19, P3_20, P3_21, P3_22, P3_23, P3_24, P3_25, P3_26, P3_27, P3_28, P3_29, P3_30, P3_31,
P4_0, P4_1, P4_2, P4_3, P4_4, P4_5, P4_6, P4_7, P4_8, P4_9, P4_10, P4_11, P4_12, P4_13, P4_14, P4_15, P4_16, P4_17, P4_18, P4_19, P4_20, P4_21, P4_22, P4_23, P4_24, P4_25, P4_26, P4_27, P4_28, P4_29, P4_30, P4_31,
// mbed DIP Pin Names
p5 = P0_9,
p6 = P0_8,
p7 = P0_7,
p8 = P0_6,
p9 = P0_0,
p10 = P0_1,
p11 = P0_18,
p12 = P0_17,
p13 = P0_15,
p14 = P0_16,
p15 = P0_23,
p16 = P0_24,
p17 = P0_25,
p18 = P0_26,
p19 = P1_30,
p20 = P1_31,
p21 = P2_5,
p22 = P2_4,
p23 = P2_3,
p24 = P2_2,
p25 = P2_1,
p26 = P2_0,
p27 = P0_11,
p28 = P0_10,
p29 = P0_5,
p30 = P0_4,
// Other mbed Pin Names
#ifdef MCB1700
LED1 = P1_28,
LED2 = P1_29,
LED3 = P1_31,
LED4 = P2_2,
#else
LED1 = P1_18,
LED2 = P1_20,
LED3 = P1_21,
LED4 = P1_23,
#endif
USBTX = P0_2,
USBRX = P0_3,
// Arch Pro Pin Names
D0 = P4_29,
D1 = P4_28,
D2 = P0_4,
D3 = P0_5,
D4 = P2_2,
D5 = P2_3,
D6 = P2_4,
D7 = P2_5,
D8 = P0_0,
D9 = P0_1,
D10 = P0_6,
D11 = P0_9,
D12 = P0_8,
D13 = P0_7,
D14 = P0_27,
D15 = P0_28,
A0 = P0_23,
A1 = P0_24,
A2 = P0_25,
A3 = P0_26,
A4 = P1_30,
A5 = P1_31,
// Not connected
NC = (int)0xFFFFFFFF,
I2C_SCL0 = NC,
I2C_SDA0 = NC,
I2C_SCL1 = p10,
I2C_SDA1 = p9,
I2C_SCL2 = P0_11, // pin used by application board
I2C_SDA2 = P0_10, // pin used by application board
I2C_SCL = I2C_SCL2,
I2C_SDA = I2C_SDA2,
} PinName;
typedef enum {
PullUp = 0,
PullDown = 3,
PullNone = 2,
Repeater = 1,
OpenDrain = 4,
PullDefault = PullDown
} PinMode;
// version of PINCON_TypeDef using register arrays
typedef struct {
__IO uint32_t PINSEL[11];
uint32_t RESERVED0[5];
__IO uint32_t PINMODE[10];
__IO uint32_t PINMODE_OD[5];
} PINCONARRAY_TypeDef;
#define PINCONARRAY ((PINCONARRAY_TypeDef *)LPC_PINCON_BASE)
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,147 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* 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_PINNAMES_H
#define MBED_PINNAMES_H
#include "cmsis.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
PIN_INPUT,
PIN_OUTPUT
} PinDirection;
#define PORT_SHIFT 5
typedef enum {
// LPC Pin Names
P0_0 = LPC_GPIO0_BASE,
P0_1, P0_2, P0_3, P0_4, P0_5, P0_6, P0_7, P0_8, P0_9, P0_10, P0_11, P0_12, P0_13, P0_14, P0_15, P0_16, P0_17, P0_18, P0_19, P0_20, P0_21, P0_22, P0_23, P0_24, P0_25, P0_26, P0_27, P0_28, P0_29, P0_30, P0_31,
P1_0, P1_1, P1_2, P1_3, P1_4, P1_5, P1_6, P1_7, P1_8, P1_9, P1_10, P1_11, P1_12, P1_13, P1_14, P1_15, P1_16, P1_17, P1_18, P1_19, P1_20, P1_21, P1_22, P1_23, P1_24, P1_25, P1_26, P1_27, P1_28, P1_29, P1_30, P1_31,
P2_0, P2_1, P2_2, P2_3, P2_4, P2_5, P2_6, P2_7, P2_8, P2_9, P2_10, P2_11, P2_12, P2_13, P2_14, P2_15, P2_16, P2_17, P2_18, P2_19, P2_20, P2_21, P2_22, P2_23, P2_24, P2_25, P2_26, P2_27, P2_28, P2_29, P2_30, P2_31,
P3_0, P3_1, P3_2, P3_3, P3_4, P3_5, P3_6, P3_7, P3_8, P3_9, P3_10, P3_11, P3_12, P3_13, P3_14, P3_15, P3_16, P3_17, P3_18, P3_19, P3_20, P3_21, P3_22, P3_23, P3_24, P3_25, P3_26, P3_27, P3_28, P3_29, P3_30, P3_31,
P4_0, P4_1, P4_2, P4_3, P4_4, P4_5, P4_6, P4_7, P4_8, P4_9, P4_10, P4_11, P4_12, P4_13, P4_14, P4_15, P4_16, P4_17, P4_18, P4_19, P4_20, P4_21, P4_22, P4_23, P4_24, P4_25, P4_26, P4_27, P4_28, P4_29, P4_30, P4_31,
// mbed DIP Pin Names
p5 = P0_9,
p6 = P0_8,
p7 = P0_7,
p8 = P0_6,
p9 = P0_0,
p10 = P0_1,
p11 = P0_18,
p12 = P0_17,
p13 = P0_15,
p14 = P0_16,
p15 = P0_23,
p16 = P0_24,
p17 = P0_25,
p18 = P0_26,
p19 = P1_30,
p20 = P1_31,
p21 = P2_5,
p22 = P2_4,
p23 = P2_3,
p24 = P2_2,
p25 = P2_1,
p26 = P2_0,
p27 = P0_11,
p28 = P0_10,
p29 = P0_5,
p30 = P0_4,
// Other mbed Pin Names
#ifdef MCB1700
LED1 = P1_28,
LED2 = P1_29,
LED3 = P1_31,
LED4 = P2_2,
#else
LED1 = P1_18,
LED2 = P1_20,
LED3 = P1_21,
LED4 = P1_23,
#endif
USBTX = P0_2,
USBRX = P0_3,
// Arch Pro Pin Names
D0 = P4_29,
D1 = P4_28,
D2 = P0_4,
D3 = P0_5,
D4 = P2_2,
D5 = P2_3,
D6 = P2_4,
D7 = P2_5,
D8 = P0_0,
D9 = P0_1,
D10 = P0_6,
D11 = P0_9,
D12 = P0_8,
D13 = P0_7,
D14 = P0_27,
D15 = P0_28,
A0 = P0_23,
A1 = P0_24,
A2 = P0_25,
A3 = P0_26,
A4 = P1_30,
A5 = P1_31,
// Not connected
NC = (int)0xFFFFFFFF,
I2C_SCL0 = NC,
I2C_SDA0 = NC,
I2C_SCL1 = p10,
I2C_SDA1 = p9,
I2C_SCL2 = P0_11, // pin used by application board
I2C_SDA2 = P0_10, // pin used by application board
I2C_SCL = I2C_SCL2,
I2C_SDA = I2C_SDA2,
} PinName;
typedef enum {
PullUp = 0,
PullDown = 3,
PullNone = 2,
Repeater = 1,
OpenDrain = 4,
PullDefault = PullDown
} PinMode;
// version of PINCON_TypeDef using register arrays
typedef struct {
__IO uint32_t PINSEL[11];
uint32_t RESERVED0[5];
__IO uint32_t PINMODE[10];
__IO uint32_t PINMODE_OD[5];
} PINCONARRAY_TypeDef;
#define PINCONARRAY ((PINCONARRAY_TypeDef *)LPC_PINCON_BASE)
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,149 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* 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.
*/
/* MBED TARGET LIST: K67F */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H
#include "cmsis.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
PIN_INPUT,
PIN_OUTPUT
} PinDirection;
#define PORT_SHIFT 5
typedef enum {
// LPC Pin Names
P0_0 = LPC_GPIO0_BASE,
P0_1, P0_2, P0_3, P0_4, P0_5, P0_6, P0_7, P0_8, P0_9, P0_10, P0_11, P0_12, P0_13, P0_14, P0_15, P0_16, P0_17, P0_18, P0_19, P0_20, P0_21, P0_22, P0_23, P0_24, P0_25, P0_26, P0_27, P0_28, P0_29, P0_30, P0_31,
P1_0, P1_1, P1_2, P1_3, P1_4, P1_5, P1_6, P1_7, P1_8, P1_9, P1_10, P1_11, P1_12, P1_13, P1_14, P1_15, P1_16, P1_17, P1_18, P1_19, P1_20, P1_21, P1_22, P1_23, P1_24, P1_25, P1_26, P1_27, P1_28, P1_29, P1_30, P1_31,
P2_0, P2_1, P2_2, P2_3, P2_4, P2_5, P2_6, P2_7, P2_8, P2_9, P2_10, P2_11, P2_12, P2_13, P2_14, P2_15, P2_16, P2_17, P2_18, P2_19, P2_20, P2_21, P2_22, P2_23, P2_24, P2_25, P2_26, P2_27, P2_28, P2_29, P2_30, P2_31,
P3_0, P3_1, P3_2, P3_3, P3_4, P3_5, P3_6, P3_7, P3_8, P3_9, P3_10, P3_11, P3_12, P3_13, P3_14, P3_15, P3_16, P3_17, P3_18, P3_19, P3_20, P3_21, P3_22, P3_23, P3_24, P3_25, P3_26, P3_27, P3_28, P3_29, P3_30, P3_31,
P4_0, P4_1, P4_2, P4_3, P4_4, P4_5, P4_6, P4_7, P4_8, P4_9, P4_10, P4_11, P4_12, P4_13, P4_14, P4_15, P4_16, P4_17, P4_18, P4_19, P4_20, P4_21, P4_22, P4_23, P4_24, P4_25, P4_26, P4_27, P4_28, P4_29, P4_30, P4_31,
// mbed DIP Pin Names
p5 = P0_9,
p6 = P0_8,
p7 = P0_7,
p8 = P0_6,
p9 = P0_0,
p10 = P0_1,
p11 = P0_18,
p12 = P0_17,
p13 = P0_15,
p14 = P0_16,
p15 = P0_23,
p16 = P0_24,
p17 = P0_25,
p18 = P0_26,
p19 = P1_30,
p20 = P1_31,
p21 = P2_5,
p22 = P2_4,
p23 = P2_3,
p24 = P2_2,
p25 = P2_1,
p26 = P2_0,
p27 = P0_11,
p28 = P0_10,
p29 = P0_5,
p30 = P0_4,
// Other mbed Pin Names
#ifdef MCB1700
LED1 = P1_28,
LED2 = P1_29,
LED3 = P1_31,
LED4 = P2_2,
#else
LED1 = P1_18,
LED2 = P1_20,
LED3 = P1_21,
LED4 = P1_23,
#endif
USBTX = P0_2,
USBRX = P0_3,
// Arch Pro Pin Names
D0 = P4_29,
D1 = P4_28,
D2 = P0_4,
D3 = P0_5,
D4 = P2_2,
D5 = P2_3,
D6 = P2_4,
D7 = P2_5,
D8 = P0_0,
D9 = P0_1,
D10 = P0_6,
D11 = P0_9,
D12 = P0_8,
D13 = P0_7,
D14 = P0_27,
D15 = P0_28,
A0 = P0_23,
A1 = P0_24,
A2 = P0_25,
A3 = P0_26,
A4 = P1_30,
A5 = P1_31,
// Not connected
NC = (int)0xFFFFFFFF,
I2C_SCL0 = NC,
I2C_SDA0 = NC,
I2C_SCL1 = p10,
I2C_SDA1 = p9,
I2C_SCL2 = P0_11, // pin used by application board
I2C_SDA2 = P0_10, // pin used by application board
I2C_SCL = I2C_SCL2,
I2C_SDA = I2C_SDA2,
} PinName;
typedef enum {
PullUp = 0,
PullDown = 3,
PullNone = 2,
Repeater = 1,
OpenDrain = 4,
PullDefault = PullDown
} PinMode;
// version of PINCON_TypeDef using register arrays
typedef struct {
__IO uint32_t PINSEL[11];
uint32_t RESERVED0[5];
__IO uint32_t PINMODE[10];
__IO uint32_t PINMODE_OD[5];
} PINCONARRAY_TypeDef;
#define PINCONARRAY ((PINCONARRAY_TypeDef *)LPC_PINCON_BASE)
#ifdef __cplusplus
}
#endif
#endif

View File

@ -56,6 +56,12 @@
"SPI_CLK": "PTD5",
"SPI_CS": "PTD4"
},
"K64F": {
"SPI_CS": "SPI_CS",
"SPI_MOSI": "SPI_MOSI",
"SPI_MISO": "SPI_MISO",
"SPI_CLK": "SPI_SCK"
},
"K66F": {
"SPI_MOSI": "PTE3",
"SPI_MISO": "PTE1",
@ -121,6 +127,12 @@
"SPI_MISO": "PC_2",
"SPI_CLK": "PB_10",
"SPI_CS": "PE_2"
},
"WIO_BG96": {
"SPI_CS": "SPI_CS",
"SPI_MOSI": "SPI_MOSI",
"SPI_MISO": "SPI_MISO",
"SPI_CLK": "SPI_SCK"
}
}
}

View File

@ -14,6 +14,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: FVP_MPS2_M0, FVP_MPS2_M0P, FVP_MPS2_M3, FVP_MPS2_M4,
* FVP_MPS2_M7
*/
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: ARM_CM3DS_MPS2 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: ARM_MPS2_M0, ARM_MPS2_M0P, ARM_MPS2_M3, ARM_MPS2_M4,
* ARM_MPS2_M7
*/
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -16,6 +16,8 @@
* limitations under the License.
*/
/* MBED TARGET LIST: ARM_MUSCA_B1, ARM_MUSCA_B1_NS */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -16,6 +16,8 @@
* limitations under the License.
*/
/* MBED TARGET LIST: ARM_MUSCA_S1, ARM_MUSCA_S1_NS */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -20,6 +20,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/* MBED TARGET LIST: SFE_ARTEMIS */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -20,6 +20,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/* MBED TARGET LIST: SFE_ARTEMIS_ATP */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -20,6 +20,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/* MBED TARGET LIST: SFE_ARTEMIS_DK */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -20,6 +20,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/* MBED TARGET LIST: SFE_ARTEMIS_MODULE */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -20,6 +20,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/* MBED TARGET LIST: SFE_ARTEMIS_NANO */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -20,6 +20,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/* MBED TARGET LIST: SFE_ARTEMIS_THING_PLUS*/
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -20,6 +20,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/* MBED TARGET LIST: SFE_EDGE */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -20,6 +20,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/* MBED TARGET LIST: SFE_EDGE2 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -38,6 +38,8 @@
* POSSIBILITY OF SUCH DAMAGE.
******************************************************************************/
/* MBED TARGET LIST: EV_COG_AD3029LZ */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -38,6 +38,8 @@
* POSSIBILITY OF SUCH DAMAGE.
******************************************************************************/
/* MBED TARGET LIST: EV_COG_AD4050LZ */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -17,6 +17,12 @@
* limitations under the License.
*/
/* MBED TARGET LIST: CY8CPROTO_062_4343W, CY8CKIT_062S2_43012,
* CY8CPROTO_062S3_4343W, CY8CKIT_062_WIFI_BT, CY8CKIT_062_BLE,
* CYW9P62S1_43438EVB_01, CYW9P62S1_43012EVB_01, CY8CKIT064B0S2_4343W,
* CYTFM_064B0S2_4343W, CYSBSYSKIT_01
*/
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: KL25Z */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: KL46Z */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: K66F */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: K82F */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: KL43Z */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: KW41Z */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: K22F */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: K64F */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: HEXIWEAR */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: SDT64B */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -15,6 +15,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: GD32_F307VG */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -15,6 +15,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: GD32_F450ZI */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -31,6 +31,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: MAX32620FTHR */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -31,6 +31,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: SDT32620B */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -31,6 +31,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: MAX32625MBED */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -31,6 +31,9 @@
*******************************************************************************
*/
/* MBED TARGET LIST: MAX32625PICO */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -31,6 +31,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: SDT32625B */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -31,6 +31,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: MAX32630FTHR */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -36,6 +36,8 @@
*
*/
/* MBED TARGET LIST: NRF52_DK */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -36,6 +36,8 @@
*
*/
/* MBED TARGET LIST: SDT52832B */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,8 @@
* limitations under the License.
*/
/* MBED TARGET LIST: ARDUINO_NANO33BLE */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: EP_AGORA */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: EP_ATLAS */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -36,6 +36,8 @@
*
*/
/* MBED TARGET LIST: NRF52840_DK */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -16,6 +16,8 @@
* limitations under the License.
*/
/* MBED TARGET LIST: NUMAKER_IOT_M252 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: NUMAKER_IOT_M263A */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -13,6 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: NUMAKER_PFM_M453 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -16,6 +16,8 @@
* limitations under the License.
*/
/* MBED TARGET LIST: NUMAKER_IOT_M487 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -16,6 +16,8 @@
* limitations under the License.
*/
/* MBED TARGET LIST: NUMAKER_PFM_M487 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -13,6 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: NUMAKER_PFM_NANO130 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -13,6 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: NUMAKER_PFM_NUC472 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: LPC1114 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: ARCH_PRO */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: LPC1768 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: LPC54114 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: FF_LPC546XX */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: LPC546XX */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: MIMXRT1050_EVK */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: GR_LYCHEE */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: RZ_A1H */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: GR_MANGO */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: NUCLEO_F070RB */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: NUCLEO_F072RB */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: NUCLEO_F091RC */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: NUCLEO_F103RB */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: NUCLEO_F207ZG */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: NUCLEO_F303K8 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: NUCLEO_F303RE */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: NUCLEO_F303ZE */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: NUCLEO_F401RE */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -29,6 +29,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************
*/
/* MBED TARGET LIST: ARCH_MAX */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -27,6 +27,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************
*/
/* MBED TARGET LIST: MTS_DRAGONFLY_F411RE */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -27,6 +27,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************
*/
/* MBED TARGET LIST: MTS_MDOT_F411RE */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: NUCLEO_F411RE */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: NUCLEO_F412ZG */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* MBED TARGET LIST: WIO_EMW3166 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: DISCO_F413ZH */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -27,6 +27,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************
*/
/* MBED TARGET LIST: MTS_DRAGONFLY_F413RH */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: NUCLEO_F413ZH */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: DISCO_F429ZI */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: NUCLEO_F429ZI */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: NUCLEO_F439ZI */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -30,6 +30,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: WIO_3G */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -30,6 +30,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: WIO_BG96 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: NUCLEO_F446RE */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: NUCLEO_F446ZE */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: DISCO_F469NI */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -29,6 +29,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: SDP_K1 */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

View File

@ -28,6 +28,8 @@
*******************************************************************************
*/
/* MBED TARGET LIST: DISCO_F746NG */
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H

Some files were not shown because too many files have changed in this diff Show More