A board support package for the LPC4088 Display Module.

Dependencies:   DM_HttpServer DM_USBHost

Dependents:   lpc4088_displaymodule_emwin lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI ... more

Fork of DMSupport by EmbeddedArtists AB

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers crc.h Source File

crc.h

00001 /*
00002  *  Copyright 2014 Embedded Artists AB
00003  *
00004  *  Licensed under the Apache License, Version 2.0 (the "License");
00005  *  you may not use this file except in compliance with the License.
00006  *  You may obtain a copy of the License at
00007  *
00008  *    http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  *  Unless required by applicable law or agreed to in writing, software
00011  *  distributed under the License is distributed on an "AS IS" BASIS,
00012  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  *  See the License for the specific language governing permissions and
00014  *  limitations under the License.
00015  */
00016  
00017 #ifndef __CRC_H
00018 #define __CRC_H
00019 
00020 #include <stdio.h>
00021 #include <stdint.h>
00022 
00023 /** Calculates the CRC32 checksum on the contents of the file
00024  *
00025  *  Note that the position in the file will change as a result of this
00026  *  call. To get the old position back, use fseek().
00027  *
00028  *  @param f   An open file
00029  *
00030  *  @returns
00031  *       checksum on success
00032  *       0 on failure
00033  */
00034 uint32_t crc_File(FILE* f);
00035 
00036 /** Calculates the CRC32 checksum on the data
00037  *
00038  *  @param data   the data
00039  *  @param size   the number of elements in the data array
00040  *
00041  *  @returns
00042  *       checksum
00043  */
00044 uint32_t crc_Buffer(const uint32_t* data, uint32_t size);
00045 
00046 #endif /* end __CRC_H */