at91_pit.h

Go to the documentation of this file.
00001 
00041 /*
00042  * Copyright (C) 2007 by egnite Software GmbH. All rights reserved.
00043  *
00044  * Redistribution and use in source and binary forms, with or without
00045  * modification, are permitted provided that the following conditions
00046  * are met:
00047  *
00048  * 1. Redistributions of source code must retain the above copyright
00049  *    notice, this list of conditions and the following disclaimer.
00050  * 2. Redistributions in binary form must reproduce the above copyright
00051  *    notice, this list of conditions and the following disclaimer in the
00052  *    documentation and/or other materials provided with the distribution.
00053  * 3. Neither the name of the copyright holders nor the names of
00054  *    contributors may be used to endorse or promote products derived
00055  *    from this software without specific prior written permission.
00056  *
00057  * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
00058  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00059  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00060  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
00061  * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00062  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00063  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00064  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00065  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00066  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00067  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00068  * SUCH DAMAGE.
00069  *
00070  * For additional information see http://www.ethernut.de/
00071  */
00072 
00073 #ifndef AT91_PIT_H
00074 #define AT91_PIT_H
00075 
00076 #include <cfg/compiler.h>
00081 #define PIT_MR_OFF 0x00000000 
00082 #define PIT_MR     (*((reg32_t *)(PIT_BASE + PIT_MR_OFF))) 
00083 
00084 #define PIV_MASK   0x000FFFFF 
00085 #define PIV_SHIFT  0          
00086 #define PITEN      24         
00087 #define PITIEN     25         
00088 /*\}*/
00089 
00094 #define PIT_SR_OFF 0x00000004 
00095 #define PIT_SR     (*((reg32_t *)(PIT_BASE + PIT_SR_OFF))) 
00096 
00097 #define PITS       0          
00098 /*\}*/
00099 
00104 #define PIVR_OFF    0x00000008 
00105 #define PIVR        (*((reg32_t *)(PIT_BASE + PIVR_OFF))) 
00106 
00107 #define PIIR_OFF    0x0000000C 
00108 #define PIIR        (*((reg32_t *)(PIT_BASE + PIIR_OFF))) 
00109 #define CPIV_MASK   0x000FFFFF 
00110 #define CPIV_SHIFT  0          
00111 #define PICNT_MASK  0xFFF00000 
00112 #define PICNT_SHIFT 20         
00113 /*\}*/
00114 
00115 #endif /* AT91_PIT_H */