Nut/OS  5.0.5
API Reference
at91_pwmc.h
Go to the documentation of this file.
00001 #ifndef _ARCH_ARM_AT91_PWMC_H_
00002 #define _ARCH_ARM_AT91_PWMC_H_
00003 
00004 /*
00005  * Copyright (C) 2008 by egnite GmbH. All rights reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted provided that the following conditions
00009  * are met:
00010  *
00011  * 1. Redistributions of source code must retain the above copyright
00012  *    notice, this list of conditions and the following disclaimer.
00013  * 2. Redistributions in binary form must reproduce the above copyright
00014  *    notice, this list of conditions and the following disclaimer in the
00015  *    documentation and/or other materials provided with the distribution.
00016  * 3. Neither the name of the copyright holders nor the names of
00017  *    contributors may be used to endorse or promote products derived
00018  *    from this software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00021  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00022  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00023  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00024  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00025  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00026  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00027  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00028  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00029  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00030  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00031  * SUCH DAMAGE.
00032  *
00033  * For additional information see http://www.ethernut.de/
00034  */
00035 
00052 
00055 #define PWMC_MR_OFF             0x00000000  
00056 #define PWMC_MR  (PWMC_BASE + PWMC_MR_OFF)  
00058 #define PWMC_DIVA               0x000000FF  
00059 #define PWMC_DIVA_LSB           0           
00061 #define PWMC_PREA               0x00000F00  
00062 #define PWMC_PREA_MCK2          0x00000100  
00063 #define PWMC_PREA_MCK4          0x00000200  
00064 #define PWMC_PREA_MCK8          0x00000300  
00065 #define PWMC_PREA_MCK16         0x00000400  
00066 #define PWMC_PREA_MCK32         0x00000500  
00067 #define PWMC_PREA_MCK64         0x00000600  
00068 #define PWMC_PREA_MCK128        0x00000700  
00069 #define PWMC_PREA_MCK256        0x00000800  
00070 #define PWMC_PREA_MCK512        0x00000900  
00071 #define PWMC_PREA_MCK1024       0x00000A00  
00073 #define PWMC_DIVB               0x00FF0000  
00074 #define PWMC_DIVB_LSB           16          
00076 #define PWMC_PREB               0x0F000000  
00077 #define PWMC_PREB_MCK2          0x01000000  
00078 #define PWMC_PREB_MCK4          0x02000000  
00079 #define PWMC_PREB_MCK8          0x03000000  
00080 #define PWMC_PREB_MCK16         0x04000000  
00081 #define PWMC_PREB_MCK32         0x05000000  
00082 #define PWMC_PREB_MCK64         0x06000000  
00083 #define PWMC_PREB_MCK128        0x07000000  
00084 #define PWMC_PREB_MCK256        0x08000000  
00085 #define PWMC_PREB_MCK512        0x09000000  
00086 #define PWMC_PREB_MCK1024       0x0A000000  
00088 
00089 
00091 #define PWMC_ENA_OFF            0x00000004  
00092 #define PWMC_ENA (PWMC_BASE + PWMC_ENA_OFF) 
00093 #define PWMC_DIS_OFF            0x00000008  
00094 #define PWMC_DIS (PWMC_BASE + PWMC_DIS_OFF) 
00095 #define PWMC_SR_OFF             0x0000000C  
00096 #define PWMC_SR   (PWMC_BASE + PWMC_SR_OFF) 
00097 #define PWMC_IER_OFF            0x00000010  
00098 #define PWMC_IER (PWMC_BASE + PWMC_IER_OFF) 
00099 #define PWMC_IDR_OFF            0x00000014  
00100 #define PWMC_IDR (PWMC_BASE + PWMC_IDR_OFF) 
00101 #define PWMC_IMR_OFF            0x00000018  
00102 #define PWMC_IMR (PWMC_BASE + PWMC_IMR_OFF) 
00103 #define PWMC_ISR_OFF            0x0000001C  
00104 #define PWMC_ISR (PWMC_BASE + PWMC_ISR_OFF) 
00105 #define PWMC_CHID0              0x00000001  
00106 #define PWMC_CHID1              0x00000002  
00107 #define PWMC_CHID2              0x00000004  
00108 #define PWMC_CHID3              0x00000008  
00110 
00111 
00113 #define PWMC_CMR_OFF            0x00000200  
00115 #define PWMC_CMR(i)  (PWMC_BASE + ((i) * 32) + PWMC_CMR_OFF)
00116 
00117 #define PWMC_CPRE               0x0000000F  
00118 #define PWMC_CPRE_MCK2          0x00000001  
00119 #define PWMC_CPRE_MCK4          0x00000002  
00120 #define PWMC_CPRE_MCK8          0x00000003  
00121 #define PWMC_CPRE_MCK16         0x00000004  
00122 #define PWMC_CPRE_MCK32         0x00000005  
00123 #define PWMC_CPRE_MCK64         0x00000006  
00124 #define PWMC_CPRE_MCK128        0x00000007  
00125 #define PWMC_CPRE_MCK256        0x00000008  
00126 #define PWMC_CPRE_MCK512        0x00000009  
00127 #define PWMC_CPRE_MCK1024       0x0000000A  
00128 #define PWMC_CPRE_CLKA          0x0000000B  
00129 #define PWMC_CPRE_CLKB          0x0000000C  
00131 #define PWMC_CALG               0x00000100  
00132 #define PWMC_CPOL               0x00000200  
00133 #define PWMC_CPD                0x00000400  
00135 
00136 
00138 #define PWMC_CDTY_OFF           0x00000204  
00140 #define PWMC_CDTY(i)  (PWMC_BASE + PWMC_CDTY_OFF + ((i) * 32))
00141 
00145 #define PWMC_CPRD_OFF           0x00000208  
00147 #define PWMC_CPRD(i)  (PWMC_BASE + PWMC_CPRD_OFF + ((i) * 32))
00148 
00152 #define PWMC_CCNT_OFF           0x0000020C  
00154 #define PWMC_CCNT(i)  (PWMC_BASE + PWMC_CCNT_OFF + ((i) * 32))
00155 
00159 #define PWMC_CUPD_OFF           0x00000210  
00161 #define PWMC_CUPD(i)  (PWMC_BASE + PWMC_CUPD_OFF + ((i) * 32))
00162 
00165 
00167 #endif  /* _ARCH_ARM_AT91_PWMC_H_ */