Compare commits

...

6 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
8ef0add346 Remove empty #ifdef RT_USING_FINSH blocks
Removed empty conditional compilation blocks that were left after FINSH macro cleanup.

Co-authored-by: BernardXiong <1241087+BernardXiong@users.noreply.github.com>
2025-10-28 23:21:39 +00:00
copilot-swe-agent[bot]
af25087e09 Remove orphaned finsh.h includes after FINSH_FUNCTION_EXPORT cleanup
Co-authored-by: Rbb666 <64397326+Rbb666@users.noreply.github.com>
2025-10-26 07:16:09 +00:00
copilot-swe-agent[bot]
f2d0b8a626 Remove deprecated FINSH_FUNCTION_EXPORT macro and all usages
Co-authored-by: Rbb666 <64397326+Rbb666@users.noreply.github.com>
2025-10-26 07:04:31 +00:00
copilot-swe-agent[bot]
42aef81d15 Remove extra blank lines left after FINSH_FUNCTION_EXPORT_ALIAS cleanup
Co-authored-by: BernardXiong <1241087+BernardXiong@users.noreply.github.com>
2025-10-24 02:26:45 +00:00
copilot-swe-agent[bot]
60c9bc2350 Remove all FINSH_FUNCTION_EXPORT_ALIAS calls and macro definitions
Co-authored-by: BernardXiong <1241087+BernardXiong@users.noreply.github.com>
2025-10-24 01:31:21 +00:00
copilot-swe-agent[bot]
189980406c Initial plan 2025-10-24 01:25:27 +00:00
104 changed files with 0 additions and 304 deletions

View File

@@ -183,5 +183,3 @@ static int cmd_disp_debug(int argc, const char **argv)
}
return 0;
}
FINSH_FUNCTION_EXPORT_ALIAS(cmd_disp_debug, __cmd_disp, disp cmd);

View File

@@ -130,5 +130,3 @@ int disp_layer_alpha_test(int argc, char **argv)
disp_mem_clear(1);
return 0;
}
FINSH_FUNCTION_EXPORT_ALIAS(disp_layer_alpha_test, __cmd_disp_layer_alpha_test, disp_layer_alpha_test);

View File

@@ -556,7 +556,3 @@ int parse_cmdline_and_set_config(int argc, char **argv)
}
}
FINSH_FUNCTION_EXPORT_ALIAS(parse_cmdline_and_set_config, disp_layer_cfg, disp set layer);

View File

@@ -134,5 +134,3 @@ int disp_layer_format_test(int argc, char **argv)
return 0;
}
FINSH_FUNCTION_EXPORT_ALIAS(disp_layer_format_test, __cmd_disp_layer_format_test, disp_layer_format_test);

View File

@@ -78,5 +78,3 @@ int disp_layer_rgb_test(int argc, char **argv)
return 0;
}
FINSH_FUNCTION_EXPORT_ALIAS(disp_layer_rgb_test, __cmd_disp_layer_rgb_test, disp_layer_rgb_test);

View File

@@ -145,5 +145,3 @@ int disp_layer_scal_test(int argc, char **argv)
return 0;
}
FINSH_FUNCTION_EXPORT_ALIAS(disp_layer_scal_test, __cmd_disp_layer_scal_test, disp_layer_scal_test);

View File

@@ -157,9 +157,3 @@ int lbc_test(int argc, char **argv)
return 0;
}
FINSH_FUNCTION_EXPORT_ALIAS(lbc_test, __cmd_disp_lbc_test, disp lbc test);

View File

@@ -264,5 +264,3 @@ int parse_cmdline_and_alloc(int argc, char **argv)
}
}
FINSH_FUNCTION_EXPORT_ALIAS(parse_cmdline_and_alloc, disp_mem, disp mem);

View File

@@ -123,7 +123,6 @@ INIT_DEVICE_EXPORT(rt_hw_led_init);
#endif
#ifdef RT_USING_FINSH
#include <finsh.h>
void led(rt_uint32_t led, rt_uint32_t state)
{
@@ -140,7 +139,6 @@ void led(rt_uint32_t led, rt_uint32_t state)
break;
}
}
FINSH_FUNCTION_EXPORT(led, turn led (0 - 3) on (1) or off (0).)
#endif
/*@}*/

View File

@@ -201,7 +201,5 @@ void list_irq(void)
}
}
#include <finsh.h>
FINSH_FUNCTION_EXPORT(list_irq, list system irq);
#endif

View File

@@ -151,8 +151,6 @@ void nfs_start(void)
rt_kprintf("NFSv3 File System initialzation failed!\n");
}
#include "finsh.h"
FINSH_FUNCTION_EXPORT(nfs_start, start net filesystem);
#endif
/*@}*/

View File

@@ -891,8 +891,6 @@ err:
INIT_DEVICE_EXPORT(at91_mci_init);
#include "finsh.h"
FINSH_FUNCTION_EXPORT(at91_mci_init, at91sam9260 sd init);
void mci_dump(void)
{
@@ -907,4 +905,3 @@ void mci_dump(void)
}
}
FINSH_FUNCTION_EXPORT(mci_dump, dump register for mci);

View File

@@ -611,7 +611,6 @@ int rt_hw_mtd_nand_init(void)
INIT_DEVICE_EXPORT(rt_hw_mtd_nand_init);
#if defined(RT_USING_FINSH)
#include <finsh.h>
void nand_eraseall()
{
int tmp=0;
@@ -628,7 +627,6 @@ void nand_eraseall()
at9260_nand_erase_block(RT_NULL, index);
}
}
FINSH_FUNCTION_EXPORT(nand_eraseall, erase all of block in the nand flash);
#endif //RT_USING_FINSH

View File

