Skip to content

Commit 3b6e59b

Browse files
committed
Merge branch 'feature/add_esp_new_jpeg_breaking_change' into 'master'
Update esp_jpeg to esp_new_jpeg (breaking change) See merge request adf/esp-adf-internal!1341
2 parents c2221be + 706cdc1 commit 3b6e59b

File tree

11 files changed

+362
-126
lines changed

11 files changed

+362
-126
lines changed

components/esp-adf-libs

Submodule esp-adf-libs updated 69 files
Lines changed: 94 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,212 +1,212 @@
11
/*
2-
* ESPRESSIF MIT License
3-
*
4-
* Copyright (c) 2017 <ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD>
5-
*
6-
* Permission is hereby granted for use on ESPRESSIF SYSTEMS products only, in which case,
7-
* it is free of charge, to any person obtaining a copy of this software and associated
8-
* documentation files (the "Software"), to deal in the Software without restriction, including
9-
* without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
10-
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished
11-
* to do so, subject to the following conditions:
12-
*
13-
* The above copyright notice and this permission notice shall be included in all copies or
14-
* substantial portions of the Software.
15-
*
16-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18-
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19-
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20-
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21-
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22-
*
23-
*/
2+
* ESPRESSIF MIT License
3+
*
4+
* Copyright (c) 2017 <ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD>
5+
*
6+
* Permission is hereby granted for use on ESPRESSIF SYSTEMS products only, in which case,
7+
* it is free of charge, to any person obtaining a copy of this software and associated
8+
* documentation files (the "Software"), to deal in the Software without restriction, including
9+
* without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
10+
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished
11+
* to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all copies or
14+
* substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22+
*
23+
*/
2424
#ifndef _IOT_I2C_BUS_H_
2525
#define _IOT_I2C_BUS_H_
2626

