Exemplo n.º 1
0
int test_platfore (int test)
{
	int ret = FAILURE;
	AIO_ATTR_S stAioAttr;
	
	ret = framework_init ();
	if (ret != SUCCESS)
	{
		printf ("framework_init error\n");
		return FAILURE;
	}

	printf ("framework_init success\n");

	memset (&stAioAttr, 0x00, sizeof (stAioAttr));
	stAioAttr.enSamplerate = AUDIO_SAMPLE_RATE_8000;
	stAioAttr.enBitwidth = AUDIO_BIT_WIDTH_16;
	stAioAttr.enWorkmode = AIO_MODE_I2S_MASTER;
	stAioAttr.enSoundmode = AUDIO_SOUND_MODE_MONO;
	stAioAttr.u32EXFlag = 1;
	stAioAttr.u32FrmNum = 30;
	stAioAttr.u32PtNumPerFrm = 320;
	stAioAttr.u32ChnCnt = 2;
	stAioAttr.u32ClkSel = 1;

	ret = adec_ao (&stAioAttr);
	if (ret != SUCCESS)
	{
		printf ("adec_ao error\n");
		return FAILURE;
	}
	printf ("adec_ao Success\n");

	return SUCCESS;
}
Exemplo n.º 2
0
int DLLEXPORT Keyer_detime_Init(Tcl_Interp *interp) {
  return framework_init(interp, "sdrtcl::keyer-detime", "1.0.0", "sdrtcl::keyer-detime", _factory);
}
Exemplo n.º 3
0
// the initialization function which installs the adapter factory
int DLLEXPORT Demod_sam_Init(Tcl_Interp *interp) {
  return framework_init(interp, "sdrtcl::demod-sam", "1.0.0", "sdrtcl::demod-sam", _factory);
}
Exemplo n.º 4
0
Arquivo: window.c Projeto: recri/keyer
// the initialization function which installs the adapter factory
int DLLEXPORT Window_Init(Tcl_Interp *interp) {
  return framework_init(interp, "sdrtcl::window", "1.0.0", "sdrtcl::window", _command);
}
Exemplo n.º 5
0
Arquivo: main.c Projeto: caicry/sge800
/*************************************************
  主函数
*************************************************/
int main()
{
	int ret = 0;
	int i;

	PRINTF("BUILD:%s, %s\n\n", __DATE__, __TIME__);
	//对象类初始化,手工写也行,自动生成也行
	aaa.base.baseft = &aaa_ft;
	aaa.base.thread = 1;
	aaa.base.prio = 1;
	
	bbb.base.baseft = &bbb_ft;
	bbb.base.thread = 5;
	bbb.base.prio = 3;

	disp.base.baseft = &disp_ft;
	disp.base.thread = 6;
	disp.base.prio = 6;

	device_test.base.baseft = &device_test_ft;
	device_test.base.thread = 8;
	device_test.base.prio = 10;
	//初始化平台
	ret = framework_init();
	if (ret) {
		//错误处理
		goto error;
	}
	PRINTF("%s:%d\n\n", __FILE__, __LINE__);
	
	//初始化业务模块模型
	for (i = 0; i < sizeof(objects)/ sizeof(objects[0]); i++)
	{
		ret = objects[i]->baseft->initmodel(objects[i]);
		if (ret) {
			goto error;
		}
	}
	//初始化业务模块数据
	for (i = 0; i < sizeof(objects)/ sizeof(objects[0]); i++)
	{
		ret = objects[i]->baseft->initdata(objects[i]);
		if (ret) {
			goto error;
		}
	}
	
	//启动平台框架
	ret = framework_start();
	if (ret) {
		//错误处理
		goto error;
	}
	PRINTF("%s:%d\n\n", __FILE__, __LINE__);

	while(1) {
		sleep(1000);
	}

error:
	PRINTF("main err\n");
	return 0;
}
Exemplo n.º 6
0
// the initialization function which install the jack-client factory
int DLLEXPORT Jack_client_Init(Tcl_Interp *interp) {
  return framework_init(interp, "sdrtcl::jack-client", "1.0.0", "sdrtcl::jack-client", _factory);
}
Exemplo n.º 7
0
Arquivo: mixer.c Projeto: recri/keyer
// the initialization function which installs the adapter factory
int DLLEXPORT Mixer_Init(Tcl_Interp *interp) {
  return framework_init(interp, "sdrtcl::mixer", "1.0.0", "sdrtcl::mixer", _factory);
}
Exemplo n.º 8
0
// the initialization function which installs the adapter factory
int DLLEXPORT Iq_rotation_Init(Tcl_Interp *interp) {
  return framework_init(interp, "sdrtcl::iq-rotation", "1.0.0", "sdrtcl::iq-rotation", _factory);
}
Exemplo n.º 9
0
Arquivo: noise.c Projeto: recri/keyer
// the initialization function which installs the adapter factory
int DLLEXPORT Noise_Init(Tcl_Interp *interp) {
  return framework_init(interp, "sdrtcl::noise", "1.0.0", "sdrtcl::noise", _factory);
}
Exemplo n.º 10
0
// the initialization function which install the jack-client factory
int DLLEXPORT Jack_ctl_Init(Tcl_Interp *interp) {
  return framework_init(interp, "sdrtcl::jack-ctl", "1.0.0", "sdrtcl::jack-ctl", _command);
}
Exemplo n.º 11
0
int DLLEXPORT Audio_tap_Init(Tcl_Interp *interp) {
  return framework_init(interp, "sdrtcl::audio-tap", "1.0.0", "sdrtcl::audio-tap", _factory);
}