// ----------------------------------------------------------------------------------------
//
//  avr/device/spinwait.h
//    
//  Bob Cook Development, Robotics Library
//  http://www.bobcookdev.com/rl/
//    
//  This file provides spin-wait delay routines for the Atmel AVR processor family.
//
//  Copyright (C) 2007 Bob Cook
//
//      This program is free software; you can redistribute it and/or modify it
//      under the terms of the GNU General Public License as published by the
//      Free Software Foundation; either version 2 of the License, or (at your
//      option) any later version.
//    
//      This program 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 General Public License 
//      for more details.
//    
//      You should have received a copy of the GNU General Public License along
//      with this program; if not, write to the Free Software Foundation, Inc., 
//      51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
//
// ----------------------------------------------------------------------------------------


#if !defined( BCD_AVR_DEVICE_SPINWAIT_H )
#define BCD_AVR_DEVICE_SPINWAIT_H


#include <inttypes.h>


// ----------------------------------------------------------------------------------------
//  definitions from "project_defs.h"
//
//  PRJ_CPU_FREQ <long>
//
// ----------------------------------------------------------------------------------------


// ----------------------------------------------------------------------------------------
//  spinwait_delay_us
//
//      Spin-wait for the specified number of microseconds.
//

void spinwait_delay_us( uint16_t microseconds );


// ----------------------------------------------------------------------------------------
//  spinwait_delay_ms
//
//      Spin-wait for the specified number of milliseconds.
//

void spinwait_delay_ms( uint16_t milliseconds );


#endif  // #if !defined( BCD_AVR_DEVICE_SPINWAIT_H )
// ----------------------------------------------------------------------------------------
//  end of spinwait.h
// ----------------------------------------------------------------------------------------

