• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 C-SKY Microsystems Co., Ltd. All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *   http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /******************************************************************************
18  * @file     pin.h
19  * @brief    header File for pin definition
20  * @version  V1.0
21  * @date     02. June 2017
22  ******************************************************************************/
23 #ifndef PHOBOS_PIN_H
24 #define PHOBOS_PIN_H
25 
26 #include <stdint.h>
27 #include "pin_name.h"
28 #include "pinmux.h"
29 
30 #define UART_TXD0       1
31 #define UART_RXD0       2
32 
33 #define CONSOLE_TXD     PAD_UART0_SIN
34 #define CONSOLE_RXD     PAD_UART0_SOUT
35 #define CONSOLE_IDX     0
36 
37 /* example pin manager */
38 #define EXAMPLE_USART_IDX       0
39 #define EXAMPLE_PIN_USART_TX    PAD_UART0_SIN
40 #define EXAMPLE_PIN_USART_RX    PAD_UART0_SOUT
41 #define EXAMPLE_PIN_USART_TX_FUNC   0
42 #define EXAMPLE_PIN_USART_RX_FUNC   0
43 
44 #define EXAMPLE_GPIO_PIN    PA1
45 #define EXAMPLE_BOARD_GPIO_PIN_NAME "A1"
46 #define EXAMPLE_GPIO_PIN_FUNC   0
47 
48 /* tests pin manager */
49 #define TEST_USART_IDX       0
50 #define TEST_PIN_USART_TX    PAD_UART0_SIN
51 #define TEST_PIN_USART_RX    PAD_UART0_SOUT
52 #define TEST_PIN_USART_TX_FUNC      0
53 #define TEST_PIN_USART_RX_FUNC      0
54 
55 #define TEST_GPIO_PIN    PA0
56 #define TEST_BOARD_GPIO_PIN_NAME "A0"
57 #define TEST_GPIO_PIN_FUNC   0
58 
59 #define UART_TXD2       3
60 #define UART_RXD2       4
61 
62 #define UART_TXD3       5
63 #define UART_RXD3       6
64 
65 #define UART_PINs  { {PA0, PA1},\
66         {PA10, PA11},\
67         {PA23, PA22},\
68         {PA26, PA27} }
69 
70 #define GPIO_EXAMPLE_PORT   PORTB
71 #define GPIO_EXAMPLE_PIN    PA1
72 #define CTS_GPIO_TEST_PORT  PORTA
73 #define CTS_GPIO_TEST_PIN   PA0
74 #define EXAMPLE_BOARD_GPIO_PIN_NAME "A1"
75 #define CTS_BOARD_GPIO_PIN_NAME     "A0"
76 #define SENSOR_UART_DIR     PA3
77 
78 #endif /* PHOBOS_PIN_H */
79