The official mbed C/C SDK provides the software platform and libraries to build your applications.
Fork of mbed by
TARGET_LPC4337/TARGET_NXP/TARGET_LPC43XX/objects.h@89:552587b429a1, 2014-09-12 (annotated)
- Committer:
- bogdanm
- Date:
- Fri Sep 12 16:41:52 2014 +0100
- Revision:
- 89:552587b429a1
Release 89 of the mbed library
Main changes:
- low power optimizations for Nordic targets
- code structure changes for Freescale K64F targets
- bug fixes in various backends
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 89:552587b429a1 | 1 | /* mbed Microcontroller Library |
bogdanm | 89:552587b429a1 | 2 | * Copyright (c) 2006-2013 ARM Limited |
bogdanm | 89:552587b429a1 | 3 | * |
bogdanm | 89:552587b429a1 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
bogdanm | 89:552587b429a1 | 5 | * you may not use this file except in compliance with the License. |
bogdanm | 89:552587b429a1 | 6 | * You may obtain a copy of the License at |
bogdanm | 89:552587b429a1 | 7 | * |
bogdanm | 89:552587b429a1 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
bogdanm | 89:552587b429a1 | 9 | * |
bogdanm | 89:552587b429a1 | 10 | * Unless required by applicable law or agreed to in writing, software |
bogdanm | 89:552587b429a1 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
bogdanm | 89:552587b429a1 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
bogdanm | 89:552587b429a1 | 13 | * See the License for the specific language governing permissions and |
bogdanm | 89:552587b429a1 | 14 | * limitations under the License. |
bogdanm | 89:552587b429a1 | 15 | */ |
bogdanm | 89:552587b429a1 | 16 | #ifndef MBED_OBJECTS_H |
bogdanm | 89:552587b429a1 | 17 | #define MBED_OBJECTS_H |
bogdanm | 89:552587b429a1 | 18 | |
bogdanm | 89:552587b429a1 | 19 | #include "cmsis.h" |
bogdanm | 89:552587b429a1 | 20 | #include "PortNames.h" |
bogdanm | 89:552587b429a1 | 21 | #include "PeripheralNames.h" |
bogdanm | 89:552587b429a1 | 22 | #include "PinNames.h" |
bogdanm | 89:552587b429a1 | 23 | #include "gpio_object.h" |
bogdanm | 89:552587b429a1 | 24 | |
bogdanm | 89:552587b429a1 | 25 | #ifdef __cplusplus |
bogdanm | 89:552587b429a1 | 26 | extern "C" { |
bogdanm | 89:552587b429a1 | 27 | #endif |
bogdanm | 89:552587b429a1 | 28 | |
bogdanm | 89:552587b429a1 | 29 | struct gpio_irq_s { |
bogdanm | 89:552587b429a1 | 30 | uint32_t port; |
bogdanm | 89:552587b429a1 | 31 | uint32_t pin; |
bogdanm | 89:552587b429a1 | 32 | uint32_t ch; |
bogdanm | 89:552587b429a1 | 33 | }; |
bogdanm | 89:552587b429a1 | 34 | |
bogdanm | 89:552587b429a1 | 35 | struct port_s { |
bogdanm | 89:552587b429a1 | 36 | __IO uint32_t *reg_dir; |
bogdanm | 89:552587b429a1 | 37 | __IO uint32_t *reg_out; |
bogdanm | 89:552587b429a1 | 38 | __I uint32_t *reg_in; |
bogdanm | 89:552587b429a1 | 39 | PortName port; |
bogdanm | 89:552587b429a1 | 40 | uint32_t mask; |
bogdanm | 89:552587b429a1 | 41 | }; |
bogdanm | 89:552587b429a1 | 42 | |
bogdanm | 89:552587b429a1 | 43 | struct pwmout_s { |
bogdanm | 89:552587b429a1 | 44 | PWMName pwm; |
bogdanm | 89:552587b429a1 | 45 | uint8_t mr; |
bogdanm | 89:552587b429a1 | 46 | }; |
bogdanm | 89:552587b429a1 | 47 | |
bogdanm | 89:552587b429a1 | 48 | struct serial_s { |
bogdanm | 89:552587b429a1 | 49 | LPC_USART_T *uart; |
bogdanm | 89:552587b429a1 | 50 | int index; |
bogdanm | 89:552587b429a1 | 51 | }; |
bogdanm | 89:552587b429a1 | 52 | |
bogdanm | 89:552587b429a1 | 53 | struct analogin_s { |
bogdanm | 89:552587b429a1 | 54 | LPC_ADC_T *adc; |
bogdanm | 89:552587b429a1 | 55 | uint8_t num; |
bogdanm | 89:552587b429a1 | 56 | uint8_t ch; |
bogdanm | 89:552587b429a1 | 57 | }; |
bogdanm | 89:552587b429a1 | 58 | |
bogdanm | 89:552587b429a1 | 59 | struct dac_s { |
bogdanm | 89:552587b429a1 | 60 | DACName dac; |
bogdanm | 89:552587b429a1 | 61 | }; |
bogdanm | 89:552587b429a1 | 62 | |
bogdanm | 89:552587b429a1 | 63 | struct can_s { |
bogdanm | 89:552587b429a1 | 64 | LPC_CCAN_T *dev; |
bogdanm | 89:552587b429a1 | 65 | }; |
bogdanm | 89:552587b429a1 | 66 | |
bogdanm | 89:552587b429a1 | 67 | struct i2c_s { |
bogdanm | 89:552587b429a1 | 68 | LPC_I2C_T *i2c; |
bogdanm | 89:552587b429a1 | 69 | }; |
bogdanm | 89:552587b429a1 | 70 | |
bogdanm | 89:552587b429a1 | 71 | struct spi_s { |
bogdanm | 89:552587b429a1 | 72 | LPC_SSP_T *spi; |
bogdanm | 89:552587b429a1 | 73 | }; |
bogdanm | 89:552587b429a1 | 74 | |
bogdanm | 89:552587b429a1 | 75 | #ifdef __cplusplus |
bogdanm | 89:552587b429a1 | 76 | } |
bogdanm | 89:552587b429a1 | 77 | #endif |
bogdanm | 89:552587b429a1 | 78 | |
bogdanm | 89:552587b429a1 | 79 | #endif |