From 88a1787fd3838a39333f8249c2eb0e6d16124cc7 Mon Sep 17 00:00:00 2001 From: Jean THOMAS Date: Fri, 24 Jul 2020 15:13:33 +0200 Subject: [PATCH] Expose gram_reset_burstdet and gram_read_burstdet APIs --- libgram/include/gram.h | 4 ++++ libgram/src/calibration.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libgram/include/gram.h b/libgram/include/gram.h index 7234465..2ba2eb3 100644 --- a/libgram/include/gram.h +++ b/libgram/include/gram.h @@ -3,6 +3,7 @@ #include #include +#include enum GramError { GRAM_ERR_NONE = 0, @@ -34,6 +35,9 @@ extern __attribute__((visibility ("default"))) int gram_memtest(struct gramCtx * extern __attribute__((visibility ("default"))) int gram_calibration_auto(struct gramCtx *ctx); extern __attribute__((visibility ("default"))) void gram_load_calibration(struct gramCtx *ctx, struct gramProfile *profile); +extern __attribute__((visibility ("default"))) void gram_reset_burstdet(struct gramCtx *ctx); +extern __attribute__((visibility ("default"))) bool gram_read_burstdet(struct gramCtx *ctx, int phase); + #ifdef GRAM_RW_FUNC extern uint32_t gram_read(struct gramCtx *ctx, void *addr); extern int gram_write(struct gramCtx *ctx, void *addr, uint32_t value); diff --git a/libgram/src/calibration.c b/libgram/src/calibration.c index 7fd70fb..bcd8c12 100644 --- a/libgram/src/calibration.c +++ b/libgram/src/calibration.c @@ -22,7 +22,7 @@ static void set_rdly(struct gramCtx *ctx, unsigned int phase, unsigned int rdly) #endif } -static void reset_burstdet(struct gramCtx *ctx) { +void gram_reset_burstdet(struct gramCtx *ctx) { #ifdef GRAM_RW_FUNC gram_write(ctx, &(ctx->phy->burstdet), 0); #else @@ -30,7 +30,7 @@ static void reset_burstdet(struct gramCtx *ctx) { #endif } -static bool read_burstdet(struct gramCtx *ctx, int phase) { +bool gram_read_burstdet(struct gramCtx *ctx, int phase) { #ifdef GRAM_RW_FUNC return gram_read(ctx, &(ctx->phy->burstdet)) & (1 << phase); #else -- 2.30.2