(self, token)
| 232 | self.spi.write(b"\xff") |
| 233 | |
| 234 | def write_token(self, token): |
| 235 | self.cs(0) |
| 236 | self.spi.read(1, token) |
| 237 | self.spi.write(b"\xff") |
| 238 | # wait for write to finish |
| 239 | while self.spi.read(1, 0xFF)[0] == 0x00: |
| 240 | pass |
| 241 | |
| 242 | self.cs(1) |
| 243 | self.spi.write(b"\xff") |
| 244 | |
| 245 | def readblocks(self, block_num, buf): |
| 246 | # workaround for shared bus, required for (at least) some Kingston |