mbed libraries for KL25Z

Dependents:   FRDM_RGBLED

Committer:
emilmont
Date:
Fri Nov 09 11:33:53 2012 +0000
Revision:
8:c14af7958ef5
Child:
9:663789d7729f
SPI driver; ADC driver; DAC driver; microlib support; general bugfixing

Who changed what in which revision?

UserRevisionLine numberNew contents of line
emilmont 8:c14af7958ef5 1 /* mbed Microcontroller Library - PeripheralNames
emilmont 8:c14af7958ef5 2 * Copyright (C) 2008-2011 ARM Limited. All rights reserved.
emilmont 8:c14af7958ef5 3 *
emilmont 8:c14af7958ef5 4 * Provides the mappings for peripherals
emilmont 8:c14af7958ef5 5 */
emilmont 8:c14af7958ef5 6 #ifndef MBED_PERIPHERALNAMES_H
emilmont 8:c14af7958ef5 7 #define MBED_PERIPHERALNAMES_H
emilmont 8:c14af7958ef5 8
emilmont 8:c14af7958ef5 9 #include "cmsis.h"
emilmont 8:c14af7958ef5 10
emilmont 8:c14af7958ef5 11 #ifdef __cplusplus
emilmont 8:c14af7958ef5 12 extern "C" {
emilmont 8:c14af7958ef5 13 #endif
emilmont 8:c14af7958ef5 14
emilmont 8:c14af7958ef5 15 typedef enum {
emilmont 8:c14af7958ef5 16 UART_0 = (int)UART0_BASE,
emilmont 8:c14af7958ef5 17 UART_1 = (int)UART1_BASE,
emilmont 8:c14af7958ef5 18 UART_2 = (int)UART2_BASE
emilmont 8:c14af7958ef5 19 } UARTName;
emilmont 8:c14af7958ef5 20 #define STDIO_UART_TX USBTX
emilmont 8:c14af7958ef5 21 #define STDIO_UART_RX USBRX
emilmont 8:c14af7958ef5 22 #define STDIO_UART UART_0
emilmont 8:c14af7958ef5 23
emilmont 8:c14af7958ef5 24 typedef enum {
emilmont 8:c14af7958ef5 25 I2C_0 = (int)I2C0_BASE,
emilmont 8:c14af7958ef5 26 I2C_1 = (int)I2C1_BASE,
emilmont 8:c14af7958ef5 27 } I2CName;
emilmont 8:c14af7958ef5 28
emilmont 8:c14af7958ef5 29 #define TPM_SHIFT 8
emilmont 8:c14af7958ef5 30 typedef enum {
emilmont 8:c14af7958ef5 31 PWM_1 = (0 << TPM_SHIFT) | (0), // TPM0 CH0
emilmont 8:c14af7958ef5 32 PWM_2 = (0 << TPM_SHIFT) | (1), // TPM0 CH1
emilmont 8:c14af7958ef5 33 PWM_3 = (0 << TPM_SHIFT) | (2), // TPM0 CH2
emilmont 8:c14af7958ef5 34 PWM_4 = (0 << TPM_SHIFT) | (3), // TPM0 CH3
emilmont 8:c14af7958ef5 35 PWM_5 = (0 << TPM_SHIFT) | (4), // TPM0 CH4
emilmont 8:c14af7958ef5 36 PWM_6 = (0 << TPM_SHIFT) | (5), // TPM0 CH5
emilmont 8:c14af7958ef5 37
emilmont 8:c14af7958ef5 38 PWM_7 = (1 << TPM_SHIFT) | (0), // TPM1 CH0
emilmont 8:c14af7958ef5 39 PWM_8 = (1 << TPM_SHIFT) | (1), // TPM1 CH1
emilmont 8:c14af7958ef5 40
emilmont 8:c14af7958ef5 41 PWM_9 = (2 << TPM_SHIFT) | (0), // TPM2 CH0
emilmont 8:c14af7958ef5 42 PWM_10 = (2 << TPM_SHIFT) | (1) // TPM2 CH1
emilmont 8:c14af7958ef5 43 } PWMName;
emilmont 8:c14af7958ef5 44
emilmont 8:c14af7958ef5 45 typedef enum {
emilmont 8:c14af7958ef5 46 ADC0_SE0 = 0,
emilmont 8:c14af7958ef5 47 ADC0_SE3 = 3,
emilmont 8:c14af7958ef5 48 ADC0_SE4b = 4,
emilmont 8:c14af7958ef5 49 ADC0_SE5b = 5,
emilmont 8:c14af7958ef5 50 ADC0_SE6b = 6,
emilmont 8:c14af7958ef5 51 ADC0_SE7b = 7,
emilmont 8:c14af7958ef5 52 ADC0_SE8 = 8,
emilmont 8:c14af7958ef5 53 ADC0_SE9 = 9,
emilmont 8:c14af7958ef5 54 ADC0_SE11 = 11,
emilmont 8:c14af7958ef5 55 ADC0_SE12 = 12,
emilmont 8:c14af7958ef5 56 ADC0_SE13 = 13,
emilmont 8:c14af7958ef5 57 ADC0_SE14 = 14,
emilmont 8:c14af7958ef5 58 ADC0_SE15 = 15,
emilmont 8:c14af7958ef5 59 ADC0_SE23 = 23
emilmont 8:c14af7958ef5 60 } ADCName;
emilmont 8:c14af7958ef5 61
emilmont 8:c14af7958ef5 62 typedef enum {
emilmont 8:c14af7958ef5 63 DAC_0 = 0
emilmont 8:c14af7958ef5 64 } DACName;
emilmont 8:c14af7958ef5 65
emilmont 8:c14af7958ef5 66
emilmont 8:c14af7958ef5 67 typedef enum {
emilmont 8:c14af7958ef5 68 SPI_0 = (int)SPI0_BASE,
emilmont 8:c14af7958ef5 69 SPI_1 = (int)SPI1_BASE,
emilmont 8:c14af7958ef5 70 } SPIName;
emilmont 8:c14af7958ef5 71
emilmont 8:c14af7958ef5 72 #ifdef __cplusplus
emilmont 8:c14af7958ef5 73 }
emilmont 8:c14af7958ef5 74 #endif
emilmont 8:c14af7958ef5 75
emilmont 8:c14af7958ef5 76 #endif