@@ -29,9 +29,6 @@ void machine_shutdown(void)
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_cpu_reset, reset, restart the system);
#ifdef FINSH_USING_MSH
int cmd_reset(int argc, char** argv)
{

View File

@@ -152,8 +152,6 @@ void nfs_start(void)
rt_kprintf("NFSv3 File System initialzation failed!\n");
}
#include "finsh.h"
FINSH_FUNCTION_EXPORT(nfs_start, start net filesystem);
#endif
/*@}*/

View File

@@ -891,8 +891,6 @@ err:
INIT_DEVICE_EXPORT(at91_mci_init);
#include "finsh.h"
FINSH_FUNCTION_EXPORT(at91_mci_init, at91sam9260 sd init);
void mci_dump(void)
{
@@ -907,4 +905,3 @@ void mci_dump(void)
}
}
FINSH_FUNCTION_EXPORT(mci_dump, dump register for mci);

View File

@@ -97,8 +97,6 @@ void nfs_start(void)
rt_kprintf("NFSv3 File System initialzation failed!\n");
}
#include "finsh.h"
FINSH_FUNCTION_EXPORT(nfs_start, start net filesystem);
#endif
/*@}*/

View File

@@ -1741,7 +1741,6 @@ void dump_emac_stats(void)
rt_kprintf("\n");
}
FINSH_FUNCTION_EXPORT(dump_emac_stats, dump emac statistics);
#ifdef FINSH_USING_MSH
int cmd_dump_emac_stats(int argc, char** argv)

View File

@@ -278,7 +278,6 @@ void list_irq(void)
}
#include <finsh.h>
FINSH_FUNCTION_EXPORT(list_irq, list system irq);
#ifdef FINSH_USING_MSH
int cmd_list_irq(int argc, char** argv)

View File

@@ -824,7 +824,6 @@ rt_err_t efm_accel_init(void)
* Export to FINSH
******************************************************************************/
#ifdef RT_USING_FINSH
#include <finsh.h>
void accel_cal(rt_uint8_t mode, rt_uint32_t second)
{
@@ -836,7 +835,6 @@ void accel_cal(rt_uint8_t mode, rt_uint32_t second)
rt_kprintf("Calibration done.\n");
}
FINSH_FUNCTION_EXPORT(accel_cal, auto-zero calibration.)
void list_accel(void)
{
@@ -845,7 +843,6 @@ void list_accel(void)
efm_accel_get_data(&data, false);
rt_kprintf("X: %d, Y: %d, Z: %d\n", data.x, data.y, data.z);
}
FINSH_FUNCTION_EXPORT(list_accel, list accelerometer info.)
void test_accel(rt_uint8_t mode)
{
@@ -880,7 +877,6 @@ void test_accel(rt_uint8_t mode)
}
}
}
FINSH_FUNCTION_EXPORT(test_accel, list accelerometer info.)
#endif
#endif

View File

@@ -166,7 +166,6 @@ rt_err_t rt_hw_led_init(void)
* Export to FINSH
******************************************************************************/
#ifdef RT_USING_FINSH
#include <finsh.h>
void list_leds(void)
{
@@ -189,7 +188,6 @@ void list_leds(void)
#endif
}
}
FINSH_FUNCTION_EXPORT(list_leds, list all the LEDs.)
void set_led(rt_uint32_t led, rt_uint32_t state)
{
@@ -206,7 +204,6 @@ void set_led(rt_uint32_t led, rt_uint32_t state)
break;
}
}
FINSH_FUNCTION_EXPORT(set_led, turn led (0 - 3) on (1) or off (0).)
#endif
/***************************************************************************//**

View File

@@ -172,7 +172,6 @@ rt_int32_t efm32_misc_getCelsius(rt_uint32_t adcResult)
* Export to FINSH
******************************************************************************/
#ifdef RT_USING_FINSH
#include <finsh.h>
void list_temp(void)
{
@@ -180,7 +179,6 @@ void list_temp(void)
rt_kprintf("Temperature is %2d.%02d C\n", temp / 100, temp % 100);
}
FINSH_FUNCTION_EXPORT(list_temp, list current temperature value.)
void list_vdd(void)
{
@@ -188,7 +186,6 @@ void list_vdd(void)
rt_kprintf("VDD is %1d.%02d V\n", vdd / 100, vdd % 100);
}
FINSH_FUNCTION_EXPORT(list_vdd, list current VDD value.)
#endif /* RT_USING_FINSH */

View File

@@ -381,7 +381,6 @@ rt_uint32_t efm_spiFlash_cmd(
* Export to FINSH
*********************************************************************/
#ifdef RT_USING_FINSH
#include <finsh.h>
void list_sflash(void)
{
@@ -395,7 +394,6 @@ void list_sflash(void)
rt_kprintf(" Memory type:\t\t%x\n", buf[1]);
rt_kprintf(" Memory capacity:\t%x\n", buf[2]);
}
FINSH_FUNCTION_EXPORT(list_sflash, list the SPI Flash.)
#endif
#endif /* defined(EFM32_USING_SFLASH) */

View File

@@ -232,7 +232,6 @@ void efm32_emu_init(void)
* Export to FINSH
******************************************************************************/
#ifdef RT_USING_FINSH
#include <finsh.h>
void list_emu(void)
{
@@ -244,7 +243,6 @@ void list_emu(void)
rt_kprintf(" em4 token used %d\n",
EMU_TASK_EM4_TOKEN_NUMBER - emu_task.em4.value);
}
FINSH_FUNCTION_EXPORT(list_emu, list the EMU status)
#endif
/***************************************************************************//**

View File

@@ -1016,7 +1016,6 @@ rt_err_t efm_hw_eth_init(void)
******************************************************************************/
#if defined(EFM32_USING_ETH_UTILS)
#ifdef RT_USING_FINSH
#include <finsh.h>
void list_eth(void)
{
@@ -1075,7 +1074,6 @@ void list_eth(void)
rt_kprintf(" TX is idle\n");
}
}
FINSH_FUNCTION_EXPORT(list_eth, list the Ethernet device status.)
#include "lwip\api.h"
@@ -1184,7 +1182,6 @@ void list_myip(void)
rt_kprintf("Current IP: [%s]\n", ip);
}
FINSH_FUNCTION_EXPORT(list_myip, list the current IP address.)
#if !defined(hostName) || !defined(userPwdB64)
#error "The 'hostName' and 'userPwdB64' must be defined to use update_ip() function"
@@ -1309,7 +1306,6 @@ void update_myip(char *ip)
rt_kprintf("succeeded.\n", ip);
}
FINSH_FUNCTION_EXPORT(update_myip, update DDNS with specified IP address.)
#endif /* RT_USING_FINSH */
#endif /* defined(EFM32_USING_ETH_UTILS) */

