diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/port_api.c b/targets/TARGET_NORDIC/TARGET_NRF5x/port_api.c index e8c57184a5..346c0bf45c 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5x/port_api.c +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/port_api.c @@ -36,6 +36,8 @@ * */ +#if DEVICE_PORTIN || DEVICE_PORTOUT || DEVICE_PORTINOUT + #include "port_api.h" #include "pinmap.h" @@ -132,3 +134,5 @@ int port_read(port_t *obj) { return ((m_ports[obj->port]->IN) & obj->mask); } + +#endif // DEVICE_PORTIN || DEVICE_PORTOUT || DEVICE_PORTINOUT \ No newline at end of file