#include <stdint.h>
#include <stddef.h>
+#include <stdbool.h>
enum GramError {
GRAM_ERR_NONE = 0,
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);
#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
#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