View File

@@ -1271,7 +1271,6 @@ void efm_spiSd_deinit(void)
* Export to FINSH
******************************************************************************/
#ifdef RT_USING_FINSH
#include <finsh.h>
void list_sd(void)
{
@@ -1317,7 +1316,6 @@ void list_sd(void)
capacity >>= 4;
rt_kprintf(" Card capacity:\t\t%dMB\n", capacity);
}
FINSH_FUNCTION_EXPORT(list_sd, list the SD card.)
#endif
#endif /* defined(EFM32_USING_SPISD) */

View File

@@ -419,7 +419,6 @@ long k64_dump_tx_bd(void)
return 0;
}
FINSH_FUNCTION_EXPORT(k64_dump_tx_bd, dump all receive buffer descriptor);
MSH_CMD_EXPORT(k64_dump_tx_bd, dump all receive buffer descriptor);
long k64_dump_rx_bd(void)
@@ -441,7 +440,6 @@ long k64_dump_rx_bd(void)
return 0;
}
FINSH_FUNCTION_EXPORT(k64_dump_rx_bd, dump all receive buffer descriptor);
MSH_CMD_EXPORT(k64_dump_rx_bd, dump all receive buffer descriptor);
#endif

View File

@@ -620,7 +620,6 @@ void nand_read(int block, int page)
rt_kprintf("oob data:\n");
dump_mem(nand_oob, 16);
}
FINSH_FUNCTION_EXPORT_ALIAS(nand_read, read_page, read page[block/page]);
void nand_write(int block, int page)
{
@@ -630,13 +629,11 @@ void nand_write(int block, int page)
NF_WritePage(block, page, nand_buffer);
}
FINSH_FUNCTION_EXPORT_ALIAS(nand_write, write_page, write page[block/page]);
void nand_erase(int block)
{
NF_EraseBlock(block);
}
FINSH_FUNCTION_EXPORT_ALIAS(nand_erase, erase_block, erase block[block]);
void nand_readoob(int block, int page)
{
@@ -646,7 +643,6 @@ void nand_readoob(int block, int page)
rt_kprintf("oob data:\n");
dump_mem(nand_oob, 16);
}
FINSH_FUNCTION_EXPORT_ALIAS(nand_readoob, readoob, read oob[block/page]);
void nand_erase_chip(void)
{
@@ -661,5 +657,4 @@ void nand_erase_chip(void)
NF_EraseBlock(i);
}
}
FINSH_FUNCTION_EXPORT_ALIAS(nand_erase_chip, erase_chip, erase whole chip);
#endif

View File

@@ -153,11 +153,9 @@ void rt_led_hw_init(void)
}
#ifdef RT_USING_FINSH
#include <finsh.h>
void led(rt_uint32_t led, rt_uint32_t value)
{
rt_uint8_t led_value = value;
rt_led_write(&fm4_led.parent, led, &led_value, 1);
}
FINSH_FUNCTION_EXPORT(led, e.g:led(0,0)/led(0,1).)
#endif

View File

@@ -156,11 +156,9 @@ void rt_led_hw_init(void)
}
#ifdef RT_USING_FINSH
#include <finsh.h>
void led(rt_uint32_t led, rt_uint32_t value)
{
rt_uint8_t led_value = value;
rt_led_write(&fm3_led.parent, led, &led_value, 1);
}
FINSH_FUNCTION_EXPORT(led, e.g:led(0,100).)
#endif

View File

@@ -667,7 +667,3 @@ void dm9000a(void)
rt_kprintf("\n");
}
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(dm9000a, dm9000a register dump);
#endif

View File

@@ -698,7 +698,3 @@ void dm9161a(void)
{
}
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(dm9161a, dm9161a register dump);
#endif

View File

@@ -15,10 +15,6 @@
#include "board.h"
#include <rtdevice.h>
#ifdef RT_USING_FINSH
#include <finsh.h>
#endif
#include "fsl_enet.h"
#include "fsl_gpio.h"
#include "fsl_cache.h"
@@ -1094,7 +1090,6 @@ INIT_DEVICE_EXPORT(rt_hw_imxrt_eth_init);
#endif
#if defined(RT_USING_FINSH) && defined(RT_USING_PHY)
#include <finsh.h>
void phy_read(rt_uint32_t phy_reg)
{
@@ -1313,12 +1308,5 @@ void enet_buf_info(void)
}
}
FINSH_FUNCTION_EXPORT(phy_read, read phy register);
FINSH_FUNCTION_EXPORT(phy_write, write phy register);
FINSH_FUNCTION_EXPORT(phy_dump, dump phy registers);
FINSH_FUNCTION_EXPORT(enet_reg_dump, dump enet registers);
FINSH_FUNCTION_EXPORT(enet_nvic_tog, toggle enet nvic pendding bit);
FINSH_FUNCTION_EXPORT(enet_rx_stat, dump enet rx statistic);
FINSH_FUNCTION_EXPORT(enet_buf_info, dump enet tx and tx buffer descripter);
#endif

