{"id":15163160,"url":"https://github.com/mauriciobarroso/at24cs0x","last_synced_at":"2026-02-13T13:01:24.853Z","repository":{"id":181316461,"uuid":"627955661","full_name":"mauriciobarroso/at24cs0x","owner":"mauriciobarroso","description":"EEPROM memory AT24CS0x (AT24CS01 and AT24CS02) driver for ESP-IDF and STM32CubeIDE","archived":false,"fork":false,"pushed_at":"2025-02-16T16:58:29.000Z","size":29,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T11:51:37.876Z","etag":null,"topics":["at24cs01","at24cs02","at24cs0x","eeprom","esp-idf","esp32","esp32c3","esp32s2","esp32s3","stm32","stm32cubeide","stm32f4","stm32g4","stm32l0","stm32wl"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mauriciobarroso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-14T15:12:33.000Z","updated_at":"2025-02-17T07:17:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"fca584dc-037d-4258-a167-11eb63fb7249","html_url":"https://github.com/mauriciobarroso/at24cs0x","commit_stats":{"total_commits":12,"total_committers":2,"mean_commits":6.0,"dds":"0.16666666666666663","last_synced_commit":"bcaa2f72295d3d8bb473eafd194ff810f555f554"},"previous_names":["mauriciobarroso/at24cs0x"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mauriciobarroso/at24cs0x","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciobarroso%2Fat24cs0x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciobarroso%2Fat24cs0x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciobarroso%2Fat24cs0x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciobarroso%2Fat24cs0x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mauriciobarroso","download_url":"https://codeload.github.com/mauriciobarroso/at24cs0x/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciobarroso%2Fat24cs0x/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29407016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["at24cs01","at24cs02","at24cs0x","eeprom","esp-idf","esp32","esp32c3","esp32s2","esp32s3","stm32","stm32cubeide","stm32f4","stm32g4","stm32l0","stm32wl"],"created_at":"2024-09-27T02:20:15.048Z","updated_at":"2026-02-13T13:01:24.831Z","avatar_url":"https://github.com/mauriciobarroso.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EEPROM memory AT24CS0x (AT24CS01 and AT24CS02) driver for ESP-IDF and STM32CubeIDE\nDriver compatible with ESP-IDF and STM32CubeIDE to use AT24CS0x EEPROM memory with embedded serial ID series\n\n## Features\n- Initialization function allows use a custom delay function to ensure compatibility with bare-metal and RTOS applications\n- Algorithm to prevent overwriting within the same page and ensure data length does not exceed the available memory\n- Multiple instances.\n\n## How to use\n### ESP-IDF\nTo use this component follow the next steps:\n\n1. Configure the component in the project configuration menu (`idf.py menuconfig`)\n\n`\nComponent config-\u003eAT24CS0x Configuration\n`\n\n2. Include the I2C driver component headers\n```c\n#include \"driver/i2c_master.h\"\n#include \"at24cs0x.h\"\n```\n3. Declare a handle of I2C bus and an instance of the compoent\n```c\ni2c_master_bus_handle_t i2c_bus_handle; \nat24cs0x_t eeprom;\n```\n\n4. Define a custom delay function in miliseconds according your application\n```c\n/* Custom delay function */\nvoid delay_ms(uint32_t time)\n{\n    vTaskDelay(pdMS_TO_TICKS(time));\n}\n```\n\n5. In the main function initialize the I2C bus and the component instance\n```c\n/* Configure and create a new I2C bus */\ni2c_master_bus_config_t i2c_bus_config = {\n    .clk_source = I2C_CLK_SRC_DEFAULT,\n    .i2c_port = I2C_NUM_0,\n    .scl_io_num = GPIO_NUM_48,\n    .sda_io_num = GPIO_NUM_47,\n    .glitch_ignore_cnt = 7\n};\n\nESP_ERROR_CHECK(i2c_new_master_bus(\u0026i2c_bus_config, \u0026i2c_bus_handle));\n\n/* Initialize AT24CS0x instance for AT24CS02 */\nESP_ERROR_CHECK(at24cs0x_init(\u0026eeprom, i2c_bus_handle, AT24CS0X_I2C_ADDRESS, AT24CS0X_MODEL_02, delay_ms));\n```\n\n7. Perform a sequential random write\n```c\n/* Declare an array to write in EEPROM */\nuint8_t data[32] = 0xFF;\n\n/* Write data array in address 0xF */\nESP_ERROR_CHECK(at24cs0x_write(\u0026eeprom, 0xF, data, 32));\n```\n\n### STM32CubeIDE\nTBD\n\n## License\nMIT License\n\nCopyright (c) 2025 Mauricio Barroso Benavides\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauriciobarroso%2Fat24cs0x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmauriciobarroso%2Fat24cs0x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauriciobarroso%2Fat24cs0x/lists"}