Commit Graph

839 Commits

Author SHA1 Message Date
prife f71f0595d6 DFS/jffs2: fix bug when umount jffs2
found by haitao5198
clear mount parition device talbe when jffs2 mount falied
2013-09-28 14:57:05 +08:00
prife 12a6366217 DFS/jffs2: fix file mode init bug in jffs2_open/opendir
found by haitao52198
URL:http://www.rt-thread.org/phpBB3/viewtopic.php?f=3&t=3112&p=17153#p17153
2013-09-28 14:43:00 +08:00
Grissiom df4e8ff060 msh: only export cd/pwd when DFS_USING_WORKDIR is set 2013-09-26 11:50:28 +08:00
Grissiom 05651e7c66 logtrace: only export cmd when finsh is enabled 2013-09-26 11:49:33 +08:00
Grissiom 2a20337707 logtrace: adjust the log values
logtrace only use odd number of log levels. So the use could set some
custom level amount them.
2013-09-23 15:13:45 +08:00
Grissiom 519982fa74 logtrace: add LOG_TRACE_VERBOSE log level 2013-09-23 15:10:02 +08:00
Grissiom 783a6a6717 logtrace: cleanup code and fix compiling warnings 2013-09-23 13:13:03 +08:00
Grissiom 6d2df9bf94 finsh: unregister rx_indicate when closing the device
Because the device could still remain opened when closed by finsh, the
old rx_indicate is useless for finsh. Some buggy driver will still
generate rx_indicate even after the device has been closed. So FinSh
should unregister the rx_indicate when releasing the old device.
2013-09-22 22:12:04 +08:00
bernard 0bf7ed76cf Merge branch 'master' of https://github.com/RT-Thread/rt-thread 2013-09-17 11:07:36 +08:00
bernard 77096894f9 change the compiling macro before DFS option 2013-09-17 11:07:24 +08:00
Bernard Xiong 2bcb9edd91 Add gettimeofday declaration in sys/time.h 2013-09-08 15:01:29 +08:00
Grissiom ea66b820e1 log_trace: cleanup 2013-09-03 16:09:16 +08:00
Grissiom c05b205390 finsh: use alias in the variable definition
With this patch, one could define two alias for the same function like:

    FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_cpu_reset, reboot, reboot the cpu);
    FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_cpu_reset, __cmd_reboot, reboot the cpu);

