sdwire 0.1.2__tar.gz → 0.2.1__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.1
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,60 @@ Commands:
56
56
  ts ts/host => connects the sdcard interface to host machine
57
57
  ```
58
58
 
59
+ ## Installing
60
+
61
+ Using pip
62
+
63
+ ```
64
+ pip install sdwire
65
+ ```
66
+
67
+ Using apt
68
+
69
+ ```
70
+ sudo add-apt-repository ppa:tchavadar/badgerd
71
+ sudo apt install python3-sdwire
72
+ ```
73
+
74
+ ## Listing SDWire Devices
75
+
76
+ `sdwire list` command will search through usb devices connected to the system
77
+ and prints out the list of gen2 and legacy devices.
78
+
79
+ ```
80
+ ❯ sdwire list
81
+ Serial Product Info
82
+ sdwire_gen2_101 [SDWire-Gen2::Badgerd Technologies]
83
+ bdgrd_sdwirec_522 [sd-wire::SRPOL]
84
+ ```
85
+
86
+ ## Switching SD Card Connection
87
+
88
+ `sdwire switch` command switches the sd card connection to specified direction.
89
+ If there is more than one sdwire connected to then you need specify which sdwire
90
+ you want to alter with `--serial` or `-s` options.
91
+
92
+ If there is only one sdwire connected then you dont need to specify the serial,
93
+ it will pick the one connected automatically. See the examples below.
94
+
95
+ ```
96
+ ❯ sdwire list
97
+ Serial Product Info
98
+ sdwire_gen2_101 [SDWire-Gen2::Badgerd Technologies]
99
+ bdgrd_sdwirec_522 [sd-wire::SRPOL]
100
+
101
+ ❯ sdwire switch -s bdgrd_sdwirec_522 target
102
+
103
+ ❯ sdwire switch target
104
+ Usage: sdwire switch [OPTIONS] COMMAND [ARGS]...
105
+ Try 'sdwire switch --help' for help.
106
+
107
+ Error: There is more then 1 sdwire device connected, please use --serial|-s to specify!
108
+
109
+ ❯ sdwire list
110
+ Serial Product Info
111
+ bdgrd_sdwirec_522 [sd-wire::SRPOL]
112
+
113
+ ❯ sdwire switch host
114
+ ```
115
+
sdwire-0.2.1/README.md ADDED
@@ -0,0 +1,96 @@
1
+ # CLI for Badgerd SDWire Devices
2
+
3
+ Application also supports legacy SDWireC and non-Badger'd sdwires as well as
4
+ new Badgerd SDwire Gen2 devices.
5
+
6
+ Please see below for usage:
7
+
8
+ ```
9
+ ❯ sdwire --help
10
+ Usage: sdwire [OPTIONS] COMMAND [ARGS]...
11
+
12
+ Options:
13
+ --help Show this message and exit.
14
+
15
+ Commands:
16
+ list
17
+ switch dut/target => connects the sdcard interface to target device
18
+
19
+ ❯ sdwire switch --help
20
+ Usage: sdwire switch [OPTIONS] COMMAND [ARGS]...
21
+
22
+ dut/target => connects the sdcard interface to target device
23
+
24
+ ts/host => connects the sdcard interface to host machine
25
+
26
+ off => disconnects the sdcard interface from both host and target
27
+
28
+ Options:
29
+ -s, --serial TEXT Serial number of the sdwire device, if there is only one
30
+ sdwire connected then it will be used by default
31
+ --help Show this message and exit.
32
+
33
+ Commands:
34
+ dut dut/target => connects the sdcard interface to target device
35
+ host ts/host => connects the sdcard interface to host machine
36
+ off off => disconnects the sdcard interface from both host and target
37
+ target dut/target => connects the sdcard interface to target device
38
+ ts ts/host => connects the sdcard interface to host machine
39
+ ```
40
+
41
+ ## Installing
42
+
43
+ Using pip
44
+
45
+ ```
46
+ pip install sdwire
47
+ ```
48
+
49
+ Using apt
50
+
51
+ ```
52
+ sudo add-apt-repository ppa:tchavadar/badgerd
53
+ sudo apt install python3-sdwire
54
+ ```
55
+
56
+ ## Listing SDWire Devices
57
+
58
+ `sdwire list` command will search through usb devices connected to the system
59
+ and prints out the list of gen2 and legacy devices.
60
+
61
+ ```
62
+ ❯ sdwire list
63
+ Serial Product Info
64
+ sdwire_gen2_101 [SDWire-Gen2::Badgerd Technologies]
65
+ bdgrd_sdwirec_522 [sd-wire::SRPOL]
66
+ ```
67
+
68
+ ## Switching SD Card Connection
69
+
70
+ `sdwire switch` command switches the sd card connection to specified direction.
71
+ If there is more than one sdwire connected to then you need specify which sdwire
72
+ you want to alter with `--serial` or `-s` options.
73
+
74
+ If there is only one sdwire connected then you dont need to specify the serial,
75
+ it will pick the one connected automatically. See the examples below.
76
+
77
+ ```
78
+ ❯ sdwire list
79
+ Serial Product Info
80
+ sdwire_gen2_101 [SDWire-Gen2::Badgerd Technologies]
81
+ bdgrd_sdwirec_522 [sd-wire::SRPOL]
82
+
83
+ ❯ sdwire switch -s bdgrd_sdwirec_522 target
84
+
85
+ ❯ sdwire switch target
86
+ Usage: sdwire switch [OPTIONS] COMMAND [ARGS]...
87
+ Try 'sdwire switch --help' for help.
88
+
89
+ Error: There is more then 1 sdwire device connected, please use --serial|-s to specify!
90
+
91
+ ❯ sdwire list
92
+ Serial Product Info
93
+ bdgrd_sdwirec_522 [sd-wire::SRPOL]
94
+
95
+ ❯ sdwire switch host
96
+ ```
@@ -1,15 +1,11 @@
1
1
  [tool.poetry]
2
2
  name = "sdwire"
3
- version = "0.1.2"
3
+ version = "0.2.1"
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()
sdwire-0.1.2/README.md DELETED
@@ -1,39 +0,0 @@
1
- # CLI for Badgerd SDWire Devices
2
-
3
- Application also supports legacy SDWireC and non-Badger'd sdwires as well as
4
- new Badgerd SDwire Gen2 devices.
5
-
6
- Please see below for usage:
7
-
8
- ```
9
- ❯ sdwire --help
10
- Usage: sdwire [OPTIONS] COMMAND [ARGS]...
11
-
12
- Options:
13
- --help Show this message and exit.
14
-
15
- Commands:
16
- list
17
- switch dut/target => connects the sdcard interface to target device
18
-
19
- ❯ sdwire switch --help
20
- Usage: sdwire switch [OPTIONS] COMMAND [ARGS]...
21
-
22
- dut/target => connects the sdcard interface to target device
23
-
24
- ts/host => connects the sdcard interface to host machine
25
-
26
- off => disconnects the sdcard interface from both host and target
27
-
28
- Options:
29
- -s, --serial TEXT Serial number of the sdwire device, if there is only one
30
- sdwire connected then it will be used by default
31
- --help Show this message and exit.
32
-
33
- Commands:
34
- dut dut/target => connects the sdcard interface to target device
35
- host ts/host => connects the sdcard interface to host machine
36
- off off => disconnects the sdcard interface from both host and target
37
- target dut/target => connects the sdcard interface to target device
38
- ts ts/host => connects the sdcard interface to host machine
39
- ```
File without changes
File without changes
File without changes