View File

@@ -17,7 +17,6 @@
#include <fsl_gpio.h>
#include <fsl_iomuxc.h>
#include <finsh.h>
#define RT_USING_SDIO1
#define RT_USING_SDIO2
@@ -395,7 +394,6 @@ static void log_toggle(int en)
{
enable_log = en;
}
FINSH_FUNCTION_EXPORT(log_toggle, toglle log dumple);
#endif
static const struct rt_mmcsd_host_ops ops =

View File

@@ -201,5 +201,4 @@ void key(rt_uint32_t key)
ekbd.type = RTGUI_KEYUP;
rtgui_server_post_event((struct rtgui_event*)&ekbd, sizeof(ekbd));
}
FINSH_FUNCTION_EXPORT(key, send a key to gui server);
#endif

View File

@@ -536,7 +536,6 @@ void lpc17xx_emac_hw_init(void)
}
#ifdef RT_USING_FINSH
#include <finsh.h>
void emac_dump()
{
rt_kprintf("Command : %08x\n", LPC_EMAC->Command);
@@ -546,6 +545,5 @@ void emac_dump()
rt_kprintf("IntEnable: %08x\n", LPC_EMAC->IntEnable);
rt_kprintf("IntStatus: %08x\n", LPC_EMAC->IntStatus);
}
FINSH_FUNCTION_EXPORT(emac_dump, dump emac register);
#endif

View File

@@ -94,7 +94,3 @@ void lcd_fill(uint8_t * start, uint8_t * end, uint8_t pixel)
*start++ = pixel;
}
}
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(lcd_fill, lcd_fill );
#endif

View File

@@ -493,7 +493,6 @@ int rt_hw_emac_init(void)
INIT_DEVICE_EXPORT(rt_hw_emac_init);
#ifdef RT_USING_FINSH
#include <finsh.h>
void emac_dump()
{
rt_kprintf("Command : %08x\n", LPC_EMAC->Command);
@@ -503,6 +502,5 @@ void emac_dump()
rt_kprintf("IntEnable: %08x\n", LPC_EMAC->IntEnable);
rt_kprintf("IntStatus: %08x\n", LPC_EMAC->IntStatus);
}
FINSH_FUNCTION_EXPORT(emac_dump, dump emac register);
#endif

View File

@@ -144,11 +144,9 @@ int rt_hw_led_init(void)
INIT_DEVICE_EXPORT(rt_hw_led_init);
#ifdef RT_USING_FINSH
#include <finsh.h>
void led_test(rt_uint32_t led_num, rt_uint32_t value)
{
rt_uint8_t led_value = value;
rt_led_write(&led.parent, led_num, &led_value, 1);
}
FINSH_FUNCTION_EXPORT(led_test, e.g: led_test(0, 100).)
#endif

View File

@@ -517,7 +517,6 @@ int lpc_emac_hw_init(void)
INIT_DEVICE_EXPORT(lpc_emac_hw_init);
#ifdef RT_USING_FINSH
#include <finsh.h>
void emac_dump()
{
rt_kprintf("Command : %08x\n", LPC_EMAC->Command);
@@ -527,6 +526,5 @@ void emac_dump()
rt_kprintf("IntEnable: %08x\n", LPC_EMAC->IntEnable);
rt_kprintf("IntStatus: %08x\n", LPC_EMAC->IntStatus);
}
FINSH_FUNCTION_EXPORT(emac_dump, dump emac register);
#endif

View File

@@ -159,11 +159,9 @@ int rt_led_hw_init(void)
INIT_DEVICE_EXPORT(rt_led_hw_init);
#ifdef RT_USING_FINSH
#include <finsh.h>
void led_test(rt_uint32_t led_num, rt_uint32_t value)
{
rt_uint8_t led_value = value;
rt_led_write(&led.parent, led_num, &led_value, 1);
}
FINSH_FUNCTION_EXPORT(led_test, e.g: led_test(0, 100).)
#endif

View File

@@ -195,11 +195,9 @@ void Led_Control(rt_uint32_t Set_led, rt_uint32_t value)
INIT_DEVICE_EXPORT(rt_led_hw_init);
#ifdef RT_USING_FINSH
#include <finsh.h>
void led_test(rt_uint32_t led_num, rt_uint32_t value)
{
rt_uint8_t led_value = value;
rt_led_write(&led.parent, led_num, &led_value, 1);
}
FINSH_FUNCTION_EXPORT(led_test, e.g: led_test(0, 100).)
#endif

View File

@@ -724,10 +724,3 @@ void emac_bd_dump(void)
}
}
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(emac_stat, dump emac stat data);
FINSH_FUNCTION_EXPORT(phy_dump, dump phy registers);
FINSH_FUNCTION_EXPORT(emac_dump, dump emac registers);
FINSH_FUNCTION_EXPORT(emac_bd_dump, dump emac tx and rx descriptor);
#endif

View File

@@ -457,8 +457,6 @@ void lcd_test(void)
}
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(lcd_clear, lcd_clear);
FINSH_FUNCTION_EXPORT(lcd_test, lcd_test);
#ifdef FINSH_USING_MSH
MSH_CMD_EXPORT(lcd_clear, lcd_clear);
MSH_CMD_EXPORT(lcd_test, lcd_test);

View File

@@ -83,8 +83,6 @@ void rt_hw_exit(void)
}
#if defined(RT_USING_FINSH)
#include <finsh.h>
FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_exit, exit, exit rt - thread);
MSH_CMD_EXPORT_ALIAS(rt_hw_exit, quit, exit rt-thread);
#endif /* RT_USING_FINSH */

View File

