Lab 1 Program C

Dependents:   Lab1C

Fork of mbed by -deleted-

Committer:
rolf.meyer@arm.com
Date:
Fri Aug 28 12:10:11 2009 +0000
Revision:
11:1c1ebd0324fa
Child:
27:7110ebee3484
A shiny new version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rolf.meyer@arm.com 11:1c1ebd0324fa 1 /* mbed Microcontroller Library - PeripheralNames
rolf.meyer@arm.com 11:1c1ebd0324fa 2 * Copyright (C) 2008-2009 ARM Limited. All rights reserved.
rolf.meyer@arm.com 11:1c1ebd0324fa 3 *
rolf.meyer@arm.com 11:1c1ebd0324fa 4 * Provides the mappings for peripherals
rolf.meyer@arm.com 11:1c1ebd0324fa 5 * Implementation specific to the LPC1768/LPC2368
rolf.meyer@arm.com 11:1c1ebd0324fa 6 * sford
rolf.meyer@arm.com 11:1c1ebd0324fa 7 */
rolf.meyer@arm.com 11:1c1ebd0324fa 8
rolf.meyer@arm.com 11:1c1ebd0324fa 9 #ifndef MBED_PERIPHERALNAMES_H
rolf.meyer@arm.com 11:1c1ebd0324fa 10 #define MBED_PERIPHERALNAMES_H
rolf.meyer@arm.com 11:1c1ebd0324fa 11
rolf.meyer@arm.com 11:1c1ebd0324fa 12 #include "cmsis.h"
rolf.meyer@arm.com 11:1c1ebd0324fa 13
rolf.meyer@arm.com 11:1c1ebd0324fa 14 #ifdef __cplusplus
rolf.meyer@arm.com 11:1c1ebd0324fa 15 extern "C" {
rolf.meyer@arm.com 11:1c1ebd0324fa 16 #endif
rolf.meyer@arm.com 11:1c1ebd0324fa 17
rolf.meyer@arm.com 11:1c1ebd0324fa 18 typedef enum UARTName UARTName;
rolf.meyer@arm.com 11:1c1ebd0324fa 19 enum UARTName {
rolf.meyer@arm.com 11:1c1ebd0324fa 20 UART_0 = (int)LPC_UART0_BASE
rolf.meyer@arm.com 11:1c1ebd0324fa 21 , UART_1 = (int)LPC_UART1_BASE
rolf.meyer@arm.com 11:1c1ebd0324fa 22 , UART_2 = (int)LPC_UART2_BASE
rolf.meyer@arm.com 11:1c1ebd0324fa 23 , UART_3 = (int)LPC_UART3_BASE
rolf.meyer@arm.com 11:1c1ebd0324fa 24 };
rolf.meyer@arm.com 11:1c1ebd0324fa 25
rolf.meyer@arm.com 11:1c1ebd0324fa 26 typedef enum ADCName ADCName;
rolf.meyer@arm.com 11:1c1ebd0324fa 27 enum ADCName {
rolf.meyer@arm.com 11:1c1ebd0324fa 28 ADC0_0 = 0
rolf.meyer@arm.com 11:1c1ebd0324fa 29 , ADC0_1
rolf.meyer@arm.com 11:1c1ebd0324fa 30 , ADC0_2
rolf.meyer@arm.com 11:1c1ebd0324fa 31 , ADC0_3
rolf.meyer@arm.com 11:1c1ebd0324fa 32 , ADC0_4
rolf.meyer@arm.com 11:1c1ebd0324fa 33 , ADC0_5
rolf.meyer@arm.com 11:1c1ebd0324fa 34 , ADC0_6
rolf.meyer@arm.com 11:1c1ebd0324fa 35 , ADC0_7
rolf.meyer@arm.com 11:1c1ebd0324fa 36 };
rolf.meyer@arm.com 11:1c1ebd0324fa 37
rolf.meyer@arm.com 11:1c1ebd0324fa 38 typedef enum DACName DACName;
rolf.meyer@arm.com 11:1c1ebd0324fa 39 enum DACName {
rolf.meyer@arm.com 11:1c1ebd0324fa 40 DAC_0 = 0
rolf.meyer@arm.com 11:1c1ebd0324fa 41 };
rolf.meyer@arm.com 11:1c1ebd0324fa 42
rolf.meyer@arm.com 11:1c1ebd0324fa 43 typedef enum SPIName SPIName;
rolf.meyer@arm.com 11:1c1ebd0324fa 44 enum SPIName {
rolf.meyer@arm.com 11:1c1ebd0324fa 45 SPI_0 = (int)LPC_SSP0_BASE
rolf.meyer@arm.com 11:1c1ebd0324fa 46 , SPI_1 = (int)LPC_SSP1_BASE
rolf.meyer@arm.com 11:1c1ebd0324fa 47 };
rolf.meyer@arm.com 11:1c1ebd0324fa 48
rolf.meyer@arm.com 11:1c1ebd0324fa 49 typedef enum I2CName I2CName;
rolf.meyer@arm.com 11:1c1ebd0324fa 50 enum I2CName {
rolf.meyer@arm.com 11:1c1ebd0324fa 51 I2C_0 = (int)LPC_I2C0_BASE
rolf.meyer@arm.com 11:1c1ebd0324fa 52 , I2C_1 = (int)LPC_I2C1_BASE
rolf.meyer@arm.com 11:1c1ebd0324fa 53 , I2C_2 = (int)LPC_I2C2_BASE
rolf.meyer@arm.com 11:1c1ebd0324fa 54 };
rolf.meyer@arm.com 11:1c1ebd0324fa 55
rolf.meyer@arm.com 11:1c1ebd0324fa 56 typedef enum PWMName PWMName;
rolf.meyer@arm.com 11:1c1ebd0324fa 57 enum PWMName {
rolf.meyer@arm.com 11:1c1ebd0324fa 58 PWM_1 = 1
rolf.meyer@arm.com 11:1c1ebd0324fa 59 , PWM_2
rolf.meyer@arm.com 11:1c1ebd0324fa 60 , PWM_3
rolf.meyer@arm.com 11:1c1ebd0324fa 61 , PWM_4
rolf.meyer@arm.com 11:1c1ebd0324fa 62 , PWM_5
rolf.meyer@arm.com 11:1c1ebd0324fa 63 , PWM_6
rolf.meyer@arm.com 11:1c1ebd0324fa 64 };
rolf.meyer@arm.com 11:1c1ebd0324fa 65
rolf.meyer@arm.com 11:1c1ebd0324fa 66 typedef enum TimerName TimerName;
rolf.meyer@arm.com 11:1c1ebd0324fa 67 enum TimerName {
rolf.meyer@arm.com 11:1c1ebd0324fa 68 TIMER_0 = (int)LPC_TIM0_BASE
rolf.meyer@arm.com 11:1c1ebd0324fa 69 , TIMER_1 = (int)LPC_TIM1_BASE
rolf.meyer@arm.com 11:1c1ebd0324fa 70 , TIMER_2 = (int)LPC_TIM2_BASE
rolf.meyer@arm.com 11:1c1ebd0324fa 71 , TIMER_3 = (int)LPC_TIM3_BASE
rolf.meyer@arm.com 11:1c1ebd0324fa 72 };
rolf.meyer@arm.com 11:1c1ebd0324fa 73
rolf.meyer@arm.com 11:1c1ebd0324fa 74 typedef enum CANName CANName;
rolf.meyer@arm.com 11:1c1ebd0324fa 75 enum CANName {
rolf.meyer@arm.com 11:1c1ebd0324fa 76 CAN_1 = (int)LPC_CAN1_BASE,
rolf.meyer@arm.com 11:1c1ebd0324fa 77 CAN_2 = (int)LPC_CAN2_BASE
rolf.meyer@arm.com 11:1c1ebd0324fa 78 };
rolf.meyer@arm.com 11:1c1ebd0324fa 79
rolf.meyer@arm.com 11:1c1ebd0324fa 80 #define STDIO_UART_TX USBTX
rolf.meyer@arm.com 11:1c1ebd0324fa 81 #define STDIO_UART_RX USBRX
rolf.meyer@arm.com 11:1c1ebd0324fa 82 #define STDIO_UART UART_0
rolf.meyer@arm.com 11:1c1ebd0324fa 83 #define US_TICKER_TIMER TIMER_3
rolf.meyer@arm.com 11:1c1ebd0324fa 84 #define US_TICKER_TIMER_IRQn TIMER3_IRQn
rolf.meyer@arm.com 11:1c1ebd0324fa 85
rolf.meyer@arm.com 11:1c1ebd0324fa 86 #ifdef __cplusplus
rolf.meyer@arm.com 11:1c1ebd0324fa 87 }
rolf.meyer@arm.com 11:1c1ebd0324fa 88 #endif
rolf.meyer@arm.com 11:1c1ebd0324fa 89
rolf.meyer@arm.com 11:1c1ebd0324fa 90 #endif