reztronics

Home - Products - News - Services - Music - About Us

 

 

/********************************************************************************/
* DIP Switch and LED Test                                                                                                   *
*Author:  Reza Ghassemi                                                                                                       *
*                                                                                                                                             *
* This program allows the LED's to represent the state of each of the binary DIP switches. *
/********************************************************************************/

#include "dsk5416.h"
#include "dsk5416_led.h"
#include "dsk5416_dip.h"

/* UserTask() - The main user task*/

void UserTask()
{
int i, j;

Uint32 dip0, dip1, dip2, dip3;

while(TRUE)
{

    DSK5416_LED_init();
    DSK5416_DIP_init();

    if(dip0=DSK5416_DIP_get(0))
    {
        DSK5416_LED_on(0);
    } 

    else
    {
        DSK5416_LED_off(0);
    } 

    if(dip1=DSK5416_DIP_get(1))
    {
        DSK5416_LED_on(1);
    }
    else
    {
        DSK5416_LED_off(1);
    }

    if(dip2=DSK5416_DIP_get(2))
    {
        DSK5416_LED_on(2);
    }
    else
    {
        DSK5416_LED_off(2);
    }

    if(dip3=DSK5416_DIP_get(3))
    {
        DSK5416_LED_on(3);
    }
    else
    {
        DSK5416_LED_off(3);
    }
}

DSK5416_PCM3002_closeCodec(hCodec);
}

void main()
{
// Initialize the board support library

DSK5416_init();
}

 

Products

Home

Send mail to rghassemi@gmail.com with questions or comments about this web site.
Copyright 2005 Reztronics
Last modified: August 30, 2005