-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathformdata.h
60 lines (48 loc) · 1.08 KB
/
formdata.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
58
59
60
/*
* FormData.h
*
* Created on: Oct 29, 2009
* Author: Nancy Minderman
*/
#ifndef FORMDATA_H_
#define FORMDATA_H_
#include <basictypes.h>
#include <ucos.h>
#include "LCD.h"
#ifndef LCD_STRING_LENGTH
#define LCD_STRING_LENGTH 48
#endif
class FormData {
public:
FormData();
virtual ~FormData();
void Init(void);
// Motor Info
void SetMotorRotations(char * rot);
DWORD GetMotorRotations(void);
void SetMotorDirection(char * dir);
BYTE GetMotorDirection(void);
void SetMotorMode(BYTE mode);
BYTE GetMotorMode(void);
// LCD Info
void SetLCDString (char * str);
char * GetLCDString (void);
// Keypad Info
void SetKeypadKey(BYTE key);
BYTE GetKeypadKey(void);
// AD segment info for bar graph display
void SetADSegment(BYTE seg);
BYTE GetADSegment(void);
// Lock/Unlock methods for resource management
void Lock(void);
void Unlock(void);
private:
DWORD dword_motor_rotations;
BYTE byte_motor_direction;
BYTE byte_motor_mode;
char str_LCD[LCD_STRING_LENGTH + 1];
BYTE byte_keypad_key_number;
BYTE byte_AD_segment;
OS_SEM sem_form;
};
#endif /* FORMDATA_H_ */