Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
CRC/CRC32BIT_LOOKUP_Int.h@0:8447350292ab, 2018-12-21 (annotated)
- Committer:
- jjantoine
- Date:
- Fri Dec 21 15:38:58 2018 +0000
- Revision:
- 0:8447350292ab
I2C
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jjantoine | 0:8447350292ab | 1 | /* ======================================================================================= |
jjantoine | 0:8447350292ab | 2 | * (c) |
jjantoine | 0:8447350292ab | 3 | * (c) MEL SYSTEM S.r.l. |
jjantoine | 0:8447350292ab | 4 | * (c) |
jjantoine | 0:8447350292ab | 5 | * (c) Libreria VB32_Lib (Vital Board 32 Bit) |
jjantoine | 0:8447350292ab | 6 | * (c) |
jjantoine | 0:8447350292ab | 7 | * (c) La libreria VB32_Lib implementa le tutte le funzionalità necessarie per l'utilizzo |
jjantoine | 0:8447350292ab | 8 | * (c) dei due processori AT91SAM9 della scheda VB32. La libreria permette di gestire |
jjantoine | 0:8447350292ab | 9 | * (c) tutte le periferiche interne (DBGU, USART, SPI, ecc..) e tutte le periferiche |
jjantoine | 0:8447350292ab | 10 | * (c) esterne (HILSCHER COM-C DPM, ecc..) del processore AT91SAM9. |
jjantoine | 0:8447350292ab | 11 | * (c) |
jjantoine | 0:8447350292ab | 12 | * (c) =================================================================================== |
jjantoine | 0:8447350292ab | 13 | * (c) |
jjantoine | 0:8447350292ab | 14 | * (c) Copyright (C) MEL SYSTEM S.r.l. |
jjantoine | 0:8447350292ab | 15 | * (c) |
jjantoine | 0:8447350292ab | 16 | * (c) Tutti i diritti riservati. |
jjantoine | 0:8447350292ab | 17 | * (c) |
jjantoine | 0:8447350292ab | 18 | * (c) Questo programma e' tutelato dalle leggi sul copyright, dalle leggi sui diritti |
jjantoine | 0:8447350292ab | 19 | * (c) d'autore e dai trattati internazionali. La riproduzione o distribuzione non |
jjantoine | 0:8447350292ab | 20 | * (c) autorizzata di questo programma, o di parte di esso, sara' perseguibile civilmente |
jjantoine | 0:8447350292ab | 21 | * (c) e penalmente. |
jjantoine | 0:8447350292ab | 22 | * (c) |
jjantoine | 0:8447350292ab | 23 | * ======================================================================================= |
jjantoine | 0:8447350292ab | 24 | */ |
jjantoine | 0:8447350292ab | 25 | |
jjantoine | 0:8447350292ab | 26 | /* ======================================================================================= |
jjantoine | 0:8447350292ab | 27 | * Elenco delle modifiche (data - autore - descrizione) |
jjantoine | 0:8447350292ab | 28 | * ======================================================================================= |
jjantoine | 0:8447350292ab | 29 | * |
jjantoine | 0:8447350292ab | 30 | * Ultima: |
jjantoine | 0:8447350292ab | 31 | * |
jjantoine | 0:8447350292ab | 32 | * 23/04/2013 - M. Giannese - creazione del modulo |
jjantoine | 0:8447350292ab | 33 | * ======================================================================================= |
jjantoine | 0:8447350292ab | 34 | */ |
jjantoine | 0:8447350292ab | 35 | |
jjantoine | 0:8447350292ab | 36 | #ifndef _CRC32_LOOKUP_INT_H |
jjantoine | 0:8447350292ab | 37 | #define _CRC32_LOOKUP_INT_H |
jjantoine | 0:8447350292ab | 38 | |
jjantoine | 0:8447350292ab | 39 | /* ======================================================================================= |
jjantoine | 0:8447350292ab | 40 | * File inclusi |
jjantoine | 0:8447350292ab | 41 | * ======================================================================================= |
jjantoine | 0:8447350292ab | 42 | */ |
jjantoine | 0:8447350292ab | 43 | |
jjantoine | 0:8447350292ab | 44 | #include "CRC32BIT_LOOKUP_Ext.h" |
jjantoine | 0:8447350292ab | 45 | #include "ERROR_STD_Def.h" |
jjantoine | 0:8447350292ab | 46 | //#include "WORD_Ext.h" |
jjantoine | 0:8447350292ab | 47 | |
jjantoine | 0:8447350292ab | 48 | /* ======================================================================================= |
jjantoine | 0:8447350292ab | 49 | * Definizioni |
jjantoine | 0:8447350292ab | 50 | * ======================================================================================= |
jjantoine | 0:8447350292ab | 51 | */ |
jjantoine | 0:8447350292ab | 52 | |
jjantoine | 0:8447350292ab | 53 | /* \def Numero di bit in un byte */ |
jjantoine | 0:8447350292ab | 54 | #define CRC32BIT_LOOKUP_NUMBITS_IN_BYTE 8 |
jjantoine | 0:8447350292ab | 55 | /* \def Numero di bit in un byte */ |
jjantoine | 0:8447350292ab | 56 | #define CRC32BIT_LOOKUP_NUMELEMENTS_IN_BYTE 256 |
jjantoine | 0:8447350292ab | 57 | /* \def Numero di bit in una double word */ |
jjantoine | 0:8447350292ab | 58 | #define CRC32BIT_LOOKUP_NUMBITS_UINT32 32 |
jjantoine | 0:8447350292ab | 59 | /* \def Differenza di dimensione tra intero a 32 bit e byte */ |
jjantoine | 0:8447350292ab | 60 | #define CRC32BIT_LOOKUP_AUGMENTATION (CRC32BIT_LOOKUP_NUMBITS_UINT32 - CRC32BIT_LOOKUP_NUMBITS_IN_BYTE) |
jjantoine | 0:8447350292ab | 61 | /* \def Maschera del bit meno significativo di una double word */ |
jjantoine | 0:8447350292ab | 62 | #define CRC32BIT_LOOKUP_UINT32LSB_MASK (UINT32_T)1 |
jjantoine | 0:8447350292ab | 63 | /* \def Maschera del bit meno significativo di un byte */ |
jjantoine | 0:8447350292ab | 64 | #define CRC32BIT_LOOKUP_BYTELSB_MASK (BYTE_T)0x01 |
jjantoine | 0:8447350292ab | 65 | /* \def Maschera del bit più significativo di una double word */ |
jjantoine | 0:8447350292ab | 66 | #define CRC32BIT_LOOKUP_UINT32MSB_MASK (UINT32_T)0x80000000 |
jjantoine | 0:8447350292ab | 67 | /* \def dimensione del blocco per il calcolo veloce del CRC */ |
jjantoine | 0:8447350292ab | 68 | #define CRC32BIT_LOOKUP_BLOCK_SIZE 8 |
jjantoine | 0:8447350292ab | 69 | |
jjantoine | 0:8447350292ab | 70 | #define TOPBIT ((UINT32_T)(1<<(CRC32BIT_LOOKUP_NUMBITS_UINT32-1))) |
jjantoine | 0:8447350292ab | 71 | |
jjantoine | 0:8447350292ab | 72 | /* ======================================================================================= |
jjantoine | 0:8447350292ab | 73 | * Macro |
jjantoine | 0:8447350292ab | 74 | * ======================================================================================= |
jjantoine | 0:8447350292ab | 75 | */ |
jjantoine | 0:8447350292ab | 76 | |
jjantoine | 0:8447350292ab | 77 | /* ======================================================================================= |
jjantoine | 0:8447350292ab | 78 | * Prototipi delle funzioni |
jjantoine | 0:8447350292ab | 79 | * ======================================================================================= |
jjantoine | 0:8447350292ab | 80 | */ |
jjantoine | 0:8447350292ab | 81 | |
jjantoine | 0:8447350292ab | 82 | /* Riflette i bit di un byte */ |
jjantoine | 0:8447350292ab | 83 | BYTE_T CRC32BIT_LOOKUP_ReflectByte(BYTE_T BYTE_Value); |
jjantoine | 0:8447350292ab | 84 | |
jjantoine | 0:8447350292ab | 85 | /* Riflette i bit di una double word */ |
jjantoine | 0:8447350292ab | 86 | UINT32_T CRC32BIT_LOOKUP_ReflectUINT32(UINT32_T UINT32_Value); |
jjantoine | 0:8447350292ab | 87 | |
jjantoine | 0:8447350292ab | 88 | #endif /* _CRC32_LOOKUP_INT_H */ |