本文整理汇总了C++中setup_i2c函数的典型用法代码示例。如果您正苦于以下问题:C++ setup_i2c函数的具体用法?C++ setup_i2c怎么用?C++ setup_i2c使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setup_i2c函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: board_init
int board_init(void)
{
/* address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info_loc);
setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info3);
#if defined(CONFIG_VIDEO_IPUV3)
setup_display();
#endif
#ifdef CONFIG_TDX_CMD_IMX_MFGR
(void) pmic_init();
#endif
#ifdef CONFIG_SATA
setup_sata();
#endif
setup_iomux_gpio();
return 0;
}
开发者ID:PlanetEater,项目名称:uboot-nsa320,代码行数:25,代码来源:apalis_imx6.c
示例2: board_init
int board_init(void)
{
/* address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
#ifdef CONFIG_MXC_SPI
setup_spi();
#endif
imx_iomux_v3_setup_multiple_pads(
usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
imx_iomux_v3_setup_multiple_pads(i2c0_mux_pads,
ARRAY_SIZE(i2c0_mux_pads));
imx_iomux_v3_setup_multiple_pads(
gpio_pads, ARRAY_SIZE(gpio_pads));
gpio_direction_output(IMX_GPIO_NR(1, 7),0); /* GPIO7 */
gpio_direction_output(IMX_GPIO_NR(1, 8),0); /* GPIO8 */
gpio_direction_input(IMX_GPIO_NR(7, 13)); /* GPIO18 */
gpio_direction_input(IMX_GPIO_NR(4, 5)); /* GPIO19 */
gpio_direction_output(IMX_GPIO_NR(3, 29), 1); /* EIM_D29: ONOFF */
gpio_direction_output(IMX_GPIO_NR(3,20),0);
gpio_direction_output(IMX_GPIO_NR(2,23),1); /* enable RTC */
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info0);
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
return 0;
}
开发者ID:rcoscali,项目名称:bootable-bootloader-uboot-imx,代码行数:28,代码来源:sp.c
示例3: i2c_setup_iomux
static void i2c_setup_iomux(void)
{
if (is_cpu_type(MXC_CPU_MX6Q))
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c_pad_info0);
else
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info0);
}
开发者ID:asebak,项目名称:bbbandroid-u-boot,代码行数:7,代码来源:gw_ventana_spl.c
示例4: board_init
int board_init(void)
{
/* Address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
#ifdef CONFIG_SYS_I2C_MXC
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info3);
#endif
/* Reset CPU_PER_RST_B signal for enet phy and PCIE */
port_exp_direction_output(CPU_PER_RST_B, 0);
udelay(500);
port_exp_direction_output(CPU_PER_RST_B, 1);
/* Set steering signal to L for selecting B0 */
port_exp_direction_output(STEER_ENET, 0);
#ifdef CONFIG_USB_EHCI_MX6
setup_usb();
#endif
#ifdef CONFIG_FSL_QSPI
board_qspi_init();
#endif
#ifdef CONFIG_NAND_MXS
setup_gpmi_nand();
#endif
return 0;
}
开发者ID:0xFelix,项目名称:u-boot-edminiv2,代码行数:32,代码来源:mx6sxsabreauto.c
示例5: board_init
int board_init(void)
{
struct iomuxc *const iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;
clrsetbits_le32(&iomuxc_regs->gpr[1],
IOMUXC_GPR1_OTG_ID_MASK,
IOMUXC_GPR1_OTG_ID_GPIO1);
imx_iomux_v3_setup_multiple_pads(misc_pads, ARRAY_SIZE(misc_pads));
/* address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
#ifdef CONFIG_MXC_SPI
setup_spi();
#endif
imx_iomux_v3_setup_multiple_pads(
usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info0);
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
#ifdef CONFIG_CMD_SATA
setup_sata();
#endif
return 0;
}
开发者ID:ehamine,项目名称:u-boot,代码行数:28,代码来源:nitrogen6x.c
示例6: board_init
int board_init(void)
{
/* address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
/* I2C 2 and 3 setup - I2C 3 hw mux with EIM */
if (is_mx6dq() || is_mx6dqp())
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c_pad_info1);
else
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info1);
/* I2C 3 Steer */
gpio_direction_output(IMX_GPIO_NR(5, 4), 1);
SETUP_IOMUX_PADS(i2c3_pads);
#ifndef CONFIG_SYS_FLASH_CFI
if (is_mx6dq() || is_mx6dqp())
setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c_pad_info2);
else
setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info2);
#endif
gpio_direction_output(IMX_GPIO_NR(1, 15), 1);
SETUP_IOMUX_PADS(port_exp);
#ifdef CONFIG_VIDEO_IPUV3
setup_display();
#endif
#ifdef CONFIG_MTD_NOR_FLASH
setup_iomux_eimnor();
#endif
return 0;
}
开发者ID:analogdevicesinc,项目名称:u-boot-xlnx,代码行数:31,代码来源:mx6sabreauto.c
示例7: platinum_setup_i2c
int platinum_setup_i2c(void)
{
imx_iomux_v3_setup_multiple_pads(i2c0_mux_pads,
ARRAY_SIZE(i2c0_mux_pads));
imx_iomux_v3_setup_multiple_pads(i2c2_mux_pads,
ARRAY_SIZE(i2c2_mux_pads));
mdelay(10);
/* Disable i2c mux 0 */
gpio_direction_output(GPIO_I2C0_SEL0, 0);
gpio_direction_output(GPIO_I2C0_SEL1, 0);
gpio_direction_output(GPIO_I2C0_ENBN, 1);
/* Disable i2c mux 1 */
gpio_direction_output(GPIO_I2C2_SEL0, 0);
gpio_direction_output(GPIO_I2C2_SEL1, 0);
gpio_direction_output(GPIO_I2C2_ENBN, 1);
udelay(10);
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info0);
setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
/* Disable all leds */
i2c_set_bus_num(0);
i2c_reg_write(0x60, 0x05, 0x55);
return 0;
}
开发者ID:OpenNoah,项目名称:u-boot,代码行数:30,代码来源:platinum_picon.c
示例8: board_init
int board_init(void)
{
/* address of boot parameters */
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
#ifdef CONFIG_VIDEO_IPUV3
setup_display();
#endif
#ifdef CONFIG_SYS_I2C
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info0);
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
#endif
#ifdef CONFIG_DWC_AHSATA
setup_sata();
#endif
#ifdef CONFIG_CMD_BMODE
add_board_boot_modes(board_boot_modes);
#endif
#ifdef CONFIG_USB_EHCI_MX6
imx_iomux_v3_setup_multiple_pads(
usb_otg_pads, ARRAY_SIZE(usb_otg_pads));
#endif
return 0;
}
开发者ID:01hyang,项目名称:u-boot,代码行数:25,代码来源:tbs2910.c
示例9: board_init
int board_init(void)
{
/* address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
return 0;
}
开发者ID:Digilent,项目名称:u-boot-digilent,代码行数:10,代码来源:el6x.c
示例10: board_early_init_f
int board_early_init_f(void)
{
setup_iomux_uart();
#ifdef CONFIG_SYS_I2C_MXC
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
#endif
return 0;
}
开发者ID:KunYi,项目名称:uboot-samx6i,代码行数:11,代码来源:mx7d_19x19_lpddr3_arm2.c
示例11: board_init
int board_init(void)
{
/* address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
#ifdef CONFIG_MXC_SPI
setup_spi();
#endif
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info0);
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
return 0;
}
开发者ID:DFE,项目名称:u-boot,代码行数:15,代码来源:dres0280.c
示例12: board_init
int board_init(void)
{
/* Address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
setup_i2c(3, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info4);
setup_fec(CONFIG_FEC_ENET_DEV);
setup_usb();
return 0;
}
开发者ID:bradfa,项目名称:u-boot,代码行数:15,代码来源:xpress.c
示例13: board_init
int board_init(void)
{
/* address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
#if defined(CONFIG_VIDEO_IPUV3)
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c2_pad_info);
if (is_mx6dq())
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c2_pad_info);
else
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c2_pad_info);
#endif
return 0;
}
开发者ID:Digilent,项目名称:u-boot-digilent,代码行数:15,代码来源:wandboard.c
示例14: board_init
int board_init(void)
{
/* address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
/* i2c1 : PMIC, Audio codec on RiOT, Expansion connector on MarS */
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
/* i2c2 : HDMI EDID */
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
/* i2c3 : LVDS, Expansion connector */
setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info3);
#ifdef CONFIG_MXC_SPI
setup_spi();
#endif
return 0;
}
开发者ID:RowanLiu,项目名称:ported_uboot,代码行数:15,代码来源:mx6boards.c
示例15: main
int main(void)
{
unsigned char ret;
DDRB = 0xff; // use all pins on port B for output
PORTB = 0x00; // (LED's low & off)
i2c_init(); // init I2C interface
ret = i2c_start(DevSSD1306+I2C_WRITE); // set device address and write mode
if ( ret ) {
/* failed to issue start condition, possibly no device found */
i2c_stop();
PORTB=0xff; // activate all 8 LED to show error */
}
else {
/* issuing start condition ok, device accessible */
setup_i2c();
setup_adc();
}
for(;;){
clearBuffer(buffer);
// get accelerometer values
sample_adc_channel(1);
sample_adc_channel(2);
sample_adc_channel(3);
PORTB=0x00;
drawBuffer(0, 0, buffer);
PORTB=0xFF;
_delay_ms(500);
}
}
开发者ID:umotes,项目名称:avr-clean-new,代码行数:35,代码来源:volt_ssd.c
示例16: board_init
int board_init(void)
{
/* Address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
imx_iomux_v3_setup_multiple_pads(iox_pads, ARRAY_SIZE(iox_pads));
iox74lv_init();
#ifdef CONFIG_SYS_I2C_MXC
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
#endif
#ifdef CONFIG_FEC_MXC
setup_fec(CONFIG_FEC_ENET_DEV);
#endif
#ifdef CONFIG_USB_EHCI_MX6
setup_usb();
#endif
#ifdef CONFIG_FSL_QSPI
board_qspi_init();
#endif
#ifdef CONFIG_VIDEO_MXS
setup_lcd();
#endif
return 0;
}
开发者ID:OpenPhoenux,项目名称:gta04-uboot,代码行数:31,代码来源:mx6ul_14x14_evk.c
示例17: main
int main(void) {
// initialization
initIO();
startupSequence();
startupSequence();
// _delay_ms(100);
// TOGGLE_STATUS;
// _delay_ms(100);
// TOGGLE_STATUS;
// spin until position received from connected block (or BBB)
uint8_t addr = waitForVector();
// assign function pointer to use custom data-collector function
getData_ptr gData = getMyData;
sendHorizontal_ptr sHoriz = sendRight;
sendHorizontal_ptr sVert = sendUp;
// assign received vector to i2c initialization
setup_i2c(addr, gData, sHoriz, sVert, 0, 0);
forwardChain();
STATUS_PORT &= ~_BV(STATUS_LED);
sei();
// continuously poll i2c for commands
while (loop_i2c()) {
advanceVector();
// _delay_ms(200);
// TOGGLE_STATUS;
}
return 0; // never reached
}
开发者ID:erebus-labs,项目名称:blocks-o-code,代码行数:35,代码来源:main.c
示例18: board_late_init
int board_late_init(void)
{
setup_i2c(1);
power_init();
return 0;
}
开发者ID:AshishNamdev,项目名称:u-boot,代码行数:7,代码来源:mx53evk.c
示例19: board_init
int board_init(void)
{
int i;
struct i2c_pads_info *p = i2c_pads + i2c_get_info_entry_offset();
struct iomuxc *const iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;
clrsetbits_le32(&iomuxc_regs->gpr[1],
IOMUXC_GPR1_OTG_ID_MASK,
IOMUXC_GPR1_OTG_ID_GPIO1);
/* address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
for (i = 0; i < 3; i++) {
setup_i2c(i, CONFIG_SYS_I2C_SPEED, 0x7f, p);
p += I2C_PADS_INFO_ENTRY_SPACING;
}
#ifdef CONFIG_CMD_SATA
setup_sata();
#endif
#ifdef CONFIG_CMD_FBPANEL
fbp_setup_display(displays, ARRAY_SIZE(displays));
#endif
return 0;
}
开发者ID:abbasraza,项目名称:u-boot-imx6,代码行数:25,代码来源:per.c
示例20: board_init
int board_init(void)
{
struct i2c_pads_info *p = i2c_pads + i2c_get_info_entry_offset();
/* address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, p);
p += I2C_PADS_INFO_ENTRY_SPACING;
setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, p);
#ifdef CONFIG_CMD_SATA
setup_sata();
#endif
#ifdef CONFIG_CMD_FBPANEL
fbp_setup_display(displays, ARRAY_SIZE(displays));
#endif
return 0;
}
开发者ID:mengfick,项目名称:GitSpace,代码行数:17,代码来源:h.c
注:本文中的setup_i2c函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论