aboutsummaryrefslogtreecommitdiffstats
path: root/src/i2ccmds.c
Commit message (Collapse)AuthorAgeFilesLines
* i2ccmds: move status checks to functionTimofey Titovets2024-10-261-29/+24
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* i2c: handle errors at i2ccmdsTimofey Titovets2024-10-261-4/+25
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* i2ccmds: abstract i2c dev from bus implementationTimofey Titovets2024-10-261-14/+23
| | | | | | | | Added wrapper around sw/hw bus API, pins.py code will ensure that pins will not mix between HW/SW buses. Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* i2c: drop i2c_modify_bitsTimofey Titovets2024-09-221-33/+0
| | | | | | No longer used and niche Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* Kconfig: Support selecting optional features on chips with small flash sizeKevin O'Connor2023-06-081-8/+7
| | | | | | | | | | | | | Add a new HAVE_LIMITED_CODE_SIZE symbol that enables a menu to select optional features. This symbol is enabled on chips with small build sizes. Replace the HAVE_GPIO_BITBANGING with four new symbols: WANT_GPIO_BITBANGING, WANT_DISPLAYS, WANT_SENSORS, WANT_SOFTWARE_SPI, and WANT_SOFTWARE_I2C. This allows users a little more flexibility when selecting features they need. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* i2c_software: Implementation of software i2c (#6141)BIGTREETECH2023-06-071-8/+47
| | | Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
* mpu9250: Adding support for MPU-9250 (and MPU-6050) accelerometerbluesforte2022-06-161-4/+7
| | | | | | Add support for mpu9250 accelerometer over I2C bus. Signed-off-by: Harry Beyel <harry3b9@gmail.com>
* command: Add command_decode_ptr() helperKevin O'Connor2020-10-301-16/+12
| | | | | | | | Add a helper function to convert from a string buffer passed in the args[] parameter to an actual pointer. This avoids all the callers needing to perfrom pointer manipulation. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: implement i2c_readArksine2020-01-131-1/+1
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* bus: Change bus parameter in config_spi/config_i2cKevin O'Connor2019-04-041-1/+1
| | | | | | Be explicit when using an spi_bus vs i2c_bus in the parameter name. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* i2ccmds: Pass the i2c address as a 7-bit number (0-127)Kevin O'Connor2019-01-071-4/+2
| | | | | | | | | | | | | | | | The sam3 i2c code and the linux code use a 7-bit i2c address, while the avr, lpc176x, and samd21 i2c code uses an 8-bit address with the least significant bit always zero. A similar issue occurred in the host code (sx1509.py and replicape.py use 7-bit addresses while uc1701.py and mcp4451.py use 8-bit addresses). Consistently use 7-bit addresses in all the code. This breaks compatibility between host and mcu software, so make a change to the config_i2c command to force users to synchronize software updates. This also breaks common Smoothieboard configs, so update the mcp4451 code to validate the i2c_address. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* i2ccmds: Validate the i2c addressKevin O'Connor2018-11-301-1/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* i2ccmds: Minor whitespace changesKevin O'Connor2018-11-231-1/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Add generic i2c interfaceFlorian.Heilmann2018-10-271-0/+76
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>