• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ IOMUX_TO_GPIO函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中IOMUX_TO_GPIO函数的典型用法代码示例。如果您正苦于以下问题:C++ IOMUX_TO_GPIO函数的具体用法?C++ IOMUX_TO_GPIO怎么用?C++ IOMUX_TO_GPIO使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了IOMUX_TO_GPIO函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: headphone_det_status

static int headphone_det_status(void)
{
	if (cpu_is_mx51_rev(CHIP_REV_1_1) == 2)
		return (gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_NANDF_D14)) == 0);

	return gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_NANDF_CS0));
}
开发者ID:fread-ink,项目名称:fread-kernel-k4,代码行数:7,代码来源:mx51_babbage.c


示例2: kzm_init_ext_uart

static int __init kzm_init_ext_uart(void)
{
	u8 tmp;

	/*
	 * GPIO 1-1: external UART interrupt line
	 */
	mxc_iomux_mode(IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO));
	gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1), "ext-uart-int");
	gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1));

	/*
	 * Unmask UART interrupt
	 */
	tmp = __raw_readb(KZM_ARM11_IO_ADDRESS(KZM_ARM11_CTL1));
	tmp |= 0x2;
	__raw_writeb(tmp, KZM_ARM11_IO_ADDRESS(KZM_ARM11_CTL1));

	serial_platform_data[0].irq =
			gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1));
	serial8250_resources[1].start =
			gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1));
	serial8250_resources[1].end =
			gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1));

	return platform_device_register(&serial_device);
}
开发者ID:linux-next,项目名称:linux-next,代码行数:27,代码来源:mach-kzm_arm11_01.c


示例3: efika_usb_phy_reset

/*
 * Reset USB PHY (or PHYs on EfikaSB)
 */
static void efika_usb_phy_reset(void)
{
	/* SMSC 3317 PHY reset */
	gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_EIM_D27), 0);
	udelay(1000);
	gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_EIM_D27), 1);
}
开发者ID:AeroGirl,项目名称:u-boot-kern3.2,代码行数:10,代码来源:efikamx-usb.c


示例4: setup_iomux_spi

static void setup_iomux_spi(void)
{
	/* 000: Select mux mode: ALT0 mux port: MOSI of instance: ecspi1 */
	mxc_request_iomux(MX51_PIN_CSPI1_MOSI, IOMUX_CONFIG_ALT0);
	mxc_iomux_set_pad(MX51_PIN_CSPI1_MOSI,
		PAD_CTL_HYS_ENABLE | PAD_CTL_DRV_HIGH | PAD_CTL_SRE_FAST);

	/* 000: Select mux mode: ALT0 mux port: MISO of instance: ecspi1. */
	mxc_request_iomux(MX51_PIN_CSPI1_MISO, IOMUX_CONFIG_ALT0);
	mxc_iomux_set_pad(MX51_PIN_CSPI1_MISO,
		PAD_CTL_HYS_ENABLE | PAD_CTL_DRV_HIGH | PAD_CTL_SRE_FAST);

	/* Configure SS0 as a GPIO */
	mxc_request_iomux(MX51_PIN_CSPI1_SS0, IOMUX_CONFIG_GPIO);
	gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_CSPI1_SS0), 0);

	/* Configure SS1 as a GPIO */
	mxc_request_iomux(MX51_PIN_CSPI1_SS1, IOMUX_CONFIG_GPIO);
	gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_CSPI1_SS1), 1);

	/* 000: Select mux mode: ALT0 mux port: SS2 of instance: ecspi1. */
	mxc_request_iomux(MX51_PIN_CSPI1_RDY, IOMUX_CONFIG_ALT0);
	mxc_iomux_set_pad(MX51_PIN_CSPI1_RDY,
		PAD_CTL_HYS_ENABLE | PAD_CTL_PKE_ENABLE);

	/* 000: Select mux mode: ALT0 mux port: SCLK of instance: ecspi1. */
	mxc_request_iomux(MX51_PIN_CSPI1_SCLK, IOMUX_CONFIG_ALT0);
	mxc_iomux_set_pad(MX51_PIN_CSPI1_SCLK,
		PAD_CTL_HYS_ENABLE | PAD_CTL_DRV_HIGH | PAD_CTL_SRE_FAST);
}
开发者ID:Apaisal,项目名称:u-boot,代码行数:30,代码来源:efikamx.c


示例5: mx31moboard_marxbot_init

/*
 * system init for baseboard usage. Will be called by mx31moboard init.
 */
void __init mx31moboard_marxbot_init(void)
{
	printk(KERN_INFO "Initializing mx31marxbot peripherals\n");

	mxc_iomux_setup_multiple_pins(marxbot_pins, ARRAY_SIZE(marxbot_pins),
		"marxbot");

	marxbot_init_sel_gpios();

	dspics_resets_init();

	mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata);

	spi_register_board_info(marxbot_spi_board_info,
		ARRAY_SIZE(marxbot_spi_board_info));

	marxbot_cam_init();
	platform_add_devices(marxbot_cameras, ARRAY_SIZE(marxbot_cameras));

	/* battery present pin */
	gpio_request(IOMUX_TO_GPIO(MX31_PIN_LCS0), "bat-present");
	gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_LCS0));
	gpio_export(IOMUX_TO_GPIO(MX31_PIN_LCS0), false);

	mxc_register_device(&mxc_otg_udc_device, &usb_pdata);

	marxbot_usbh1_init();
}
开发者ID:0-t,项目名称:samsung-kernel-msm7x30,代码行数:31,代码来源:mx31moboard-marxbot.c


