当前位置: 首页>>代码示例>>C++>>正文


C++ P1275_INOUT函数代码示例

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


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

示例1: prom_puts

void
prom_puts(char *s, int len)
{
	p1275_cmd("write", P1275_ARG(1,P1275_ARG_IN_BUF)|
			   P1275_INOUT(3,1),
			   prom_stdout, s, P1275_SIZE(len));
}
开发者ID:romanalexander,项目名称:Trickles,代码行数:7,代码来源:console.c

示例2: prom_set_trap_table_sun4v

void prom_set_trap_table_sun4v(unsigned long tba, unsigned long mmfsa)
{
	p1275_cmd("SUNW,set-trap-table",
		  (P1275_ARG(0, P1275_ARG_IN_64B) |
		   P1275_ARG(1, P1275_ARG_IN_64B) |
		   P1275_INOUT(2, 0)), tba, mmfsa);
}
开发者ID:maliyu,项目名称:SOM2416,代码行数:7,代码来源:misc.c

示例3: prom_cmdline

/* Drop into the prom, with the chance to continue with the 'go'
 * prom command.
 */
void
prom_cmdline(void)
{
	unsigned long flags;

	__save_and_cli(flags);

#ifdef CONFIG_SUN_CONSOLE
	if(!serial_console && prom_palette)
		prom_palette (1);
#endif

#ifdef CONFIG_SMP
	smp_capture();
#endif

	p1275_cmd ("enter", P1275_INOUT(0,0));

#ifdef CONFIG_SMP
	smp_release();
	spin_unlock_wait(&__br_write_locks[BR_GLOBALIRQ_LOCK].lock);
#endif

#ifdef CONFIG_SUN_CONSOLE
	if(!serial_console && prom_palette)
		prom_palette (0);
#endif

	__restore_flags(flags);
}
开发者ID:romanalexander,项目名称:Trickles,代码行数:33,代码来源:misc.c

示例4: prom_ihandle2path

int prom_ihandle2path(int handle, char *buffer, int bufsize)
{
	return p1275_cmd("instance-to-path",
			 P1275_ARG(1,P1275_ARG_OUT_BUF)|
			 P1275_INOUT(3, 1),
			 handle, buffer, P1275_SIZE(bufsize));
}
开发者ID:A2109devs,项目名称:lenovo_a2109a_kernel,代码行数:7,代码来源:tree_64.c

示例5: prom_devopen

/* Open the device described by the string 'dstr'.  Returns the handle
 * to that device used for subsequent operations on that device.
 * Returns 0 on failure.
 */
int
prom_devopen(const char *dstr)
{
    return p1275_cmd ("open", P1275_ARG(0,P1275_ARG_IN_STRING)|
                      P1275_INOUT(1,1),
                      dstr);
}
开发者ID:smx-smx,项目名称:dsl-n55u,代码行数:11,代码来源:devops.c

示例6: prom_sun4v_guest_soft_state

void prom_sun4v_guest_soft_state(void)
{
	const char *svc = "SUNW,soft-state-supported";

	if (!prom_service_exists(svc))
		return;
	p1275_cmd(svc, P1275_INOUT(0, 0));
}
开发者ID:E-LLP,项目名称:n900,代码行数:8,代码来源:misc.c

示例7: prom_getproplen

/* Return the length in bytes of property 'prop' at node 'node'.
 * Return -1 on error.
 */
inline int prom_getproplen(int node, const char *prop)
{
	if((!node) || (!prop)) return -1;
	return p1275_cmd ("getproplen", 
			  P1275_ARG(1,P1275_ARG_IN_STRING)|
			  P1275_INOUT(2, 1), 
			  node, prop);
}
开发者ID:A2109devs,项目名称:lenovo_a2109a_kernel,代码行数:11,代码来源:tree_64.c

示例8: prom_inst2pkg

inline int prom_inst2pkg(int inst)
{
	int node;
	
	node = p1275_cmd ("instance-to-package", P1275_INOUT(1, 1), inst);
	if (node == -1) return 0;
	return node;
}
开发者ID:A2109devs,项目名称:lenovo_a2109a_kernel,代码行数:8,代码来源:tree_64.c

示例9: prom_getparent

inline int prom_getparent(int node)
{
	int cnode;

	if(node == -1) return 0;
	cnode = p1275_cmd ("parent", P1275_INOUT(1, 1), node);
	if(cnode == -1) return 0;
	return (int)cnode;
}
开发者ID:A2109devs,项目名称:lenovo_a2109a_kernel,代码行数:9,代码来源:tree_64.c

示例10: prom_service_exists

int prom_service_exists(const char *service_name)
{
	int err = p1275_cmd("test", P1275_ARG(0, P1275_ARG_IN_STRING) |
			    P1275_INOUT(1, 1), service_name);

	if (err)
		return 0;
	return 1;
}
开发者ID:E-LLP,项目名称:n900,代码行数:9,代码来源:misc.c

示例11: prom_reboot

/* Reset and reboot the machine with the command 'bcommand'. */
void prom_reboot(const char *bcommand)
{
#ifdef CONFIG_SUN_LDOMS
	if (ldom_domaining_enabled)
		ldom_reboot(bcommand);
#endif
	p1275_cmd("boot", P1275_ARG(0, P1275_ARG_IN_STRING) |
		  P1275_INOUT(1, 0), bcommand);
}
开发者ID:E-LLP,项目名称:n900,代码行数:10,代码来源:misc.c

示例12: p1275_cmd

/* Return the first property type for node 'node'.
 * buffer should be at least 32B in length
 */
inline char *prom_firstprop(int node, char *buffer)
{
	*buffer = 0;
	if(node == -1) return buffer;
	p1275_cmd ("nextprop", P1275_ARG(2,P1275_ARG_OUT_32B)|
			       P1275_INOUT(3, 0), 
			       node, (char *) 0x0, buffer);
	return buffer;
}
开发者ID:A2109devs,项目名称:lenovo_a2109a_kernel,代码行数:12,代码来源:tree_64.c

示例13: prom_halt

/* Drop into the prom, but completely terminate the program.
 * No chance of continuing.
 */
void prom_halt(void)
{
#ifdef CONFIG_SUN_LDOMS
	if (ldom_domaining_enabled)
		ldom_power_off();
#endif
again:
	p1275_cmd("exit", P1275_INOUT(0, 0));
	goto again; /* PROM is out to get me -DaveM */
}
开发者ID:E-LLP,项目名称:n900,代码行数:13,代码来源:misc.c

示例14: prom_finddevice

int
prom_finddevice(const char *name)
{
	if (!name)
		return 0;
	return p1275_cmd(prom_finddev_name,
			 P1275_ARG(0,P1275_ARG_IN_STRING)|
			 P1275_INOUT(1, 1), 
			 name);
}
开发者ID:A2109devs,项目名称:lenovo_a2109a_kernel,代码行数:10,代码来源:tree_64.c

示例15: prom_halt_power_off

void prom_halt_power_off(void)
{
#ifdef CONFIG_SUN_LDOMS
	if (ldom_domaining_enabled)
		ldom_power_off();
#endif
	p1275_cmd("SUNW,power-off", P1275_INOUT(0, 0));

	/* if nothing else helps, we just halt */
	prom_halt();
}
开发者ID:E-LLP,项目名称:n900,代码行数:11,代码来源:misc.c


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