亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? beeper.c

?? uboot for at91rm9200dk
?? C
字號:
/* * (C) Copyright 2002 * Keith Outwater, keith_outwater@mvis.com * * See file CREDITS for list of people who contributed to this * project. * * 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 */#include <common.h>#include <mpc8xx.h>#include <asm/8xx_immap.h>#include <linux/ctype.h>/* * Basic beeper support for the GEN860T board.  The GEN860T includes * an audio sounder driven by a Phillips TDA8551 amplifier.  The * TDA8551 features a digital volume control which uses a "trinary" * input (high/high-Z/low) to set volume.  The 860's SPKROUT pin * drives the amplifier input. *//* * Initialize beeper-related hardware. Initialize timer 1 for use with * the beeper. Use 66 Mhz internal clock with prescale of 33 to get * 1 uS period per count. * FIXME: we should really compute the prescale based on the reported * core clock frequency. */voidinit_beeper(void){    volatile immap_t *immap  = (immap_t *)CFG_IMMR;	immap->im_cpmtimer.cpmt_tgcr &= ~TGCR_RST1 | TGCR_STP1;	immap->im_cpmtimer.cpmt_tmr1 = ((33 << TMR_PS_SHIFT) & TMR_PS_MSK)								 | TMR_OM | TMR_FRR | TMR_ICLK_IN_GEN;	immap->im_cpmtimer.cpmt_tcn1 = 0;	immap->im_cpmtimer.cpmt_ter1 = 0xffff;	immap->im_cpmtimer.cpmt_tgcr |= TGCR_RST1;}/* * Set beeper frequency.  Max allowed frequency is 2.5 KHz.  This limit * is mostly arbitrary, but the beeper isn't really much good beyond this * frequency. */voidset_beeper_frequency(uint frequency){#define FREQ_LIMIT	2500    volatile immap_t *immap  = (immap_t *)CFG_IMMR;	/*	 * Compute timer ticks given desired frequency.  The timer is set up	 * to count 0.5 uS per tick and it takes two ticks per cycle (Hz).	 */	if (frequency > FREQ_LIMIT) frequency = FREQ_LIMIT;	frequency = 1000000/frequency;	immap->im_cpmtimer.cpmt_trr1 = (ushort)frequency;}/* * Turn the beeper on */voidbeeper_on(void){    volatile immap_t *immap  = (immap_t *)CFG_IMMR;	immap->im_cpmtimer.cpmt_tgcr &= ~TGCR_STP1;}/* * Turn the beeper off */voidbeeper_off(void){    volatile immap_t *immap  = (immap_t *)CFG_IMMR;	immap->im_cpmtimer.cpmt_tgcr |= TGCR_STP1;}/* * Increase or decrease the beeper volume.  Volume can be set * from off to full in 64 steps.  To increase volume, the output * pin is actively driven high, then returned to tristate. * To decrease volume, output a low on the port pin (no need to * change pin mode to tristate) then output a high to go back to * tristate. */voidset_beeper_volume(int steps){    volatile immap_t *immap  = (immap_t *)CFG_IMMR;	int i;	if (steps >= 0) {		for (i = 0; i < (steps >= 64 ? 64 : steps); i++) {			immap->im_cpm.cp_pbodr &= ~(0x80000000 >> 19);			udelay(1);			immap->im_cpm.cp_pbodr |= (0x80000000 >> 19);			udelay(1);		}	}	else {		for (i = 0; i > (steps <= -64 ? -64 : steps); i--) {			immap->im_cpm.cp_pbdat &= ~(0x80000000 >> 19);			udelay(1);			immap->im_cpm.cp_pbdat |= (0x80000000 >> 19);			udelay(1);		}	}}/* * Check the environment to see if the beeper needs beeping. * Controlled by a sequence of the form: * freq/delta volume/on time/off time;... where: * freq 		= frequency in Hz (0 - 2500) * delta volume = volume steps up or down (-64 <= vol <= 64) * on time		= time in mS * off time		= time in mS * * Return 1 on success, 0 on failure */intdo_beeper(char *sequence){#define DELIMITER	';'int args[4];int i;int val;char *p = sequence;char *tp;	/*	 * Parse the control sequence.  This is a really simple parser	 * without any real error checking.  You can probably blow it	 * up really easily.	 */	if (*p == '\0' || !isdigit(*p)) {		printf("%s:%d: null or invalid string (%s)\n",				__FILE__, __LINE__, p);		return 0;	}	i = 0;	while (*p != '\0') {		while (*p != DELIMITER) {			if (i > 3) i = 0;			val = (int) simple_strtol(p, &tp, 0);			if (tp == p) {				printf("%s:%d: no digits or bad format\n",								__FILE__,__LINE__);				return 0;			}			else {				args[i] = val;			}			i++;			if (*tp == DELIMITER)				p = tp;			else				p = ++tp;		}		p++;		/*		 * Well, we got something that has a chance of being correct		 */#if 0		for (i = 0; i < 4; i++) {			printf("%s:%d:arg %d = %d\n", __FILE__, __LINE__, i, args[i]);		}		printf("\n");#endif		set_beeper_frequency(args[0]);		set_beeper_volume(args[1]);		beeper_on();		udelay(1000 * args[2]);		beeper_off();		udelay(1000 * args[3]);	}	return 1;}/* vim: set ts=4 sw=4 tw=78: */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品一二三四| 亚洲一区二区三区四区在线免费观看 | 国产精品卡一卡二卡三| 精品剧情在线观看| 日韩美女天天操| 一本一道综合狠狠老| 色偷偷久久一区二区三区| 在线观看日韩毛片| 亚洲mv大片欧洲mv大片精品| 日日欢夜夜爽一区| 99国产精品久| 国产主播一区二区三区| 欧美亚洲另类激情小说| 日韩女优制服丝袜电影| 日韩视频一区二区三区| 国产精品久久久久久久久免费桃花| 奇米色一区二区| 国内一区二区在线| 欧美人与z0zoxxxx视频| 亚洲午夜成aⅴ人片| 欧美国产成人在线| 精品欧美乱码久久久久久1区2区| 亚洲一区二区中文在线| 69堂精品视频| av一区二区三区黑人| 亚洲视频在线一区| 3atv在线一区二区三区| 亚洲成人福利片| 日韩欧美激情在线| 樱桃国产成人精品视频| 国产一区二区精品久久91| 日本一区二区三区视频视频| 99久久婷婷国产综合精品电影 | 老司机午夜精品99久久| 久久久久国产一区二区三区四区 | 国产高清视频一区| 综合色中文字幕| 91精品国产一区二区三区香蕉| 欧美视频在线一区二区三区| 99久久夜色精品国产网站| 中文字幕日韩av资源站| 色悠悠久久综合| 欧美日韩国产一二三| 日韩在线a电影| 欧美老肥妇做.爰bbww| 国产精品免费aⅴ片在线观看| 色综合一区二区三区| 九色综合狠狠综合久久| 综合在线观看色| 蜜臀av性久久久久蜜臀aⅴ| 亚洲欧洲精品天堂一级| 久久九九久精品国产免费直播| 欧美成人猛片aaaaaaa| 欧美日韩aaa| 99久久国产免费看| 极品销魂美女一区二区三区| 亚洲精品久久7777| 亚洲精品一二三| 日韩综合一区二区| 免费精品视频在线| 亚洲三级电影网站| 肉肉av福利一精品导航| 一区二区三区精品视频| 国产综合色在线视频区| 色婷婷亚洲精品| 欧美日韩国产一二三| 国产亚洲综合av| 911精品国产一区二区在线| 国产精品自拍av| 成人美女视频在线观看18| 久久你懂得1024| 欧美大尺度电影在线| 久久久久国产精品厨房| 亚洲视频图片小说| 在线影视一区二区三区| 日韩精品一区二区三区老鸭窝| 国产色产综合产在线视频| 欧美亚洲一区二区在线| hitomi一区二区三区精品| 精品日韩一区二区三区| 午夜私人影院久久久久| 激情五月婷婷综合| 欧美专区在线观看一区| 2021国产精品久久精品| 99riav一区二区三区| 九九精品一区二区| 国产激情偷乱视频一区二区三区| 亚洲视频中文字幕| 久久不见久久见免费视频7| www.日本不卡| 国产亚洲一区二区三区在线观看| 成人精品亚洲人成在线| 欧美日韩在线直播| 日韩一级二级三级精品视频| 欧美私人免费视频| 国产精品久久久久一区二区三区 | 久久精品一区蜜桃臀影院| 亚洲成人激情av| 成人av免费在线观看| 日韩亚洲欧美一区| 国产精品综合二区| 亚洲色图.com| 国产日韩三级在线| 国产成人欧美日韩在线电影| 亚洲黄色录像片| 日韩中文欧美在线| 日韩网站在线看片你懂的| 日韩国产精品久久久| 欧美一级日韩一级| 日韩欧美一区二区视频| 日韩黄色免费网站| 国产调教视频一区| 91网址在线看| 欧美三级电影网| 91视频在线看| 日韩中文欧美在线| 一区二区三区.www| 亚洲欧美一区二区三区国产精品| 精品视频一区二区不卡| 国产精品99久久久久久久vr| 精品无人区卡一卡二卡三乱码免费卡| 91精品国产91久久综合桃花| www.欧美.com| 国产成人精品网址| 久久久不卡影院| 欧美在线一二三| 欧美日韩成人在线一区| 日韩综合在线视频| 欧美日韩国产综合久久| 成人午夜精品在线| 国产一区二区不卡在线| 国产一区二区久久| 久久亚洲一级片| 精品国产电影一区二区| 久久奇米777| 久久久久久麻豆| 亚洲日本韩国一区| 91精品一区二区三区在线观看| 色综合色综合色综合| 91麻豆6部合集magnet| 亚洲欧美日韩国产综合| 国产精品久久久久久久久久久免费看 | 欧美日韩国产a| 91蜜桃网址入口| 国产在线播精品第三| 美女视频一区二区三区| 麻豆精品蜜桃视频网站| 奇米综合一区二区三区精品视频| 丝袜美腿亚洲一区二区图片| 国产一区二区免费视频| 色综合 综合色| 7777精品伊人久久久大香线蕉| 青草国产精品久久久久久| 久久av中文字幕片| 国产a视频精品免费观看| 91蜜桃视频在线| 亚洲成av人综合在线观看| 视频一区在线播放| 免费欧美在线视频| 成人性生交大片免费看视频在线 | 日本美女一区二区| 99re8在线精品视频免费播放| 有码一区二区三区| 亚洲一区视频在线| 粉嫩av一区二区三区粉嫩| 精品少妇一区二区三区日产乱码| 99久久精品免费看| 国产亚洲综合色| 国产福利一区二区| 欧美放荡的少妇| 国产精品久久久久久久久久久免费看| 欧美日韩国产区一| 麻豆国产欧美一区二区三区| 欧美久久久久久久久久| 亚洲欧美日韩电影| 自拍偷自拍亚洲精品播放| 国产传媒一区在线| 日韩欧美黄色影院| 国产精品99久久久久久久vr| 国产精品国产三级国产a| 亚洲精品一区二区三区影院| 中文字幕一区二区三区在线不卡| 成人激情黄色小说| 亚洲另类在线一区| 日韩欧美二区三区| 久久久99久久| 欧美体内she精视频| 国产原创一区二区| 中文字幕av一区二区三区高 | 日本一区二区三区在线观看| 粉嫩aⅴ一区二区三区四区| 亚洲九九爱视频| 亚洲mv大片欧洲mv大片精品| 国产亚洲女人久久久久毛片| 欧美男男青年gay1069videost| 久久精品免费观看| 不卡视频一二三| 五月天精品一区二区三区| 精品日产卡一卡二卡麻豆| 91视频精品在这里|