nRF51 Example 6 - Timer

Source Demo

time1

My Demo

Add 2 LED
time2

Please click “more” on the right!

Part of my source files

main.c

1
int main(void)
{
    //
	 LED_Init();

    while (1)
    {
        LED_Toggle(LED_1);
        //使用定时器0产生1s定时
        nrf_timer_delay_ms(TIMER0, TIMER_DELAY_MS);

        LED_Toggle(LED_2);
        // 使用定时器1产生1s定时
        nrf_timer_delay_ms(TIMER1, TIMER_DELAY_MS);

        LED_Toggle(LED_3);
        // 使用定时器2产生1s定时
        nrf_timer_delay_ms(TIMER2, TIMER_DELAY_MS);
    }
}

Download my files


This work is licensed under a Creative Commons Attribution 4.0 International License.

文章目录
  1. 1. Source Demo
  2. 2. My Demo
  3. 3. Part of my source files
    1. 3.1. main.c
,