mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 15:08:52 +08:00
Co-authored-by: Megan McCormick <megan.mccormick@sagetech.com> Co-authored-by: Chuck Faber <chuck.faber@sagetech.com>
23 lines
416 B
C
23 lines
416 B
C
/**
|
|
* @copyright Copyright (c) 2021 Sagetech, Inc. All rights reserved.
|
|
*
|
|
* @file toUint32.c
|
|
* @author Jacob.Garrison
|
|
*
|
|
* @date Mar 2, 2021
|
|
*
|
|
*/
|
|
|
|
#include "sgUtil.h"
|
|
|
|
/*
|
|
* Documented in the header file.
|
|
*/
|
|
uint32_t toUint32(const uint8_t bytes[])
|
|
{
|
|
uint32_t uint32 = ((uint32_t) bytes[0] << 24) | ((uint32_t) bytes[1] << 16) | ((uint32_t) bytes[2] << 8) | ((
|
|
uint32_t) bytes[3]);
|
|
|
|
return uint32;
|
|
}
|