Support for MSP430 launchpad.
Fork of mbed by
TARGET_LPC4088/TARGET_NXP/TARGET_LPC408X/objects.h@86:c662433839e3, 2014-06-21 (annotated)
- Committer:
- atamariya
- Date:
- Sat Jun 21 09:54:56 2014 +0000
- Revision:
- 86:c662433839e3
- Parent:
- 82:6473597d706e
Support for MSP430
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 65:5798e58a58b1 | 1 | /* mbed Microcontroller Library |
bogdanm | 65:5798e58a58b1 | 2 | * Copyright (c) 2006-2013 ARM Limited |
bogdanm | 65:5798e58a58b1 | 3 | * |
bogdanm | 65:5798e58a58b1 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
bogdanm | 65:5798e58a58b1 | 5 | * you may not use this file except in compliance with the License. |
bogdanm | 65:5798e58a58b1 | 6 | * You may obtain a copy of the License at |
bogdanm | 65:5798e58a58b1 | 7 | * |
bogdanm | 65:5798e58a58b1 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
bogdanm | 65:5798e58a58b1 | 9 | * |
bogdanm | 65:5798e58a58b1 | 10 | * Unless required by applicable law or agreed to in writing, software |
bogdanm | 65:5798e58a58b1 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
bogdanm | 65:5798e58a58b1 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
bogdanm | 65:5798e58a58b1 | 13 | * See the License for the specific language governing permissions and |
bogdanm | 65:5798e58a58b1 | 14 | * limitations under the License. |
bogdanm | 65:5798e58a58b1 | 15 | */ |
bogdanm | 65:5798e58a58b1 | 16 | #ifndef MBED_OBJECTS_H |
bogdanm | 65:5798e58a58b1 | 17 | #define MBED_OBJECTS_H |
bogdanm | 65:5798e58a58b1 | 18 | |
bogdanm | 65:5798e58a58b1 | 19 | #include "cmsis.h" |
bogdanm | 65:5798e58a58b1 | 20 | #include "PortNames.h" |
bogdanm | 65:5798e58a58b1 | 21 | #include "PeripheralNames.h" |
bogdanm | 65:5798e58a58b1 | 22 | #include "PinNames.h" |
bogdanm | 65:5798e58a58b1 | 23 | |
bogdanm | 65:5798e58a58b1 | 24 | #ifdef __cplusplus |
bogdanm | 65:5798e58a58b1 | 25 | extern "C" { |
bogdanm | 65:5798e58a58b1 | 26 | #endif |
bogdanm | 65:5798e58a58b1 | 27 | |
bogdanm | 65:5798e58a58b1 | 28 | struct gpio_irq_s { |
bogdanm | 65:5798e58a58b1 | 29 | uint32_t port; |
bogdanm | 65:5798e58a58b1 | 30 | uint32_t pin; |
bogdanm | 65:5798e58a58b1 | 31 | uint32_t ch; |
bogdanm | 65:5798e58a58b1 | 32 | }; |
bogdanm | 65:5798e58a58b1 | 33 | |
bogdanm | 65:5798e58a58b1 | 34 | struct port_s { |
bogdanm | 65:5798e58a58b1 | 35 | __IO uint32_t *reg_dir; |
bogdanm | 65:5798e58a58b1 | 36 | __IO uint32_t *reg_out; |
bogdanm | 65:5798e58a58b1 | 37 | __I uint32_t *reg_in; |
bogdanm | 65:5798e58a58b1 | 38 | PortName port; |
bogdanm | 65:5798e58a58b1 | 39 | uint32_t mask; |
bogdanm | 65:5798e58a58b1 | 40 | }; |
bogdanm | 65:5798e58a58b1 | 41 | |
bogdanm | 65:5798e58a58b1 | 42 | struct pwmout_s { |
bogdanm | 65:5798e58a58b1 | 43 | __IO uint32_t *MR; |
bogdanm | 65:5798e58a58b1 | 44 | LPC_PWM_TypeDef *pwm; |
bogdanm | 65:5798e58a58b1 | 45 | uint32_t channel; |
bogdanm | 65:5798e58a58b1 | 46 | }; |
bogdanm | 65:5798e58a58b1 | 47 | |
bogdanm | 65:5798e58a58b1 | 48 | struct serial_s { |
bogdanm | 65:5798e58a58b1 | 49 | LPC_UART_TypeDef *uart; |
bogdanm | 65:5798e58a58b1 | 50 | int index; |
bogdanm | 65:5798e58a58b1 | 51 | }; |
bogdanm | 65:5798e58a58b1 | 52 | |
bogdanm | 65:5798e58a58b1 | 53 | struct analogin_s { |
bogdanm | 65:5798e58a58b1 | 54 | ADCName adc; |
bogdanm | 65:5798e58a58b1 | 55 | }; |
bogdanm | 65:5798e58a58b1 | 56 | |
bogdanm | 65:5798e58a58b1 | 57 | struct dac_s { |
bogdanm | 65:5798e58a58b1 | 58 | DACName dac; |
bogdanm | 65:5798e58a58b1 | 59 | }; |
bogdanm | 65:5798e58a58b1 | 60 | |
bogdanm | 65:5798e58a58b1 | 61 | struct can_s { |
bogdanm | 65:5798e58a58b1 | 62 | LPC_CAN_TypeDef *dev; |
bogdanm | 65:5798e58a58b1 | 63 | int index; |
bogdanm | 65:5798e58a58b1 | 64 | }; |
bogdanm | 65:5798e58a58b1 | 65 | |
bogdanm | 65:5798e58a58b1 | 66 | struct i2c_s { |
bogdanm | 65:5798e58a58b1 | 67 | LPC_I2C_TypeDef *i2c; |
bogdanm | 65:5798e58a58b1 | 68 | }; |
bogdanm | 65:5798e58a58b1 | 69 | |
bogdanm | 65:5798e58a58b1 | 70 | struct spi_s { |
bogdanm | 65:5798e58a58b1 | 71 | LPC_SSP_TypeDef *spi; |
bogdanm | 65:5798e58a58b1 | 72 | }; |
bogdanm | 65:5798e58a58b1 | 73 | |
bogdanm | 65:5798e58a58b1 | 74 | #include "gpio_object.h" |
bogdanm | 65:5798e58a58b1 | 75 | |
bogdanm | 65:5798e58a58b1 | 76 | #ifdef __cplusplus |
bogdanm | 65:5798e58a58b1 | 77 | } |
bogdanm | 65:5798e58a58b1 | 78 | #endif |
bogdanm | 65:5798e58a58b1 | 79 | |
bogdanm | 65:5798e58a58b1 | 80 | #endif |