You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "raiden00pl (via GitHub)" <gi...@apache.org> on 2023/08/16 08:14:54 UTC
[GitHub] [nuttx] raiden00pl opened a new issue, #10240: Sensor function prototypes using the SCU should be private to cxd56xx.
raiden00pl opened a new issue, #10240:
URL: https://github.com/apache/nuttx/issues/10240
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);
#endif
````
I 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] raiden00pl commented on issue #10240: Sensor function prototypes using the SCU should be private to cxd56xx.
Posted by "raiden00pl (via GitHub)" <gi...@apache.org>.
raiden00pl commented on issue #10240:
URL: https://github.com/apache/nuttx/issues/10240#issuecomment-1693035375
thanks @SPRESENSE !
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] SPRESENSE commented on issue #10240: Sensor function prototypes using the SCU should be private to cxd56xx.
Posted by "SPRESENSE (via GitHub)" <gi...@apache.org>.
SPRESENSE commented on issue #10240:
URL: https://github.com/apache/nuttx/issues/10240#issuecomment-1691117039
I agree. I will create a pull request to fix modularity.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 closed issue #10240: Sensor function prototypes using the SCU should be private to cxd56xx.
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 closed issue #10240: Sensor function prototypes using the SCU should be private to cxd56xx.
URL: https://github.com/apache/nuttx/issues/10240
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] acassis commented on issue #10240: Sensor function prototypes using the SCU should be private to cxd56xx.
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on issue #10240:
URL: https://github.com/apache/nuttx/issues/10240#issuecomment-1680682556
Agree! I think sensors need to be generic and companies could create a layer/wrap around it to support things specific for their needs like uorb and the Spresense sequence (SCU)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org