The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
Kojto
Date:
Tue Feb 14 11:24:20 2017 +0000
Revision:
136:ef9c61f8c49f
Parent:
129:0ab6a29f35bf
Release 136 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3432: Target STM USBHOST support https://github.com/ARMmbed/mbed-os/pull/3432
3181: NUCLEO_F207ZG extending PeripheralPins.c: all available alternate functions can be used now https://github.com/ARMmbed/mbed-os/pull/3181
3626: NUCLEO_F412ZG : Add USB Device +Host https://github.com/ARMmbed/mbed-os/pull/3626
3628: Fix warnings https://github.com/ARMmbed/mbed-os/pull/3628
3629: STM32: L0 LL layer https://github.com/ARMmbed/mbed-os/pull/3629
3632: IDE Export support for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3632
3642: Missing IRQ pin fix for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3642
3664: Fix ncs36510 sleep definitions https://github.com/ARMmbed/mbed-os/pull/3664
3655: [STM32F4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3655
3657: [STM32L4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3657
3658: [STM32F3] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3658
3685: STM32: I2C: reset state machine https://github.com/ARMmbed/mbed-os/pull/3685
3692: uVisor: Standardize available legacy heap and stack https://github.com/ARMmbed/mbed-os/pull/3692
3621: Fix for #2884, LPC824: export to LPCXpresso, target running with wron https://github.com/ARMmbed/mbed-os/pull/3621
3649: [STM32F7] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3649
3695: Enforce device_name is valid in targets.json https://github.com/ARMmbed/mbed-os/pull/3695
3723: NCS36510: spi_format function bug fix https://github.com/ARMmbed/mbed-os/pull/3723

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 129:0ab6a29f35bf 1 /*******************************************************************************
<> 129:0ab6a29f35bf 2 * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
<> 129:0ab6a29f35bf 3 *
<> 129:0ab6a29f35bf 4 * Permission is hereby granted, free of charge, to any person obtaining a
<> 129:0ab6a29f35bf 5 * copy of this software and associated documentation files (the "Software"),
<> 129:0ab6a29f35bf 6 * to deal in the Software without restriction, including without limitation
<> 129:0ab6a29f35bf 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
<> 129:0ab6a29f35bf 8 * and/or sell copies of the Software, and to permit persons to whom the
<> 129:0ab6a29f35bf 9 * Software is furnished to do so, subject to the following conditions:
<> 129:0ab6a29f35bf 10 *
<> 129:0ab6a29f35bf 11 * The above copyright notice and this permission notice shall be included
<> 129:0ab6a29f35bf 12 * in all copies or substantial portions of the Software.
<> 129:0ab6a29f35bf 13 *
<> 129:0ab6a29f35bf 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
<> 129:0ab6a29f35bf 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
<> 129:0ab6a29f35bf 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
<> 129:0ab6a29f35bf 17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
<> 129:0ab6a29f35bf 18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
<> 129:0ab6a29f35bf 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
<> 129:0ab6a29f35bf 20 * OTHER DEALINGS IN THE SOFTWARE.
<> 129:0ab6a29f35bf 21 *
<> 129:0ab6a29f35bf 22 * Except as contained in this notice, the name of Maxim Integrated
<> 129:0ab6a29f35bf 23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
<> 129:0ab6a29f35bf 24 * Products, Inc. Branding Policy.
<> 129:0ab6a29f35bf 25 *
<> 129:0ab6a29f35bf 26 * The mere transfer of this software does not imply any licenses
<> 129:0ab6a29f35bf 27 * of trade secrets, proprietary technology, copyrights, patents,
<> 129:0ab6a29f35bf 28 * trademarks, maskwork rights, or any other form of intellectual
<> 129:0ab6a29f35bf 29 * property whatsoever. Maxim Integrated Products, Inc. retains all
<> 129:0ab6a29f35bf 30 * ownership rights.
<> 129:0ab6a29f35bf 31 *******************************************************************************
<> 129:0ab6a29f35bf 32 */
<> 129:0ab6a29f35bf 33
<> 129:0ab6a29f35bf 34 #ifndef MBED_GPIO_OBJECT_H
<> 129:0ab6a29f35bf 35 #define MBED_GPIO_OBJECT_H
<> 129:0ab6a29f35bf 36
<> 129:0ab6a29f35bf 37 #include "mbed_assert.h"
<> 129:0ab6a29f35bf 38
<> 129:0ab6a29f35bf 39 #ifdef __cplusplus
<> 129:0ab6a29f35bf 40 extern "C" {
<> 129:0ab6a29f35bf 41 #endif
<> 129:0ab6a29f35bf 42
<> 129:0ab6a29f35bf 43 typedef struct {
<> 129:0ab6a29f35bf 44 PinName name;
<> 129:0ab6a29f35bf 45 __IO uint32_t *reg_out;
<> 129:0ab6a29f35bf 46 __I uint32_t *reg_in;
<> 129:0ab6a29f35bf 47 PinMode mode;
<> 129:0ab6a29f35bf 48 } gpio_t;
<> 129:0ab6a29f35bf 49
<> 129:0ab6a29f35bf 50 static inline void gpio_write(gpio_t *obj, int value)
<> 129:0ab6a29f35bf 51 {
<> 129:0ab6a29f35bf 52 MBED_ASSERT(obj->name != (PinName)NC);
<> 129:0ab6a29f35bf 53 *obj->reg_out = !!value;
<> 129:0ab6a29f35bf 54 }
<> 129:0ab6a29f35bf 55
<> 129:0ab6a29f35bf 56 static inline int gpio_read(gpio_t *obj)
<> 129:0ab6a29f35bf 57 {
<> 129:0ab6a29f35bf 58 MBED_ASSERT(obj->name != (PinName)NC);
<> 129:0ab6a29f35bf 59 return *obj->reg_in;
<> 129:0ab6a29f35bf 60 }
<> 129:0ab6a29f35bf 61
<> 129:0ab6a29f35bf 62 void pin_dir_mode(PinName name, PinDirection direction, PinMode mode);
<> 129:0ab6a29f35bf 63
<> 129:0ab6a29f35bf 64 static inline int gpio_is_connected(const gpio_t *obj)
<> 129:0ab6a29f35bf 65 {
<> 129:0ab6a29f35bf 66 return obj->name != (PinName)NC;
<> 129:0ab6a29f35bf 67 }
<> 129:0ab6a29f35bf 68
<> 129:0ab6a29f35bf 69 #ifdef __cplusplus
<> 129:0ab6a29f35bf 70 }
<> 129:0ab6a29f35bf 71 #endif
<> 129:0ab6a29f35bf 72
<> 129:0ab6a29f35bf 73 #endif