summaryrefslogtreecommitdiffstats
path: root/m168_firmware/calibration.h
blob: f3458f67528625e837067e3a18f88360a9f0ff8b (plain)
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
#ifndef WIFI_CALIBRATION_H_
#define WIFI_CALIBRATION_H_

/****************************************************************************
 * Microcontroller CPU speed calibration                                    *
 ****************************************************************************/

/* CPU frequency in HZ */
#define CPU_HZ				12000000
/* 1ms timer calibration */
#define DELAY_1MS_TIMERFREQ		(1 << CS01) /* == CPU_FREQ/8 */
#define DELAY_1MS_LOOP			125
#define DELAY_1MS_LOOP_TIMES		12
/* 1us delayloop calibration */
#define DELAY_1US_LOOP			4
/* System timer calibration. Calibrated to 10Hz */
#define SYSTIMER_TIMERFREQ		((1 << CS10) | (1 << CS12)) /* == CPU_HZ/1024 */
#define SYSTIMER_CMPVAL			1172
#define JIFFIES_PER_SECOND		10
/* The minimum battery percentage when the system will go panic. */
#define MIN_BATTERY_PERCENT		0
/* The number of jiffies the backlight will stay ON. */
#define MAX_BACKL_ON_TIME		(JIFFIES_PER_SECOND * 10)
/* The time in 10-seconds after the last user interaction when the
 * AP-lock will be released. */
#define AP_LOCK_AUTORELEASE_TIMEOUT	((5/*minutes*/  * 60) / 10)


#endif /* WIFI_CALIBRATION_H_ */
bues.ch cgit interface