Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

espressif/mcpwm: fix compile error #14942

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions arch/risc-v/src/common/espressif/esp_mcpwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,7 @@ static int esp_capture_start(struct cap_lowerhalf_s *lower)
struct mcpwm_cap_channel_lowerhalf_s *)lower;
irqstate_t flags;
mcpwm_hal_context_t *hal = &priv->common->hal;
flags = spin_lock_irqsave(priv->common->mcpwm_spinlock);
flags = spin_lock_irqsave(&priv->common->mcpwm_spinlock);

/* Enable channel and interruption for rising edge */

Expand All @@ -1444,7 +1444,7 @@ static int esp_capture_start(struct cap_lowerhalf_s *lower)
priv->enabled = true;
priv->ready = false;

spin_unlock_irqrestore(priv->common->mcpwm_spinlock, flags);
spin_unlock_irqrestore(&priv->common->mcpwm_spinlock, flags);
cpinfo("Channel enabled: %d\n", priv->channel_id);
return OK;
}
Expand Down Expand Up @@ -1474,7 +1474,7 @@ static int esp_capture_stop(struct cap_lowerhalf_s *lower)
struct mcpwm_cap_channel_lowerhalf_s *)lower;
irqstate_t flags;
mcpwm_hal_context_t *hal = &priv->common->hal;
flags = spin_lock_irqsave(priv->common->mcpwm_spinlock);
flags = spin_lock_irqsave(&priv->common->mcpwm_spinlock);

/* Disable channel and interrupts */

Expand All @@ -1485,7 +1485,7 @@ static int esp_capture_stop(struct cap_lowerhalf_s *lower)
false);
priv->enabled = false;

spin_unlock_irqrestore(priv->common->mcpwm_spinlock, flags);
spin_unlock_irqrestore(&priv->common->mcpwm_spinlock, flags);
cpinfo("Channel disabled: %d\n", priv->channel_id);
return OK;
}
Expand Down Expand Up @@ -1711,7 +1711,7 @@ static int IRAM_ATTR mcpwm_driver_isr_default(int irq, void *context,
struct mcpwm_motor_lowerhalf_s *priv = NULL;
#endif

flags = spin_lock_irqsave(common->mcpwm_spinlock);
flags = spin_lock_irqsave(&common->mcpwm_spinlock);
status = mcpwm_ll_intr_get_status(common->hal.dev);

/* Evaluate capture interrupt for all 3 cap channels */
Expand Down Expand Up @@ -1770,7 +1770,7 @@ static int IRAM_ATTR mcpwm_driver_isr_default(int irq, void *context,
#ifdef CONFIG_ESP_MCPWM_CAPTURE
if (lower == NULL)
{
spin_unlock_irqrestore(common->mcpwm_spinlock, flags);
spin_unlock_irqrestore(&common->mcpwm_spinlock, flags);
return OK;
}

Expand Down Expand Up @@ -1837,7 +1837,7 @@ static int IRAM_ATTR mcpwm_driver_isr_default(int irq, void *context,
}
#endif

spin_unlock_irqrestore(common->mcpwm_spinlock, flags);
spin_unlock_irqrestore(&common->mcpwm_spinlock, flags);
return OK;
}
#endif
Expand Down
14 changes: 7 additions & 7 deletions arch/xtensa/src/common/espressif/esp_mcpwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,7 @@ static int esp_capture_start(struct cap_lowerhalf_s *lower)
struct mcpwm_cap_channel_lowerhalf_s *)lower;
mcpwm_hal_context_t *hal = &priv->common->hal;
irqstate_t flags;
flags = spin_lock_irqsave(priv->common->mcpwm_spinlock);
flags = spin_lock_irqsave(&priv->common->mcpwm_spinlock);

DEBUGASSERT(priv->common->initialized);

Expand All @@ -1471,7 +1471,7 @@ static int esp_capture_start(struct cap_lowerhalf_s *lower)
priv->ready = false;

cpinfo("Channel enabled: %d\n", priv->channel_id);
spin_unlock_irqrestore(priv->common->mcpwm_spinlock, flags);
spin_unlock_irqrestore(&priv->common->mcpwm_spinlock, flags);

return OK;
}
Expand Down Expand Up @@ -1499,7 +1499,7 @@ static int esp_capture_stop(struct cap_lowerhalf_s *lower)
struct mcpwm_cap_channel_lowerhalf_s *)lower;
mcpwm_hal_context_t *hal = &priv->common->hal;
irqstate_t flags;
flags = spin_lock_irqsave(priv->common->mcpwm_spinlock);
flags = spin_lock_irqsave(&priv->common->mcpwm_spinlock);

/* Disable channel and interrupts */

Expand All @@ -1511,7 +1511,7 @@ static int esp_capture_stop(struct cap_lowerhalf_s *lower)
priv->enabled = false;

cpinfo("Channel disabled: %d\n", priv->channel_id);
spin_unlock_irqrestore(priv->common->mcpwm_spinlock, flags);
spin_unlock_irqrestore(&priv->common->mcpwm_spinlock, flags);

return OK;
}
Expand Down Expand Up @@ -1701,7 +1701,7 @@ static int IRAM_ATTR mcpwm_driver_isr_default(int irq, void *context,
struct mcpwm_motor_lowerhalf_s *priv = NULL;
#endif

flags = spin_lock_irqsave(common->mcpwm_spinlock);
flags = spin_lock_irqsave(&common->mcpwm_spinlock);
status = mcpwm_ll_intr_get_status(common->hal.dev);

/* Evaluate capture interrupt for all 3 cap channels */
Expand Down Expand Up @@ -1758,7 +1758,7 @@ static int IRAM_ATTR mcpwm_driver_isr_default(int irq, void *context,
#ifdef CONFIG_ESP_MCPWM_CAPTURE
if (lower == NULL)
{
spin_unlock_irqrestore(common->mcpwm_spinlock, flags);
spin_unlock_irqrestore(&common->mcpwm_spinlock, flags);
return OK;
}

Expand Down Expand Up @@ -1823,7 +1823,7 @@ static int IRAM_ATTR mcpwm_driver_isr_default(int irq, void *context,
}
#endif

spin_unlock_irqrestore(common->mcpwm_spinlock, flags);
spin_unlock_irqrestore(&common->mcpwm_spinlock, flags);
return OK;
}
#endif
Expand Down
Loading