uc-sdk
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
stm32f10x_crc.c
Go to the documentation of this file.
1
22
/* Includes ------------------------------------------------------------------*/
23
#include "
stm32f10x_crc.h
"
24
83
void
CRC_ResetDR
(
void
)
84
{
85
/* Reset CRC generator */
86
CRC
->CR =
CRC_CR_RESET
;
87
}
88
94
uint32_t
CRC_CalcCRC
(uint32_t Data)
95
{
96
CRC
->DR = Data;
97
98
return
(
CRC
->DR);
99
}
100
107
uint32_t
CRC_CalcBlockCRC
(uint32_t pBuffer[], uint32_t BufferLength)
108
{
109
uint32_t index = 0;
110
111
for
(index = 0; index < BufferLength; index++)
112
{
113
CRC
->DR = pBuffer[index];
114
}
115
return
(
CRC
->DR);
116
}
117
123
uint32_t
CRC_GetCRC
(
void
)
124
{
125
return
(
CRC
->DR);
126
}
127
133
void
CRC_SetIDRegister
(uint8_t IDValue)
134
{
135
CRC
->IDR = IDValue;
136
}
137
143
uint8_t
CRC_GetIDRegister
(
void
)
144
{
145
return
(
CRC
->IDR);
146
}
147
160
/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
arch
arm
stm32f10x
Drivers
source
stm32f10x_crc.c
Generated on Fri Nov 15 2013 05:00:17 for uc-sdk by
1.8.4