Line data Source code
1 : /** 2 : * @copyright Copyright (c) 2021 Sagetech, Inc. All rights reserved. 3 : * 4 : * @file toInt16.c 5 : * @author Jacob.Garrison 6 : * 7 : * @date Mar 2, 2021 8 : * 9 : */ 10 : 11 : #include "sgUtil.h" 12 : 13 : /* 14 : * Documented in the header file. 15 : */ 16 24930 : int16_t toInt16(const uint8_t bytes[]) 17 : { 18 24930 : int16_t int16 = ((int16_t)bytes[0] << 8) | bytes[1]; 19 : 20 24930 : return int16; 21 : }