ATtiny85 Template Code
Code snippets for the ATtiny85
|
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Functions | |
void | wait (uint16_t millis) |
char | hexChar (uint8_t value) |
uint16_t | crcInit () |
uint16_t | crcByte (uint16_t crc, uint8_t data) |
uint16_t | crcData (uint16_t crc, const uint8_t *pData, uint8_t length) |
uint16_t | crcDataP (uint16_t crc, const uint8_t *pData, uint8_t length) |
uint16_t crcByte | ( | uint16_t | crc, |
uint8_t | data | ||
) |
uint16_t crcData | ( | uint16_t | crc, |
const uint8_t * | pData, | ||
uint8_t | length | ||
) |
Add a block of data to an ongoing CRC calculation
Add a sequence of bytes from a buffer in RAM. Note that this function can process up to 255 bytes in a single call (which is usually enough for a microcontroller application).
crc | the current CRC value |
pData | pointer to the memory buffer |
length | the number of bytes to process. |
Definition at line 74 of file crc16.c.
uint16_t crcDataP | ( | uint16_t | crc, |
const uint8_t * | pData, | ||
uint8_t | length | ||
) |
Add a block of data to an ongoing CRC calculation
Add a sequence of bytes from a buffer in PROGMEM. Note that this function can process up to 255 bytes in a single call (which is usually enough for a microcontroller application).
crc | the current CRC value |
pData | pointer to the memory location. |
length | the number of bytes to process. |
Definition at line 92 of file crc16.c.
uint16_t crcInit | ( | ) |
char hexChar | ( | uint8_t | value | ) |
void wait | ( | uint16_t | millis | ) |
An inaccurate delay function
This function will delay for the given number of milliseconds. This is not an accurate delay (interrupt activity will interfere with the timing and it uses instruction timing approximations to consume the time) but should be close enough for many purposes without having to revert to a timer interrupt.