Hi Jason, > According to the CC2538 user manual, some of the register values from the > radio are signed
Are you referring to the RSSI bit here? Typecasting this value should be fine, so long as you are casting to an 8-bit signed integer. Strictly speaking I think this behaviour is implementation-defined, but in practice it should be safe so long as the two types are the same width. Cheers Aaron 2016-08-17 8:31 GMT+12:00 Jason A. Tran <[email protected]>: > Hi All, > > According to the CC2538 user manual, some of the register values from the > radio are signed. The current RF driver uses uint_fast8_t as the return type > of rfcore_read_byte(). Is it generally safe to typecast the return value to > a signed integer? If not, what's the best way to handle this? > > Best Regards, > Jason Tran > > _______________________________________________ > devel mailing list > [email protected] > https://lists.riot-os.org/mailman/listinfo/devel > _______________________________________________ devel mailing list [email protected] https://lists.riot-os.org/mailman/listinfo/devel
