Motorola Digital dna MSC8101ADS Manual page 11

Table of Contents

Advertisement

Freescale Semiconductor, Inc.
IMM = (t_8101IMM *)0x14700000; // MSC8101 internal register map
IMM->memc_regs[1].br = 0x14501801; // Base register 1. Allows access
to BCSR
IMM->memc_regs[1].or = 0xffff8010; // Option register 1
BCSR0 = (UWord32 *)0x14500000;// Init Board Control/Status Registers
(BSCR)
BCSR1 = (UWord32 *)0x14500004;
BCSR2 = (UWord32 *)0x14500008;
Led(OFF);
}
/*------------------------------------------------------------------------
--
*
* FUNCTION NAME: Led
*
* DESCRIPTION:
*
* Turn On/Off either the Green or Red LED on 8260ADS board.
*
* EXTERNAL EFFECTS:
*
* PARAMETERS:
*
* 0: turns off red and green LEDs
* GREEN: turns green LED on
* RED: turns red LED on
*
* RETURNS: NONE
*
*-------------------------------------------------------------------------
-*/
void Led(UWord16 setting)
{
switch(setting)
{
// Turn red and green LEDs off
case OFF:
*BCSR0 |= (GP_LED0_PIL | GP_LED1_PIL);
break;
// Turn green LED on
case GREEN:
*BCSR0 &= ~GP_LED0_PIL;
break;
// Turn red LED on
case RED:
*BCSR0 &= ~GP_LED1_PIL;
break;
// Turn red LED on to indicate an error
default:
*BCSR0 &= ~GP_LED1_PIL;
break;
}
} /* end Led */
/*------------------------------------------------------------------------
--
*
For More Information On This Product,
Go to: www.freescale.com
Running LEDblinker from Internal SRAM
// Turn On Green & Red LEDs
11

Advertisement

Table of Contents
loading

Table of Contents