ads1115 only

Fork of mbed by mbed official

Committer:
bogdanm
Date:
Wed Jun 11 15:14:05 2014 +0100
Revision:
85:024bf7f99721
Parent:
82:6473597d706e
Release 85 of the mbed library

Main changes:

- K64F Ethernet fixes
- Updated tests
- Fixes for various mbed targets
- Code cleanup: fixed warnings, more consistent code style
- GCC support for K64F

There is a known issue with the I2C interface on some ST targets. If you
find the I2C interface problematic on your ST board, please log a bug
against this on mbed.org.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 82:6473597d706e 1 /* mbed Microcontroller Library
bogdanm 82:6473597d706e 2 * Copyright (c) 2006-2014 ARM Limited
bogdanm 82:6473597d706e 3 *
bogdanm 82:6473597d706e 4 * Licensed under the Apache License, Version 2.0 (the "License");
bogdanm 82:6473597d706e 5 * you may not use this file except in compliance with the License.
bogdanm 82:6473597d706e 6 * You may obtain a copy of the License at
bogdanm 82:6473597d706e 7 *
bogdanm 82:6473597d706e 8 * http://www.apache.org/licenses/LICENSE-2.0
bogdanm 82:6473597d706e 9 *
bogdanm 82:6473597d706e 10 * Unless required by applicable law or agreed to in writing, software
bogdanm 82:6473597d706e 11 * distributed under the License is distributed on an "AS IS" BASIS,
bogdanm 82:6473597d706e 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
bogdanm 82:6473597d706e 13 * See the License for the specific language governing permissions and
bogdanm 82:6473597d706e 14 * limitations under the License.
bogdanm 82:6473597d706e 15 */
bogdanm 82:6473597d706e 16 #ifndef MBED_PINNAMES_H
bogdanm 82:6473597d706e 17 #define MBED_PINNAMES_H
bogdanm 82:6473597d706e 18
bogdanm 82:6473597d706e 19 #include "cmsis.h"
bogdanm 82:6473597d706e 20
bogdanm 82:6473597d706e 21 #ifdef __cplusplus
bogdanm 82:6473597d706e 22 extern "C" {
bogdanm 82:6473597d706e 23 #endif
bogdanm 82:6473597d706e 24
bogdanm 82:6473597d706e 25 typedef enum {
bogdanm 82:6473597d706e 26 PIN_INPUT,
bogdanm 82:6473597d706e 27 PIN_OUTPUT
bogdanm 82:6473597d706e 28 } PinDirection;
bogdanm 82:6473597d706e 29
bogdanm 82:6473597d706e 30 typedef enum {
bogdanm 82:6473597d706e 31 // LPC Pin Names
bogdanm 82:6473597d706e 32 P0_0 = 0,
bogdanm 82:6473597d706e 33 P0_1, P0_2, P0_3, P0_4, P0_5, P0_6, P0_7, P0_8, P0_9, P0_10, P0_11, P0_12, P0_13, P0_14, P0_15, P0_16, P0_17, P0_18, P0_19, P0_20, P0_21, P0_22, P0_23, P0_24, P0_25, P0_26, P0_27, P0_28, P0_29, P0_30, P0_31,
bogdanm 82:6473597d706e 34 P1_0, P1_1, P1_2, P1_3, P1_4, P1_5, P1_6, P1_7, P1_8, P1_9, P1_10, P1_11, P1_12, P1_13, P1_14, P1_15, P1_16, P1_17, P1_18, P1_19, P1_20, P1_21, P1_22, P1_23, P1_24, P1_25, P1_26, P1_27, P1_28, P1_29, P1_30, P1_31,
bogdanm 82:6473597d706e 35 P2_0, P2_1, P2_2, P2_3, P2_4, P2_5, P2_6, P2_7, P2_8, P2_9, P2_10, P2_11, P2_12,
bogdanm 82:6473597d706e 36
bogdanm 82:6473597d706e 37 LED_RED = P0_25,
bogdanm 82:6473597d706e 38 LED_GREEN = P0_3,
bogdanm 82:6473597d706e 39 LED_BLUE = P1_1,
bogdanm 82:6473597d706e 40
bogdanm 82:6473597d706e 41 // mbed original LED naming
bogdanm 85:024bf7f99721 42 LED1 = LED_RED,
bogdanm 82:6473597d706e 43 LED2 = LED_GREEN,
bogdanm 85:024bf7f99721 44 LED3 = LED_BLUE,
bogdanm 85:024bf7f99721 45 LED4 = LED_BLUE,
bogdanm 82:6473597d706e 46
bogdanm 82:6473597d706e 47 // Serial to USB pins
bogdanm 82:6473597d706e 48 USBTX = P0_18,
bogdanm 82:6473597d706e 49 USBRX = P0_13,
bogdanm 82:6473597d706e 50
bogdanm 82:6473597d706e 51 // Arduino Shield Receptacles Names
bogdanm 82:6473597d706e 52 D0 = P0_13,
bogdanm 82:6473597d706e 53 D1 = P0_18,
bogdanm 82:6473597d706e 54 D2 = P0_29,
bogdanm 82:6473597d706e 55 D3 = P0_9,
bogdanm 82:6473597d706e 56 D4 = P0_10,
bogdanm 82:6473597d706e 57 D5 = P0_16, // same port as D13
bogdanm 82:6473597d706e 58 D6 = P1_3,
bogdanm 82:6473597d706e 59 D7 = P0_0,
bogdanm 82:6473597d706e 60 D8 = P0_24,
bogdanm 82:6473597d706e 61 D9 = P1_0,
bogdanm 82:6473597d706e 62 D10= P0_27,
bogdanm 82:6473597d706e 63 D11= P0_28,
bogdanm 82:6473597d706e 64 D12= P0_12,
bogdanm 82:6473597d706e 65 D13= P0_16, // same port as D5
bogdanm 82:6473597d706e 66 D14= P0_23,
bogdanm 82:6473597d706e 67 D15= P0_22,
bogdanm 82:6473597d706e 68
bogdanm 82:6473597d706e 69 A0 = P0_8,
bogdanm 82:6473597d706e 70 A1 = P0_7,
bogdanm 82:6473597d706e 71 A2 = P0_6,
bogdanm 82:6473597d706e 72 A3 = P0_5,
bogdanm 82:6473597d706e 73 A4 = P0_23, // same port as SDA
bogdanm 82:6473597d706e 74 A5 = P0_22, // same port as SCL
bogdanm 82:6473597d706e 75 SDA= P0_23, // same port as A4
bogdanm 82:6473597d706e 76 SCL= P0_22, // same port as A5
bogdanm 82:6473597d706e 77
bogdanm 82:6473597d706e 78 // Not connected
bogdanm 82:6473597d706e 79 NC = (int)0xFFFFFFFF,
bogdanm 82:6473597d706e 80 } PinName;
bogdanm 82:6473597d706e 81
bogdanm 82:6473597d706e 82 typedef enum {
bogdanm 82:6473597d706e 83 PullUp = 2,
bogdanm 82:6473597d706e 84 PullDown = 1,
bogdanm 82:6473597d706e 85 PullNone = 0,
bogdanm 82:6473597d706e 86 Repeater = 3,
bogdanm 82:6473597d706e 87 OpenDrain = 4,
bogdanm 82:6473597d706e 88 PullDefault = PullDown
bogdanm 82:6473597d706e 89 } PinMode;
bogdanm 82:6473597d706e 90
bogdanm 82:6473597d706e 91 #define STDIO_UART_TX USBTX
bogdanm 82:6473597d706e 92 #define STDIO_UART_RX USBRX
bogdanm 82:6473597d706e 93
bogdanm 82:6473597d706e 94 typedef struct {
bogdanm 82:6473597d706e 95 unsigned char n;
bogdanm 82:6473597d706e 96 unsigned char offset;
bogdanm 82:6473597d706e 97 } SWM_Map;
bogdanm 82:6473597d706e 98
bogdanm 82:6473597d706e 99 #ifdef __cplusplus
bogdanm 82:6473597d706e 100 }
bogdanm 82:6473597d706e 101 #endif
bogdanm 82:6473597d706e 102
bogdanm 82:6473597d706e 103 #endif