Suitable for being used in MSH/Finsh.
2013-08-31 17:58:34 +08:00
Grissiom 246bdde8de dev/portal: fix bug in portal callback forwarding
When forwarding rx/tx callback from the underlaying device(pipe), the
"dev" argument should be the portal. So the portal callback could think
itself as called.
2013-08-22 16:43:06 +08:00
Grissiom 824261d3bc dev/portal: add checks on oflag
It does not make sense to open portal without a flag. One should open a
portal with RT_DEVICE_OFLAG_RDWR in most cases.
2013-08-22 15:12:00 +08:00
Grissiom b4ab82284f finsh/cmd: add description for new pipe and portal device 2013-08-20 14:27:28 +08:00
Grissiom 6e676e7754 dev/portal: implement portal device
Portal is a device that connect devices. Currently, you can only connect
pipes in portal. Pipes are unidirectional. But with portal, you can
construct a bidirectional device with two pipes.
2013-08-20 12:54:43 +08:00
Grissiom 7e68096a88 dev/pipe: make pipe a type of device
Pipe have many differences with char device. The main difference is
altough pipe have both read and write, it is unidirectional in nature.
2013-08-20 10:16:55 +08:00
Grissiom 0340300f89 dev/pipe: cleanup 2013-08-19 16:25:17 +08:00
Grissiom e8cca2315a dev/pipe: call rx_indicate the time we resume reader
Some reader(FinSh again) would like to block on a semaphore which is
released in rx_indicate. So we should invoke rx_indicate in
_rt_pipe_resume_reader.
2013-08-19 15:57:59 +08:00
Grissiom d683d32bd5 device/pipe: add nonblocking read/write and force write mode
The previous implementation will always blocks the reader/writer.
However, at least FinSh would expect the device to be nonblocking ---
read should return 0 when there is no data in it.
2013-08-19 15:35:56 +08:00
Grissiom 4919d29d69 ringbuffer: add put_force and putchar_force API
Add the APIs that will discard the old data when rb is full.
2013-08-19 15:32:42 +08:00
Grissiom 981d929b56 ringbuffer: fix the ambiguous name
RT_RINGBUFFER_SIZE could mean "the size of the whole buffer", "the size
of the empty space" or "the size of the data". Moreover, it's never a
micro anymore. Change it to rt_ringbuffer_data_len before it's too late.
Also, RT_RINGBUFFER_EMPTY is changed to rt_ringbuffer_space_len.
2013-08-19 14:12:35 +08:00
bernard 6f75988cee Merge branch 'master' of https://github.com/RT-Thread/rt-thread 2013-08-19 13:00:48 +08:00
bernard d8695085dc Merge branch 'master' of https://github.com/RT-Thread/rt-thread 2013-08-19 12:47:40 +08:00
bernard fa934fa7bd add shell device automatically setting for rx_ind 2013-08-19 12:46:04 +08:00
Grissiom 38ce3879d8 device/pipe: add rt_pipe_{init,detach}
This provide the possibility that allocate the buffer of the ringbuffer
on a specific region, instead of always mallocing it. It also bring us
the benefit of using pipe device on the systems without heap.
2013-08-19 12:28:59 +08:00
Bernard Xiong 0826efaab3 Merge branch 'master' of https://github.com/RT-Thread/rt-thread 2013-08-12 07:22:04 -07:00
Bernard Xiong 05b9eb0b82 remove compiling warning 2013-08-12 07:21:29 -07:00
bernard ac10730492 fix O_APPEND write issue in RAMFS 2013-07-29 14:50:12 +08:00
bernard ac850ef3f0 add device_open/close in mkfs 2013-07-29 14:43:52 +08:00
bernard 914244f368 Merge branch 'master' of https://github.com/RT-Thread/rt-thread 2013-07-29 13:53:38 +08:00
bernard d74dee0dd6 Add ramfs into building script 2013-07-29 13:52:59 +08:00
Bernard Xiong a431a25699 Merge pull request #135 from reynoldxu/K60Fxxxx
K60 fxxxx
2013-07-25 03:55:52 -07:00
reynoldxu 10c75c3dc6 remove a var for INT_TX. 2013-07-25 10:18:33 +08:00
reynoldxu 8f0fffc132 fix a bug in rt_hw_uart_init() where u CAN NOT init some feature. 2013-07-24 18:34:07 +08:00
bernard a124e7bd22 add initialization debug code 2013-07-24 07:33:48 +08:00
bernard b96b35613f add mount table 2013-07-22 07:46:10 +08:00
Bernard Xiong f0f0e3dd9e move commands out of DFS 2013-07-14 14:36:48 +08:00
Bernard Xiong 493930ea07 Merge pull request #118 from BernardXiong/master
Remove initialization feature for MS VC++ compiler.
2013-07-09 13:56:51 -07:00
Bernard Xiong 4f0cb88739 Merge pull request #120 from prife/dfs-fix
dfs: fix the variable definition bug in copy, found by ffgamelife from rt-thread.org
2013-07-06 06:06:57 -07:00
prife 15b08b483a dfs: fix the variable definition bug in copy, found by ffgamelife from rt-thread.org 2013-07-06 16:41:10 +08:00
Bernard Xiong ca56dce2a3 remove initialization feature for MS VC++ compiler 2013-07-05 19:32:16 -04:00
Bernard Xiong b0c1f8a79b Add device checking when set_device. 2013-07-05 21:02:47 +08:00
Bernard Xiong 1dd7e05336 fix lwip 1.4.1 compiling error when enable component init 2013-06-30 22:50:33 +08:00
Bernard Xiong 1172b47d1e add sys_now() function porting 2013-06-30 22:37:05 +08:00
Bernard Xiong e156a8d62b Move logtrace to utilites 2013-06-30 21:51:41 +08:00
Bernard Xiong 86c9ea1117 Use lwIP 1.4.1 as the default TCP/IP protocol stack 2013-06-30 21:46:14 +08:00
Bernard Xiong 91ee1e07cf rename group of logtrace 2013-06-30 21:42:34 +08:00
yiyue.fang 873a5de811 reformat the coding style in dfs_ramfs.c 2013-06-29 10:43:03 +08:00