keever50 commented on issue #15856: URL: https://github.com/apache/nuttx/issues/15856#issuecomment-2701664826
> > https://github.com/keever50/nuttx/blob/9caff9604715a4eae1235c0fef03547ebfc730cc/include/nuttx/wireless/ioctl.h > > I made progress to the start of the common API. Let me know what you think. > > I like it so far, but I'm still not sure about using `fixedmath`. Why not just take up the extra integer space for RSSI and dBm to have more precision? > > Just so I understand correctly, the process for the user will be to do something like the following? > > uint8_t payload[SIZE]; > struct wlioc_rx_hdr_s hdr = { > .payload_length = sizeof(payload), > .payload = &hdr, > }; > read(radio, &hdr, sizeof(hdr)); Yeah honestly you are right, it is possible to use 32bit - 16 fractional bits using fixedmath.h. The 16bit - 8 fractional bits did fit nicely in common RSSI and SNR values. But saving up on these very few bytes is of course insignificant, so lets just make it 32 (16 fractional bits)? About the rx_hdr, thats interesting! i was more thinking of .payload pointing to an internal driver buffer. But this is also an option, the buffer being the user's responsibility. Might actually allow more user flexibility. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org