summaryrefslogtreecommitdiffhomepage
path: root/pyecsca/sca/target/serial.py
blob: ccde326999cd65eaabe1738395b7694349913cfb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from abc import abstractmethod
from typing import Optional

from public import public

from .base import Target


@public
class SerialTarget(Target):

    @abstractmethod
    def write(self, data: bytes):
        ...

    @abstractmethod
    def read(self, num: int = 0, timeout: int = 0) -> bytes:
        ...