[riot-notifications] [RIOT-OS/RIOT] tests/driver_sx127x: Add reset command (#11925)

Leandro Lanzieri notifications at github.com
Fri Jul 26 15:18:23 CEST 2019


<!--
The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
-->

### Contribution description
This PR adds the reset command to the SX127X driver test application. It performs a reset on the device, by setting `NETOPT_STATE` to `NETOPT_STATE_RESET` on the interface. It is useful to test the reset sequence on the device.

### Testing procedure
Flash the driver test application:
```
BOARD=b-l072z-lrwan1 make all flash term -C tests/driver_sx127x
```
Set some value that will we restored on reset, such as the syncword:
```
> syncword set 12
2019-07-26 15:13:54,790 - INFO #  syncword set 12
2019-07-26 15:13:54,792 - INFO # Syncword set to 12
```
Use the reset command and verify the value goes back to the default:
```
> reset
2019-07-26 15:13:58,564 - INFO #  reset
2019-07-26 15:13:58,565 - INFO # resetting sx127x...
> syncword get
2019-07-26 15:14:00,265 - INFO #  syncword get
2019-07-26 15:14:00,267 - INFO # Syncword: 0xf5
```

### Issues/PRs references
Useful for testing fix proposed in #11913
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/11925

-- Commit Summary --

  * tests/driver_sx127x: Add reset command

-- File Changes --

    M tests/driver_sx127x/main.c (12)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11925.patch
https://github.com/RIOT-OS/RIOT/pull/11925.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11925
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190726/a7086f58/attachment-0001.htm>


More information about the notifications mailing list