coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
crc_byte.h File Reference
#include <stddef.h>
#include <stdint.h>
Include dependency graph for crc_byte.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CRC(buf, size, crc_func)
 

Functions

uint8_t crc7_byte (uint8_t prev_crc, uint8_t data)
 
uint16_t crc16_byte (uint16_t prev_crc, uint8_t data)
 
uint32_t crc32_byte (uint32_t prev_crc, uint8_t data)
 

Macro Definition Documentation

◆ CRC

#define CRC (   buf,
  size,
  crc_func 
)
Value:
({ \
const uint8_t *_crc_local_buf = (const uint8_t *)buf; \
size_t _crc_local_size = size; \
__typeof__(crc_func(0, 0)) _crc_local_result = 0; \
while (_crc_local_size--) { \
_crc_local_result = crc_func(_crc_local_result, *_crc_local_buf++); \
} \
_crc_local_result; \
})
static uint8_t * buf
Definition: uart.c:7
unsigned char uint8_t
Definition: stdint.h:8

Definition at line 37 of file crc_byte.h.

Function Documentation

◆ crc16_byte()

uint16_t crc16_byte ( uint16_t  prev_crc,
uint8_t  data 
)

◆ crc32_byte()

uint32_t crc32_byte ( uint32_t  prev_crc,
uint8_t  data 
)

Definition at line 27 of file crc_byte.c.

Referenced by acpi_device_uid(), get_board_settings_from_eeprom(), and update_board_layout().

Here is the caller graph for this function:

◆ crc7_byte()

uint8_t crc7_byte ( uint8_t  prev_crc,
uint8_t  data 
)

Definition at line 5 of file crc_byte.c.

Referenced by spi_sdcard_calculate_command_crc().

Here is the caller graph for this function: