From: Jean THOMAS Date: Thu, 30 Jul 2020 15:08:26 +0000 (+0200) Subject: Fix output in gram_read_burstdet X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c56363bad14333baceb74508f771f0e1214795c5;p=gram.git Fix output in gram_read_burstdet --- diff --git a/libgram/src/calibration.c b/libgram/src/calibration.c index ea337c8..e979dee 100644 --- a/libgram/src/calibration.c +++ b/libgram/src/calibration.c @@ -62,9 +62,9 @@ void gram_reset_burstdet(const struct gramCtx *ctx) { bool gram_read_burstdet(const struct gramCtx *ctx, int phase) { #ifdef GRAM_RW_FUNC - return gram_read(ctx, &(ctx->phy->burstdet)) & (1 << phase); + return !!(gram_read(ctx, &(ctx->phy->burstdet)) & (1 << phase)); #else - return ctx->phy->burstdet & (1 << phase); + return !!(ctx->phy->burstdet & (1 << phase)); #endif }