forked from xuos/xiuos
delete no need
This commit is contained in:
@@ -24,7 +24,7 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_ADD_XIZI_FEATURES),y)
|
||||
SRC_FILES := test_shell.c
|
||||
SRC_FILES += test_hash.c
|
||||
|
||||
ifeq ($(CONFIG_USER_TEST_ADC),y)
|
||||
SRC_FILES += test_adc.c
|
||||
endif
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2020 AIIT XUOS Lab
|
||||
* XiUOS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
* http://license.coscl.org.cn/MulanPSL2
|
||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
* See the Mulan PSL v2 for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file: test_ethernet.c
|
||||
* @brief: a application of ethernet function
|
||||
* @version: 1.1
|
||||
* @author: AIIT XUOS Lab
|
||||
* @date: 2022/12/17
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <transform.h>
|
||||
#include <xs_hash.h>
|
||||
|
||||
int Testhash(void)
|
||||
{
|
||||
Element a[]={{12,1},{2,2},{31,3},{45,4},{8,5},{45,5}};
|
||||
|
||||
int n = sizeof(a)/sizeof(Element);
|
||||
Hash_table *h = Creat_Table(n);
|
||||
int i = 0;
|
||||
for(i = 0 ; i<n ; i++)
|
||||
{
|
||||
Insert(h,a[i]);
|
||||
}
|
||||
print_Table(h); // 打印哈希表
|
||||
printf("%d\n\n", lookup(h,12)->data->value); //查找key值为12的Element
|
||||
printf("%d\n",h->length); //打印哈希表的元素个数
|
||||
Destroy_Table(h); // 摧毁哈希表
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
PRIV_SHELL_CMD_FUNCTION(Testhash, a hash test sample, PRIV_SHELL_CMD_MAIN_ATTR);
|
||||
@@ -14,7 +14,7 @@ ifeq ($(CONFIG_ADD_XIZI_FEATURES),y)
|
||||
ifeq ($(CONFIG_RESOURCES_LWIP),y)
|
||||
SRC_DIR += socket_demo
|
||||
endif
|
||||
SRC_DIR +=mqtt_demo
|
||||
|
||||
include $(KERNEL_ROOT)/compiler.mk
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user