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
yiyue.fang
03cf76e7ef
reformat the coding style in usbdevice/core/core.c
2013-06-29 10:32:27 +08:00
yiyue.fang
3359419d4f
additional update
2013-06-28 00:39:11 +08:00
yiyue.fang
621fbdb90c
Embedded GPLv2 license in drivers
2013-06-28 00:36:54 +08:00
yiyue.fang
90ac1c9ba4
Embedded GPLv2 license in components
2013-06-26 23:25:12 +08:00
yiyue.fang
8ab2b287b8
Embedded GPLv2 license in pthreads
2013-06-26 23:18:30 +08:00
yiyue.fang
773990abdb
Embedded GPLv2 license in dfs
2013-06-26 22:30:40 +08:00
Grissiom
247772df3b
add logtrace component
...
Logtrace is a component that could output the log into either a device
or a file. It has the ability to filter the log messages according to a
pre-module level. Define RT_USING_LOGTRACE in rtconfig.h if you want to
have a try.
2013-06-26 10:34:49 +08:00
Bernard Xiong
d7762e5a7d
Update SConscript
2013-06-23 23:48:22 +08:00
Bernard Xiong
97d1ebf6e8
Update SConscript
2013-06-23 23:42:27 +08:00
Bernard Xiong
9acd018cbb
fix compiling warning
2013-06-23 07:57:22 +08:00
Bernard Xiong
88c9bc2d64
fix compiling error
2013-06-23 07:53:19 +08:00
Bernard Xiong
98c8a23e94
Add component initialization.
2013-06-23 07:48:42 +08:00
heyuanjie87
02869d7e67
udisk can be eject
2013-06-15 23:02:50 +08:00
Grissiom
b02993c989
usbdevice/core: cope with some buggy drivers on USB_MSG_DATA_NOTIFY
...
Some driver will emit USB_MSG_DATA_NOTIFY before the USB get configured.
Filter out those events.
2013-06-11 11:50:05 +08:00
Grissiom
ed19483cb4
usb: add USB_MSG_PLUG_OUT event
...
When the core received an USB_MSG_PLUG_OUT event, it will stop all the
classes. This make a chance that the classes could get rid off doing
useless stuff while the USB cable is plugged out.
2013-06-06 15:21:40 +08:00
Bernard Xiong
d80a471680
Fix the memheap_realloc issue
2013-06-03 06:44:35 +08:00
Bernard Xiong
8238f85036
Merge pull request #98 from grissiom/rm48x50
...
Rm48x50
2013-05-31 07:15:28 -07:00
heyuanjie87
376a08d89a
return correct length of LangID string to host
2013-05-30 18:26:52 +08:00
Grissiom
27ee5b627b
finsh: add CCS support
2013-05-29 23:37:43 +08:00
weety
624d947e56
use __rt_ffs instead of ffs
2013-05-25 18:57:01 +08:00
qiuyiuestc
a33e992724
Merge pull request #95 from grissiom/vcom
...
usbdevice/core: add reset function to support hotplug
2013-05-25 01:05:00 -07:00
qiuyiuestc
97a507e667
usbdevice/core: add reset function to support hotplug
...
When the USB got RESET packet from the host and the address is setup,
all the classes will got reset. The reset is done by class stop and than
class run. So the classes should reset their internal state in
class_{run,stop}.
Besides, the USB device driver could post a USB_MSG_RESET message on
every RESET packet.
2013-05-25 15:55:27 +08:00
qiuyiuestc
2e25159a83
Merge pull request #94 from grissiom/vcom
...
cdc_vcom: reset the vcom state in proper cases
2013-05-25 00:52:05 -07:00
Grissiom
046182be94
cdc_vcom: reset the vcom state in proper cases
...
Reset the vcom state in class_{run,stop} and when the PC is not
receiving data from me.
2013-05-25 15:25:32 +08:00
heyuanjie87
8aa4eb7924
make Host can halt endpoints
2013-05-23 12:33:22 +08:00
qiuyiuestc
e822f87b1a
Merge pull request #90 from heyuanjie87/ForPullRequest
...
For pull request
2013-05-17 06:39:05 -07:00
Bernard Xiong
2ef9d91913
Merge pull request #89 from grissiom/dfs-misc-fix
...
add missing dfs_mkfs prototype in dfs_fs.h
2013-05-17 06:15:15 -07:00
aozima
c77c69c46e
fix spelling error.
2013-05-17 20:59:38 +08:00
aozima
9a671a5002
move initial alarm event & mutex in system init.
2013-05-17 20:58:40 +08:00
aozima
36fc5520cb
format code by Astyle.
2013-05-17 20:57:05 +08:00
heyuanjie87
8b4aadb4db
add usb state
2013-05-17 20:53:05 +08:00
Grissiom
3b91e8143b
add missing dfs_mkfs prototype in dfs_fs.h
2013-05-17 20:07:55 +08:00
Grissiom
b3e38f53b4
usbdevice/core: use static message queue
...
Although currently the only message send to the queue is struct
udev_msg, in order to keep backward compacity and for extention in the
future, we set the size of message to 32.
2013-05-12 15:43:30 +08:00
Grissiom
f0d50a7b36
usbdevice/core: use static thread instead of dynamic thread
...
It also add two configurations for the USB device even loop thread:
RT_USBD_THREAD_STACK_SZ to set the stack size, default to 2048
RT_USBD_THREAD_PRIO to set the priority, default to 8
You can overwrite the default values in rtconfig.h
2013-05-12 15:43:29 +08:00
Bernard Xiong
f1e34eef11
Merge pull request #86 from grissiom/serial-rb-size
...
serial: use RT_SERIAL_RB_BUFSZ to define the size of ring buffer.
2013-05-11 23:18:18 -07:00
Bernard Xiong
8e9e7f3e7c
serial: use RT_SERIAL_RB_BUFSZ to define the size of ring buffer.
2013-05-12 14:03:11 +08:00
Grissiom
aa179e4438
cdc_vcom: not to start sending data when the data is already sending
...
We start the sending transaction in SOF handler. But if the data is
already sending, start an other transaction will cause data lose.
Implement a state machine is cdc_vcom and avoid that.
2013-05-12 13:27:13 +08:00
Grissiom
157af94af9
usbdevice/core: small optimization on the event loop
...
Sort the switch cases by the frequency of the events.
2013-05-12 13:07:03 +08:00
Grissiom
d23ee75d2e
cdc_vcom: send data as many as possible
...
The data filled into dcd_ep_write does not to be limited by
MaxPacketSize.
2013-05-10 17:50:07 +08:00
Grissiom
5de59429fe
usbdevice/core: misc cleanup
2013-05-10 17:35:33 +08:00
Grissiom
ffb1e62020
cdc_vcom: send a zero-length-packet at the end is transaction
2013-05-10 15:17:59 +08:00
Grissiom
778c4239b1
cdc_vcom: fix the bug that use ringbuffer pool as usb packet buffer
...
This commit set the buffer for packet to CDC_MaxPacketSize which is a
reasonable value for it. However, maybe we should make
CDC_{RX,TX}_BUFSIZE configurable as well.
2013-05-09 23:18:58 +08:00
Grissiom
952bc0d4ef
ringbuffer: format the code to a more symmetric structure
2013-05-08 15:54:30 +08:00
Grissiom
639bd30321
reimplement ringbuffer
...
The new implementation use the mirroring method to distinguish full
buffer and the empty buffer. It also support buffers of arbitrary size.
2013-05-08 15:45:31 +08:00
Bernard Xiong
1161e7b3f8
Merge branch 'master' of https://github.com/RT-Thread/rt-thread
2013-05-05 07:17:16 +08:00
Bernard Xiong
0e16b6dc97
add RAMFS implementation
2013-05-05 07:16:49 +08:00
Grissiom
d196a75a41
usbdevice/core/core.c: fix garbage value bug
...
This could crash the program with -O1 and -O2 in MDK.
2013-05-04 18:34:13 +08:00
shaolin
83751c63e3
add error handler in dlopen.c
2013-04-10 21:40:08 +08:00
user
06c6630bbf
fix compiling warning in finsh shell
2013-04-04 14:12:35 -04:00
Bernard Xiong
009eccf640
fix the wrong strcpy issue in list() function
2013-04-04 15:32:10 +08:00
prife
e952d55d6d
Merge pull request #70 from geniusgogo/dfs-fixbug
...
Dfs clean and optimized code
2013-04-03 09:10:49 -07:00
Bernard Xiong
b68e34c931
strip more characters in finsh token
2013-04-03 05:31:29 -04:00
geniusgogo
f95cd9a354
dfs_fs.c: optimized redundant loop.
2013-04-01 02:53:59 +08:00
geniusgogo
8d6264af58
dfs.c: delete the redunant space in the line end.
2013-04-01 02:37:13 +08:00
geniusgogo
ec6f9e3b5a
dfs.c: fix null pointer bug.
2013-04-01 02:31:24 +08:00
Bernard Xiong
97eadb7d8e
implement a shell for module
2013-03-30 16:14:38 +08:00
Rogerz Zhang
e9cf10daed
add comments to help understanding pthread
2013-03-28 23:26:46 +08:00
Bernard Xiong
86fc696957
add the first porting for lwip 1.4.1
2013-03-25 04:40:09 -04:00
Bernard Xiong
7890ee5d45
add libc in link when enable RT_USING_NEWLIB
2013-03-23 07:51:29 +08:00
prife
157e326487
dfs_elm.c: fix the head file conflicts caused by time.h
2013-03-02 18:56:07 +08:00
aozima
9bb005312f
fixed uninitialized variable.
2013-03-01 12:34:01 +08:00
aozima
f71555ec55
fixed dfs(elmfat) bug: fixed the stat(st_mtime) issue.
2013-03-01 12:23:28 +08:00
aozima
43228aeb9c
fixed list_tcps bug: ipaddr_ntoa isn't reentrant.
2013-02-28 18:22:52 +08:00
Bernard Xiong
385f682d7b
remove RT-Thread GUI from RT-Thread temporary
2013-02-21 13:11:10 +08:00
Grissiom
f06c70feed
sync with rtgui-0.6
2013-02-01 10:27:10 +08:00
prife
2a3f223b4e
Merge branch 'master' of github.com:RT-Thread/rt-thread
2013-01-25 12:21:59 +08:00
prife
4be62911f9
show volume size in KBytes in df
2013-01-25 12:17:47 +08:00
qiuyiuestc
58a5550414
Merge pull request #21 from heyuanjie87/ForPullRequest
...
class driver can custom string description
2013-01-24 05:08:09 -08:00
heyuanjie87
34d531578e
class driver can custom string description
2013-01-24 20:59:43 +08:00
prife
a4d661dcf1
fix memory leak in dfs_elm.c and umount fatfs when mount fatfs fails (this bug leads to mkfs failure in linux)
2013-01-22 23:47:32 +08:00
Bernard Xiong
8bbd54ddf6
Merge pull request #18 from prife/finsh-64gcc
...
fix bug in finsh when built with 64bit-gcc
2013-01-21 23:15:52 -08:00
prife
5d68ef8ec1
fix bug in finsh when built with 64bit-gcc
2013-01-22 12:44:47 +08:00
heyuanjie87
7ce0547575
fixed the string descriptor send to host more than actual
2013-01-17 14:03:45 +08:00
heyuanjie87
a3bde3c4a3
handle standard request to interface that defined in class
2013-01-17 12:23:06 +08:00
Bernard Xiong
9721603b72
Add RT_MTD_ESRC definitions.
...
Add RT_MTD_ESRC definitions. If the source page has issue when copying a page, the low level can return this error code.
2013-01-17 10:06:01 +08:00
Bernard Xiong
7a8dfb6dd5
Merge pull request #11 from grissiom/remove-newlib-math
...
remove math code for newlib
2013-01-13 22:53:52 -08:00
Grissiom
9168e18e5c
newlib: use the LIBS argument in DefineGroup instead of modifying the Env
2013-01-13 09:48:37 +08:00
Grissiom
8ad12057c4
Newlib: link with libm in default.
...
libm is a frequently used lib. Newlib is compiled with
-ffunction-sections in recent GCC tool chains. The linker would just
link in the functions that have been referenced. So setting this won't
result in bigger text size.
2013-01-11 15:13:11 +08:00
qiuyiuestc
64bf67ccfd
Merge pull request #12 from heyuanjie87/usb-device
...
Usb device:correct the macro
2013-01-10 08:23:38 -08:00
heyuanjie87
1cb356c9df
Correct macro definition
2013-01-11 00:03:46 +08:00
heyuanjie87
7b2929303e
revert some define to usb_common.h
2013-01-11 00:02:40 +08:00
qiuyiuestc
da1414ff27
Merge pull request #9 from heyuanjie87/usb-device
...
Usb-device
2013-01-10 05:50:11 -08:00
Grissiom
3ef523714f
remove math code for newlib
...
Newlib already have optimized and full featured math implementation. To
use it, one should add:
env['LIBS'] = ['m']
or equivalent to the SConstruct.
2013-01-10 14:58:07 +08:00
Bernard Xiong
c81fa554d9
Merge pull request #10 from grissiom/fix-math
...
fix math.h
2013-01-09 17:15:20 -08:00
Grissiom
1bb22a0a0b
fix math.h
...
Declare sin/cos and M_PI in math.h.
2013-01-09 21:37:41 +08:00
heyuanjie87
d84fde4e54
revert the define
2013-01-09 18:56:31 +08:00
heyuanjie87
928cabff50
allows the user custom PID and VID
2013-01-09 18:07:59 +08:00
heyuanjie87
58317f5bd2
use new interface to send status in control transfer
2013-01-09 17:55:46 +08:00
Bernard Xiong
1eb6e23c43
add lwip 1.4.1 source code
2013-01-09 00:13:42 -08:00
heyuanjie87
96f5a6dcec
move the define related to Mass to here;
...
remove product ID
2013-01-09 12:20:15 +08:00
heyuanjie87
d20974b9d2
allows the user custom PID and VID
2013-01-09 12:18:13 +08:00
heyuanjie87
6119136596
remove product ID
2013-01-09 12:15:09 +08:00
heyuanjie87
6b0b2d51e3
move the define related to Mass to mstorage.h
2013-01-09 12:12:25 +08:00
heyuanjie87
22786f8817
allows the user to custom PID and VID;
...
add a dcd operation to send status in control transfer
2013-01-09 12:04:01 +08:00
Ming, Bai
1ea6fd2a94
Update CRLF
2013-01-08 23:10:25 +08:00
Ming, Bai
86623c945f
Update CRLF
2013-01-08 23:09:34 +08:00
Ming, Bai
85d0f41067
Continue updating CRLF
2013-01-08 22:52:41 +08:00
Ming, Bai
b4de7cce57
Re-normalizing the repo
2013-01-08 22:40:58 +08:00
Bernard Xiong
72782e9203
convert end of line
2013-01-08 05:05:02 -08:00
prife
4bc0347b11
update dfs_xxx_mkfs in jffs2 nand uffs.c to use new args
2013-01-08 20:30:57 +08:00
prife
1e6bf8671c
format dfs_elm.c with astyle
2013-01-08 19:52:00 +08:00
prife
5646189b29
elm fatfs support mkfs with no need to run dfs_mount elm first; and can mount/umount/mkfs without reset any more
2013-01-08 18:58:45 +08:00
wuyangyong
dd5742c9bc
fix spelling error.
...
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2581 bbd45198-f89e-11dd-88c7-29a3b14d5316
2013-01-01 12:25:32 +00:00
sc943313837@gmail.com
deef5db546
添加RNDIS
...
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2580 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-31 15:40:31 +00:00
sc943313837@gmail.com
b1fa07f392
添加RNDIS
...
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2579 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-31 15:39:52 +00:00
sc943313837@gmail.com
2a6ffa0ccd
添加RNDIS定义
...
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2578 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-31 15:38:35 +00:00
goprife@gmail.com
e10d628b47
remove the drivers in uffs/nand which is already out of date. now you can look simulator to explore how to use uffs on nand flash or Realtouch demo code on github
...
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2576 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-31 06:11:09 +00:00
goprife@gmail.com
3b2b01c375
1. fix bug in uffs_nandif.c to work with mtd nand driver; 2)clean code in uffs_nandif.c and dfs_uffs.h
...
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2575 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-31 06:07:04 +00:00
dzzxzz@gmail.com
6e6d5c5b0d
fixed the coding style
...
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2572 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-31 05:33:46 +00:00
bernard.xiong@gmail.com
9a8fbc6f17
fix some compiling warning.
...
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2571 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-31 04:17:31 +00:00
sc943313837@gmail.com
6374d20fad
change inferface handler parameter
...
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2565 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-30 09:49:31 +00:00
sc943313837@gmail.com
aa49ca9db3
change inferface handler parameter; add a protocol define
...
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2564 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-30 09:43:19 +00:00