-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.h
58 lines (49 loc) · 1.33 KB
/
functions.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
49
50
51
52
53
54
55
56
57
/*
* File: functions.h
* Author: Isabelle
*
* Created on February 20, 2017, 11:36 PM
*/
#ifndef FUNCTIONS_H
#define FUNCTIONS_H
//LCD
void lcdInst(char data);
void lcdNibble(char data);
void initLCD(void);
//I2C
void I2C_Master_Init(const unsigned long c);
void I2C_Master_Wait();
void I2C_Master_Start();
void I2C_Master_RepeatedStart();
void I2C_Master_Write(unsigned d);
unsigned char I2C_Master_Read(unsigned char a);
void I2C_Master_Stop();
void delay_10ms(unsigned char n);
void set_time(void);
void updateTime(void);
//motors
void PWM1(int duty);
void PWM1off();
void PWM2(int duty, int dir);
void PWM2slow(int duty);
void PWM2off();
void updateS1(int mode);
void updateS2(int mode);
void updateS3(int mode);
//void drumCW(void);
//void drumCCW(void);
//interface
signed char eepromRead(signed char address);
void eepromWrite(signed char address, signed char data);
void displayLog(int run);
void homescreen(void);
//void updateEEPROM(int year, int month, int date, int time, int sodaT, int sodaNT, int soupL, int soupNL);
void addRun(int dur, int year, int month, int date, int hours, int mins, int secs, int sodaT, int sodaNT, int soupL, int soupNL);
void keycheck(void);
void keyinterrupt(void);
//logic
int timePassed(int start);
void readADC(char channel);
void startTMR3(void);
void calibrateWheels(void);
#endif /* FUNCTIONS_H */