Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
smilecc.c File Reference
#include "usb.h"
#include "scsiglue.h"
#include "transport.h"
#include "smcommon.h"
#include "smil.h"

Go to the source code of this file.

Macros

#define BIT7   0x80
 
#define BIT6   0x40
 
#define BIT5   0x20
 
#define BIT4   0x10
 
#define BIT3   0x08
 
#define BIT2   0x04
 
#define BIT1   0x02
 
#define BIT0   0x01
 
#define BIT1BIT0   0x03
 
#define BIT23   0x00800000L
 
#define MASK_CPS   0x3f
 
#define CORRECTABLE   0x00555554L
 

Functions

void calculate_ecc (BYTE *table, BYTE *data, BYTE *ecc1, BYTE *ecc2, BYTE *ecc3)
 
BYTE correct_data (BYTE *data, BYTE *eccdata, BYTE ecc1, BYTE ecc2, BYTE ecc3)
 
int _Correct_D_SwECC (BYTE *buf, BYTE *redundant_ecc, BYTE *calculate_ecc)
 
void _Calculate_D_SwECC (BYTE *buf, BYTE *ecc)
 

Macro Definition Documentation

#define BIT0   0x01

Definition at line 48 of file smilecc.c.

#define BIT1   0x02

Definition at line 47 of file smilecc.c.

#define BIT1BIT0   0x03

Definition at line 49 of file smilecc.c.

#define BIT2   0x04

Definition at line 46 of file smilecc.c.

#define BIT23   0x00800000L

Definition at line 50 of file smilecc.c.

#define BIT3   0x08

Definition at line 45 of file smilecc.c.

#define BIT4   0x10

Definition at line 44 of file smilecc.c.

#define BIT5   0x20

Definition at line 43 of file smilecc.c.

#define BIT6   0x40

Definition at line 42 of file smilecc.c.

#define BIT7   0x80

Definition at line 41 of file smilecc.c.

#define CORRECTABLE   0x00555554L

Definition at line 52 of file smilecc.c.

#define MASK_CPS   0x3f

Definition at line 51 of file smilecc.c.

Function Documentation

void _Calculate_D_SwECC ( BYTE buf,
BYTE ecc 
)

Definition at line 206 of file smilecc.c.

int _Correct_D_SwECC ( BYTE buf,
BYTE redundant_ecc,
BYTE calculate_ecc 
)

Definition at line 191 of file smilecc.c.

void calculate_ecc ( BYTE table,
BYTE data,
BYTE ecc1,
BYTE ecc2,
BYTE ecc3 
)

Definition at line 98 of file smilecc.c.

BYTE correct_data ( BYTE data,
BYTE eccdata,
BYTE  ecc1,
BYTE  ecc2,
BYTE  ecc3 
)

Definition at line 130 of file smilecc.c.