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.
21 lines
334 B
21 lines
334 B
/** |
|
* @copyright Copyright (c) 2021 Sagetech, Inc. All rights reserved. |
|
* |
|
* @file toInt16.c |
|
* @author Jacob.Garrison |
|
* |
|
* @date Mar 2, 2021 |
|
* |
|
*/ |
|
|
|
#include "sgUtil.h" |
|
|
|
/* |
|
* Documented in the header file. |
|
*/ |
|
int16_t toInt16(const uint8_t bytes[]) |
|
{ |
|
int16_t int16 = ((int16_t)bytes[0] << 8) | bytes[1]; |
|
|
|
return int16; |
|
}
|
|
|