Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:08

0001 /**
0002  * @file
0003  * @ingroup RTEMSBSPsSPARCLEON2
0004  * @brief LEON2 BSP Delay Method
0005  */
0006 
0007 /*
0008  *  COPYRIGHT (c) 1989-2011.
0009  *  On-Line Applications Research Corporation (OAR).
0010  *
0011  *  The license and distribution terms for this file may be
0012  *  found in the file LICENSE in this distribution or at
0013  *  http://www.rtems.org/license/LICENSE.
0014  */
0015 
0016 #include <bsp.h>
0017 
0018 void rtems_bsp_delay(int usecs)
0019 {
0020   uint32_t then;
0021 
0022   then  = LEON_REG.Timer_Counter_1;
0023   then += usecs;
0024 
0025   while (LEON_REG.Timer_Counter_1 >= then)
0026     ;
0027 }