Mistake on this page?
Report an issue in GitHub or email us
fcs.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file fcs.h
4  *
5  * \brief FCS utilities (3GPP TS 27.010).
6  *
7  * Copyright (c) 2010-2017 Arm Ltd. All Rights Reserved.
8  *
9  * Copyright (c) 2019 Packetcraft, Inc.
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 /*************************************************************************************************/
24 #ifndef FCS_H
25 #define FCS_H
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 /*************************************************************************************************/
32 /*!
33  * \brief Calculate the FCS of the given buffer.
34  *
35  * \param len Length of the buffer.
36  * \param pBuf Buffer to compute the CRC.
37  *
38  * \return FCS value.
39  */
40 /*************************************************************************************************/
41 uint8_t FcsCalc(uint32_t len, const uint8_t *pBuf);
42 
43 /*************************************************************************************************/
44 /*!
45  * \brief Computes resultant CRC by appending one byte.
46  *
47  * \param pFcs CRC value on which to append the byte.
48  * \param byte Byte to be added to CRC computation.
49  *
50  * \return FCS value.
51  */
52 /*************************************************************************************************/
53 void FcsAddByte(uint8_t *pFcs, uint8_t byte);
54 
55 #ifdef __cplusplus
56 };
57 #endif
58 
59 #endif /* FCS_H */
void FcsAddByte(uint8_t *pFcs, uint8_t byte)
Computes resultant CRC by appending one byte.
uint8_t FcsCalc(uint32_t len, const uint8_t *pBuf)
Calculate the FCS of the given buffer.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.