@@ -347,11 +347,6 @@ rt_module_t rt_module_open(const char *path)
/* FreeLibrary(hinstlib); */
}
#if defined(RT_USING_FINSH)
#include <finsh.h>
FINSH_FUNCTION_EXPORT_ALIAS(rt_module_open, exec, exec module from a file);
#endif
#endif
#define RT_MODULE_ARG_MAX 8

View File

@@ -393,7 +393,6 @@ void rt_hw_mtd_nand_init(void)
}
#if defined(RT_USING_FINSH)
#include <finsh.h>
void nand_eraseall()
{
int index;
@@ -402,6 +401,5 @@ void nand_eraseall()
nanddrv_file_erase_block(&_nanddrv_file_device, index);
}
}
FINSH_FUNCTION_EXPORT(nand_eraseall, erase all of block in the nand flash);
#endif //RT_USING_FINSH

View File

@@ -197,7 +197,6 @@ rt_err_t rt_hw_sdcard_init(const char *spi_device_name)
}
#ifdef RT_USING_FINSH
#include <finsh.h>
int sd_erase(void)
{
rt_uint32_t index;
@@ -219,5 +218,4 @@ int sd_erase(void)
rt_free(buffer);
return 0;
}
FINSH_FUNCTION_EXPORT(sd_erase, erase all block in SPI flash);
#endif

View File

@@ -235,7 +235,6 @@ rt_err_t sst25vfxx_mtd_init(const char *nor_name,
}
#ifdef RT_USING_FINSH
#include <finsh.h>
void nor_erase(void)
{
rt_uint32_t index;
@@ -247,7 +246,6 @@ void nor_erase(void)
sst25vfxx_erase_block(mtd, index * mtd->block_size, BLOCK_SIZE);
}
}
FINSH_FUNCTION_EXPORT(nor_erase, erase all block in SPI flash);
#endif
#endif

View File

@@ -276,7 +276,6 @@ void pcap_netif_hw_init(void)
eth_device_init(&(pcap_netif_device.parent), "e0");
}
#include <finsh.h>
void list_pcap(void)
{
int i=0;
@@ -310,4 +309,3 @@ void list_pcap(void)
return ;
}
FINSH_FUNCTION_EXPORT(list_pcap, show host netif adapter);

View File

@@ -1488,20 +1488,17 @@ INIT_COMPONENT_EXPORT(rt_hw_tiva_eth_init);
#if 0
#ifdef RT_USING_FINSH
#include "finsh.h"
void PHY_Read(uint8_t addr)
{
uint16_t data = EMACPHYRead(EMAC0_BASE, PHY_PHYS_ADDR, addr);
rt_kprintf("R PHY_REG[0x%02X] = 0x%04X\n", addr, data);
}
FINSH_FUNCTION_EXPORT(PHY_Read, (add));
void PHY_Write(uint8_t addr , uint16_t data)
{
EMACPHYWrite(EMAC0_BASE, PHY_PHYS_ADDR, addr, data);
rt_kprintf("W PHY_REG[0x%02X] = 0x%04X\n", addr, data);
}
FINSH_FUNCTION_EXPORT(PHY_Write, (add, data));
void PHY_SetAdd(uint8_t addr0, uint8_t addr1, uint8_t addr2,
uint8_t addr3, uint8_t addr4, uint8_t addr5)
@@ -1514,6 +1511,5 @@ void PHY_SetAdd(uint8_t addr0, uint8_t addr1, uint8_t addr2,
MAP_FlashUserSave();
rt_kprintf("Save to EEPROM. please reboot.");
}
FINSH_FUNCTION_EXPORT(PHY_SetAdd, (add0-add5));
#endif //RT_USING_FINSH
#endif

View File

@@ -152,11 +152,9 @@ int rt_led_hw_init(void)
INIT_DEVICE_EXPORT(rt_led_hw_init);
#ifdef RT_USING_FINSH
#include <finsh.h>
void led_test(rt_uint32_t led_num, rt_uint32_t value)
{
rt_uint8_t led_value = value;
rt_led_write(&led.parent, led_num, &led_value, 1);
}
FINSH_FUNCTION_EXPORT(led_test, e.g: led_test(0, 100).)
#endif

View File

@@ -780,7 +780,6 @@ int dfs_file_mmap2(struct dfs_file *fd, struct dfs_mmap2_args *mmap2)
#endif
#ifdef RT_USING_FINSH
#include <finsh.h>
void ls(const char *pathname)
{
@@ -853,7 +852,6 @@ void ls(const char *pathname)
if (pathname == NULL)
rt_free(path);
}
FINSH_FUNCTION_EXPORT(ls, list directory contents);
void rm(const char *filename)
{
@@ -862,7 +860,6 @@ void rm(const char *filename)
rt_kprintf("Delete %s failed\n", filename);
}
}
FINSH_FUNCTION_EXPORT(rm, remove files or directories);
void cat(const char *filename)
{
@@ -893,7 +890,6 @@ void cat(const char *filename)
dfs_file_close(&fd);
}
FINSH_FUNCTION_EXPORT(cat, print file);
#ifdef DFS_USING_POSIX
#define BUF_SZ 4096
@@ -1119,7 +1115,6 @@ void copy(const char *src, const char *dst)
}
}
}
FINSH_FUNCTION_EXPORT(copy, copy file or dir)
#endif /* DFS_USING_POSIX */
#endif /* RT_USING_FINSH */

View File

@@ -613,12 +613,10 @@ err1:
#endif
#ifdef RT_USING_FINSH
#include <finsh.h>
void mkfs(const char *fs_name, const char *device_name)
{
dfs_mkfs(fs_name, device_name);
}
FINSH_FUNCTION_EXPORT(mkfs, make a file system);
int df(const char *path)
{
@@ -653,7 +651,6 @@ int df(const char *path)
(unsigned long)cap, minor, unit_str[unit_index], buffer.f_bfree, buffer.f_bsize);
return 0;
}
FINSH_FUNCTION_EXPORT(df, get disk free);
#endif
/**@}*/

