mbed(SerialHalfDuplex入り)
Fork of mbed by
TARGET_NRF51822/TARGET_NORDIC/TARGET_NRF51822/objects.h@82:6473597d706e, 2014-04-07 (annotated)
- Committer:
- bogdanm
- Date:
- Mon Apr 07 18:28:36 2014 +0100
- Revision:
- 82:6473597d706e
- Child:
- 85:024bf7f99721
Release 82 of the mbed library
Main changes:
- support for K64F
- Revisited Nordic code structure
- Test infrastructure improvements
- various bug fixes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 82:6473597d706e | 1 | /* mbed Microcontroller Library |
bogdanm | 82:6473597d706e | 2 | * Copyright (c) 2013 Nordic Semiconductor |
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_OBJECTS_H |
bogdanm | 82:6473597d706e | 17 | #define MBED_OBJECTS_H |
bogdanm | 82:6473597d706e | 18 | |
bogdanm | 82:6473597d706e | 19 | #include "cmsis.h" |
bogdanm | 82:6473597d706e | 20 | #include "PortNames.h" |
bogdanm | 82:6473597d706e | 21 | #include "PeripheralNames.h" |
bogdanm | 82:6473597d706e | 22 | #include "PinNames.h" |
bogdanm | 82:6473597d706e | 23 | |
bogdanm | 82:6473597d706e | 24 | #ifdef __cplusplus |
bogdanm | 82:6473597d706e | 25 | extern "C" { |
bogdanm | 82:6473597d706e | 26 | #endif |
bogdanm | 82:6473597d706e | 27 | |
bogdanm | 82:6473597d706e | 28 | struct serial_s { |
bogdanm | 82:6473597d706e | 29 | NRF_UART_Type *uart; |
bogdanm | 82:6473597d706e | 30 | int index; |
bogdanm | 82:6473597d706e | 31 | }; |
bogdanm | 82:6473597d706e | 32 | |
bogdanm | 82:6473597d706e | 33 | struct spi_s { |
bogdanm | 82:6473597d706e | 34 | NRF_SPI_Type *spi; |
bogdanm | 82:6473597d706e | 35 | NRF_SPIS_Type *spis; |
bogdanm | 82:6473597d706e | 36 | }; |
bogdanm | 82:6473597d706e | 37 | |
bogdanm | 82:6473597d706e | 38 | struct port_s { |
bogdanm | 82:6473597d706e | 39 | __IO uint32_t *reg_cnf; |
bogdanm | 82:6473597d706e | 40 | __IO uint32_t *reg_out; |
bogdanm | 82:6473597d706e | 41 | __I uint32_t *reg_in; |
bogdanm | 82:6473597d706e | 42 | PortName port; |
bogdanm | 82:6473597d706e | 43 | uint32_t mask; |
bogdanm | 82:6473597d706e | 44 | }; |
bogdanm | 82:6473597d706e | 45 | |
bogdanm | 82:6473597d706e | 46 | struct pwmout_s { |
bogdanm | 82:6473597d706e | 47 | PWMName pwm; |
bogdanm | 82:6473597d706e | 48 | PinName pin; |
bogdanm | 82:6473597d706e | 49 | }; |
bogdanm | 82:6473597d706e | 50 | |
bogdanm | 82:6473597d706e | 51 | struct i2c_s { |
bogdanm | 82:6473597d706e | 52 | NRF_TWI_Type *i2c; |
bogdanm | 82:6473597d706e | 53 | PinName sda; |
bogdanm | 82:6473597d706e | 54 | PinName scl; |
bogdanm | 82:6473597d706e | 55 | int freq; |
bogdanm | 82:6473597d706e | 56 | }; |
bogdanm | 82:6473597d706e | 57 | |
bogdanm | 82:6473597d706e | 58 | struct analogin_s { |
bogdanm | 82:6473597d706e | 59 | ADCName adc; |
bogdanm | 82:6473597d706e | 60 | }; |
bogdanm | 82:6473597d706e | 61 | |
bogdanm | 82:6473597d706e | 62 | struct gpio_irq_s { |
bogdanm | 82:6473597d706e | 63 | uint32_t ch; |
bogdanm | 82:6473597d706e | 64 | }; |
bogdanm | 82:6473597d706e | 65 | |
bogdanm | 82:6473597d706e | 66 | #include "gpio_object.h" |
bogdanm | 82:6473597d706e | 67 | |
bogdanm | 82:6473597d706e | 68 | #ifdef __cplusplus |
bogdanm | 82:6473597d706e | 69 | } |
bogdanm | 82:6473597d706e | 70 | #endif |
bogdanm | 82:6473597d706e | 71 | |
bogdanm | 82:6473597d706e | 72 | #endif |