⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pio.inc

📁 嵌入式系统开发用源代码 包含At91C arm芯片相关各种例程 包括整数性能测试,浮点测试,硬件驱动等
💻 INC
字号:
;-----------------------------------------------------------------------------
;-      ATMEL Microcontroller Software Support  -   ROUSSET -
;-----------------------------------------------------------------------------
; The software is delivered "AS IS" without warranty or condition of any
; kind, either express, implied or statutory. This includes without
; limitation any warranty or condition with respect to merchantability or
; fitness for any particular purpose, or against the infringements of
; intellectual property rights of others.
;-----------------------------------------------------------------------------
;- File Name            : pio.inc
;- Object               : PIO Controller Definition File.
;- Translator           : ARM Software Development Toolkit V2.11a
;-
;- 1.0 10/03/98 JCZ     : Creation
;- 2.0 21/10/98 JCZ     : Clean up.
;-----------------------------------------------------------------------------

;---------------------------------
; Parallel IO Controller Structure
;---------------------------------
                ^       0
PIO_PER         #       4       ; PIO Enable Register
PIO_PDR         #       4       ; PIO Disable Register
PIO_PSR         #       4       ; PIO Status Register
                #       4
PIO_OER         #       4       ; Output Enable Register
PIO_ODR         #       4       ; Output Disable Register
PIO_OSR         #       4       ; Output Status Register
                #       4
PIO_IFER        #       4       ; Input Filter Enable Register
PIO_IFDR        #       4       ; Input Filter Disable Register
PIO_IFSR        #       4       ; Input Filter Status Register
                #       4
PIO_SODR        #       4       ; Set Output Data Register
PIO_CODR        #       4       ; Clear Output Data Register
PIO_ODSR        #       4       ; Output Data Status Register
PIO_PDSR        #       4       ; Pin Data Status Register
PIO_IER         #       4       ; Interrupt Enable Register
PIO_IDR         #       4       ; Interrupt Disable Register
PIO_IMR         #       4       ; Interrupt Mask Register
PIO_ISR         #       4       ; Interrupt Status Register

;--------------------------------
;- Device Dependancies Definition
;--------------------------------

    IF  :DEF: AT91M40400

;- Number of PIO Controller
NB_PIO_CTRL     EQU     1

;- Base Address
PIO_BASE        EQU     0xFFFF0000

;- Number of PIO Lines
NB_PIO          EQU     32

;- Parallel I/O Bits Definition
P0              EQU     (1:SHL:0)
P1              EQU     (1:SHL:1)
P2              EQU     (1:SHL:2)
P3              EQU     (1:SHL:3)
P4              EQU     (1:SHL:4)
P5              EQU     (1:SHL:5)
P6              EQU     (1:SHL:6)
P7              EQU     (1:SHL:7)
P8              EQU     (1:SHL:8)
P9              EQU     (1:SHL:9)
P10             EQU     (1:SHL:10)
P11             EQU     (1:SHL:11)
P12             EQU     (1:SHL:12)
P13             EQU     (1:SHL:13)
P14             EQU     (1:SHL:14)
P15             EQU     (1:SHL:15)
P16             EQU     (1:SHL:16)
P17             EQU     (1:SHL:17)
P18             EQU     (1:SHL:18)
P19             EQU     (1:SHL:19)
P20             EQU     (1:SHL:20)
P21             EQU     (1:SHL:21)
P22             EQU     (1:SHL:22)
P23             EQU     (1:SHL:23)
P24             EQU     (1:SHL:24)
P25             EQU     (1:SHL:25)
P26             EQU     (1:SHL:26)
P27             EQU     (1:SHL:27)
P28             EQU     (1:SHL:28)
P29             EQU     (1:SHL:29)
P30             EQU     (1:SHL:30)
P31             EQU     (1:SHL:31)

;- PIO Multiplexing Definition

PIO_CTRL        EQU     0

TCLK0           EQU     P0
TIOA0           EQU     P1
TIOB0           EQU     P2
PIN_TC0         EQU     TIOA0:OR:TIOB0:OR:TCLK0

TCLK1           EQU     P3
TIOA1           EQU     P4
TIOB1           EQU     P5
PIN_TC1         EQU     TIOA1:OR:TIOB1:OR:TCLK1

TCLK2           EQU     P6
TIOA2           EQU     P7
TIOB2           EQU     P8
PIN_TC2         EQU     TIOA2:OR:TIOB2:OR:TCLK2

PIN_IRQ0        EQU     P9
PIN_IRQ1        EQU     P10
PIN_IRQ2        EQU     P11
PIN_FIQ         EQU     P12

PIO_USART0      EQU     0
SCK0            EQU     P13
TXD0            EQU     P14
RXD0            EQU     P15
PIN_USART0      EQU     SCK0:OR:TXD0:OR:RXD0

PIO_USART1      EQU     0
SCK1            EQU     P20
TXD1            EQU     P21
RXD1            EQU     P22
PIN_USART1      EQU     SCK1:OR:TXD1:OR:RXD1

MCKO            EQU     P25
CS2             EQU     P26
CS3             EQU     P27
CS4             EQU     P31
CS5             EQU     P30
CS6             EQU     P29
CS7             EQU     P28

    ENDIF   ; AT91M40400

                END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -