1
0
mirror of https://github.com/elua/elua.git synced 2025-01-08 20:56:17 +08:00

748 Commits

Author SHA1 Message Date
Martin Guy
007eada8db Remove bogus "luaopen_disp()" functions that are never called
Three modules had a bogus luaopen_disp() function that was never called.
In reality, each platform.c only uses the extern disp_map[] (or str9_pio_map[])
and does the right thing with it in luaopen_platform().

This also removes a bug (AUXLIB_DISP undefined), which prevented avr32
and str9 from compiling when optram=0
2011-07-23 19:12:54 +02:00
Martin Guy
c39d55feb8 Revert "Allow "disp" modules to compile when optram=0"
This reverts commit c027a5929391550d25e8a6c5edc0de8e46d30708.
2011-07-23 19:09:09 +02:00
Martin Guy
c027a59293 Allow "disp" modules to compile when optram=0
The AUXLIB_DISP macro is only used when optram=0.
This change lets the avr32 and str9 platform-specific modules compile
also under optram=0.
2011-07-23 18:53:11 +02:00
Martin Guy
bb1b783037 Respect zero characters in string argument to mizar32.disp.print
and send long strings in packets of 31 characters, a limit imposed by the
LCD board's PIC's firmware.
2011-07-21 04:56:30 +02:00
Martin Guy
17f11b6163 Fix i2c.write() to treat all string arguments as strings.
Previously, with i2c.write(id, "123"), lua_isnumber would react to the numeric
string and greedily convert it to a single character '{', which made printing
digits to an I2C LCD display almost impossible.
2011-07-21 02:05:45 +02:00
Martin Guy
aa25e81cfa Merge branch 'master' of github.com:elua/elua 2011-07-20 10:52:58 +02:00
James Snyder
f5417716d6 add soldercore port to scons build system 2011-07-19 15:15:51 -05:00
James Snyder
1a85900ac6 Fix minor indentation conflict.
Merge branch 'master' of https://github.com/elua/elua

Conflicts:
	src/platform/lm3s/platform.c
2011-07-19 15:11:31 -05:00
James Snyder
10a9cfc303 basic working port for soldercore with console over telnet 2011-07-19 15:08:09 -05:00
Martin Guy
2e2bcba26e Fix typos 2011-07-19 18:05:33 +02:00
Martin Guy
1730329faf Fix typos 2011-07-18 17:14:03 +02:00
James Snyder
afeeac9cd7 fixes for spi sdcard support 2011-07-17 21:53:25 -05:00
Martin Guy
a2d4596cf2 Avoid compiler warnings about unused static functions in math lib
when compiling integer version.
2011-07-16 18:09:38 +02:00
Martin Guy
9c6371c1f1 Trivial changes to remove some compiler warnings 2011-07-16 18:03:33 +02:00
Martin Guy
f3b86cdf6b Fix value of SYSTICKHZ, which must equal VTMR_FREQ_HZ 2011-07-16 17:48:43 +02:00
Martin Guy
0585f8ec96 Initial framework for Mizar32 character LCD display driver 2011-07-16 00:12:19 +02:00
Martin Guy
8501c0118c Drop misplaced duplicate inclusion of spi.h 2011-07-15 18:15:11 +02:00
Martin Guy
e3982f6682 Document the fact that other I2C bus speeds can be specified as an integer. 2011-07-15 15:23:18 +02:00
Martin Guy
db9d054711 Fix typos 2011-07-15 08:32:02 +02:00
Martin Guy
a04fcd854e MMCFS_TICK_HZ needs to be the same as VTMR_FREQ_HZ
elua_mmc.c uses the virtual timer tick to implement its timeout delays,
and needs MMCFS_TICK_HZ to have the same value as VTMR_FREQ_HZ.
This corrects the mismatch on AVR32 platforms and adds a check to
validate.h to ensure that it remains so.
2011-07-13 23:02:33 +02:00
Martin Guy
69433ff94c Fix MMCFS timeout code to wait for >= the required timeout
MMCFS timeouts work by counting ticks of the virtual timer, which is
free-running and could tick immediately, giving a zero timeout.
This fixes the calculation of the number of ticks to wait for to set up
an N-millisecond timeout, ensuring that the actual timeout used is >= N.
2011-07-13 18:53:18 +02:00
Martin Guy
5cb72c0595 Set internal RAM size to 64KB on ATUC3A0{256,512} models of Mizar32 2011-07-10 13:35:28 +02:00
Martin Guy
51a3ed5f0c Document more precisely the arguments to i2c.write() 2011-07-08 21:44:51 +02:00
Martin Guy
1562d13cdf Change personal credits to company credit 2011-07-06 06:29:35 +02:00
Martin Guy
cd0b194fe3 Fix repeated spelling error "reffer" 2011-07-05 17:26:39 +02:00
Martin Guy
d72145688a Document the default for ADC's blocking or non-blocking mode (i.e. blocking) 2011-07-05 17:23:14 +02:00
Martin Guy
2a6131ffe6 Eliminate all TAB characters in elua-specific code files.
Tabs have been creeping in to eLua's source files, sometimes representing
2 characters, sometimes 8.  This patch replaces them all with the appropriate
number of spaces, according to the context.
This only fixes files that were written specifically for eLua, not the
manufacturers' SDK source files that were simply imported into the tree.
2011-07-05 17:17:45 +02:00
Martin Guy
250441c91d Don't bother enabling 32kHz clock on AVR32 if the crystal is not present 2011-07-05 14:42:00 +02:00
James Snyder
4e9086177a more support for Soldercore device 2011-06-30 23:49:46 -05:00
Martin Guy
0452d1e79d Fix code to select 120KB config for Mizar32 2011-06-28 07:16:31 +02:00
Martin Guy
ca7f6befd9 Avoid returning negative values from tmr.getmaxdelay(tmr.VIRT0)
The return value from tmr.getmaxdelay() is always passed to
lua_pushinteger(), which turns the top half of the unsigned numbers into
negative values. This always used to bite getmaxdelay(tmr.VIRT0) and can bite
tmr.gettimediff(0, small, large).

