[riot-notifications] [RIOT-OS/RIOT] drivers/sx127x: add support for rx and tx switch pin (#11316)

Francisco notifications at github.com
Fri Mar 29 19:00:04 CET 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

<!--
Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes
-->

This PR adds support for RX/TX antena switch for sx1727x. Most of the boards used so far have this fucntion covered by hardware. Some of them don't, eg [im880b](https://www.wireless-solutions.de/downloads/Radio-Modules/iM880B/General_Information/iM880B_Datasheet_V1_6.pdf). In some cases this switch is devided in to two, as the case of IM880b, 1 for tx and another for rx. In other [boards](https://os.mbed.com/media/uploads/GregCr/sx1272mb2xas_e364v01a_sch.pdf) there is a single pin that can be toogled (High when TX). 

Define SX127X_TX_SWITCH, and if needed SX127X_RX_SWITCH in the boards makefiles.

### Testing procedure

<!--
Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output
-->

Compile on two lora capable boards, where one is im880b:

`make BOARD=im880b DRIVER=sx172x -C tests/driver_sx127x clean -j flash`

Listen on one and send on the other with SX127X_TX_SWITCH and SX127X_RX_SWITCH flags enabled for sx127x, re-flash without and notice SNR/RSSI difference.

> - INFO # {Payload: "hello" (6 bytes), RSSI: 221, SNR: 9, TOA: 1188}
> - INFO # {Payload: "hello" (6 bytes), RSSI: 212, SNR: 7, TOA: 1188}

### Issues/PRs references

<!--
Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
-->

Can use #11315 to test

You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * drivers/sx127x: add support for rx and tx switch pin

-- File Changes --

    M drivers/include/sx127x.h (4)
    M drivers/sx127x/include/sx127x_params.h (19)
    M drivers/sx127x/sx127x.c (11)
    M drivers/sx127x/sx127x_getset.c (15)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11316.patch
https://github.com/RIOT-OS/RIOT/pull/11316.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/11316
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190329/883f18a6/attachment-0001.html>


More information about the notifications mailing list