LCOV - code coverage report
Current view: top level - lib/os - crc7_sw.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 6 0.0 %
Date: 2022-08-18 11:36:24 Functions: 0 1 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 2 0.0 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * Copyright (c) 2018 Google LLC.
       3                 :            :  *
       4                 :            :  * SPDX-License-Identifier: Apache-2.0
       5                 :            :  */
       6                 :            : 
       7                 :            : #include <sys/crc.h>
       8                 :            : 
       9                 :          0 : uint8_t crc7_be(uint8_t seed, const uint8_t *src, size_t len)
      10                 :            : {
      11         [ #  # ]:          0 :         while (len--) {
      12                 :          0 :                 uint8_t e = seed ^ *src++;
      13                 :          0 :                 uint8_t f = e ^ (e >> 4) ^ (e >> 7);
      14                 :            : 
      15                 :          0 :                 seed = (f << 1) ^ (f << 4);
      16                 :            :         }
      17                 :            : 
      18                 :          0 :         return seed;
      19                 :            : }

Generated by: LCOV version 1.14