mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-19 01:33:52 +08:00
k-line 5 baud init (#565)
* k-line slow init * k-line slow init LED bit blink * fix misra violations * better names for k-line methods * debug prints match names * switch to timer * use TIM4 until I figure out TIM5 * tickle faster * fix bit bug and add stop bit * TIM5 working * USB return after addr sent * fix l-line reset * fix misra violations * blink for the ones instead of the zeros * k-line 5 baud fault type * lin check * use TIM5 or wakeup * better names
This commit is contained in:
@@ -579,6 +579,14 @@ class Panda(object):
|
||||
if DEBUG:
|
||||
print("kline wakeup done")
|
||||
|
||||
def kline_5baud(self, addr, k=True, l=True):
|
||||
assert k or l, "must specify k-line, l-line, or both"
|
||||
if DEBUG:
|
||||
print("kline 5 baud...")
|
||||
self._handle.controlWrite(Panda.REQUEST_OUT, 0xf4, 2 if k and l else int(l), addr, b'')
|
||||
if DEBUG:
|
||||
print("kline 5 baud done")
|
||||
|
||||
def kline_drain(self, bus=2):
|
||||
# drain buffer
|
||||
bret = bytearray()
|
||||
|
||||
Reference in New Issue
Block a user