pebble
  • Tutorials
  • Get the SDK
  • Guides
  • Documentation
  • PebbleOS
  • Mobile App
  • Examples
  • Index 01
  • Community
  • Blog
  • More
Privacy
Cookies
Publish

PebbleOS

  • Overview
  • Contributing
  • Start here
  • Development
  • System
    • Architecture overview
    • Kernel
    • Subsystems
    • Drivers
    • Services
    • Libraries
    • Third-party
    • Application SDK
  • Hardware
  • Community
  • Reference
  • Firmware API Reference

CRC

CRC drivers accelerate the CRC subsystem with a hardware CRC unit. They are optional: without one, the subsystem computes every CRC in software.

Interface

A driver selects the hidden CONFIG_CRC_HW_ACCEL symbol and implements the two functions in include/pbl/drivers/crc.h, one per algorithm. Each takes a running value and a buffer, processes a prefix of it that is a whole number of 32-bit words, and returns its length in bytes.

Returning less than the full length is always allowed: the subsystem finishes in software. A driver returns 0 whenever the hardware cannot be used, before it is ready, when its self-test failed, or for any other reason, so callers never see a failure.

Implementations

  • SF32LB

The API reference documents the interface.

Generated from PebbleOS 3a7b71785. This page is maintained in the pebbleos repository: docs/drivers/crc/index.md.

Overview

  • Interface
  • Implementations