pcnt: add const qualifier to event data
This commit is contained in:
+1
-1
@@ -57,7 +57,7 @@ typedef struct {
|
||||
pid_ctrl_block_handle_t pid_ctrl;
|
||||
} motor_control_task_context_t;
|
||||
|
||||
static bool example_pcnt_on_reach(pcnt_unit_handle_t unit, pcnt_watch_event_data_t *edata, void *user_ctx)
|
||||
static bool example_pcnt_on_reach(pcnt_unit_handle_t unit, const pcnt_watch_event_data_t *edata, void *user_ctx)
|
||||
{
|
||||
motor_control_timer_context_t *ctx = (motor_control_timer_context_t *)user_ctx;
|
||||
ctx->accumu_count += edata->watch_point_value;
|
||||
|
||||
@@ -18,7 +18,7 @@ static const char *TAG = "example";
|
||||
#define EXAMPLE_EC11_GPIO_A 0
|
||||
#define EXAMPLE_EC11_GPIO_B 2
|
||||
|
||||
static bool example_pcnt_on_reach(pcnt_unit_handle_t unit, pcnt_watch_event_data_t *edata, void *user_ctx)
|
||||
static bool example_pcnt_on_reach(pcnt_unit_handle_t unit, const pcnt_watch_event_data_t *edata, void *user_ctx)
|
||||
{
|
||||
BaseType_t high_task_wakeup;
|
||||
QueueHandle_t queue = (QueueHandle_t)user_ctx;
|
||||
|
||||
Reference in New Issue
Block a user