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: Seeed_Barometer_Sensor_Example
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/pinmap.c
- Revision:
- 239:8cadf13dff33
- Parent:
- 219:993c9b0acbcc
- Child:
- 250:a49055e7a707
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/pinmap.c Thu Jun 26 09:00:08 2014 +0100
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/pinmap.c Thu Jun 26 09:15:07 2014 +0100
@@ -27,6 +27,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************
*/
+#include "mbed_assert.h"
#include "pinmap.h"
#include "PortNames.h"
#include "error.h"
@@ -82,7 +83,7 @@
* Configure pin (mode, speed, output type and pull-up/pull-down)
*/
void pin_function(PinName pin, int data) {
- if (pin == NC) return;
+ MBED_ASSERT(pin != (PinName)NC);
// Get the pin informations
uint32_t mode = STM_PIN_MODE(data);
@@ -116,7 +117,7 @@
* Configure pin pull-up/pull-down
*/
void pin_mode(PinName pin, PinMode mode) {
- if (pin == NC) return;
+ MBED_ASSERT(pin != (PinName)NC);
uint32_t port_index = STM_PORT(pin);
uint32_t pin_index = STM_PIN(pin);
