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

Rr/add cmake build and provide handle to platform dependent function #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RamasyaR
Copy link

@RamasyaR RamasyaR commented Nov 1, 2024

Hi, please take a look at my suggestion for improving the library

Providing ds1307_handle_t is necessary for things like this:

typedef struct {
    ds1307_t base;
    esp_ds1307_config_t config;
    i2c_master_dev_handle_t i2c_handle;
} esp_ds1307_t;

esp_ds1307_t *ds1307 = __containerof(handle, esp_ds1307_t, base);

This will allow you to get, for example, an i2c handler from the structure.

The changes do not cover your entire repository, they only provide minimal functionality for the driver itself. If you are interested, I can continue moving in this direction

…s a pointer to ds1307_s structure. Added ds1307_handle_t argument to all platform-dependent function prototypes.
@libdriver
Copy link
Owner

Your suggestion is very good. We will make some modifications to the current program and conduct compatibility testing. Thank you for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants