Nordic nrf51 sdk sources. Mirrored from https://github.com/ARMmbed/nrf51-sdk.
Diff: source/nordic_sdk/components/drivers_nrf/delay/nrf_delay.c
- Revision:
- 28:041dac1366b2
- Child:
- 29:286940b7ee5a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/source/nordic_sdk/components/drivers_nrf/delay/nrf_delay.c Thu Apr 07 17:37:56 2016 +0100 @@ -0,0 +1,26 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include <stdio.h> +#include "compiler_abstraction.h" +#include "nrf.h" +#include "nrf_delay.h" + +/*lint --e{438} "Variable not used" */ +void nrf_delay_ms(uint32_t volatile number_of_ms) +{ + while(number_of_ms != 0) + { + number_of_ms--; + nrf_delay_us(999); + } +} \ No newline at end of file