Skip to content

Commit

Permalink
Merge pull request #542 from UncleRus/feature-max1704x
Browse files Browse the repository at this point in the history
Feature: add max1704x driver + example
  • Loading branch information
UncleRus authored Jul 26, 2023
2 parents e8a4868 + 7371bad commit fc7241b
Show file tree
Hide file tree
Showing 26 changed files with 873 additions and 5 deletions.
10 changes: 9 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -702,4 +702,12 @@ labels:
any:
- "components/sts3x/**"
- "components/sts3x/.eil.yml"
- "examples/sts3x/**"
- "examples/sts3x/**"
- label: "area:components:max1704x"
sync: true
matcher:
files:
any:
- "components/max1704x/**"
- "components/max1704x/.eil.yml"
- "examples/max1704x/**"
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ or [GitLab examples](https://gitlab.com/UncleRus/esp-idf-lib/tree/master/example
| **scd4x** | Driver for SCD40/SCD41 miniature CO₂ sensor | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes
| **sgp40** | Driver for SGP40 Indoor Air Quality Sensor for VOC Measurements | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes

### Battery controllers

| Component | Description | License | Supported on | Thread safety
|--------------------------|----------------------------------------------------------------------------------|---------|--------------------|--------------
| **lc709203f** | Driver for LC709203F battery fuel gauge | ISC | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes
| **max1704x** | Driver for MAX17043/MAX17044/MAX17048/MAX17049 battery fuel gauge | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes

### Common libraries

| Component | Description | License | Supported on | Thread safety
Expand Down Expand Up @@ -221,7 +228,6 @@ or [GitLab examples](https://gitlab.com/UncleRus/esp-idf-lib/tree/master/example
| **ds3502** | Driver for nonvolatile digital potentiometer DS3502 | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes
| **example** | An example component | ISC | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes
| **hd44780** | Driver for HD44780 compatible LCD text displays | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | No
| **lc709203f** | Driver for LC709203F battery fuel gauge | ISC | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes
| **pca9685** | Driver for 16-channel, 12-bit PWM PCA9685 | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes
| **rda5807m** | Driver for single-chip broadcast FM radio tuner RDA5807M | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes
| **tca9548** | Driver for TCA9548A/PCA9548A low-voltage 8-channel I2C switch | BSD-3 | `esp32`, `esp8266`, `esp32s2`, `esp32c3` | Yes
Expand Down Expand Up @@ -315,3 +321,4 @@ or [GitLab examples](https://gitlab.com/UncleRus/esp-idf-lib/tree/master/example
- [Weslley Duarte](https://github.com/weslleymfd), developer of ADS130E08 driver
- [Jan Veeh](https://github.com/janveeh), developer of ICM42670 driver
- [Marc Luehr](https://github.com/Th3Link), developer of VEML7700 driver
- [Joshua Butler, MD, MHI](https://github.com/shuki25), developer of MAX1704x driver
2 changes: 1 addition & 1 deletion components/lc709203f/.eil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ components:
- name: lc709203f
description: |
Driver for LC709203F battery fuel gauge
group: misc
group: battery
groups: []
code_owners: jmpmscorp
depends:
Expand Down
23 changes: 23 additions & 0 deletions components/max1704x/.eil.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
components:
- name: max1704x
description: Driver for MAX17043/MAX17044/MAX17048/MAX17049 battery fuel gauge
group: battery
groups: []
code_owners: shuki25
depends:
- name: i2cdev
- name: log
- name: esp_idf_lib_helpers
thread_safe: yes
targets:
- name: esp32
- name: esp8266
- name: esp32s2
- name: esp32c3
licenses:
- name: BSD-3
copyrights:
- author:
name: shuki25
year: 2022
5 changes: 5 additions & 0 deletions components/max1704x/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
idf_component_register(
SRCS max1704x.c
INCLUDE_DIRS .
REQUIRES i2cdev log esp_idf_lib_helpers
)
11 changes: 11 additions & 0 deletions components/max1704x/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
menu "MAX1704X Battery Fuel Gauge"

choice MAX1704X_MODEL
prompt "Chip type"
config MAX1704X_MODEL_3_4
bool "MAX17043/MAX17044"
config MAX1704X_MODEL_8_9
bool "MAX17048/MAX17049"
endchoice

endmenu
26 changes: 26 additions & 0 deletions components/max1704x/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright (c) 2022 Joshua Butler <josh.butler929@gmail.com>

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of itscontributors
may be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7 changes: 7 additions & 0 deletions components/max1704x/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# `example`

An example driver. Use this as an template for new driver.

## Usage

As this is an example, no usage is available.
2 changes: 2 additions & 0 deletions components/max1704x/component.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
COMPONENT_ADD_INCLUDEDIRS = .
COMPONENT_DEPENDS = i2cdev log esp_idf_lib_helpers
Loading

0 comments on commit fc7241b

Please sign in to comment.