Skip to content

Commit e8839c3

Browse files
committed
Fixed codec board pin parse err
1 parent 71beeca commit e8839c3

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

components/codec_board/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v1.0.2
4+
5+
- Fixed pin parse error
6+
37
## v1.0.1
48

59
- Upgrade dependency of `esp_codev_dev` to v1.5.x

components/codec_board/cfg_parse.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,9 @@ static lcd_bus_type_t lcd_get_bus(const char* s)
258258

259259
static int16_t get_pin(const char* s)
260260
{
261-
char* ext = strstr(s, "ext");
262-
if (ext) {
263-
return 0x1000 + atoi(ext + 3);
261+
bool has_ext = (strncmp(s, "ext", 3) == 0);
262+
if (has_ext) {
263+
return 0x1000 + atoi(s + 3);
264264
}
265265
return (int16_t)atoi(s);
266266
}

components/codec_board/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## IDF Component Manager Manifest File
2-
version: "1.0.1"
2+
version: "1.0.2"
33
description: Simple ESP32 series codec board realization
44
dependencies:
55
espressif/esp_codec_dev: "~1.5"

0 commit comments

Comments
 (0)