Location:
Search - lm3s811 gpio l
Search list
Description: lm3s811 程序
对LED和KEY的编程,采用封装好“驱动库”模式,只要在工程里添加LED和KEY的驱动程序,就能运用自如。
例如对LED的操作就很简单:
LED_Init(LED1) // 只初始化LED1,而对LED2和LED3所在的GPIO管脚无影响
LED_Init(LED1 | LED2 | LED3) // 同时初始化3只LED
LED_On(LED2 | LED3) // 同时点亮LED2和LED3,而LED1的状态保持不变
此外还有LED_Off()和LED_Toggle()两个操作函数,用法都是类似的。-KEY programming on the LED and using the package good " driver library" model, just add the LED and the KEY Project in the driver, you can use with ease. For example, the operation of the LED is simple: LED_Init (LED1) // only initialize the LED1, LED2 and LED3 against GPIO pins where no effect LED_Init (LED1 | LED2 | LED3) // also initialize 3 only LED LED_On (LED2 | LED3) // while light LED2 and LED3, LED1 state remains unchanged while the addition LED_Off () and LED_Toggle () function of the two operations, usage is similar.
Platform: |
Size: 48128 |
Author: 小强 |
Hits: