Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] M260/M261 i2c command register support #27559

Open
nvtkaszpir opened this issue Dec 1, 2024 · 0 comments
Open

[FR] M260/M261 i2c command register support #27559

nvtkaszpir opened this issue Dec 1, 2024 · 0 comments
Labels
T: Feature Request Features requested by users.

Comments

@nvtkaszpir
Copy link

nvtkaszpir commented Dec 1, 2024

Is your feature request related to a problem? Please describe.

Right now M260 and M261 allows writing to i2c address in a basic form, but a lot of devices are much more easy to operate when specifying command register to read/write values to it.

Are you looking for hardware support?

Stock Prusa Mini+

Describe the feature you want

A lot of i2c devices specify command registers they use for certain read/write operations, which makes using them a bit easier with other libraries, for example smbus.

Example writing to PCF8591 (I know it is ancient) under linux using i2c command:
device address: 0x48
command register: 0x40 - this an analog out pin available on the given module
value: 0x0

i2cset -y 1 0x48 0x40 0x0

or set it to 255

i2cset -y 1 0x48 0x40 0xff

Also please see https://www.waveshare.com/wiki/Raspberry_Pi_Tutorial_Series:_PCF8591_AD/DA for example code

Additional context

I saw https://www.printables.com/model/1045824-prusa-mini-stacklight which uses PCA9554, but I wanted to use PCF8591.
I thing C in gcode command could be used for 'command' (because R is already used, but maybe it would be useful as 'register' but that would be breaking experimental feature).

@nvtkaszpir nvtkaszpir added the T: Feature Request Features requested by users. label Dec 1, 2024
@thisiskeithb thisiskeithb changed the title [FR] M260 nad M261 i2c command register support [FR] M260/M261 i2c command register support Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: Feature Request Features requested by users.
Projects
None yet
Development

No branches or pull requests

1 participant