diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-10-08 07:50:10 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-10-10 14:00:37 +0200 |
commit | e1a0e0c30829a0da4174085ee5109fba337dba11 (patch) | |
tree | d033929ab19a3a21e12662a35ff845d7bf7b4195 /bsps/include | |
parent | build: Fix legacy Makefile support (diff) | |
download | rtems-e1a0e0c30829a0da4174085ee5109fba337dba11.tar.bz2 |
grlib: Add and use irqmp_has_timestamp()
Replace leon3_irqmp_has_timestamp() with irqmp_has_timestamp() and move
it to grlib.h.
Close #4128.
Diffstat (limited to 'bsps/include')
-rw-r--r-- | bsps/include/grlib/grlib.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bsps/include/grlib/grlib.h b/bsps/include/grlib/grlib.h index fb7085dfc4..49d9999807 100644 --- a/bsps/include/grlib/grlib.h +++ b/bsps/include/grlib/grlib.h @@ -16,6 +16,8 @@ #ifndef __GRLIB_H__ #define __GRLIB_H__ +#include <stdbool.h> + #ifdef __cplusplus extern "C" { #endif @@ -51,6 +53,13 @@ struct irqmp_timestamp_regs { volatile unsigned int ack; /* 0x0c */ }; +static inline bool irqmp_has_timestamp( + volatile struct irqmp_timestamp_regs *irqmp_ts +) +{ + return (irqmp_ts->control >> 27) > 0; +} + /* IRQMP and IRQAMP interrupt controllers */ struct irqmp_regs { volatile unsigned int ilevel; /* 0x00 */ |