View File

@@ -978,9 +978,6 @@ int chdir(const char *path)
}
RTM_EXPORT(chdir);
#ifdef RT_USING_FINSH
FINSH_FUNCTION_EXPORT_ALIAS(chdir, cd, change current working directory);
#endif
#endif
/**

View File

@@ -3027,6 +3027,5 @@ void copy(const char *src, const char *dst)
}
}
}
FINSH_FUNCTION_EXPORT(copy, copy file or dir)
#endif

View File

@@ -847,11 +847,6 @@ int mkdir(const char *path, mode_t mode)
}
RTM_EXPORT(mkdir);
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(mkdir, create a directory);
#endif
/**
* this function is a POSIX compliant version, which will remove a directory.
*
@@ -1241,9 +1236,6 @@ int chdir(const char *path)
}
RTM_EXPORT(chdir);
#ifdef RT_USING_FINSH
FINSH_FUNCTION_EXPORT_ALIAS(chdir, cd, change current working directory);
#endif
#endif
/**

View File

@@ -411,15 +411,6 @@ help:
MSH_CMD_EXPORT(mtd_nand, MTD nand device test function);
#endif /* RT_USING_FINSH */
#ifndef RT_USING_FINSH_ONLY
FINSH_FUNCTION_EXPORT_ALIAS(mtd_nandid, nand_id, read ID - nandid(name));
FINSH_FUNCTION_EXPORT_ALIAS(mtd_nand_read, nand_read, read page in nand - nand_read(name, block, page));
FINSH_FUNCTION_EXPORT_ALIAS(mtd_nand_readoob, nand_readoob, read spare data in nand - nand_readoob(name, block, page));
FINSH_FUNCTION_EXPORT_ALIAS(mtd_nand_write, nand_write, write dump data to nand - nand_write(name, block, page));
FINSH_FUNCTION_EXPORT_ALIAS(mtd_nand_erase, nand_erase, nand_erase(name, block));
FINSH_FUNCTION_EXPORT_ALIAS(mtd_nand_erase_all, nand_erase_all, erase all of nand device - nand_erase_all(name, block));
#endif /* RT_USING_FINSH_ONLY */
#endif /* defined(RT_MTD_NAND_DEBUG) && defined(RT_USING_FINSH) */
#endif /* RT_USING_MTD_NAND */

View File

@@ -1279,7 +1279,6 @@ static void rt_pm_dump_status(void)
}
rt_kprintf("+--------+------+------------+-----------+\n");
}
FINSH_FUNCTION_EXPORT_ALIAS(rt_pm_dump_status, pm_dump, dump power management status);
MSH_CMD_EXPORT_ALIAS(rt_pm_dump_status, pm_dump, dump power management status);
#endif

View File

@@ -815,7 +815,6 @@ int32_t rw009_rssi(void)
}
#ifdef RT_USING_FINSH
#include <finsh.h>
static rt_err_t rw009_scan(void)
{
@@ -845,8 +844,5 @@ static rt_err_t rw009_scan(void)
return result;
}
FINSH_FUNCTION_EXPORT(rw009_scan, SACN and list AP.);
FINSH_FUNCTION_EXPORT(rw009_join, RW009 join to AP.);
FINSH_FUNCTION_EXPORT(rw009_rssi, get RW009 current AP rssi.);
#endif // RT_USING_FINSH

View File

@@ -842,7 +842,6 @@ rt_err_t enc28j60_attach(const char *spi_device_name)
}
#ifdef RT_USING_FINSH
#include <finsh.h>
/*
* Debug routine to dump useful register contents
*/
@@ -895,5 +894,4 @@ static void enc28j60(void)
enc28j60_unlock(&enc28j60_dev);
}
FINSH_FUNCTION_EXPORT(enc28j60, dump enc28j60 registers);
#endif

View File

@@ -110,28 +110,6 @@ typedef long (*syscall_func)(void);
#define _MSH_FUNCTION_EXPORT_CMD3_OPT(a0, a1, a2, a3) \
MSH_FUNCTION_EXPORT_CMD(a0, a1, a2, a0##_msh_options)
/**
* @ingroup group_finsh
*
* @brief This macro exports a system function to finsh shell.
*
* @param[in] name Name of function.
* @param[in] desc Description of function, which will show in help.
*/
#define FINSH_FUNCTION_EXPORT(name, desc)
/**
* @ingroup group_finsh
*
* @brief Exports a system function with an alias name to finsh shell.
*
* @param[in] name Name of function.
* @param[in] alias Alias name of function.
* @param[in] desc Description of function, which will show in help.
*/
#define FINSH_FUNCTION_EXPORT_ALIAS(name, alias, desc)
/**
* @ingroup group_finsh
*

View File

@@ -221,7 +221,6 @@ rt_err_t ping(char* target_name, rt_uint32_t times, rt_size_t size)
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(ping, ping network host);
int cmd_ping(int argc, char **argv)
{

View File

@@ -221,7 +221,6 @@ rt_err_t ping(char* target_name, rt_uint32_t times, rt_size_t size)
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(ping, ping network host);
int cmd_ping(int argc, char **argv)
{

View File

@@ -66,7 +66,6 @@ static void tftp_server(uint8_t argc, char **argv)
rt_kprintf("TFTP server start failed.\n");
}
}
FINSH_FUNCTION_EXPORT(tftp_server, start tftp server.);
MSH_CMD_EXPORT(tftp_server, start tftp server.);

View File

@@ -221,7 +221,6 @@ rt_err_t ping(char* target_name, rt_uint32_t times, rt_size_t size)
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(ping, ping network host);
int cmd_ping(int argc, char **argv)
{

View File

@@ -66,7 +66,6 @@ static void tftp_server(uint8_t argc, char **argv)
rt_kprintf("TFTP server start failed.\n");
}
}
FINSH_FUNCTION_EXPORT(tftp_server, start tftp server.);
MSH_CMD_EXPORT(tftp_server, start tftp server.);

View File

@@ -1075,7 +1075,6 @@ void set_if(char* netif_name, char* ip_addr, char* gw_addr, char* nm_addr)
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(set_if, set network interface address);
#if LWIP_DNS
#include <lwip/dns.h>
@@ -1088,7 +1087,6 @@ void set_dns(uint8_t dns_num, char* dns_server)
dns_setserver(dns_num, &addr);
}
}
FINSH_FUNCTION_EXPORT(set_dns, set DNS server address);
#endif
void list_if(void)
@@ -1174,7 +1172,6 @@ void list_if(void)
rt_exit_critical();
}
FINSH_FUNCTION_EXPORT(list_if, list network interface information);
#if LWIP_TCP
#include <lwip/tcp.h>
@@ -1240,7 +1237,6 @@ void list_tcps(void)
}
rt_exit_critical();
}
FINSH_FUNCTION_EXPORT(list_tcps, list all of tcp connections);
#endif /* LWIP_TCP */
#if LWIP_UDP
@@ -1270,7 +1266,6 @@ void list_udps(void)
}
rt_exit_critical();
}
FINSH_FUNCTION_EXPORT(list_udps, list all of udp connections);
#endif /* LWIP_UDP */
#endif

