Commit Graph

10 Commits

Author SHA1 Message Date
Kevin O'Connor 55e20f2c19 mcu: Add support for changing cycle_time in set_pwm()
Signed-off-by: Guy Shapira <gayuha@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-26 20:55:56 -04:00
Kevin O'Connor f931da1b87 extras: Use "from . import module" for relative imports
Use alternate import syntax to improve Python3 compatibility.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:15:53 -04:00
Kevin O'Connor 6edc2946db sx1509: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:15:53 -04:00
Kevin O'Connor 4aeb7d38a7 sx1509: Minor cleanup - don't default print_time to 0
It's not valid to use a print_time=0, and it isn't actually used in
the sx1509 code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-06-25 18:19:05 -04:00
Kevin O'Connor be6b29fabf sx1509: Convert code to use generic i2c bus support
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-04-04 18:29:30 -04:00
Kevin O'Connor f13c5d4cdb sx1509: Wrap code to 80 columns
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-27 14:33:17 -05:00
Kevin O'Connor e26d1a3567 i2ccmds: Pass the i2c address as a 7-bit number (0-127)
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>
2019-01-07 20:00:44 -05:00
Florian Heilmann b98e12c19a sx1509: Relax restrictions on SX1509 pins (#836)
This allows SX1509 pins to be used as temperature fans and heater fans. Heaters are still disallowed.

Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2018-10-30 18:08:12 -04:00
Kevin O'Connor 4f89251f03 sx1509: Raise an error if a pin max_duration is not zero
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-27 12:22:23 -04:00
Florian Heilmann f57c29442c Add SX1509 extra
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2018-10-27 10:34:28 -04:00