Timer Bugfix for lm3s #11

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@StefanBa
StefanBa commented May 9, 2012

Maybe not the most elegant solution, but it does work

The following functions are working correctly now:
tmr.getdiffnow(..)
tmr.gettimediff(..)
and uart.read(..) with timeout

tested with lm3s9d92

Stefan Baumann Timer Bugfix for lm3s
Maybe not the most elegant solution, but it does work
b1a3420
@bogdanm bogdanm commented on the diff May 9, 2012
src/platform/lm3s/platform.c
@@ -557,7 +557,7 @@ timer_data_type platform_s_timer_op( unsigned id, int op,timer_data_type data )
break;
case PLATFORM_TIMER_OP_READ:
- res = MAP_TimerValueGet( base, TIMER_A );
+ res = 0xFFFFFFFF - MAP_TimerValueGet( base, TIMER_A );
@bogdanm
bogdanm May 9, 2012 Member

That's precisely the fix I had in mind too, except I want to make it more generic (thus applicable to more than one platform). So I will not merge this pull request yet, I'll merge it only if the generic approach doesn't work (or if it turns out to be too ugly to implement).

@bogdanm
Member
bogdanm commented May 25, 2012

Fixed in a more generic way on master.

@bogdanm bogdanm closed this May 25, 2012
@naves-thiago naves-thiago pushed a commit to naves-thiago/elua that referenced this pull request May 2, 2013
@martinwguy martinwguy Apply fix to Lua 5.1.4 bug #11
See http://www.lua.org/bugs.html -> Lua 5.1.4 -> bug 11
"Parser may collect a prototype while building it."
c9c4311
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment