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

Missing type declaration in i2c.html sample code (IDFGH-14295) #15086

Open
3 tasks done
wellssam100 opened this issue Dec 23, 2024 · 1 comment
Open
3 tasks done

Missing type declaration in i2c.html sample code (IDFGH-14295) #15086

wellssam100 opened this issue Dec 23, 2024 · 1 comment
Labels
Status: Opened Issue is new

Comments

@wellssam100
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

In /esp-idf/en/v5.3.2/esp32/api-reference/peripherals/i2c.html there is sample code for using the Slave Read, written here.

On line 25, the following is written: s_receive_queue = xQueueCreate(1, sizeof(i2c_slave_rx_done_event_data_t));
Which should updated to be: QueueHandle_t s_receive_queue = xQueueCreate(1, sizeof(i2c_slave_rx_done_event_data_t));

Another example is given in components/freertos/FreeRTOS-Kernel/include/freertos/queue.h line 126, which uses the QueueHandle_t type for declaration.

I believe that this code was written with some variables declared outside of the scope of the code and this is an artifact of that.

@espressif-bot espressif-bot added the Status: Opened Issue is new label Dec 23, 2024
@github-actions github-actions bot changed the title Missing type declaration in i2c.html sample code Missing type declaration in i2c.html sample code (IDFGH-14295) Dec 23, 2024
@mythbuster5
Copy link
Collaborator

Thanks for your report, and we will fix it. However, we have a more useful i2c slave since v5.4 called i2c_slave_v2, and we encourage you to use that one. For this old version of i2c slave, we will not treat it as a high periority fix. So I'm going to close this one and find proper time to fix this doc on 5.3, thank you!

@ginkgm ginkgm reopened this Dec 24, 2024
@mythbuster5 mythbuster5 removed their assignment Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new
Projects
None yet
Development

No branches or pull requests

4 participants