-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Area: ModularityNeeded to support modular architectureNeeded to support modular architecture
Description
The SCU is a Spresense-specific peripheral so we shouldn't depend on it in common code.
Some sensors now have two different interfaces that depend on the architecture, e.g. :
#ifdef CONFIG_SENSORS_AK09912_SCU
int ak09912_register(FAR const char *devpath, int minor,
FAR struct i2c_master_s *i2c, int port);
#else
int ak09912_register(FAR const char *devpath, FAR struct i2c_master_s *i2c);
#endifI don't think this is a modular solution. Additionally, we introduce board-specific data in the sensor interface (argument int port in the example above).
So, it seem to me that the SCU-specific interface should be moved to boards/cxd56xx/drivers as it is with the rest of the code related to the SCU (Kconfig, driver implementation). Function names should also be updated e.g. to 'ak09912_scu_register()` to avoid the same functions with incompatible arguments.
Ping Spresense team @jerpelea @SPRESENSE
xiaoxiang781216 and jerpelea
Metadata
Metadata
Assignees
Labels
Area: ModularityNeeded to support modular architectureNeeded to support modular architecture