Merge branch 'bugfix/fix_mcpwm_example_memory_bug_v3.3' into 'release/v3.3'

Bugfix(example):  Fixed MCPWM example bug for release/v3.3

See merge request espressif/esp-idf!5544
This commit is contained in:
Angus Gratton 2019-07-27 17:27:41 +08:00
commit 7af04d857f

View File

@ -138,8 +138,8 @@ static void gpio_test_signal(void *arg)
*/
static void disp_captured_signal(void *arg)
{
uint32_t *current_cap_value = (uint32_t *)malloc(sizeof(CAP_SIG_NUM));
uint32_t *previous_cap_value = (uint32_t *)malloc(sizeof(CAP_SIG_NUM));
uint32_t *current_cap_value = (uint32_t *)malloc(CAP_SIG_NUM*sizeof(uint32_t));
uint32_t *previous_cap_value = (uint32_t *)malloc(CAP_SIG_NUM*sizeof(uint32_t));
capture evt;
while (1) {
xQueueReceive(cap_queue, &evt, portMAX_DELAY);