lkml.org 
[lkml]   [2018]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectpi433: initialization of tx config in pi433_open()
Hi Marcus,

I'm currently working on the following TODO:

966 /* setup instance data*/
967 instance->device = device;
968 instance->tx_cfg.bit_rate = 4711;
969 // TODO: fill instance->tx_cfg;

If a user calls write() right after open()-ing an instance, the driver
might try to setup the device with uninitialized garbage. In fact
nothing really bad will happen because the rf69 interface abstraction
will filter out wrong values, but this might be a confusing behavior
for the user.

What do you think about initializing instance->tx_cfg with the default
values of the rf69 datasheet[0] ?

Also, is there a specific reason why you chose 4711 as a default value
for the bit rate ? I couldn't find it anywhere in the datasheet nor on
the internet.

Thanks !

Regards,
Hugo

[0] http://www.hoperf.com/upload/rf/RFM69CW-V1.1.pdf

--
Hugo Lefeuvre (hle) | www.owl.eu.com
4096/ 9C4F C8BF A4B0 8FC5 48EB 56B8 1962 765B B9A8 BACA
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2018-06-22 04:48    [W:0.051 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site