mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/spi_api.c
- Revision:
- 227:7bd0639b8911
- Parent:
- 158:3121b9889f7b
- Child:
- 250:a49055e7a707
--- a/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/spi_api.c Wed Jun 11 09:45:09 2014 +0100 +++ b/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/spi_api.c Wed Jun 11 16:00:09 2014 +0100 @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "spi_api.h" +#include <math.h> +#include "mbed_assert.h" -#include <math.h> - +#include "spi_api.h" #include "cmsis.h" #include "pinmap.h" #include "error.h" @@ -93,9 +93,7 @@ uint32_t spi_cntl = pinmap_merge(spi_sclk, spi_ssel); obj->instance = pinmap_merge(spi_data, spi_cntl); - if ((int)obj->instance == NC) { - error("SPI pinout mapping failed"); - } + MBED_ASSERT((int)obj->instance != NC); // enable power and clocking clock_manager_set_gate(kClockModuleSPI, obj->instance, true);