示例6: mx50_yoshi_gpio_spi_chipselect_active

void mx50_yoshi_gpio_spi_chipselect_active(int cspi_mode, int status,
		                             int chipselect)
{
	switch (cspi_mode) {
	case 1:
		break;
	case 2:
		break;
	case 3:
		switch (chipselect) {
		case 0x1:
		        /* enable ss0 */
		        mxc_request_iomux(MX50_PIN_CSPI_SS0, IOMUX_CONFIG_ALT0);
		        /*disable other ss */
		        mxc_request_iomux(MX50_PIN_ECSPI1_MOSI, IOMUX_CONFIG_GPIO);
		        /* pull up/down deassert it */
		        gpio_direction_input(IOMUX_TO_GPIO(MX50_PIN_ECSPI1_MOSI));
		        break;
		case 0x2:
		        /* enable ss1 */
		        mxc_request_iomux(MX50_PIN_ECSPI1_MOSI, IOMUX_CONFIG_ALT2);
		        /*disable other ss */
		        mxc_request_iomux(MX50_PIN_CSPI_SS0, IOMUX_CONFIG_GPIO);
		        /* pull up/down deassert it */
		        gpio_direction_input(IOMUX_TO_GPIO(MX50_PIN_CSPI_SS0));
		        break;
		default:
		        break;
		}
		break;

	default:
		break;
	}
}
开发者ID:twobob,项目名称:KK_kernel,代码行数:35,代码来源:mx50_yoshi_gpio.c


示例7: mx31lite_late

static void __init mx31lite_late(void)
{
	int ret;

	if (mx31lite_baseboard == MX31LITE_DB)
		mx31lite_db_init();

	mc13783_spi_dev.irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3));
	spi_register_board_info(&mc13783_spi_dev, 1);

	/* USB */
	usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
			ULPI_OTG_DRVVBUS_EXT);
	if (usbh2_pdata.otg)
		imx31_add_mxc_ehci_hs(2, &usbh2_pdata);

	/* SMSC9117 IRQ pin */
	ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq");
	if (ret)
		pr_warn("could not get LAN irq gpio\n");
	else {
		gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_SFS6));
		smsc911x_resources[1].start =
			gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_SFS6));
		smsc911x_resources[1].end =
			gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_SFS6));
		platform_device_register(&smsc911x_device);
	}
}
开发者ID:01org,项目名称:thunderbolt-software-kernel-tree,代码行数:29,代码来源:mach-mx31lite.c


示例8: gpio_watchdog_low

/* Called during ship mode */
void gpio_watchdog_low(void)
{
	printk(KERN_CRIT "Halting ...\n");

	/* configure the PMIC for WDIRESET */
	pmic_write_reg(REG_POWER_CTL2, (0 << WDIRESET_LSH), (1 << WDIRESET_LSH));

	/* Turn on RESTARTEN */
	pmic_write_reg(REG_POWER_CTL2, (1 << RESTARTEN_LSH), (1 << RESTARTEN_LSH));

	/* Free WDOG as ALT2 */
	mxc_free_iomux(MX50_PIN_WDOG, IOMUX_CONFIG_ALT2);

	/* Re-request as GPIO */
	mxc_request_iomux(MX50_PIN_WDOG, IOMUX_CONFIG_ALT1);

	/* Pad settings */
	mxc_iomux_set_pad(MX50_PIN_WDOG, PAD_CTL_HYS_NONE | PAD_CTL_PKE_NONE |
				PAD_CTL_DRV_HIGH | PAD_CTL_ODE_OPENDRAIN_NONE);

	/* Enumerate */
	gpio_request(IOMUX_TO_GPIO(MX50_PIN_WDOG), "wdog");

	/* Direction output */
	gpio_direction_output(IOMUX_TO_GPIO(MX50_PIN_WDOG), 0);

	/* Set low */
	gpio_set_value(IOMUX_TO_GPIO(MX50_PIN_WDOG), 0);
}
开发者ID:twobob,项目名称:KK_kernel,代码行数:30,代码来源:mx50_yoshi_gpio.c


示例9: si4702_reset

void si4702_reset(void)
{
	gpio_set_value(IOMUX_TO_GPIO(MX31_PIN_SRST0), 0);
	msleep(100);
	gpio_set_value(IOMUX_TO_GPIO(MX31_PIN_SRST0), 1);
	msleep(100);
}
开发者ID:vasubabu,项目名称:kernel,代码行数:7,代码来源:mx3_3stack.c


示例10: qong_nand_select_chip

