[solved] doxygenfunction: Cannot find function “i2c_slave_read”

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

[solved] doxygenfunction: Cannot find function “i2c_slave_read”

Postby rudi ;-) » Wed Feb 21, 2018 9:51 pm

SRC
not_found.png
not_found.png (34.74 KiB) Viewed 6782 times

Code: Select all

static int i2c_slave_read(i2c_port_t i2c_num, uint8_t* data, size_t max_size, TickType_t ticks_to_wait)
{
    i2c_obj_t* p_i2c = p_i2c_obj[i2c_num];
    size_t size = 0;
    uint8_t* pdata = (uint8_t*) xRingbufferReceiveUpTo(p_i2c->rx_ring_buf, &size, ticks_to_wait, max_size);
    if (pdata && size > 0) {
        memcpy(data, pdata, size);
        vRingbufferReturnItem(p_i2c->rx_ring_buf, pdata);
    }
    return size;
}
LINK



( i2c_slave_read point to i2c_slave_read_buffer )

Code: Select all

/**
 * @brief I2C slave read data from internal buffer. When I2C slave receive data, isr will copy received data
 *        from hardware rx fifo to internal ringbuffer. Then users can read from internal ringbuffer.
 *        @note
 *        Only call this function in I2C slave mode
 *
 * @param i2c_num I2C port number
 * @param data data pointer to write into internal buffer
 * @param max_size Maximum data size to read
 * @param ticks_to_wait Maximum waiting ticks
 *
 * @return
 *     - ESP_FAIL(-1) Parameter error
 *     - Others(>=0) The number of data bytes that read from I2C slave buffer.
 */
 int i2c_slave_read_buffer(i2c_port_t i2c_num, uint8_t* data, size_t max_size, TickType_t ticks_to_wait);
LINK for doxygen


TBD.png
TBD.png (6.61 KiB) Viewed 6774 times
TBD
sry.png
sry.png (131.28 KiB) Viewed 6774 times
Last edited by rudi ;-) on Fri Feb 23, 2018 1:15 am, edited 1 time in total.
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: doxygenfunction: Cannot find function “i2c_slave_read”

Postby ESP_Angus » Wed Feb 21, 2018 11:12 pm

Hi rudi,

Some URLs changed between v2.0 and v2.1, when we cleaned up the documentation in general (including removing these warnings). Unfortunately RTD doesn't give us an easy way to forward the old URLs to the new ones, so switching versions sometimes gives these 404s.

v2.1.1 is a bugfix update to v2.0, so we recommend all users update.

The I2C peripherals docs for v2.1.1:
https://esp-idf.readthedocs.io/en/v2.1. ... tBASE_TYPE


Angus

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

Re: doxygenfunction: Cannot find function “i2c_slave_read”

Postby rudi ;-) » Thu Feb 22, 2018 7:34 pm

ESP_Angus wrote:Hi rudi,

Some URLs changed between v2.0 and v2.1, when we cleaned up the documentation in general (including removing these warnings). Unfortunately RTD doesn't give us an easy way to forward the old URLs to the new ones, so switching versions sometimes gives these 404s.

v2.1.1 is a bugfix update to v2.0, so we recommend all users update.

The I2C peripherals docs for v2.1.1:
https://esp-idf.readthedocs.io/en/v2.1. ... tBASE_TYPE


Angus

hi Angus ( no hurry! )
thank you! we have no standalone example for esp32 as i2c slave. only this combine with master code.

do you know, why i2c_slave_read itself is not listed? i2c_slave_read_buffer is listed - but not i2c_slave_read.
is it an privat interna function so the *f is not for using outside?
found the buffer function only.

Code: Select all

int i2c_slave_read_buffer(i2c_port_t i2c_num, uint8_t *data, size_t max_size, portBASE_TYPE ticks_to_wait)
best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: doxygenfunction: Cannot find function “i2c_slave_read”

Postby ESP_Angus » Thu Feb 22, 2018 10:17 pm

rudi ;-) wrote: do you know, why i2c_slave_read itself is not listed? i2c_slave_read_buffer is listed - but not i2c_slave_read.
is it an privat interna function so the *f is not for using outside?
Correct, this is an internal function only. i2c_slave_read_buffer() and i2c_slave_write_buffer() are the API for using the driver.

Who is online

Users browsing this forum: No registered users and 62 guests