码迷,mamicode.com
首页 > 其他好文 > 详细

2、跑马灯测试程序(设置一定范围的gpio)

时间:2015-08-11 07:04:31      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:

 

 

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

 

2、跑马灯测试程序(设置一定范围的gpio)

标签:

原文地址:http://www.cnblogs.com/happyhappy/p/4719605.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!