mail.h

/**********************************************************************
    main.h

    This file is part of the <MyPackage> package

    Copyright (c) 2003 dinux - dinux@mail.bg

    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 2 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, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

**********************************************************************/

/* Macroses, constants, etc*/


#ifndef _MAIN_H_
#define _MAIN_H_

#define CPU_CLOCK	11059200


/* Variable for storing flags and boolean types. Very memory-efficient way to store
 * boolean values. Note that it might be a bit slower though.*/
struct _bitfield {
	unsigned char b0:1;
	unsigned char b1:1;
	unsigned char b2:1;
	unsigned char b3:1;
	unsigned char b4:1;
	unsigned char b5:1;
	unsigned char b6:1;
	unsigned char b7:1;
};

/* If you declare bits_store1 to be of type _bitfield in every module, you
 * can declare some pseudonims for boolean flags.*/
#define some_boolean_var		bits_store1.b0


/* Variable for storing time information */
struct rtc_time {
	unsigned char sec;
	unsigned char min;
	unsigned char hour;
	unsigned char day_of_month;
	unsigned char month;
	unsigned char year;
	unsigned char week_day;
	unsigned char week_num;
};


/* Global IO pin/port definitions */


#endif //_MAIN_H_