diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-11-15 16:57:02 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-12-03 13:17:10 +0100 |
commit | 67338ed870bb8bccb7c47af07414525dcce81276 (patch) | |
tree | 4946f33c652b86119b972d52e4ca6e3ae5a49e6d /c/src/lib/libcpu/powerpc | |
parent | bsp/mpc55xx: Use BSP_START_DATA_SECTION (diff) | |
download | rtems-67338ed870bb8bccb7c47af07414525dcce81276.tar.bz2 |
bsp/mpc55xx: Add mpc55xx_wait_for_interrupt()
Use mpc55xx_wait_for_interrupt().
Diffstat (limited to 'c/src/lib/libcpu/powerpc')
-rw-r--r-- | c/src/lib/libcpu/powerpc/mpc55xx/include/mpc55xx.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/c/src/lib/libcpu/powerpc/mpc55xx/include/mpc55xx.h b/c/src/lib/libcpu/powerpc/mpc55xx/include/mpc55xx.h index a43140d700..e7bb83995a 100644 --- a/c/src/lib/libcpu/powerpc/mpc55xx/include/mpc55xx.h +++ b/c/src/lib/libcpu/powerpc/mpc55xx/include/mpc55xx.h @@ -7,7 +7,7 @@ */ /* - * Copyright (c) 2008-2011 embedded brains GmbH. All rights reserved. + * Copyright (c) 2008-2012 embedded brains GmbH. All rights reserved. * * embedded brains GmbH * Obere Lagerstr. 30 @@ -43,7 +43,12 @@ #define LIBCPU_POWERPC_MPC55XX_H #include <stddef.h> -#include <stdint.h> + +#include <mpc55xx/regs.h> + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ int mpc55xx_flash_copy(void *dest, const void *src, size_t nbytes); int mpc55xx_flash_copy_op(void *rdest, const void *src, size_t nbytes, @@ -124,4 +129,17 @@ static inline uint32_t mpc55xx_count_leading_zeros( uint32_t value) return count; } +static inline mpc55xx_wait_for_interrupt(void) +{ + #ifdef MPC55XX_HAS_WAIT_INSTRUCTION + __asm__ volatile ("wait"); + #else + __asm__ volatile (""); + #endif +} + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* LIBCPU_POWERPC_MPC55XX_H */ |