Fixes bug #229 in the old tracker.
2011-06-28 06:43:52 +02:00
Martin Guy
5746dfc1e0 Make pio.decode() present also when optram=0 (fixes bug #187) 2011-06-28 04:38:48 +02:00
Martin Guy
93743fa12e First working hack at single channel bit-bang I2C for AVR32.
To get round the inadequacies of the AVR32 "TWI" hardware, this implements
I2C as a bit-banging interface, currently handling a single channel only.
Tested on EVK1100 and Mizar32. "Should work" on EVK1101 if the 2-line change
is made to evk1101_conf.h
2011-06-28 04:20:11 +02:00
Martin Guy
4dea8b6665 Use the AVR32 GPIO's set/clear registers to simplify PIO operations.
The AVR32 GPIO resgiter map presents each GPIO register in four memory
locations which, respectively, read/write, set, clear and toggle bits
in the underlying hardware register.

This patch makes the AVR32 GPIO driving code use that register set
instead of reading, toggling bits and rewriting the registers, which required
a helper layer to make the necessary bit-twiddling generic.
2011-06-27 01:00:29 +02:00
Martin Guy
d1daa53541 Refactor "Portuguese" translations which are an old copy of the English. 2011-06-25 22:15:31 +02:00
Martin Guy
df65909f59 Merge branch 'master' of github.com:elua/elua 2011-06-25 03:27:39 +02:00
Martin Guy
e45faec6f9 Complete the support for versions of Mizar32 with 256KB and 512KB of flash 2011-06-25 03:26:38 +02:00
James Snyder
f175278212 fix build issue introduced when adding linenoise for posix platforms 2011-06-24 18:24:24 -05:00
Martin Guy
c388e32a84 Add support for versions of Mizar32 with 256KB and 512KB of flash 2011-06-24 20:40:39 +02:00
Martin Guy
81507203e3 Undo changes to mizar32_conf that entered with Nuccio's ethernet support,
returning to a 120KB config by default, which works on all Mizar32 platforms
(already OKed with Nuccio).

Automate the selection of features for the 128KB and 256/512KB versions by
checking the value of ELUA_CPU
2011-06-24 19:24:36 +02:00
Bogdan Marinescu
7a72d58d74 Fixed invalid 'romfs/' prefix for files in ROMFS 2011-06-23 11:50:58 +03:00
James Snyder
24e6a4f29f Disable setting of DTR control on windows serial since it seems to prevent reading with LM3S eval kits 2011-06-20 22:53:09 -05:00
James Snyder
bd1ee31f5b Check/fix some inexplicit conversions and type issues in LuaRPC and elsewhere. Other cleanup in LuaRPC 2011-06-20 20:02:45 -05:00
James Snyder
ef1f485db6 Use linenoise instead of readline on POSIX platforms for desktop LuaRPC 2011-06-20 18:04:53 -05:00
Martin Guy
41dfa67e4c Fix compilation errors in previous commit 2011-06-17 19:17:07 +02:00
Martin Guy
6d9cc5eb8c Remove tab characters and trailing spaces from avr32 platform code
and regularize indentation/spacing in new uip/ethernet code.
2011-06-17 19:00:05 +02:00
Martin Guy
dca244112b Merge branch 'master' of github.com:elua/elua 2011-06-16 15:02:22 +02:00
Marcelo Politzer Couto
1ae6f3f865 Corrected a memory leak, and checking writing error on xmodem recv. 2011-06-12 17:51:32 -03:00
Marcelo Politzer Couto
d64459f8f5 Added the new recv on term help. and corrected a comment. 2011-06-08 17:06:35 -03:00
Marcelo Politzer Couto
cc88916c9f Added file saving xmodem. to use it, run in eLua terminal: recv <path_to_file> 2011-06-07 18:59:13 -03:00