mbed library sources. Supersedes mbed-src.
Fork of mbed-dev by
targets/TARGET_NORDIC/TARGET_NRF5_SDK13/objects.h@162:e13f6fdb2ac4, 2017-04-12 (annotated)
- Committer:
- <>
- Date:
- Wed Apr 12 16:21:43 2017 +0100
- Revision:
- 162:e13f6fdb2ac4
This updates the lib to the mbed lib v140
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
<> | 162:e13f6fdb2ac4 | 1 | /* |
<> | 162:e13f6fdb2ac4 | 2 | * Copyright (c) 2013 Nordic Semiconductor ASA |
<> | 162:e13f6fdb2ac4 | 3 | * All rights reserved. |
<> | 162:e13f6fdb2ac4 | 4 | * |
<> | 162:e13f6fdb2ac4 | 5 | * Redistribution and use in source and binary forms, with or without modification, |
<> | 162:e13f6fdb2ac4 | 6 | * are permitted provided that the following conditions are met: |
<> | 162:e13f6fdb2ac4 | 7 | * |
<> | 162:e13f6fdb2ac4 | 8 | * 1. Redistributions of source code must retain the above copyright notice, this list |
<> | 162:e13f6fdb2ac4 | 9 | * of conditions and the following disclaimer. |
<> | 162:e13f6fdb2ac4 | 10 | * |
<> | 162:e13f6fdb2ac4 | 11 | * 2. Redistributions in binary form, except as embedded into a Nordic Semiconductor ASA |
<> | 162:e13f6fdb2ac4 | 12 | * integrated circuit in a product or a software update for such product, must reproduce |
<> | 162:e13f6fdb2ac4 | 13 | * the above copyright notice, this list of conditions and the following disclaimer in |
<> | 162:e13f6fdb2ac4 | 14 | * the documentation and/or other materials provided with the distribution. |
<> | 162:e13f6fdb2ac4 | 15 | * |
<> | 162:e13f6fdb2ac4 | 16 | * 3. Neither the name of Nordic Semiconductor ASA nor the names of its contributors may be |
<> | 162:e13f6fdb2ac4 | 17 | * used to endorse or promote products derived from this software without specific prior |
<> | 162:e13f6fdb2ac4 | 18 | * written permission. |
<> | 162:e13f6fdb2ac4 | 19 | * |
<> | 162:e13f6fdb2ac4 | 20 | * 4. This software, with or without modification, must only be used with a |
<> | 162:e13f6fdb2ac4 | 21 | * Nordic Semiconductor ASA integrated circuit. |
<> | 162:e13f6fdb2ac4 | 22 | * |
<> | 162:e13f6fdb2ac4 | 23 | * 5. Any software provided in binary or object form under this license must not be reverse |
<> | 162:e13f6fdb2ac4 | 24 | * engineered, decompiled, modified and/or disassembled. |
<> | 162:e13f6fdb2ac4 | 25 | * |
<> | 162:e13f6fdb2ac4 | 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
<> | 162:e13f6fdb2ac4 | 27 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
<> | 162:e13f6fdb2ac4 | 28 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
<> | 162:e13f6fdb2ac4 | 29 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
<> | 162:e13f6fdb2ac4 | 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
<> | 162:e13f6fdb2ac4 | 31 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
<> | 162:e13f6fdb2ac4 | 32 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
<> | 162:e13f6fdb2ac4 | 33 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
<> | 162:e13f6fdb2ac4 | 34 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
<> | 162:e13f6fdb2ac4 | 35 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
<> | 162:e13f6fdb2ac4 | 36 | * |
<> | 162:e13f6fdb2ac4 | 37 | */ |
<> | 162:e13f6fdb2ac4 | 38 | |
<> | 162:e13f6fdb2ac4 | 39 | #ifndef MBED_OBJECTS_H |
<> | 162:e13f6fdb2ac4 | 40 | #define MBED_OBJECTS_H |
<> | 162:e13f6fdb2ac4 | 41 | |
<> | 162:e13f6fdb2ac4 | 42 | #include "cmsis.h" |
<> | 162:e13f6fdb2ac4 | 43 | #include "PortNames.h" |
<> | 162:e13f6fdb2ac4 | 44 | #include "PeripheralNames.h" |
<> | 162:e13f6fdb2ac4 | 45 | #include "PinNames.h" |
<> | 162:e13f6fdb2ac4 | 46 | |
<> | 162:e13f6fdb2ac4 | 47 | #ifdef __cplusplus |
<> | 162:e13f6fdb2ac4 | 48 | extern "C" { |
<> | 162:e13f6fdb2ac4 | 49 | #endif |
<> | 162:e13f6fdb2ac4 | 50 | |
<> | 162:e13f6fdb2ac4 | 51 | struct serial_s |
<> | 162:e13f6fdb2ac4 | 52 | { |
<> | 162:e13f6fdb2ac4 | 53 | uint32_t placeholder; // struct is unused by nRF5x API implementation |
<> | 162:e13f6fdb2ac4 | 54 | }; // but it must be not empty (required by strict compiler - IAR) |
<> | 162:e13f6fdb2ac4 | 55 | |
<> | 162:e13f6fdb2ac4 | 56 | struct spi_s |
<> | 162:e13f6fdb2ac4 | 57 | { |
<> | 162:e13f6fdb2ac4 | 58 | uint8_t spi_idx; |
<> | 162:e13f6fdb2ac4 | 59 | }; |
<> | 162:e13f6fdb2ac4 | 60 | |
<> | 162:e13f6fdb2ac4 | 61 | struct port_s |
<> | 162:e13f6fdb2ac4 | 62 | { |
<> | 162:e13f6fdb2ac4 | 63 | PortName port; |
<> | 162:e13f6fdb2ac4 | 64 | uint32_t mask; |
<> | 162:e13f6fdb2ac4 | 65 | }; |
<> | 162:e13f6fdb2ac4 | 66 | |
<> | 162:e13f6fdb2ac4 | 67 | struct pwmout_s |
<> | 162:e13f6fdb2ac4 | 68 | { |
<> | 162:e13f6fdb2ac4 | 69 | PWMName pwm_name; |
<> | 162:e13f6fdb2ac4 | 70 | PinName pin; |
<> | 162:e13f6fdb2ac4 | 71 | uint8_t pwm_channel; |
<> | 162:e13f6fdb2ac4 | 72 | void * pwm_struct; |
<> | 162:e13f6fdb2ac4 | 73 | }; |
<> | 162:e13f6fdb2ac4 | 74 | |
<> | 162:e13f6fdb2ac4 | 75 | struct i2c_s |
<> | 162:e13f6fdb2ac4 | 76 | { |
<> | 162:e13f6fdb2ac4 | 77 | uint8_t twi_idx; |
<> | 162:e13f6fdb2ac4 | 78 | }; |
<> | 162:e13f6fdb2ac4 | 79 | |
<> | 162:e13f6fdb2ac4 | 80 | struct analogin_s |
<> | 162:e13f6fdb2ac4 | 81 | { |
<> | 162:e13f6fdb2ac4 | 82 | ADCName adc; |
<> | 162:e13f6fdb2ac4 | 83 | uint8_t adc_pin; |
<> | 162:e13f6fdb2ac4 | 84 | }; |
<> | 162:e13f6fdb2ac4 | 85 | |
<> | 162:e13f6fdb2ac4 | 86 | struct gpio_irq_s |
<> | 162:e13f6fdb2ac4 | 87 | { |
<> | 162:e13f6fdb2ac4 | 88 | uint32_t ch; |
<> | 162:e13f6fdb2ac4 | 89 | }; |
<> | 162:e13f6fdb2ac4 | 90 | |
<> | 162:e13f6fdb2ac4 | 91 | |
<> | 162:e13f6fdb2ac4 | 92 | #include "gpio_object.h" |
<> | 162:e13f6fdb2ac4 | 93 | |
<> | 162:e13f6fdb2ac4 | 94 | #ifdef __cplusplus |
<> | 162:e13f6fdb2ac4 | 95 | } |
<> | 162:e13f6fdb2ac4 | 96 | #endif |
<> | 162:e13f6fdb2ac4 | 97 | |
<> | 162:e13f6fdb2ac4 | 98 | #endif |