happyhappy

 

 

C:\Users\LiTao\Desktop\儿童智能硬件资料\nrf51822\nRF51822EK_TM配套资料\EK_TM测试程序\跑马灯测试程序

 1 int main(void)
 2 {
 3   uint8_t output_state = 0;
 4 
 5   // Configure LED-pins as outputs
 6   nrf_gpio_range_cfg_output(LED_START, LED_STOP);//[1]
 7 
 8   while(true)
 9   {
10     nrf_gpio_port_write(LED_PORT, 1 << (output_state + LED_OFFSET));
11     output_state = (output_state + 1) & BLINKY_STATE_MASK;
12     nrf_delay_ms(100);
13   }
14 }

[1] This function can be used to configure pin range as simple output with gate driving GPIO_PIN_CNF_DRIVE_S0S1 (normal cases).
链接:http://pan.baidu.com/s/1dDtZKgL

 

分类:

技术点:

相关文章:

  • 2021-09-30
  • 2022-12-23
  • 2022-02-05
  • 2022-01-13
  • 2021-10-02
  • 2022-02-07
猜你喜欢
  • 2022-01-10
  • 2021-08-08
  • 2021-08-30
  • 2022-01-06
  • 2021-11-02
  • 2021-12-31
  • 2022-02-18
相关资源
相似解决方案