Skip to content
Snippets Groups Projects
Commit 9bd83ec2 authored by Marc Schink's avatar Marc Schink
Browse files

README: Add simple example

parent 2f3467db
Branches
Tags
No related merge requests found
......@@ -27,6 +27,21 @@ python setup.py install
```
# Example
```python
from openocd import OpenOcd
with OpenOcd() as oocd:
oocd.halt()
registers = oocd.read_registers(['pc', 'sp'])
print('Program counter: 0x%x' % registers['pc'])
print('Stack pointer: 0x%x' % registers['sp'])
oocd.resume()
```
# License
This project is licensed under the [GPLv3+](https://www.gnu.org/licenses/gpl-3.0.en.html) - see the [LICENSE](LICENSE) file for details.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment