mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-19 01:33:52 +08:00
PandaDFU: SPI support (#1270)
* PandaDFU: SPI support * get mcu type * program bootstub * little cleanup * more cleanup * connect by dfu serial * time to remove that * none * fix linter * little more * catch --------- Co-authored-by: Comma Device <device@comma.ai>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import List, Optional
|
||||
from typing import List
|
||||
|
||||
from .constants import McuType
|
||||
|
||||
|
||||
class BaseHandle(ABC):
|
||||
@@ -33,6 +35,10 @@ class BaseSTBootloaderHandle(ABC):
|
||||
A handle to talk to a panda while it's in the STM32 bootloader.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def get_mcu_type(self) -> McuType:
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
def close(self) -> None:
|
||||
...
|
||||
@@ -42,11 +48,15 @@ class BaseSTBootloaderHandle(ABC):
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
def program(self, address: int, dat: bytes, block_size: Optional[int] = None) -> None:
|
||||
def program(self, address: int, dat: bytes) -> None:
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
def erase(self, address: int) -> None:
|
||||
def erase_app(self) -> None:
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
def erase_bootstub(self) -> None:
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
|
||||
Reference in New Issue
Block a user