Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
Diff: drivers/PortIn.h
- Revision:
- 1:9db0e321a9f4
- Parent:
- 0:5b88d5760320
--- a/drivers/PortIn.h Tue Dec 17 23:23:45 2019 +0000 +++ b/drivers/PortIn.h Tue Dec 31 06:02:27 2019 +0000 @@ -1,5 +1,5 @@ /* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited + * Copyright (c) 2006-2019 ARM Limited * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -22,10 +22,13 @@ #if DEVICE_PORTIN || defined(DOXYGEN_ONLY) #include "hal/port_api.h" -#include "platform/mbed_critical.h" namespace mbed { -/** \addtogroup drivers */ +/** + * \defgroup drivers_PortIn PortIn class + * \ingroup drivers-public-api-gpio + * @{ + */ /** A multiple pin digital input * @@ -51,7 +54,6 @@ * } * } * @endcode - * @ingroup drivers */ class PortIn { public: @@ -61,12 +63,7 @@ * @param port Port to connect to (as defined in target's PortNames.h) * @param mask Bitmask defines which port pins should be an input (0 - ignore, 1 - include) */ - PortIn(PortName port, int mask = 0xFFFFFFFF) - { - core_util_critical_section_enter(); - port_init(&_port, port, mask, PIN_INPUT); - core_util_critical_section_exit(); - } + PortIn(PortName port, int mask = 0xFFFFFFFF); /** Read the value input to the port * @@ -82,12 +79,7 @@ * * @param mode PullUp, PullDown, PullNone, OpenDrain */ - void mode(PinMode mode) - { - core_util_critical_section_enter(); - port_mode(&_port, mode); - core_util_critical_section_exit(); - } + void mode(PinMode mode); /** A shorthand for read() */ @@ -100,6 +92,8 @@ port_t _port; }; +/** @}*/ + } // namespace mbed #endif