Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers/sx127x: use netdev_register() #15537

Merged
merged 2 commits into from Dec 1, 2020

Conversation

fabian18
Copy link
Contributor

@fabian18 fabian18 commented Dec 1, 2020

Contribution description

I added the call to netdev_register() in sx127x_setup().

Testing procedure

The test tests/driver_sx127x runs.

2020-12-01 16:35:39,176 # main(): This is RIOT! (Version: 2021.01-devel-1206-gc526a-sx127x_netdev_register)
2020-12-01 16:35:39,209 # Initialization successful - starting the shell now
> help
2020-12-01 16:35:42,831 #  help
2020-12-01 16:35:42,834 # Command              Description
2020-12-01 16:35:42,838 # ---------------------------------------
2020-12-01 16:35:42,843 # setup                Initialize LoRa modulation settings
2020-12-01 16:35:42,846 # implicit             Enable implicit header
2020-12-01 16:35:42,849 # crc                  Enable CRC
2020-12-01 16:35:42,854 # payload              Set payload length (implicit header)
2020-12-01 16:35:42,859 # random               Get random number from sx127x
2020-12-01 16:35:42,862 # syncword             Get/Set the syncword
2020-12-01 16:35:42,866 # rx_timeout           Set the RX timeout
2020-12-01 16:35:42,871 # channel              Get/Set channel frequency (in Hz)
2020-12-01 16:35:42,876 # register             Get/Set value(s) of registers of sx127x
2020-12-01 16:35:42,880 # send                 Send raw payload string
2020-12-01 16:35:42,884 # listen               Start raw payload listener
2020-12-01 16:35:42,888 # reset                Reset the sx127x device
2020-12-01 16:35:42,891 # reboot               Reboot the node
2020-12-01 16:35:42,895 # version              Prints current RIOT_VERSION
2020-12-01 16:35:42,900 # pm                   interact with layered PM subsystem
2020-12-01 16:35:42,906 # ps                   Prints information about running threads.
> send
2020-12-01 16:35:55,850 #  send
2020-12-01 16:35:55,852 # usage: send <payload>
> send hi
2020-12-01 16:35:58,990 #  send hi
2020-12-01 16:35:58,993 # sending "hi" payload (3 bytes)
> 2020-12-01 16:35:59,028 #  Transmission completed

Issues/PRs references

To benefit from gnrc_netif_get_by_type() in #15120
see also: #15532

Call netdev_register() in sx127x_setup()
and pass the index in auto_init_sx127x()
and semtech_loramac_init()
@fabian18
Copy link
Contributor Author

fabian18 commented Dec 1, 2020

@maribu

@benpicco benpicco added Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation labels Dec 1, 2020
@maribu maribu merged commit 5c70345 into RIOT-OS:master Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants