Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void blinknext() {
- static uint32_t loop=0;
- switch(loop) {
- case 0:
- ledonoff(1,0);
- ledonoff(2,0);
- ledonoff(3,0);
- ledonoff(4,1);
- break;
- case 1:
- ledonoff(1,0);
- ledonoff(2,0);
- ledonoff(3,1);
- ledonoff(4,0);
- break;
- case 2:
- ledonoff(1,0);
- ledonoff(2,1);
- ledonoff(3,0);
- ledonoff(4,0);
- break;
- case 3:
- ledonoff(1,1);
- ledonoff(2,0);
- ledonoff(3,0);
- ledonoff(4,0);
- break;
- }
- loop++;
- if (loop==4)
- loop=0;
- }
- void BlinkFxn(UArg arg0)
- {
- uint32_t wait_ticks = (uint32_t) arg0;
- /*gpio driverlib api uses same bit pattern for gpio mask and value*/
- while(1) {
- blinknext();
- Task_sleep(wait_ticks);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement