Thanks gents. Got it. On Thu, May 19, 2016 at 11:03 AM, Christopher Collins <[email protected]> wrote:
> On Thu, May 19, 2016 at 10:47:20AM -0700, will sanfilippo wrote: > > > On May 19, 2016, at 10:11 AM, James Howarth <[email protected]> > wrote: > [...] > > > static int txpwer_to_set[1] ; > > > memcpy(txpwer_to_set, ctxt->chr_access.data, > > > sizeof txpwer_to_set); > > > > > > ble_phy_txpwr_set(*txpwer_to_set); > [...] > > BTW, I havent looked at the code to see what ctxt->chr_access.data is, > > but if that is an int all you need to do is this: > > > > int txpwr; > > > > txpwr = ctxt->chr_access.data > > ble_phy_txpwr_set(txpwr); > > ctxt->chr_access.data is a void*, so James has it right :). If > txpwer_to_set is a single byte, then I don't see any issues. If it is > larger than one byte, then you will need to worry about endianness. > > Chris >
