

SYSCLK 240
BUSCLK 120
HSECLK 8

# UART0
# UART0_UARTRXD PIN_69                  # GPIO6_1
# UART0_UARTTXD PIN_68                  # GPIO7_6

# LED
GPIO6_0         PIN_51:OUTPUT           # MCU_LED0
GPIO6_2         PIN_52:OUTPUT           # MCU_LED1

# key
GPIO3_0         PIN_95:INPUT            # MCU_KEY

# I2C (EEPROM)
GPIO9_0         PIN_47:OUTPUT           # I2C_SCL
GPIO9_1         PIN_48:INOUT            # I2C_SDA
GPIO9_2         PIN_46:OUTPUT           # EEPROM_WP

# GPIO Ex(TCA9535PWR)
GPIO6_4         PIN_1:OUTPUT            # IO_E_SCL
GPIO6_6         PIN_98:INOUT            # IO_E_SDA
GPIO3_1         PIN_97:INPUT            # IO_E_INT_N

# SIM's
SIM_IO[0]       PIN_77:INOUT            # A_0_SIM_IO
SIM_IO[1]       PIN_81:INOUT            # A_1_SIM_IO
SIM_IO[2]       PIN_86:INOUT            # A_2_SIM_IO
SIM_IO[3]       PIN_90:INOUT            # A_3_SIM_IO
SIM_IO[4]       PIN_79:INOUT            # B_0_SIM_IO
SIM_IO[5]       PIN_83:INOUT            # B_1_SIM_IO
SIM_IO[6]       PIN_88:INOUT            # B_2_SIM_IO
SIM_IO[7]       PIN_92:INOUT            # B_3_SIM_IO
SIM_IO[8]       PIN_26:INOUT            # C_0_SIM_IO
SIM_IO[9]       PIN_18:INOUT            # C_1_SIM_IO
SIM_IO[10]      PIN_7:INOUT             # C_2_SIM_IO
SIM_IO[11]      PIN_2:INOUT             # C_3_SIM_IO
# SIM_IO[12]    PIN_30:INOUT            # D_0_SIM_IO
# SIM_IO[13]    PIN_24:INOUT            # D_1_SIM_IO
# SIM_IO[14]    PIN_16:INOUT            # D_2_SIM_IO
# SIM_IO[15]    PIN_4:INOUT             # D_3_SIM_IO

GPIO1_0         PIN_78:OUTPUT           # A_0_SIM_RST
GPIO1_1         PIN_82:OUTPUT           # A_1_SIM_RST
GPIO1_2         PIN_87:OUTPUT           # A_2_SIM_RST
GPIO1_3         PIN_91:OUTPUT           # A_3_SIM_RST
GPIO1_4         PIN_80:OUTPUT           # B_0_SIM_RST
GPIO1_5         PIN_84:OUTPUT           # B_1_SIM_RST
GPIO1_6         PIN_89:OUTPUT           # B_2_SIM_RST
GPIO1_7         PIN_93:OUTPUT           # B_3_SIM_RST
GPIO2_0         PIN_29:OUTPUT           # C_0_SIM_RST
GPIO2_1         PIN_23:OUTPUT           # C_1_SIM_RST
GPIO2_2         PIN_15:OUTPUT           # C_2_SIM_RST
GPIO2_3         PIN_3:OUTPUT            # C_3_SIM_RST
GPIO2_4         PIN_31:OUTPUT           # D_0_SIM_RST
GPIO2_5         PIN_25:OUTPUT           # D_1_SIM_RST
GPIO2_6         PIN_17:OUTPUT           # D_2_SIM_RST
GPIO2_7         PIN_5:OUTPUT            # D_3_SIM_RST

SIM_CLK         PIN_85:OUTPUT           # AG_SIM_CLK0
GPIO9_3         PIN_96:OUTPUT           # SIM_VCC_EN_P

# WIFI,E103-W06
UART4_UARTRXD   PIN_38                  # WIFI_UART_E2I
UART4_UARTTXD   PIN_36                  # WIFI_UART_I2E
GPIO9_4         PIN_39:OUTPUT           # WIFI_NRESET_MCU
GPIO9_5         PIN_34:OUTPUT           # WIFI_RELOAD_MCU
GPIO3_2         PIN_35:INPUT            # WIFI_W_LINK
GPIO3_3         PIN_33:INPUT            # WIFI_INDICATE
GPIO3_4         PIN_32:INPUT            # WIFI_S_LINK

# Ether NE2
# UART3_UARTRXD PIN_66                  # NE2_UART1_E2I
# UART3_UARTTXD PIN_67                  # NE2_UART1_I2E
GPIO9_6         PIN_71:OUTPUT           # NE2_RST_MCU
GPIO9_7         PIN_70:OUTPUT           # NE2_RELOAD_MCU

# MCU->CPLD, rx interrupts group0
GPIO4_0         gpio_int_g0[0]:INPUT          # GPIO interrupt
GPIO4_1         gpio_int_g0[1]:INPUT          # GPIO interrupt
GPIO4_2         gpio_int_g0[2]:INPUT          # GPIO interrupt
GPIO4_3         gpio_int_g0[3]:INPUT          # GPIO interrupt
GPIO4_4         gpio_int_g0[4]:INPUT          # GPIO interrupt
GPIO4_5         gpio_int_g0[5]:INPUT          # GPIO interrupt

# MCU->CPLD, rx interrupts group1
GPIO5_0         gpio_int_g1[0]:INPUT          # GPIO interrupt
GPIO5_1         gpio_int_g1[1]:INPUT          # GPIO interrupt
GPIO5_2         gpio_int_g1[2]:INPUT          # GPIO interrupt
GPIO5_3         gpio_int_g1[3]:INPUT          # GPIO interrupt
GPIO5_4         gpio_int_g1[4]:INPUT          # GPIO interrupt
GPIO5_5         gpio_int_g1[5]:INPUT          # GPIO interrupt

# uart1
UART1_UARTRXD   rxd_12_ip:INPUT         # D_0_UART
UART1_UARTTXD   txd_12_ip:OUTPUT        # D_0_UART
SIM_IO_12       PIN_30:INOUT            # D_0_SIM_IO
GPIO8_1         txen_12_ip:OUTPUT       # D_0 发送模式切换。1发送0接收

# uart2
UART2_UARTRXD   rxd_13_ip:INPUT         # D_1_UART
UART2_UARTTXD   txd_13_ip:OUTPUT        # D_1_UART
SIM_IO_13       PIN_24:INOUT            # D_1_SIM_IO
GPIO8_3         txen_13_ip:OUTPUT       # D_1 发送模式切换。1发送0接收

# uart3
UART3_UARTRXD   rxd_14_ip:INPUT         # D_2_UART
UART3_UARTTXD   txd_14_ip:OUTPUT        # D_2_UART
uart14_rx       PIN_66:INPUT            # 有线以太网 收
uart14_tx       PIN_67:OUTPUT           # 有线以太网 发
SIM_IO_14       PIN_16:INOUT            # D_2_SIM_IO
GPIO8_5         txen_14_ip:OUTPUT       # D_2 发送模式切换。1发送0接收

# uart0
UART0_UARTRXD   rxd_15_ip:INPUT         # D_3_UART
UART0_UARTTXD   txd_15_ip:OUTPUT        # D_3_UART
uart15_rx       PIN_69:INPUT            # 日志口切换
uart15_tx       PIN_68:OUTPUT           # 日志口切换
SIM_IO_15       PIN_4:INOUT             # D_3_SIM_IO
GPIO8_7         txen_15_ip:OUTPUT       # D_3 发送模式切换。1发送0接收
