summaryrefslogtreecommitdiff
path: root/util.h
blob: 30d24a59885fa184228e8fd29c87efee48fd5ac8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef _UTIL_H
#define _UTIL_H

#include <unistd.h>
#include <stdint.h>
#define countof(x) (sizeof(x)/sizeof(*(x)))
#define char_t unsigned char

void writechecksum(uint8_t *address);
void to_hex(char_t *a, const char_t *p, int size);
void id_to_string(char_t *dest, const char_t *src);
int string_to_id(char_t *w, char_t *a);
void* file_raw(char *path, uint32_t *size);

#endif