-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdgtpicom.x86.c
97 lines (81 loc) · 2.25 KB
/
dgtpicom.x86.c
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/* functions to communicate to a DGT3000 using I2C
* version 0.8
*
* Copyright (C) 2015 DGT
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
#include <string.h>
#include <pthread.h>
#include <sched.h>
#include "dgtpicom.h"
#include "dgtpicom_dgt3000.h"
int main (int argc, char *argv[]) {
return ERROR_OK;
}
// Get direct access to BCM2708/9 chip.
int dgtpicom_init() {
return ERROR_OK;
}
// Configure the dgt3000.
int dgtpicom_configure() {
return ERROR_OK;
}
// send set and run command to dgt3000
int dgtpicom_set_and_run(char lr, char lh, char lm, char ls,
char rr, char rh, char rm, char rs) {
return ERROR_OK;
}
// Send set and run command to the dgt3000 with current clock values.
int dgtpicom_run(char lr, char rr) {
return ERROR_OK;
}
// Set a text message on the DGT3000.
int dgtpicom_set_text(char text[], char beep, char ld, char rd) {
return ERROR_OK;
}
// End a text message on the DGT3000 an return to clock mode.
int dgtpicom_end_text() {
return ERROR_OK;
}
// Put the last received time message in time[].
void dgtpicom_get_time(char time[]) {
time[0]=0;
time[1]=0;
time[2]=0;
time[3]=0;
time[4]=0;
time[5]=0;
}
// Get a button message from the buffer returns number of messages in
// the buffer or recieve error if one occured.
int dgtpicom_get_button_message(char *buttons, char *time) {
return ERROR_OK;
}
// Return the current button state.
int dgtpicom_get_button_state() {
return dgtRx.lastButtonState;
}
// Turn off the dgt3000.
int dgtpicom_off(char returnMode) {
return ERROR_OK;
}
// Disable the I2C hardware.
void dgtpicom_stop() {
}