Esempio n. 1
0
ptu32_t module_init_fs_k9f1208xxx(const char *FlashHeapName)
{
    struct nand_chip_id chip_id;
    pHeap_t MyHeap;
    u16 myid;
    char *name;

    NandFlash_GPIO_Init();
    NandFlash_On();

    __reset_nand();
    myid = __read_chip_id(&chip_id);
    if( __parse_chip(myid,&name) == false)
        return 0;

    MyHeap = M_FindHeap(FlashHeapName);
    if(MyHeap == NULL)
        return 0;
    tg_samsung_nand.ChipHeap = MyHeap;
    pg_sector_buf = (u8*)M_MallocHeap(u32g_sector_size+u16g_oob_size,MyHeap,0);
    if(pg_sector_buf == NULL)
    {
        return 0;
    }
    tg_samsung_nand.query_block_ready_with_ecc= query_block_ready_ss_with_ecc;
    tg_samsung_nand.query_block_ready_no_ecc = query_block_ready_nand_no_ecc;
    tg_samsung_nand.query_ready_with_data = query_ready_with_data_nand;
    tg_samsung_nand.erase_block = erase_block_nand;
    tg_samsung_nand.check_block = check_block_nand;
    tg_samsung_nand.read_data_with_ecc = read_block_ss_with_ecc;
    tg_samsung_nand.write_data_with_ecc = write_block_ss_with_ecc;
    tg_samsung_nand.read_data_no_ecc = read_block_ss_no_ecc;
    tg_samsung_nand.write_data_no_ecc = write_block_ss_no_ecc;
    tg_samsung_nand.write_PCRB = write_PCRB_nand;
    tg_samsung_nand.restore_PCRB = restore_PCRB_nand;
    if(DFFSD_InstallChip(&tg_samsung_nand,name,cn_reserve_blocks))
    {
         Sh_InstallCmd(ShellNandCmdTab,tg_NandCmdRsc,
            sizeof(ShellNandCmdTab)/sizeof(struct tagShellCmdTab));
         return 1;
    }
    else
    {
        M_FreeHeap(pg_sector_buf,MyHeap);
        return 0;
    }
}
Esempio n. 2
0
void djyip_main(void)
{
	printk("DJYOS NETSTACK TEST\n\r");

	if(Sh_InstallCmd(shellstackdebug,tg_monitorshell_cmd_rsc,cn_monitor_test_num))
	{
		printk("ADD TEST SHELL SUCCESS!\n\r");
	}
	else
	{
		printk("ADD TEST SHELL FAILED!\n\r");
	}	
	extern bool_t ping_test(void);
	ping_test();
//	TEST FOR THE TCP SEND
//	TcpServer_SndTask(NULL);

}
Esempio n. 3
0
ptu32_t module_exp_shell_init(ptu32_t para)
{
    para=para;
    Sh_InstallCmd(shell_cmd_reset_table,tg_reset_shell_cmd_rsc,cn_reset_shell_num);
    return 1;
}
Esempio n. 4
0
/*******************************************************************************
功能:CAN控制器操作shell模块
参数:无.
返回值:1。
*********************************************************************************/
ptu32_t CAN_Shell_Module_Install(void)
{
	Sh_InstallCmd(shell_cmd_can_table,tg_can_shell_cmd_rsc,CN_CAN_SHELL_NUM);
	return 1;
}
Esempio n. 5
0
ptu32_t IAP_Shell_Module_Install(void)
{
    Sh_InstallCmd(shell_cmd_iap_table,tg_iap_shell_cmd_rsc,CN_IAP_SHELL_NUM);
    return 1;
}
Esempio n. 6
0
//----添加pcie shell 命令------------------------------------------------------
//功能:添加pcie shell 命令
//参数:无
//返回:无
//-----------------------------------------------------------------------------
void pcie_sh_install(void)
{
    Sh_InstallCmd(pcie_cmd_table,tg_pcie_cmd_rsc,
                      sizeof(pcie_cmd_table)/sizeof(struct ShellCmdTab));
}