本文整理汇总了C++中PORT函数的典型用法代码示例。如果您正苦于以下问题:C++ PORT函数的具体用法?C++ PORT怎么用?C++ PORT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PORT函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: PORT
#include <linux/module.h>
#include <linux/init.h>
#include <linux/serial_8250.h>
#define PORT(base, int) \
{ \
.iobase = base, \
.irq = int, \
.uartclk = 1843200, \
.iotype = UPIO_PORT, \
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \
.regshift = 0, \
}
static struct plat_serial8250_port uart8250_data[] = {
PORT(0x3F8, 4),
PORT(0x2F8, 3),
PORT(0x3E8, 4),
PORT(0x2E8, 3),
{ },
};
static struct platform_device uart8250_device = {
.name = "serial8250",
.id = PLAT8250_DEV_PLATFORM,
.dev = {
.platform_data = uart8250_data,
},
};
static int __init uart8250_init(void)
开发者ID:007kumarraja,项目名称:rockchip-rk3188-mk908,代码行数:31,代码来源:8250-platform.c
示例2: sprintf
asic = (csmsr & 0x08) ? asic : !asic;
p += sprintf(p, ", ASIC PCI Rev %s", asic ? "1.0" : "1.1");
printk("%s.\n", boardtype);
}
#define PORT(_base,_irq) \
{ \
.iobase = _base, \
.irq = _irq, \
.uartclk = 1843200, \
.iotype = UPIO_PORT, \
.flags = UPF_BOOT_AUTOCONF, \
}
static struct plat_serial8250_port pcimt_data[] = {
PORT(0x3f8, 4),
PORT(0x2f8, 3),
{ },
};
static struct platform_device pcimt_serial8250_device = {
.name = "serial8250",
.id = PLAT8250_DEV_PLATFORM,
.dev = {
.platform_data = pcimt_data,
},
};
static struct resource pcimt_cmos_rsrc[] = {
{
.start = 0x70,
开发者ID:jakev,项目名称:CobraDroidBeta,代码行数:31,代码来源:pcimt.c
示例3: host_close
static void host_close(struct sscape_info *devc)
{
outb((0x03), PORT(HOST_CTRL)); /* Put the board to the MIDI mode */
}
开发者ID:GunioRobot,项目名称:MI424WR_GEN2_Rev_E-F,代码行数:4,代码来源:sscape.c
示例4: bfin_device_ready
int bfin_device_ready(struct mtd_info *mtd)
{
int ret = (*PORT(CONFIG_NAND_GPIO_PORT, IO) & BFIN_NAND_READY) ? 1 : 0;
SSYNC();
return ret;
}
开发者ID:Februar0218,项目名称:u-boot-omap-pandora,代码行数:6,代码来源:nand.c
示例5: _spi_deselect
static void _spi_deselect(void) {
IO_WRITE(PORT(IO_SPI), IO_SPI_SS_ALL, IO_SPI_SS_ALL);
}
开发者ID:jgottula,项目名称:automaton,代码行数:3,代码来源:spi.c
示例6: PORT
#include <linux/module.h>
#include <linux/init.h>
#include <linux/serial_8250.h>
#define PORT(_base,_irq) \
{ \
.iobase = _base, \
.irq = _irq, \
.uartclk = 1843200, \
.iotype = UPIO_PORT, \
.flags = UPF_BOOT_AUTOCONF, \
}
static struct plat_serial8250_port boca_data[] = {
PORT(0x100, 12),
PORT(0x108, 12),
PORT(0x110, 12),
PORT(0x118, 12),
PORT(0x120, 12),
PORT(0x128, 12),
PORT(0x130, 12),
PORT(0x138, 12),
PORT(0x140, 12),
PORT(0x148, 12),
PORT(0x150, 12),
PORT(0x158, 12),
PORT(0x160, 12),
PORT(0x168, 12),
PORT(0x170, 12),
PORT(0x178, 12),
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:30,代码来源:8250_boca.c
示例7: PORT
#define PORT(_irq) \
{ \
.irq = _irq, \
.regshift = 2, \
.iotype = UPIO_MEM32, \
.flags = (UPF_SKIP_TEST | \
UPF_FIXED_TYPE | UPF_BOOT_AUTOCONF),\
.uartclk = PIC_CLKS_PER_SEC, \
.type = PORT_16550A, \
.serial_in = nlm_xlr_uart_in, \
.serial_out = nlm_xlr_uart_out, \
}
static struct plat_serial8250_port xlr_uart_data[] = {
PORT(PIC_UART_0_IRQ),
PORT(PIC_UART_1_IRQ),
{},
};
static struct platform_device uart_device = {
.name = "serial8250",
.id = PLAT8250_DEV_PLATFORM,
.dev = {
.platform_data = xlr_uart_data,
},
};
static int __init nlm_uart_init(void)
{
unsigned long uartbase;
开发者ID:Kenepo,项目名称:roots_kk_lge_msm8974,代码行数:30,代码来源:platform.c
示例8: ie_intr
/*
* What to do upon receipt of an interrupt.
*/
void
ie_intr(void *xsc)
{
struct ie_softc *sc = (struct ie_softc *)xsc;
u_short status;
/* Clear the interrupt latch on the 3C507. */
if (sc->hard_type == IE_3C507
&& (inb(PORT(sc) + IE507_CTRL) & EL_CTRL_INTL))
outb(PORT(sc) + IE507_ICTRL, 1);
/* disable interrupts on the EE16. */
if (sc->hard_type == IE_EE16)
outb(PORT(sc) + IEE16_IRQ, sc->irq_encoded);
status = sc->scb->ie_status;
loop:
/* Don't ack interrupts which we didn't receive */
ie_ack(sc, IE_ST_WHENCE & status);
if (status & (IE_ST_RECV | IE_ST_RNR)) {
#ifdef DEBUG
in_ierint++;
if (ie_debug & IED_RINT)
printf("ie%d: rint\n", sc->unit);
#endif
ierint(sc);
#ifdef DEBUG
in_ierint--;
#endif
}
if (status & IE_ST_DONE) {
#ifdef DEBUG
in_ietint++;
if (ie_debug & IED_TINT)
printf("ie%d: tint\n", sc->unit);
#endif
ietint(sc);
#ifdef DEBUG
in_ietint--;
#endif
}
if (status & IE_ST_RNR) {
#ifdef DEBUG
if (ie_debug & IED_RNR)
printf("ie%d: rnr\n", sc->unit);
#endif
iernr(sc);
}
#ifdef DEBUG
if ((status & IE_ST_ALLDONE) && (ie_debug & IED_CNA))
printf("ie%d: cna\n", sc->unit);
#endif
if ((status = sc->scb->ie_status) & IE_ST_WHENCE)
goto loop;
/* Clear the interrupt latch on the 3C507. */
if (sc->hard_type == IE_3C507)
outb(PORT(sc) + IE507_ICTRL, 1);
/* enable interrupts on the EE16. */
if (sc->hard_type == IE_EE16)
outb(PORT(sc) + IEE16_IRQ, sc->irq_encoded | IEE16_IRQ_ENABLE);
}
开发者ID:MarginC,项目名称:kame,代码行数:71,代码来源:if_ie.c
示例9: blink_next_LED
/**
* Send next binary value to demultiplexer
* we have cycle of LEDS_AMOUNT values, blink them consecutively (don't forget
* to reduce LEDs resistor according to LEDS_AMOUNT)
*/
void blink_next_LED(){
PORT(LEDS_PORT, ODR) = LED_bits[current_LED++];
if(current_LED == LEDS_AMOUNT)
current_LED = 0;
}
开发者ID:Embeddedbuzz,项目名称:STM8_samples,代码行数:10,代码来源:CD74HC154_LEDs.c
示例10: sl_chan_attn
void
sl_chan_attn(struct ie_softc *sc)
{
outb(PORT(sc) + IEATT_ATTN, 0);
}
开发者ID:MarginC,项目名称:kame,代码行数:5,代码来源:if_ie.c
示例11: ee16_chan_attn
void
ee16_chan_attn(struct ie_softc *sc)
{
outb(PORT(sc) + IEE16_ATTN, 0);
}
开发者ID:MarginC,项目名称:kame,代码行数:5,代码来源:if_ie.c
示例12: el_chan_attn
void
el_chan_attn(struct ie_softc *sc)
{
outb(PORT(sc) + IE507_ATTN, 1);
}
开发者ID:MarginC,项目名称:kame,代码行数:5,代码来源:if_ie.c
示例13: sl_reset_586
void
sl_reset_586(struct ie_softc *sc)
{
outb(PORT(sc) + IEATT_RESET, 0);
}
开发者ID:MarginC,项目名称:kame,代码行数:5,代码来源:if_ie.c
示例14: defined
#elif defined(CONFIG_KM_PIGGY4_88E6352)
#include <mv88e6352.h>
#if defined(CONFIG_KM_NUSA)
struct mv88e_sw_reg extsw_conf[] = {
/*
* port 0, PIGGY4, autoneg
* first the fix for the 1000Mbits Autoneg, this is from
* a Marvell errata, the regs are undocumented
*/
{ PHY(0), PHY_PAGE, AN1000FIX_PAGE },
{ PHY(0), PHY_STATUS, AN1000FIX },
{ PHY(0), PHY_PAGE, 0 },
/* now the real port and phy configuration */
{ PORT(0), PORT_PHY, NO_SPEED_FOR },
{ PORT(0), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
{ PHY(0), PHY_1000_CTRL, NO_ADV },
{ PHY(0), PHY_SPEC_CTRL, AUTO_MDIX_EN },
{ PHY(0), PHY_CTRL, PHY_100_MBPS | AUTONEG_EN | AUTONEG_RST |
FULL_DUPLEX },
/* port 1, unused */
{ PORT(1), PORT_CTRL, PORT_DIS },
{ PHY(1), PHY_CTRL, PHY_PWR_DOWN },
{ PHY(1), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
/* port 2, unused */
{ PORT(2), PORT_CTRL, PORT_DIS },
{ PHY(2), PHY_CTRL, PHY_PWR_DOWN },
{ PHY(2), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
/* port 3, unused */
{ PORT(3), PORT_CTRL, PORT_DIS },
开发者ID:AeroGirl,项目名称:u-boot-kern3.2,代码行数:31,代码来源:km_arm.c
示例15: main
int main() {
line_t in_lines[8] = {
PORT(B, 0),
PORT(B, 1),
PORT(B, 2),
PORT(B, 3),
PORT(B, 4),
PORT(B, 5),
PORT(B, 6),
PORT(B, 7)
},
out_lines[16] = {
PORT(B, 8),
PORT(B, 11),
PORT(B, 12),
PORT(B, 15),
PORT(D, 0),
PORT(D, 2),
PORT(D, 3),
PORT(D, 4),
PORT(D, 5),
PORT(D, 6),
PORT(D, 7),
PORT(D, 8),
PORT(D, 9),
PORT(D, 10),
PORT(D, 11),
PORT(D, 12)
};
bus_t in_bus = initialise_bus(8, in_lines, BUS_INPUT_PULLUP),
out_bus = initialise_bus(16, out_lines, BUS_OUTPUT);
int input = 0, output;
while (1) {
input = read_data(&in_bus);
output = 0;
for (int i = 1, j = 3; i < (1 << 8); i <<= 1, j <<= 1) {
if (input & i) {
output |= j;
}
}
set_data(&out_bus, output);
}
return 0;
}
开发者ID:dmpro-ytelse,项目名称:-controller,代码行数:49,代码来源:ledtest.c
示例16: misc_init_r
#endif
return 0;
}
int misc_init_r(void)
{
ivm_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
return 0;
}
#if defined(CONFIG_KMVECT1)
#include <mv88e6352.h>
/* Marvell MV88E6122 switch configuration */
static struct mv88e_sw_reg extsw_conf[] = {
/* port 1, FRONT_MDI, autoneg */
{ PORT(1), PORT_PHY, NO_SPEED_FOR },
{ PORT(1), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
{ PHY(1), PHY_1000_CTRL, NO_ADV },
{ PHY(1), PHY_SPEC_CTRL, AUTO_MDIX_EN },
{ PHY(1), PHY_CTRL, PHY_100_MBPS | AUTONEG_EN | AUTONEG_RST |
FULL_DUPLEX },
/* port 2, unused */
{ PORT(2), PORT_CTRL, PORT_DIS },
{ PHY(2), PHY_CTRL, PHY_PWR_DOWN },
{ PHY(2), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
/* port 3, BP_MII (CPU), PHY mode, 100BASE */
{ PORT(3), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
/* port 4, ESTAR to slot 11, SerDes, 1000BASE-X */
{ PORT(4), PORT_STATUS, NO_PHY_DETECT },
{ PORT(4), PORT_PHY, SPEED_1000_FOR },
{ PORT(4), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
开发者ID:CheezeCake,项目名称:edison-u-boot,代码行数:31,代码来源:km83xx.c
示例17: PORT
{"Servname not supported for ai_socktype", 16},
{"ai_socktype not supported", 17},
{"System error", 18},
{"Unknown error", 19},
{"Copyright (C) 1999 Free Software Foundation, Inc.", 20},
{"\
This program is free software with ABSOLUTELY NO WARRANTY; you may\n\
redistribute it under the terms of the GNU General Public License.", 21},
{"version", 22},
{"Usage: jwhois [OPTIONS] [QUERY]", 23},
{"\
--version display version number and patch level\n\
--help display this help\n\
-c FILE, --config=FILE use FILE as configuration file\n\
-h HOST, --host=HOST explicitly query HOST\n\
-p PORT, --port=PORT use port number PORT (in conjunction with HOST)\n\
-v, --verbose verbose debug output\n", 24},
{"\
-f, --force-lookup force lookup even if the entry is cached\n\
-d, --disable-cache disable cache functions\n", 25},
{"Report bugs to [email protected]", 26},
{"invalid port number", 27},
{"error allocating memory", 28},
{"string out of bounds on line", 29},
{"end of file looking for '\"' on line", 30},
{"unexpected end of file on line", 31},
{"multiple keys on line", 32},
{"missing key on line", 33},
{"error creating socket", 34},
{"fatal error searching for host to query", 35},
{"fatal error reading cache", 36},
开发者ID:redwinner,项目名称:unxutils,代码行数:31,代码来源:cat-id-tbl.c
示例18: PORT
*/
#include <linux/module.h>
#include <linux/init.h>
#include <linux/serial_8250.h>
#define PORT(_base,_irq) \
{ \
.iobase = _base, \
.irq = _irq, \
.uartclk = 1843200, \
.iotype = UPIO_PORT, \
.flags = UPF_BOOT_AUTOCONF, \
}
static struct plat_serial8250_port exar_data[] = {
PORT(0x100, 5),
PORT(0x108, 5),
PORT(0x110, 5),
PORT(0x118, 5),
{ },
};
static struct platform_device exar_device = {
.name = "serial8250",
.id = PLAT8250_DEV_EXAR_ST16C554,
.dev = {
.platform_data = exar_data,
},
};
static int __init exar_init(void)
开发者ID:274914765,项目名称:C,代码行数:31,代码来源:8250_exar_st16c554.c
示例19: __sscape_write
static void __sscape_write(int reg, int data)
{
outb(reg, PORT(ODIE_ADDR));
outb(data, PORT(ODIE_DATA));
}
开发者ID:Dronevery,项目名称:JetsonTK1-kernel,代码行数:5,代码来源:sscape.c
示例20: COM_FLAGS
#else
#define COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST)
#define COM4_FLAGS UPF_BOOT_AUTOCONF
#endif
#define PORT(_base,_irq,_flags) \
{ \
.iobase = _base, \
.irq = _irq, \
.uartclk = 1843200, \
.iotype = UPIO_PORT, \
.flags = _flags, \
}
static struct plat_serial8250_port x86_com_data[] = {
PORT(0x3F8, 4, COM_FLAGS),
PORT(0x2F8, 3, COM_FLAGS),
PORT(0x3E8, 4, COM_FLAGS),
PORT(0x2E8, 3, COM4_FLAGS),
{ },
};
static struct platform_device x86_com_device = {
.name = "serial8250",
.id = PLAT8250_DEV_PLATFORM,
.dev = {
.platform_data = x86_com_data,
},
};
static int force_legacy_probe;
开发者ID:cilynx,项目名称:dd-wrt,代码行数:31,代码来源:legacy_serial.c
注:本文中的PORT函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论