sdwire 0.1.2__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sdwire
3
- Version: 0.1.2
3
+ Version: 0.2.0
4
4
  Summary: CLI application to interact with Badgerd SDWire Gen2 devices
5
5
  License: GPL-3
6
6
  Author: Talha Can Havadar
@@ -56,3 +56,45 @@ Commands:
56
56
  ts ts/host => connects the sdcard interface to host machine
57
57
  ```
58
58
 
59
+ ## Listing SDWire Devices
60
+
61
+ `sdwire list` command will search through usb devices connected to the system
62
+ and prints out the list of gen2 and legacy devices.
63
+
64
+ ```
65
+ ❯ sdwire list
66
+ Serial Product Info
67
+ sdwire_gen2_101 [SDWire-Gen2::Badgerd Technologies]
68
+ bdgrd_sdwirec_522 [sd-wire::SRPOL]
69
+ ```
70
+
71
+ ## Switching SD Card Connection
72
+
73
+ `sdwire switch` command switches the sd card connection to specified direction.
74
+ If there is more than one sdwire connected to then you need specify which sdwire
75
+ you want to alter with `--serial` or `-s` options.
76
+
77
+ If there is only one sdwire connected then you dont need to specify the serial,
78
+ it will pick the one connected automatically. See the examples below.
79
+
80
+ ```
81
+ ❯ sdwire list
82
+ Serial Product Info
83
+ sdwire_gen2_101 [SDWire-Gen2::Badgerd Technologies]
84
+ bdgrd_sdwirec_522 [sd-wire::SRPOL]
85
+
86
+ ❯ sdwire switch -s bdgrd_sdwirec_522 target
87
+
88
+ ❯ sdwire switch target
89
+ Usage: sdwire switch [OPTIONS] COMMAND [ARGS]...
90
+ Try 'sdwire switch --help' for help.
91
+
92
+ Error: There is more then 1 sdwire device connected, please use --serial|-s to specify!
93
+
94
+ ❯ sdwire list
95
+ Serial Product Info
96
+ bdgrd_sdwirec_522 [sd-wire::SRPOL]
97
+
98
+ ❯ sdwire switch host
99
+ ```
100
+
@@ -37,3 +37,45 @@ Commands:
37
37
  target dut/target => connects the sdcard interface to target device
38
38
  ts ts/host => connects the sdcard interface to host machine
39
39
  ```
40
+
41
+ ## Listing SDWire Devices
42
+
43
+ `sdwire list` command will search through usb devices connected to the system
44
+ and prints out the list of gen2 and legacy devices.
45
+
46
+ ```
47
+ ❯ sdwire list
48
+ Serial Product Info
49
+ sdwire_gen2_101 [SDWire-Gen2::Badgerd Technologies]
50
+ bdgrd_sdwirec_522 [sd-wire::SRPOL]
51
+ ```
52
+
53
+ ## Switching SD Card Connection
54
+
55
+ `sdwire switch` command switches the sd card connection to specified direction.
56
+ If there is more than one sdwire connected to then you need specify which sdwire
57
+ you want to alter with `--serial` or `-s` options.
58
+
59
+ If there is only one sdwire connected then you dont need to specify the serial,
60
+ it will pick the one connected automatically. See the examples below.
61
+
62
+ ```
63
+ ❯ sdwire list
64
+ Serial Product Info
65
+ sdwire_gen2_101 [SDWire-Gen2::Badgerd Technologies]
66
+ bdgrd_sdwirec_522 [sd-wire::SRPOL]
67
+
68
+ ❯ sdwire switch -s bdgrd_sdwirec_522 target
69
+
70
+ ❯ sdwire switch target
71
+ Usage: sdwire switch [OPTIONS] COMMAND [ARGS]...
72
+ Try 'sdwire switch --help' for help.
73
+
74
+ Error: There is more then 1 sdwire device connected, please use --serial|-s to specify!
75
+
76
+ ❯ sdwire list
77
+ Serial Product Info
78
+ bdgrd_sdwirec_522 [sd-wire::SRPOL]
79
+
80
+ ❯ sdwire switch host
81
+ ```
@@ -1,15 +1,11 @@
1
1
  [tool.poetry]
2
2
  name = "sdwire"
3
- version = "0.1.2"
3
+ version = "0.2.0"
4
4
  description = "CLI application to interact with Badgerd SDWire Gen2 devices"
5
5
  authors = ["Talha Can Havadar <havadartalha@gmail.com>"]
6
6
  license = "GPL-3"
7
7
  readme = "README.md"
8
- packages = [
9
- { include = "constants.py", from = "sdwire" },
10
- { include = "backend", from = "sdwire" },
11
- { include = "sdwire" },
12
- ]
8
+ packages = [{ include = "sdwire" }]
13
9
 
14
10
  [tool.poetry.dependencies]
15
11
  python = "^3.12"
@@ -3,10 +3,10 @@ from typing import List
3
3
  from adafruit_board_toolkit import circuitpython_serial as cpserial
4
4
  from serial.tools.list_ports_common import ListPortInfo
5
5
 
6
- import constants
7
- from backend.device.sdwire import SDWire
8
- from backend.device.sdwirec import SDWireC
9
- from backend.device.usb_device import PortInfo
6
+ from sdwire import constants
7
+ from .device.sdwire import SDWire
8
+ from .device.sdwirec import SDWireC
9
+ from .device.usb_device import PortInfo
10
10
 
11
11
  import usb.core
12
12
  import usb.util
@@ -1,5 +1,5 @@
1
1
  from serial import Serial
2
- from backend.device.usb_device import USBDevice, PortInfo
2
+ from .usb_device import USBDevice, PortInfo
3
3
 
4
4
 
5
5
  class SDWire(USBDevice):
@@ -1,7 +1,7 @@
1
1
  import logging
2
2
  from pyftdi.ftdi import Ftdi
3
3
  from serial import Serial
4
- from backend.device.usb_device import USBDevice, PortInfo
4
+ from .usb_device import USBDevice, PortInfo
5
5
 
6
6
  log = logging.getLogger(__name__)
7
7
 
@@ -1,9 +1,9 @@
1
1
  import sys
2
2
  import logging
3
3
  import click
4
- from backend.device.sdwire import SDWire
5
- from backend.device.sdwirec import SDWireC
6
- from backend import detect
4
+ from .device.sdwire import SDWire
5
+ from .device.sdwirec import SDWireC
6
+ from . import detect
7
7
 
8
8
  log = logging.getLogger(__name__)
9
9
 
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env python
2
2
  import click
3
- from backend import utils
4
- from backend import detect
5
- from backend.device.sdwire import SDWire
3
+ from .backend import utils
4
+ from .backend import detect
5
+ from .backend.device.sdwire import SDWire
6
6
 
7
7
 
8
8
  @click.group()
File without changes
File without changes
File without changes