ds1307 icon indicating copy to clipboard operation
ds1307 copied to clipboard

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

Open RamasyaR opened this issue 1 year ago • 1 comments

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

RamasyaR avatar Nov 01 '24 13:11 RamasyaR

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

libdriver avatar Nov 04 '24 04:11 libdriver