examples/AT91/Master/AT91SAM7X-EK.h
author Christian Taedcke <hacking@taedcke.com>
Tue, 08 Nov 2011 08:27:42 +0000
changeset 684 3804ee7f9030
parent 521 731bbe1b67b4
permissions -rw-r--r--
Win32 applconfig:
CHANGED: - The MSG()-Makros for Visual Studio both print now to OutputDebugString().
ADDED: - Makro CANFESTIVAL_DEBUG_DRV_MSG() and MSG_ERR_DRV() to print into MSG() from a can driver implementation.
521
peter
parents:
diff changeset
     1
// ----------------------------------------------------------------------------
peter
parents:
diff changeset
     2
//         ATMEL Microcontroller Software Support  -  ROUSSET  -
peter
parents:
diff changeset
     3
// ----------------------------------------------------------------------------
peter
parents:
diff changeset
     4
// DISCLAIMER:  THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
peter
parents:
diff changeset
     5
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
peter
parents:
diff changeset
     6
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
peter
parents:
diff changeset
     7
// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
peter
parents:
diff changeset
     8
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
peter
parents:
diff changeset
     9
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
peter
parents:
diff changeset
    10
// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
peter
parents:
diff changeset
    11
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
peter
parents:
diff changeset
    12
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
peter
parents:
diff changeset
    13
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
peter
parents:
diff changeset
    14
// ----------------------------------------------------------------------------
peter
parents:
diff changeset
    15
// File Name           : AT91SAM7X-EK.h
peter
parents:
diff changeset
    16
// Object              : AT91SAM7X-EK Evaluation Board Features Definition File
peter
parents:
diff changeset
    17
//
peter
parents:
diff changeset
    18
//  ----------------------------------------------------------------------------
peter
parents:
diff changeset
    19
peter
parents:
diff changeset
    20
#ifndef AT91SAM7X_EK_H
peter
parents:
diff changeset
    21
#define AT91SAM7X_EK_H
peter
parents:
diff changeset
    22
peter
parents:
diff changeset
    23
/*-----------------*/
peter
parents:
diff changeset
    24
/* LEDs Definition */
peter
parents:
diff changeset
    25
/*-----------------*/
peter
parents:
diff changeset
    26
#define AT91B_LED1            (1<<19)       // AT91C_PIO_PB19 AT91C_PB19_PWM0 AT91C_PB19_TCLK1
peter
parents:
diff changeset
    27
#define AT91B_LED2            (1<<20)       // AT91C_PIO_PB20 AT91C_PB20_PWM1 AT91C_PB20_PWM1
peter
parents:
diff changeset
    28
#define AT91B_LED3            (AT91C_PIO_PB21)       // AT91C_PIO_PB21 AT91C_PB21_PWM2 AT91C_PB21_PCK1
peter
parents:
diff changeset
    29
#define AT91B_LED4            (AT91C_PIO_PB22)       // AT91C_PIO_PB22 AT91C_PB22_PWM3 AT91C_PB22_PCK2
peter
parents:
diff changeset
    30
#define AT91B_NB_LEB          4
peter
parents:
diff changeset
    31
#define AT91B_LED_MASK        (AT91B_LED1|AT91B_LED2|AT91B_LED3|AT91B_LED4)
peter
parents:
diff changeset
    32
#define AT91D_BASE_PIO_LED 	  (AT91C_BASE_PIOB)
peter
parents:
diff changeset
    33
peter
parents:
diff changeset
    34
#define AT91B_POWERLED        (1<<25)       // PB25
peter
parents:
diff changeset
    35
peter
parents:
diff changeset
    36
peter
parents:
diff changeset
    37
/*-------------------------------*/
peter
parents:
diff changeset
    38
/* JOYSTICK Position Definition  */
peter
parents:
diff changeset
    39
/*-------------------------------*/
peter
parents:
diff changeset
    40
#define AT91B_SW1           (1<<21)  // PA21 Up Button	  AT91C_PA21_TF  AT91C_PA21_NPCS10
peter
parents:
diff changeset
    41
#define AT91B_SW2           (1<<22)  // PA22 Down Button  AT91C_PA22_TK	 AT91C_PA22_SPCK1
peter
parents:
diff changeset
    42
#define AT91B_SW3           (1<<23)  // PA23 Left Button  AT91C_PA23_TD  AT91C_PA23_MOSI1
peter
parents:
diff changeset
    43
#define AT91B_SW4           (1<<24)  // PA24 Right Button AT91C_PA24_RD	 AT91C_PA24_MISO1
peter
parents:
diff changeset
    44
#define AT91B_SW5           (1<<25)  // PA25 Push Button  AT91C_PA25_RK	 AT91C_PA25_NPCS11
peter
parents:
diff changeset
    45
#define AT91B_SW_MASK       (AT91B_SW1|AT91B_SW2|AT91B_SW3|AT91B_SW4|AT91B_SW5)
peter
parents:
diff changeset
    46
peter
parents:
diff changeset
    47
peter
parents:
diff changeset
    48
#define AT91D_BASE_PIO_SW   (AT91C_BASE_PIOA)
peter
parents:
diff changeset
    49
peter
parents:
diff changeset
    50
/*------------------*/
peter
parents:
diff changeset
    51
/* CAN Definition   */
peter
parents:
diff changeset
    52
/*------------------*/
peter
parents:
diff changeset
    53
#define AT91B_CAN_TRANSCEIVER_RS  (1<<2)    // PA2
peter
parents:
diff changeset
    54
peter
parents:
diff changeset
    55
/*--------------*/
peter
parents:
diff changeset
    56
/* Clocks       */
peter
parents:
diff changeset
    57
/*--------------*/
peter
parents:
diff changeset
    58
#define AT91B_MAIN_OSC        18432000               // Main Oscillator MAINCK
peter
parents:
diff changeset
    59
#define AT91B_MCK             ((18432000*73/14)/2)   // Output PLL Clock
peter
parents:
diff changeset
    60
peter
parents:
diff changeset
    61
#endif /* AT91SAM7X-EK_H */