Skip to content

Commit 926950d

Browse files
committed
NRF51822: Fix baremetal linker error
Ensure the NRF51822 module content is compiled in only if the target support USTICKER.
1 parent 789a193 commit 926950d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

targets/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
17+
#if DEVICE_USTICKER
1618
#include <stddef.h>
1719
#include <stdbool.h>
1820
#include "us_ticker_api.h"
@@ -613,3 +615,4 @@ uint32_t os_tick_val(void) {
613615
return clock_cycles_by_tick - ((current_counter - next_tick_cc_value) % clock_cycles_by_tick);
614616
}
615617
}
618+
#endif // DEVICE_USTICKER

0 commit comments

Comments
 (0)