/* $Id: misc.c,v 1.2 2005/06/16 13:46:21 cgoh Exp $
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Description: Misc. functions for MAP
 *
 * Copyright (C) Equator Technologies
 */
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/malloc.h>

#include <asm/unistd.h>
#include <asm/debug.h>

#include "libdev/mapca/iic_piomap.h"


/*------------------------------- Functions ----------------------------------*/

#define LED_OFFSET    (IICOffset + IICSlaveAndMaskControlOffset)


#define LEDON()     PIO( LED_OFFSET )  |=  1024
#define LEDOFF()    PIO( LED_OFFSET )  &= ~1024

Void ledblink(UInt N)
{
    Int i;
    for (i=0; i<(300000*N); i++) LEDON();
    for (i=0; i<(300000*N); i++) LEDOFF();
}