View File

@@ -1303,16 +1303,3 @@ void rt_vbus_chm_wm_dump(void)
}
#endif
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_rb_dump, vbrb, dump vbus ringbuffer status);
FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_chn_dump, vbchn, dump vbus channel status);
FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_sess_dump, vbses, dump vbus session status);
FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_que_dump, vbque, dump vbus out queue status);
FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_total_data_sz, vbtsz, total in data);
FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_data_pkt_dump, vbdq, dump the data queue);
#ifdef RT_VBUS_USING_FLOW_CONTROL
FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_chm_wm_dump, vbwm, dump vbus water mark status);
#endif
#endif

View File

@@ -69,7 +69,6 @@ void list_dir(const char* path)
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(list_dir, list directory);
static void cmd_list_dir(int argc, char *argv[])
{

View File

@@ -60,7 +60,6 @@ void readspeed(const char* filename, int block_size)
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(readspeed, perform file read test);
static void cmd_readspeed(int argc, char *argv[])
{

View File

@@ -149,7 +149,6 @@ __exit:
#ifdef RT_USING_FINSH
#include <finsh.h>
/* export to finsh */
FINSH_FUNCTION_EXPORT(readwrite, perform file read and write test);
static void cmd_readwrite(int argc, char *argv[])
{

View File

@@ -48,6 +48,5 @@ void seekdir_test(void)
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(seekdir_test, perform directory seek test);
MSH_CMD_EXPORT(seekdir_test, perform directory seek test);
#endif /* RT_USING_FINSH */

View File

@@ -68,7 +68,6 @@ void writespeed(const char* filename, int total_length, int block_size)
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(writespeed, perform file write test);
static void cmd_writespeed(int argc, char *argv[])
{

View File

@@ -9,7 +9,6 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <finsh.h>
#include <dirent.h>
int libc_dirent()
@@ -56,4 +55,3 @@ int libc_dirent()
closedir(dirp);
return result;
}
FINSH_FUNCTION_EXPORT(libc_dirent, dirent test for libc);

View File

@@ -10,7 +10,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <finsh.h>
int libc_env()
{
@@ -19,4 +18,3 @@ int libc_env()
printf("foo=%s\n", getenv("foo"));
return 0;
}
FINSH_FUNCTION_EXPORT(libc_env, get/set_env test);

View File

@@ -41,5 +41,3 @@ int libc_ex1(void)
printf("join b %s %d\n", sucfail(pret), pret);
return ret;
}
#include <finsh.h>
FINSH_FUNCTION_EXPORT(libc_ex1, example 1 for libc);

View File

@@ -118,5 +118,3 @@ int libc_ex2(void)
pthread_join(th_b, &retval);
return 0;
}
#include <finsh.h>
FINSH_FUNCTION_EXPORT(libc_ex2, example 2 for libc);

View File

@@ -54,8 +54,6 @@ int libc_ex3()
/* Exit the program */
return 0;
}
#include <finsh.h>
FINSH_FUNCTION_EXPORT(libc_ex3, example 5 for libc);
/* This is the cleanup function that is called
when the threads are cancelled */

View File

@@ -112,5 +112,3 @@ int libc_ex4()
pthread_join(th1, NULL);
pthread_join(th2, NULL);
}
#include <finsh.h>
FINSH_FUNCTION_EXPORT(libc_ex4, example 4 for libc);

View File

@@ -108,6 +108,4 @@ int libc_ex5(void)
pthread_join(th_b, &retval);
return 0;
}
#include <finsh.h>
FINSH_FUNCTION_EXPORT(libc_ex5, example 5 for libc);

View File

@@ -41,5 +41,3 @@ int libc_ex6(void) {
}
return 0;
}
#include <finsh.h>
FINSH_FUNCTION_EXPORT(libc_ex6, example 6 for libc);

View File

@@ -105,5 +105,3 @@ int libc_ex7(void) {
return 0;
}
#include <finsh.h>
FINSH_FUNCTION_EXPORT(libc_ex7, example 7 for libc);

View File

