forked from leachj/lightwaverf-pi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlightwaverf.h
49 lines (33 loc) · 790 Bytes
/
lightwaverf.h
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
38
39
40
41
42
43
44
45
46
47
48
// LightwaveRF.h
//
// LightwaveRF 434MHz interface for Arduino
//
// Author: Lawrie Griffiths ([email protected])
// Copyright (C) 2012 Lawrie Griffiths
#include <wiringPi.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#ifdef __cplusplus
extern "C"{
#endif
typedef uint8_t boolean;
typedef uint8_t byte;
#if !defined(NULL)
#endif
#ifdef __cplusplus
}
#endif
#define LW_OFF 0
#define LW_ON 1
#define LW_MOOD 2
void lw_tx_setup(int tx_pin);
void lw_rx_setup(int rx_pin);
void lw_setup();
boolean lw_setup_pins(int tx_pin, int rx_pin);
void lw_rx_wait();
boolean lw_have_message();
boolean lw_get_message(byte* buf, byte* len);
void lw_send(byte* msg);
void lw_cmd(byte level, byte channel, byte cmd, byte* id);
void lw_get_error_stats(long *inv);