You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
403 B

/**
* @copyright Copyright (c) 2021 Sagetech, Inc. All rights reserved.
*
* @file toInt32.c
* @author Jacob.Garrison
*
* @date Mar 2, 2021
*
*/
#include "sgUtil.h"
/*
* Documented in the header file.
*/
int32_t toInt32(const uint8_t bytes[])
{
int32_t int32 = ((int32_t)bytes[0] << 24) | ((int32_t)bytes[1] << 16) | ((int32_t)bytes[2] << 8);
int32 = int32 >> 8;
return int32;
}