static void qong_nand_select_chip(struct mtd_info *mtd, int chip)
{
	if (chip >= 0)
		gpio_set_value(IOMUX_TO_GPIO(MX31_PIN_NFCE_B), 0);
	else
		gpio_set_value(IOMUX_TO_GPIO(MX31_PIN_NFCE_B), 1);
}
开发者ID:dileepgithub,项目名称:linux-2.6,代码行数:7,代码来源:mach-qong.c


示例11: si4702_reset

static void si4702_reset(void)
{
	gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_EIM_DTACK), 0);
	msleep(100);
	gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_EIM_DTACK), 1);
	msleep(100);
}
开发者ID:babupeople,项目名称:linux-2.6.35.3-imx53,代码行数:7,代码来源:mx51_3stack.c


示例12: moboard_uart0_init

static void __init moboard_uart0_init(void)
{
	if (!gpio_request(IOMUX_TO_GPIO(MX31_PIN_CTS1), "uart0-cts-hack")) {
		gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CTS1), 0);
		gpio_free(IOMUX_TO_GPIO(MX31_PIN_CTS1));
	}
}
开发者ID:7799,项目名称:linux,代码行数:7,代码来源:mach-mx31moboard.c


示例13: mx53_gpio_host1_driver_vbus

void mx53_gpio_host1_driver_vbus(bool on)
{
	if (on)
		gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_ATA_DA_2), 1);
	else
		gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_ATA_DA_2), 0);
}
开发者ID:fread-ink,项目名称:fread-kernel-k4,代码行数:7,代码来源:mx53_evk_gpio.c


示例14: gpio_cs42888_pdwn

void gpio_cs42888_pdwn(int pdwn)
{
	if (pdwn)
		gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_12), 0);
	else
		gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_12), 1);
}
开发者ID:fread-ink,项目名称:fread-kernel-k4,代码行数:7,代码来源:mx53_evk_gpio.c


示例15: flexcan_xcvr_enable

void flexcan_xcvr_enable(int id, int en)
{
	static int pwdn;
	if (id < 0 || id > 1)
		return;

	if (en) {
		if (!(pwdn++))
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_19), 1);

		if (id == 0) {
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_18), 1);
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_17), 1);
		} else {
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_CSI0_D6), 1);
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_14), 1);
		}

	} else {
		if (!(--pwdn))
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_19), 0);

		if (id == 0) {
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_18), 0);
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_17), 0);
		} else {
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_CSI0_D6), 0);
			gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_GPIO_14), 0);
		}
	}
}
开发者ID:fread-ink,项目名称:fread-kernel-k4,代码行数:31,代码来源:mx53_evk_gpio.c


示例16: si4702_reset

static void si4702_reset(void)
{
	return;
	gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_EIM_A21), 0);
	msleep(100);
	gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_EIM_A21), 1);
	msleep(100);
}
开发者ID:fread-ink,项目名称:fread-kernel-k4,代码行数:8,代码来源:mx51_babbage.c


示例17: gpio_wan_power

void gpio_wan_power(int enable)
{
	/* Set the direction to output */
	gpio_direction_output(IOMUX_TO_GPIO(MX50_PIN_EIM_RW), 0);

	/* Enable/disable power */
	gpio_set_value(IOMUX_TO_GPIO(MX50_PIN_EIM_RW), enable);
}
开发者ID:twobob,项目名称:KK_kernel,代码行数:8,代码来源:mx50_yoshi_gpio.c


示例18: gpio_chrgled_active

void gpio_chrgled_active(int enable)
{
	if (charger_led_state != enable) {
		gpio_direction_output(IOMUX_TO_GPIO(MX50_PIN_EIM_DA2), 0);
		gpio_set_value(IOMUX_TO_GPIO(MX50_PIN_EIM_DA2), !enable);

		charger_led_state = enable;
	}
}
开发者ID:twobob,项目名称:KK_kernel,代码行数:9,代码来源:mx50_yoshi_gpio.c


示例19: efika_usb_hub_reset

/*
 * Reset USB HUB (or HUBs on EfikaSB)
 */
static void efika_usb_hub_reset(void)
{
	/* HUB reset */
	gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_GPIO1_5), 1);
	udelay(1000);
	gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_5), 0);
	udelay(1000);
	gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_5), 1);
}
开发者ID:AeroGirl,项目名称:u-boot-kern3.2,代码行数:12,代码来源:efikamx-usb.c


示例20: mx51_efikamx_reboot

int mx51_efikamx_reboot(void)
{
	if ( machine_is_mx51_efikamx() && (mx51_efikamx_revision() == 1) ) /* board rev1.1 */
		gpio_direction_output(IOMUX_TO_GPIO(EFIKAMX_WATCHDOG_REBOOT), 0);
	else
		gpio_direction_output(IOMUX_TO_GPIO(EFIKASB_WATCHDOG_REBOOT), 0);

	return 0;
}
开发者ID:fwmfee,项目名称:linux-legacy,代码行数:9,代码来源:mx51_efikamx_pmic.c



注:本文中的IOMUX_TO_GPIO函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IOMUX_TO_IRQ函数代码示例发布时间:2022-05-30
下一篇:
C++ IOMUX_MODE函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap