Anonymous
Not applicable
Apr 24, 2018
10:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 24, 2018
10:08 AM
Hi,
How could I convert variable uint8 rampasskey[6] = {1,2,3,4,5,6}; to uint32 rampasskey = 123456; ?
Thank you,
Asier.
Solved! Go to Solution.
Labels
- Labels:
-
BLE
1 Solution
Apr 24, 2018
10:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 24, 2018
10:48 AM
Something like
int ii;
uint32 rampasskey = 0;
uint8 KeyARRAY[6];
for(ii = 5; ii >= 0:ii--)
{
rampasskey *= 10;
rampasskey += KeyARRAY[ii];
}
Happy coding
Bob
1 Reply
Apr 24, 2018
10:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 24, 2018
10:48 AM
Something like
int ii;
uint32 rampasskey = 0;
uint8 KeyARRAY[6];
for(ii = 5; ii >= 0:ii--)
{
rampasskey *= 10;
rampasskey += KeyARRAY[ii];
}
Happy coding
Bob