mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 04:04:31 +02:00
Fixed the bug that the malloc memory size is smaller than the actual required.
This commit is contained in:
@@ -138,8 +138,8 @@ static void gpio_test_signal(void *arg)
|
|||||||
*/
|
*/
|
||||||
static void disp_captured_signal(void *arg)
|
static void disp_captured_signal(void *arg)
|
||||||
{
|
{
|
||||||
uint32_t *current_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(sizeof(CAP_SIG_NUM));
|
uint32_t *previous_cap_value = (uint32_t *)malloc(CAP_SIG_NUM*sizeof(uint32_t));
|
||||||
capture evt;
|
capture evt;
|
||||||
while (1) {
|
while (1) {
|
||||||
xQueueReceive(cap_queue, &evt, portMAX_DELAY);
|
xQueueReceive(cap_queue, &evt, portMAX_DELAY);
|
||||||
|
Reference in New Issue
Block a user