This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Broken macro definitions in hal_io.h


Hi,

the definitions for HAL_READ_UINT32_STRING and HAL_WRITE_UINT32_STRING
in hal/arm/arch/current/include/hal_io.h are broken. Here's a patch to fix this:

--- hal/arm/arch/current/include/hal_io.h.orig	Sun May 19 18:14:54 2002
+++ hal/arm/arch/current/include/hal_io.h	Sun May 19 18:18:11 2002
@@ -260,14 +260,14 @@
     CYG_MACRO_START                                                     \
     cyg_count32 _i_;                                                    \
     for( _i_ = 0; _i_ < (_count_); _i_++)                               \
-        (_buf_)[_i_] = ((volatile CYG_WORD32 *)(_register_));           \
+        (_buf_)[_i_] = *((volatile CYG_WORD32 *)(_register_));          \
     CYG_MACRO_END
 
 #define HAL_WRITE_UINT32_STRING( _register_, _buf_, _count_)            \
     CYG_MACRO_START                                                     \
     cyg_count32 _i_;                                                    \
     for( _i_ = 0; _i_ < (_count_); _i_++)                               \
-        ((volatile CYG_WORD32 *)(_register_)) = (_buf_)[_i_];           \
+        *((volatile CYG_WORD32 *)(_register_)) = (_buf_)[_i_];          \
     CYG_MACRO_END
 
 // Enforce a flow "barrier" to prevent optimizing compiler from reordering 



-- 

Thomas Koeller, Software Development

Basler Vision Technologies
An der Strusbek 60-62
22926 Ahrensburg
Germany

Tel  +49 (4102) 463-390
Fax +49 (4102) 463-46390

mailto:thomas.koeller@baslerweb.com
http://www.baslerweb.com 



-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]