A function for finding the port and bit position of a pin

Dependents:   pin_port_test

Committer:
takuo
Date:
Mon Dec 21 07:42:10 2015 +0000
Revision:
0:5b6a266f2211
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
takuo 0:5b6a266f2211 1 /* A function for finding the port and bit position of a pin
takuo 0:5b6a266f2211 2 * Copyright 2015, Takuo Watanabe
takuo 0:5b6a266f2211 3 *
takuo 0:5b6a266f2211 4 * Licensed under the Apache License, Version 2.0 (the "License");
takuo 0:5b6a266f2211 5 * you may not use this file except in compliance with the License.
takuo 0:5b6a266f2211 6 * You may obtain a copy of the License at
takuo 0:5b6a266f2211 7 *
takuo 0:5b6a266f2211 8 * http://www.apache.org/licenses/LICENSE-2.0
takuo 0:5b6a266f2211 9 *
takuo 0:5b6a266f2211 10 * Unless required by applicable law or agreed to in writing, software
takuo 0:5b6a266f2211 11 * distributed under the License is distributed on an "AS IS" BASIS,
takuo 0:5b6a266f2211 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
takuo 0:5b6a266f2211 13 * See the License for the specific language governing permissions and
takuo 0:5b6a266f2211 14 * limitations under the License.
takuo 0:5b6a266f2211 15 */
takuo 0:5b6a266f2211 16
takuo 0:5b6a266f2211 17 #ifndef PIN_PORT_H_
takuo 0:5b6a266f2211 18 #define PIN_PORT_H_
takuo 0:5b6a266f2211 19
takuo 0:5b6a266f2211 20 /** Finds the port and bit position of a pin
takuo 0:5b6a266f2211 21 */
takuo 0:5b6a266f2211 22 int pin_port(PinName pin, PortName *port);
takuo 0:5b6a266f2211 23
takuo 0:5b6a266f2211 24 #endif /* PIN_PORT_H_ */