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

📄 pio.h

📁 ARM9200开发板的ROM boot程序源码1.0
💻 H
字号:
//*----------------------------------------------------------------------------
//*         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.h
//* Object              : Parallel I/O Header File
//*
//* 1.0 01/04/00 HI    : Creation
//*----------------------------------------------------------------------------
#ifndef pio_h
#define pio_h

#include    "periph/stdc/std_c.h"
#include    "periph/aic/lib_aic.h"
#include    "periph/apmc/lib_apmc.h"

//*------------------------------------------------------------
//* User Interface Parallel I/O Interface Structure Definition
//*------------------------------------------------------------
typedef struct _AT91S_PIO
{
    at91_reg        PIO_PER ;           /* PIO Enable Register */
    at91_reg        PIO_PDR ;           /* PIO Disable Register */
    at91_reg        PIO_PSR ;           /* PIO Status Register */
    at91_reg        Reserved0 ;
    at91_reg        PIO_OER ;           /* Output Enable Register */
    at91_reg        PIO_ODR ;           /* Output Disable Register */
    at91_reg        PIO_OSR ;           /* Output Status Register */
    at91_reg        Reserved1 ;
    at91_reg        PIO_IFER ;          /* Input Filter Enable Register */
    at91_reg        PIO_IFDR ;          /* Input Filter Disable Register */
    at91_reg        PIO_IFSR ;          /* Input Filter Status Register */
    at91_reg        Reserved2 ;
    at91_reg        PIO_SODR ;          /* Set Output Data Register */
    at91_reg        PIO_CODR ;          /* Clear Output Data Register */
    at91_reg        PIO_ODSR ;          /* Output Data Status Register */
    at91_reg        PIO_PDSR ;          /* Pin Data Status Register */
    at91_reg        PIO_IER ;           /* Interrupt Enable Register */
    at91_reg        PIO_IDR ;           /* Interrupt Disable Register */
    at91_reg        PIO_IMR ;           /* Interrupt Mask Register */
    at91_reg        PIO_ISR ;           /* Interrupt Status Register */
    at91_reg        PIO_MDER ;          /* Multi Driver Enable Register */
    at91_reg        PIO_MDDR ;          /* Multi Driver Disable Register */
    at91_reg        PIO_MDSR ;          /* Multi Driver Status Register */
    at91_reg		reserved3;
    at91_reg		PIO_PPUDR;			/* PullUp disable register */
    at91_reg		PIO_PPUER;          /* PullUp enable register */
    at91_reg		PIO_PPUSR;          /* PullUp status register */
    at91_reg		reserved4;
	at91_reg		PIO_ASR;
    at91_reg		PIO_BSR;
	at91_reg		PIO_ABSR;
    at91_reg		reserved5[9];
	at91_reg		PIO_OWER;
	at91_reg		PIO_OWDR;
	at91_reg		PIO_OWSR;
} AT91S_PIO, *AT91PS_PIO ;


/* Configuration bits Definition : argument <config> of at91_pio_open */
#define PIO_SENSE_BIT           0x1
#define PIO_OUTPUT              0x1
#define PIO_INPUT               0x0
#define PIO_FILTER_BIT          0x2
#define PIO_FILTER_ON           0x2
#define PIO_FILTER_OFF          0x0
#define PIO_OPENDRAIN_BIT       0x4
#define PIO_OPENDRAIN_ON        0x4
#define PIO_OPENDRAIN_OFF       0x0
#define PIO_INPUT_IRQ_BIT       0x8
#define PIO_INPUT_IRQ_ON        0x8
#define PIO_INPUT_IRQ_OFF       0x0
#define RESET_PIO_CONF          (PIO_INPUT|PIO_FILTER_OFF|PIO_OPENDRAIN_OFF|PIO_INPUT_IRQ_OFF)

/* Configuration bits Definition : argument <state> of at91_pio_write */
#define PIO_SET_OUT         	0x0
#define PIO_CLEAR_OUT       	0x1

#define PERIPH_B                0x0000A500 //* Flag for PIO used on peripheral B

#endif //* pio_h

⌨️ 快捷键说明

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