|
h файл
/* Data type definitions */typedef
enum // Student working place state
{
ALONE=0, //
PAIR, // in pair
GROUP, // in group
CONF // in coference
}
State;typedef enum { // LED display color types
CL_NONE = 0,
CL_RED,
CL_GREEN,
CL_YELLOW,
CL_G_BLINKED, // Blinked green
CL_R_BLINKED, // Blinked red
CL_RED_GREEN // Alternative red / green
}
Color;typedef struct { // Student work place data
State state:2; // The place state
Color color:3; // LED color
char selct:1; // The place selection: ON / OFF
char mike:1; // Microphone state: ON / OFF
char inspct:1; // Teacher inspection: ON / OFF
}
Student;typedef Student Teacher; // The same work place as Student one
typedef Student Input;typedef struct { // Interrupt flags
char TickBit:1; // System clock flag
char KeypadBit:1; // Keypad scan flag
char BlinkBit:1; // LED blinked flag
}
Int_FLAGS;/* Global variable references */
//
// Register variables
//
__regvar __no_init volatile Int_FLAGS IntFlags @ 15; // Various interrupt flags
__regvar __no_init Teacher teacher @ 11; // Teacher's work place
//
// Program flash memory variables
//
extern __flash Color ColorTable[];
//
// SRAM variables
//
extern Student Students[NSTUDENTS]; // Student working places
extern Input Inputs[NINPUTS];
/* Global data */Student Students[NSTUDENTS]; // Student working places
static
Student Save[NSTUDENTS]; // Save buffer
E-mail: info@telesys.ru