static void set_rdly(const struct gramCtx *ctx, unsigned int phase, unsigned int rdly) {
#ifdef GRAM_RW_FUNC
if (phase == 0) {
- gram_write(ctx, &(ctx->phy->rdly_p0), rdly);
+ gram_write(ctx, (void*)&(ctx->phy->rdly_p0), rdly);
} else if (phase == 1) {
- gram_write(ctx, &(ctx->phy->rdly_p1), rdly);
+ gram_write(ctx, (void*)&(ctx->phy->rdly_p1), rdly);
}
#else
if (phase == 0) {
void gram_reset_burstdet(const struct gramCtx *ctx) {
#ifdef GRAM_RW_FUNC
- gram_write(ctx, &(ctx->phy->burstdet), 0);
+ gram_write(ctx, (void*)&(ctx->phy->burstdet), 0);
#else
ctx->phy->burstdet = 0;
#endif
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, (void*)&(ctx->phy->burstdet)) & (1 << phase));
#else
return !!(ctx->phy->burstdet & (1 << phase));
#endif
static void dfii_setcontrol(const struct gramCtx *ctx, uint8_t val) {
#ifdef GRAM_RW_FUNC
- gram_write(ctx, &(ctx->core->control), val);
+ gram_write(ctx, (void*)&(ctx->core->control), val);
#else
ctx->core->control = val;
#endif
void dfii_set_p0_address(const struct gramCtx *ctx, uint32_t val) {
#ifdef GRAM_RW_FUNC
- gram_write(ctx, &(ctx->core->phases[0].address), val);
+ gram_write(ctx, (void*)&(ctx->core->phases[0].address), val);
#else
ctx->core->phases[0].address = val;
#endif
void dfii_set_p0_baddress(const struct gramCtx *ctx, uint32_t val) {
#ifdef GRAM_RW_FUNC
- gram_write(ctx, &(ctx->core->phases[0].baddress), val);
+ gram_write(ctx, (void*)&(ctx->core->phases[0].baddress), val);
#else
ctx->core->phases[0].baddress = val;
#endif
void dfii_p0_command(const struct gramCtx *ctx, uint32_t cmd) {
#ifdef GRAM_RW_FUNC
- gram_write(ctx, &(ctx->core->phases[0].command), cmd);
- gram_write(ctx, &(ctx->core->phases[0].command_issue), 1);
+ gram_write(ctx, (void*)&(ctx->core->phases[0].command), cmd);
+ gram_write(ctx, (void*)&(ctx->core->phases[0].command_issue), 1);
#else
ctx->core->phases[0].command = cmd;
ctx->core->phases[0].command_issue = 1;