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

1144 Commits

Author SHA1 Message Date
James Snyder
09b70330d6 fix case where intervals that are too long don't get reported 2011-08-01 20:31:30 -05:00
James Snyder
e71f6eb1ea basic working timer interrupts 2011-08-01 20:28:33 -05:00
James Snyder
8b50aca945 initial attempt at timer int support on stm32 2011-08-01 18:32:11 -05:00
Bogdan Marinescu
57e222185b added the cross compiler to the list of files ignored by git 2011-07-29 14:16:14 +03:00
Martin Guy
8f520abd16 Fix typo in I2C refman 2011-07-28 17:53:10 +02:00
Martin Guy
5868fa6c87 Merge branch 'master' of github.com:elua/elua 2011-07-28 17:52:52 +02:00
James Snyder
06fa255251 add os module for desktop builds of Lua including LuaRPC binary 2011-07-25 19:31:29 -05:00
Martin Guy
a3170a953d Replace tabs by spaces in uip code 2011-07-24 17:35:45 +02:00
Martin Guy
a6b5f865d5 Document the units of net timeouts (microseconds).
Also remove superfluous text (you can't specify a timeout without giving a
timer ID parameter because it comes after it).
2011-07-24 17:12:38 +02:00
Martin Guy
713cdfdd85 Fix a missed name change from "disp" to "lcd" 2011-07-24 05:07:03 +02:00
Martin Guy
778eaf38be Fix broken EVK1101 build and enable PWM and ADC on it.
ADC/PWM pin configuration taken from the circuit diagram
but not tested on real hardware.
2011-07-24 04:43:48 +02:00
Martin Guy
fe95291cdd First full version of Mizar32 LCD module driver. 2011-07-24 01:21:59 +02:00
Martin Guy
158ce167ca Split platform_adc_op() into six separate functions
Previously, you called platform_adc_op(id, OPERATION, u32 arg) to achieve
six unrelated functions with different arg types and return values:

GET_MAXVAL takes nothing and returns an ADC conversion value
SET_SMOOTHING takes a power-of-two filter length and returns nothing
SET_BLOCKING takes a boolean and returns nothing
IS_DONE takes nothing and returns a boolean
SET_TIMER takes a timer ID and returns nothing
SET_CLOCK takes a frequency in Hz and returns a frequency in Hz.

This changes these to six independent functions, each with the right
parameters and return values.

This also makes the documentation more comprehensible, saves 26 bytes of
executable code and should be very slightly faster.
2011-07-23 20:04:32 +02:00
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
James Snyder
81a3f6aca2 testing newrpc implementation that doesn't require using adispatch. seems to work with peek and regular dispatch 2011-07-21 19:10:56 -05:00
James Snyder
3b91ff0c2a merge thiago's fixes with current trunk 2011-07-21 18:31:49 -05:00
James Snyder
041f745310 starting support for usb cdc for lm3s 2011-07-21 18:24:20 -05: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
2796414863 add support to scons build system for updated LM3S peripheral library 2011-07-19 21:31:01 -05:00
James Snyder
928c5447bd Update LM3S driver library. Update startup code for added entries on LM3S9x targets 2011-07-19 21:24:55 -05: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