@@ -10,7 +10,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <finsh.h>
#include <sys/errno.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
@@ -35,7 +34,6 @@ void libc_fstat()
printf("fstat result: %d\n", fstat(fd, &s));
close(fd);
}
FINSH_FUNCTION_EXPORT(libc_fstat, fstat test for libc);
void libc_lseek()
{
@@ -53,7 +51,6 @@ void libc_lseek()
printf("end: %d\n", lseek(fd, 0, SEEK_END));
close(fd);
}
FINSH_FUNCTION_EXPORT(libc_lseek, lseek test for libc);
void sleep(int tick)
{
@@ -517,4 +514,3 @@ int libc_fseek(void)
return result;
}
FINSH_FUNCTION_EXPORT(libc_fseek, lseek test for libc);

View File

@@ -10,7 +10,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <finsh.h>
#include <sys/errno.h>
static int errors = 0;
@@ -57,4 +56,3 @@ int libc_mem(void)
return errors != 0;
}
FINSH_FUNCTION_EXPORT(libc_mem, memory test for libc);

View File

@@ -125,5 +125,3 @@ int libc_mq()
printf("PASSED\n");
return 0;
}
#include <finsh.h>
FINSH_FUNCTION_EXPORT(libc_mq, posix mqueue test);

View File

@@ -12,7 +12,6 @@
#include <stdlib.h>
#include <sys/fcntl.h>
#include <finsh.h>
char * format[] = {
"%",
@@ -177,7 +176,6 @@ void libc_printf()
printf_test();
}
FINSH_FUNCTION_EXPORT(libc_printf, printf test in libc);
void libc_dprintf()
@@ -191,7 +189,6 @@ void libc_dprintf()
close(fd);
}
}
FINSH_FUNCTION_EXPORT(libc_dprintf, dprintf test);
void libc_fdopen()
@@ -207,4 +204,3 @@ void libc_fdopen()
fclose(fp);
}
}
FINSH_FUNCTION_EXPORT(libc_fdopen, fdopen test);

View File

@@ -10,7 +10,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <finsh.h>
int libc_rand(void)
{
@@ -44,4 +43,3 @@ int libc_rand(void)
return 1;
}
}
FINSH_FUNCTION_EXPORT(libc_rand, rand test for libc);

View File

@@ -59,7 +59,6 @@ static void test_thread(void* parameter)
pthread_exit(0);
}
#include <finsh.h>
void libc_sem()
{
rt_thread_t tid;
@@ -71,4 +70,3 @@ void libc_sem()
rt_thread_startup(tid);
}
}
FINSH_FUNCTION_EXPORT(libc_sem, posix semaphore test);

View File

@@ -10,7 +10,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <finsh.h>
int speed()
{
@@ -24,4 +23,3 @@ int speed()
printf("%d\n", time(0));
return 0;
}
FINSH_FUNCTION_EXPORT(speed, speed test);

View File

@@ -235,10 +235,8 @@ void chargen_init(void)
if (chargen != RT_NULL) rt_thread_startup(chargen);
}
#ifdef RT_USING_FINSH
#include <finsh.h>
void chargen()
{
chargen_init();
}
FINSH_FUNCTION_EXPORT(chargen, start chargen server);
#endif

View File

@@ -82,8 +82,6 @@ void tcp_senddata(const char *url, int port, int length)
}
#ifdef RT_USING_FINSH
#include <finsh.h>
/* 输出tcpclient函数到finsh shell中 */
FINSH_FUNCTION_EXPORT(tcp_senddata, send a packet through tcp connection);
#endif

View File

@@ -509,8 +509,3 @@ int device_test(const char * device_name)
}
}
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(device_test, e.g: device_test("sd0"));
#endif

View File

@@ -345,5 +345,3 @@ register int l;
}
#endif
#include <finsh.h>
FINSH_FUNCTION_EXPORT(dhry_test, dhry test);

View File

@@ -291,7 +291,3 @@ void fs_test(rt_uint32_t arg)
}
}
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(fs_test, file system R/W test. e.g: fs_test(3));
#endif

View File

@@ -108,7 +108,3 @@ void mem_test(uint32_t address, uint32_t size )
}
}
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(mem_test, mem_test(0xA0000000, 0x00100000) );
#endif

View File

@@ -11,7 +11,6 @@
* Net Test Utilities for RT-Thread
*/
#include <rtthread.h>
#include <finsh.h>
#include <lwip/api.h>
#include <lwip/sockets.h>
#include <lwip/init.h>
@@ -342,4 +341,3 @@ void net_test(void)
rt_thread_startup(tcpecho_socket_tid);
}
}
FINSH_FUNCTION_EXPORT(net_test, network test);

View File

@@ -56,6 +56,5 @@ int rtc_test(void)
}
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(rtc_test, rtc driver test. e.g: rtc_test());
MSH_CMD_EXPORT(rtc_test, rtc driver test. e.g: rtc_test());
#endif

View File

@@ -42,7 +42,6 @@ rt_err_t rym_cat_to_dev(rt_device_t idev, rt_device_t odev)
}
#ifdef RT_USING_FINSH
#include <finsh.h>
void rym_cat_vcom(void)
{
extern rt_err_t rym_cat_to_dev(rt_device_t idev, rt_device_t odev);
@@ -63,6 +62,5 @@ void rym_cat_vcom(void)
rym_cat_to_dev(idev, odev);
}
FINSH_FUNCTION_EXPORT(rym_cat_vcom, test the YModem);
#endif

View File

@@ -18,7 +18,6 @@ static enum rym_code _rym_dummy_write(
}
#ifdef RT_USING_FINSH
#include <finsh.h>
rt_err_t rym_null(char *devname)
{
struct rym_ctx rctx;
@@ -32,6 +31,5 @@ rt_err_t rym_null(char *devname)
return rym_recv_on_device(&rctx, dev, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_INT_RX,
RT_NULL, _rym_dummy_write, RT_NULL, 1000);
}
FINSH_FUNCTION_EXPORT(rym_null, dump data to null);
#endif

Some files were not shown because too many files have changed in this diff Show More