Skip to content

Conversation

@fpoussin
Copy link
Member

@fpoussin fpoussin commented Oct 1, 2025

Adding a way to handle different bus frequencies.
This is needed to calculate the write timeout.

Fixes #379

Copilot AI review requested due to automatic review settings October 1, 2025 14:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for configurable I2C bus frequency to the hal_ee24xx EEPROM driver to enable proper calculation of write timeouts. The change allows users to specify the bus frequency through configuration rather than relying on a hardcoded value.

Key changes:

  • Added bus_hz parameter to I2CEepromFileConfig structure
  • Modified timeout calculation to use configurable frequency with fallback to default
  • Updated function signatures to pass bus frequency parameter

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
os/hal/src/hal_ee24xx.c Updated timeout calculation logic and function signatures to support configurable bus frequency
os/hal/include/hal_ee24xx.h Added bus_hz field to configuration structure with documentation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@fpoussin fpoussin merged commit a391f54 into chibios-21.11.x Oct 1, 2025
1 check failed
@fpoussin fpoussin deleted the i2c_eeprom_freq branch October 1, 2025 14:24
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.

EEPROM driver makes invalid assumptions

2 participants