GEX core repository.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
gex-core/units/1wire/_ow_checksum.h

23 lines
578 B

//
// Created by MightyPork on 2018/02/01.
//
#ifndef GEX_F072_OW_CHECKSUM_H
#define GEX_F072_OW_CHECKSUM_H
#include <stdint.h>
/**
* Compute a 1-wire type checksum.
* If the buffer includes the checksum, the result should be 0.
*
* (this function may be used externally, or you can delete the implementation
* from the c file if another implementation is already available)
*
* @param[in] buf - buffer of bytes to verify
* @param[in] len - buffer length
* @return checksum
*/
uint8_t ow_checksum(const uint8_t *buf, uint32_t len);
#endif //GEX_F072_OW_CHECKSUM_H