mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Revision:
189:f392fc9709a3
Parent:
188:bcfe06ba3d64
--- a/targets/TARGET_Cypress/TARGET_PSOC6/port_api.c	Thu Nov 08 11:46:34 2018 +0000
+++ b/targets/TARGET_Cypress/TARGET_PSOC6/port_api.c	Wed Feb 20 22:31:08 2019 +0000
@@ -1,6 +1,8 @@
 /*
  * mbed Microcontroller Library
  * Copyright (c) 2017-2018 Future Electronics
+ * Copyright (c) 2018-2019 Cypress Semiconductor Corporation
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -60,9 +62,11 @@
 
     for (pin = 0; pin < 8; ++pin) {
         if (mask & (1 << pin)) {
-            if (cy_reserve_io_pin((PinName)((port << 8)+pin))) {
-                error("Port pin reservation conflict.");
-            }
+            /* Ignore pin reservation result because there is not possibility to release
+            * reserved HW resource. The MBED does not provide proper destructors for
+            * doing that.
+            */
+            (void) cy_reserve_io_pin((PinName)((port << 8) + pin));
         }
     }
     obj->port_id = port;