/*
 * low_level_init makes it possible to customize 
 * initialization before main function is executed.
 *
 * 
 * Copyright:      1996-1998 IAR Systems. All rights reserved. 
 *
 * 	Created: 10/Sep/96  ITHA
 *
 *	Archived:  $Revision: 1.3 $
 *              :  $Revision: 1.31 MGOOD $
 */
                   
#include "hardware.h"

#pragma language=extended

#pragma codeseg(RCODE)


unsigned char low_level_init (void)
{
    // Watchdog
    
	// I/O ports. Setup data for outputs first, then select the data
	// direction bits for each port.

	P1DR = b00000000;	P1DDR = b11111111;
	P2DR = b00000000;	P2DDR = b11111111;
	P3DR = b00000000;	P3DDR = b11111111;
	P4DR = b00000000;	P4DDR = b11110011;
	P5DR = b00000000;	P5DDR = b00000100;
	P6DR = b00000010;	P6DDR = b00110010;
	P7PIN = b00000000;  // No DDR for P7.
	P8DR = b00001000;	P8DDR = b00011111;
	P9DR = b00000000;	P9DDR = b00111000;

    
    return (1);
}
