📄 bytestream.c
字号:
/*****************************************************************************//* *//* <C> STMicroelectronics - copyright information *//* *//* *//* COMMENT }DOCUMENTATION *//* File Name :: bytestream.c *//* Creation Date :: September 2005 *//* Author :: Ondrej Trubac *//* Version :: $Revision: 1.5 $ *//* Last change :: $Date: 2006/09/18 09:55:22 $ by $Author: belardi $ *//* Description :: Bytestream reading,writing *//* } *//*****************************************************************************//*************************************************** * * COPYRIGHT (C) ST Microelectronics 2005 * All Rights Reserved * **************************************************** * * STM CVS Log: * * $Log: bytestream.c,v $ * Revision 1.5 2006/09/18 09:55:22 belardi * Corrected CVS keyword usage * * Revision 1.4 2006/09/18 09:24:02 belardi * Added Log CVS keyword into file header * * ***************************************************/#include "accordoptypes.h" //"aptypes.h"uint16 BYTEREAD16(uint8 *buf, uint32 pos){ uint16 val; val = (((uint16)(buf[pos])) << 8) + (uint16)(buf[pos + 1]); return val;}uint32 BYTEREAD24(uint8 *buf, uint32 pos){ uint32 val; val = (((uint32)(buf[pos])) << 16) + (((uint32)(buf[pos + 1])) << 8) + (uint32)(buf[pos + 2]); return val;}uint32 BYTEREAD32(uint8 *buf, uint32 pos){ uint32 val; val = (((uint32)(buf[pos])) << 24) + (((uint32)(buf[pos + 1])) << 16) + (((uint32)(buf[pos + 2])) << 8) + (uint32)(buf[pos + 3]); return val;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -