/*
  SFBHWMisc.h Miscellaneous hardware-specific routines
  Copyright (C) 2009 The Regents of the University of New Mexico
 
  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
  USA

  $Id$
 */
/**
  \file SFBHWMisc.h Miscellaneous hardware-specific routines
  \author David H. Ackley.  
  \date (C) 2009 All rights reserved.
  \lgpl
 */

#ifndef SFBHWMISC_H
#define SFBHWMISC_H

#include "SFBTypes.h"

/**
   Print a timestamp to \a face.  The output depending on the context:
   In host programs the date and time are printed; in boards the
   equivalent of #seconds() is printed (along with three decimal
   places), so the printed timestamps will roll over after about 180
   years of uptime.
 */
extern void facePrintTimestamp(u8 face) ;

#ifdef HOST_MODE

#define disableInterrupts() /* empty */
#define enableInterrupts() /* empty */

#define suspendInterrupts(u32var) /* empty */
#define restoreInterrupts(u32var) ((u32var) = 0)   /* note that suspend w/o restore will warn! */

#else

#include "lpc/irq.h"

#endif /* HOST_MODE */

#endif /* HW_MISC_H */
