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

Typo in Inter-Integrated Circuit documentation (IDFGH-12417) #13440

Closed
3 tasks done
nopnop2002 opened this issue Mar 21, 2024 · 4 comments
Closed
3 tasks done

Typo in Inter-Integrated Circuit documentation (IDFGH-12417) #13440

nopnop2002 opened this issue Mar 21, 2024 · 4 comments
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally

Comments

@nopnop2002
Copy link

nopnop2002 commented Mar 21, 2024

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

This example is described on the following page, but there is a typo.
https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/i2c.html

out_voltage = Vref * digi_val / 255


i2c_device_config_t dev_cfg = {
    .dev_addr_length = I2C_ADDR_BIT_LEN_7,
    .device_address = 0x58,
    .scl_speed_hz = 100000,
};

i2c_master_dev_handle_t dev_handle;
ESP_ERROR_CHECK(i2c_master_bus_add_device(I2C_PORT_NUM_0, &dev_cfg, &dev_handle));
uint8_t buf[20] = {0x20};
uint8_t buffer[2];
//ESP_ERROR_CHECK(i2c_master_transmit_receive(i2c_bus_handle, buf, sizeof(buf), buffer, 2, -1));
ESP_ERROR_CHECK(i2c_master_transmit_receive(dev_handle, buf, sizeof(buf), buffer, 2, -1));

The same Typo is also found in documents other than ESP32 and master (latest).

@espressif-bot espressif-bot added the Status: Opened Issue is new label Mar 21, 2024
@github-actions github-actions bot changed the title Typo in Inter-Integrated Circuit documentation Typo in Inter-Integrated Circuit documentation (IDFGH-12417) Mar 21, 2024
@mythbuster5
Copy link
Collaborator

Fixed

@grginho
Copy link

grginho commented Apr 26, 2024

Hello,

Sorry if this is not directly related to this issue, but I have a question related to the I2C documentation.

In the Documentation for the new I2C driver, it says this:
Thread Safety
The factory function i2c_new_master_bus() and i2c_new_slave_device() are guaranteed to be thread safe by the driver, which means, user can call them from different RTOS tasks without protection by extra locks. Other public I2C APIs are not thread safe. which means the user should avoid calling them from multiple tasks, if user strongly needs to call them in multiple tasks, please add extra lock.

Does this mean that only i2c_new_master_bus() and i2c_new_slave_device() are thread safe, and all other I2C functions are not thread safe?

Regards,

Dragan

@nopnop2002
Copy link
Author

@grginho

You are right.

@mythbuster5
Copy link
Collaborator

@grginho See latest document, some changes applied there.

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: Opened Issue is new labels Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

4 participants