-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathByteConvert.h
More file actions
37 lines (27 loc) · 829 Bytes
/
ByteConvert.h
File metadata and controls
37 lines (27 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
ByteConvert,
Library that converts int and long values into byte arrays, and then back again.
Created by Julio Terra, August 30, 2011; Modified on November 23, 2011
Header File Name: ByteConvert.h
Implementation File Name: ByteConvert.cpp
*/
#ifndef __ByteConvert_h__
#define __ByteConvert_h__
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
void int2bytes(int, byte*);
int bytes2int(byte*);
void int2bytes_127(int, byte*);
int bytes2int_127(byte*);
void unsigned_int2byte(unsigned int, byte*);
unsigned int unsigned_bytes2int(byte*);
void unsigned_int2bytes_127(unsigned int, byte*);
unsigned int unsigned_bytes2int_127(byte*);
void long2byte(long, byte*);
long bytes2long(byte*);
void long2byte_127(long, byte*);
long bytes2long_127(byte*);
#endif