2727
#ifdef __cplusplus
2828
extern "C" {
29-
#endif
29+
#endif /* __cplusplus */
3030

3131
#include "audio_idf_version.h"
3232

3333
#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0))
3434
#include "driver/i2c_master.h"
35-
#endif
35+
#endif /* (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)) */
3636

3737
#include "driver/i2c.h"
3838

3939
typedef void *i2c_bus_handle_t;
4040
typedef void (*i2c_run_cb_t)(i2c_port_t port, void *arg);
4141

4242
/**
43-
* @brief Create and init I2C bus and return a I2C bus handle
43+
* @brief Create and init I2C bus and return a I2C bus handle
4444
*
45-
* @param port I2C port number
46-
* @param conf Pointer to I2C parameters
45+
* @param port I2C port number
46+
* @param conf Pointer to I2C parameters
4747
*
4848
* @return
49-
* - I2C bus handle
49+
* - I2C bus handle
5050
*/
5151
i2c_bus_handle_t i2c_bus_create(i2c_port_t port, i2c_config_t *conf);
5252

5353
#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0))
5454
/**
5555
* @brief Set I2S master bus handle
5656
*
57-
* @param port I2C port number
58-
* @param master_handle I2C master bus handle.
57+
* @param port I2C port number
58+
* @param master_handle I2C master bus handle.
5959
*
6060
* @return
61-
* - ESP_OK on success
61+
* - ESP_OK on success
6262
*/
6363
esp_err_t i2c_bus_set_master_handle(i2c_port_t port, i2c_master_bus_handle_t master_handle);
6464

6565
/**
6666
* @brief Get I2S master bus handle
6767
*
68-
* @param port I2C port number
68+
* @param port I2C port number
6969
*
7070
* @return
71-
* - I2C master bus handle.
71+
* - I2C master bus handle.
7272
*/
7373
i2c_master_bus_handle_t i2c_bus_get_master_handle(i2c_port_t port);
7474

7575
/**
7676
* @brief Read certain bytes of data from I2C bus by address
7777
*
78-
* ___________________________________________________
79-
* | start | slave_addr + rd_bit + ack | ..... | stop |
80-
* --------|---------------------------|-- -----|------|
78+
* ___________________________________________________
79+
* | start | slave_addr + rd_bit + ack | ..... | stop |
80+
* --------|---------------------------|-- -----|------|
8181
*
8282
* @note Directly reads the data in the registers address without a write action
8383
*
84-
* @param bus I2C bus handle
85-
* @param addr The address of the device
86-
* @param outdata The outdata pointer
87-
* @param datalen The length of outdata
84+
* @param bus I2C bus handle
85+
* @param addr The address of the device
86+
* @param outdata The outdata pointer
87+
* @param datalen The length of outdata
8888
*
8989
* @return
9090
* - ESP_OK Success
9191
* - ESP_FAIL Fail
9292
*/
93-
esp_err_t i2c_bus_read_bytes_directly(i2c_bus_handle_t bus, int addr, uint8_t *outdata, int datalen);
93+
esp_err_t i2c_bus_read_bytes_directly(i2c_bus_handle_t bus, int addr, uint8_t *outdata, int datalen);
9494

9595
/**
9696
* @brief Set I2C bus clock frequency
9797
*
9898
* @note This function need called before any i2c bus read or write operation
9999
*
100-
* @param bus I2C bus handle
101-
* @param clk_speed I2C clk frequency
100+
* @param bus I2C bus handle
101+
* @param clk_speed I2C clk frequency
102102
*
103103
* @return
104-
* - ESP_OK Success
105-
* - ESP_FAIL Fail
104+
* - ESP_OK Success
105+
* - ESP_FAIL Fail
106106
*/
107107
esp_err_t i2c_bus_set_clk(i2c_bus_handle_t bus, uint32_t clk_speed);
108108

109109
#else
110110

111111
/**
112-
* @brief I2C start sending buffered commands
112+
* @brief I2C start sending buffered commands
113113
*
114-
* @param bus I2C bus handle
115-
* @param cmd I2C cmd handle
116-
* @param ticks_to_wait Maximum blocking time
114+
* @param bus I2C bus handle
115+
* @param cmd I2C cmd handle
116+
* @param ticks_to_wait Maximum blocking time
117117
*
118118
* @return
119-
* - ESP_OK Success
120-
* - ESP_FAIL Fail
119+
* - ESP_OK Success
120+
* - ESP_FAIL Fail
121121
*/
122122
esp_err_t i2c_bus_cmd_begin(i2c_bus_handle_t bus, i2c_cmd_handle_t cmd, portBASE_TYPE ticks_to_wait);
123123

124-
#endif /* ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0) */
124+
#endif /* (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)) */
125125

126126
/**
127-
* @brief Write bytes to I2C bus
127+
* @brief Write bytes to I2C bus
128128
*
129-
* @param bus I2C bus handle
130-
* @param addr The address of the device
131-
* @param reg The register of the device
132-
* @param regLen The length of register
133-
* @param data The data pointer
134-
* @param datalen The length of data
129+
* @param bus I2C bus handle
130+
* @param addr The address of the device
131+
* @param reg The register of the device
132+
* @param regLen The length of register
133+
* @param data The data pointer
134+
* @param datalen The length of data
135135
*
136136
* @return
137-
* - NULL Fail
138-
* - Others Success
137+
* - NULL Fail
138+
* - Others Success
139139
*/
140140
esp_err_t i2c_bus_write_bytes(i2c_bus_handle_t bus, int addr, uint8_t *reg, int regLen, uint8_t *data, int datalen);
141141

142142
/**
143-
* @brief Write data to I2C bus
143+
* @brief Write data to I2C bus
144144
*
145-
* @param bus I2C bus handle
146-
* @param addr The address of the device
147-
* @param data The data pointer
148-
* @param datalen The length of data
145+
* @param bus I2C bus handle
146+
* @param addr The address of the device
147+
* @param data The data pointer
148+
* @param datalen The length of data
149149
*
150150
* @return
151-
* - NULL Fail
152-
* - Others Success
151+
* - NULL Fail
152+
* - Others Success
153153
*/
154154
esp_err_t i2c_bus_write_data(i2c_bus_handle_t bus, int addr, uint8_t *data, int datalen);
155155

156156
/**
157-
* @brief Read bytes to I2C bus
157+
* @brief Read bytes to I2C bus
158158
*
159-
* @param bus I2C bus handle
160-
* @param addr The address of the device
161-
* @param reg The register of the device
162-
* @param regLen The length of register
163-
* @param outdata The outdata pointer
164-
* @param datalen The length of outdata
159+
* @param bus I2C bus handle
160+
* @param addr The address of the device
161+
* @param reg The register of the device
162+
* @param regLen The length of register
163+
* @param outdata The outdata pointer
164+
* @param datalen The length of outdata
165165
*
166166
* @return
167-
* - NULL Fail
168-
* - Others Success
167+
* - NULL Fail
168+
* - Others Success
169169
*/
170170
esp_err_t i2c_bus_read_bytes(i2c_bus_handle_t bus, int addr, uint8_t *reg, int reglen, uint8_t *outdata, int datalen);
171171

172172
/**
173-
* @brief Delete and release the I2C bus object
173+
* @brief Delete and release the I2C bus object
174174
*
175-
* @param bus I2C bus handle
175+
* @param bus I2C bus handle
176176
*
177177
* @return
178-
* - ESP_OK Success
179-
* - ESP_FAIL Fail
178+
* - ESP_OK Success
179+
* - ESP_FAIL Fail
180180
*/
181181
esp_err_t i2c_bus_delete(i2c_bus_handle_t bus);
182182

183183
/**
184-
* @brief Auto probe the I2C device
184+
* @brief Auto probe the I2C device
185185
*
186-
* @param bus I2C bus handle
187-
* @param addr I2C adress
186+
* @param bus I2C bus handle
187+
* @param addr I2C 8bit address
188188
*
189189
* @return
190-
* - ESP_OK Found a I2C device
191-
* - ESP_FAIL Fail
190+
* - ESP_OK Found a I2C device
191+
* - ESP_FAIL Fail
192192
*/
193193
esp_err_t i2c_bus_probe_addr(i2c_bus_handle_t bus, uint8_t addr);
194194

195195
/**
196-
* @brief Lock the I2C bus while executing the given callback
196+
* @brief Lock the I2C bus while executing the given callback
197197
*
198-
* @param bus I2C bus handle
199-
* @param cb The callback to execute
200-
* @param arg The argument for the callback
198+
* @param bus I2C bus handle
199+
* @param cb The callback to execute
200+
* @param arg The argument for the callback
201201
*
202202
* @return
203-
* - ESP_OK Done calling callback function
204-
* - ESP_FAIL Fail
203+
* - ESP_OK Done calling callback function
204+
* - ESP_FAIL Fail
205205
*/
206206
esp_err_t i2c_bus_run_cb(i2c_bus_handle_t bus, i2c_run_cb_t cb, void *arg);
207207

208208
#ifdef __cplusplus
209209
}
210-
#endif
210+
#endif /* __cplusplus */
211211

212-
#endif
212+
#endif /* _IOT_I2C_BUS_H_ */

components/esp_peripherals/driver/i2c_bus/i2c_bus_v2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ esp_err_t i2c_bus_probe_addr(i2c_bus_handle_t bus, uint8_t addr)
239239
i2c_bus_info_t *bus_info = (i2c_bus_info_t *)bus;
240240
esp_err_t ret = ESP_OK;
241241
mutex_lock(master[bus_info->port].bus_lock);
242-
ret = i2c_master_probe(master[bus_info->port].master_handle, addr, DEFAULT_I2C_TRANS_TIMEOUT);
242+
ret = i2c_master_probe(master[bus_info->port].master_handle, addr >> 1, DEFAULT_I2C_TRANS_TIMEOUT);
243243
mutex_unlock(master[bus_info->port].bus_lock);
244244
return ret;
245245
}

examples/display/lcd_camera/main/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
idf_component_register(
55
SRCS
66
"lcd_camera_main.c"
7+
"img_convert.c"
78
INCLUDE_DIRS
89
".")

0 commit comments

Comments
 (0)