Permalink
Browse files

Remove uart.SYS_TIMER and net.SYS_TIMER (use tmr.SYS_TIMER)

This change removes the extra undocumented uart.SYS_TIMER and
net.SYS_TIMER constants, which are equal to tmr.SYS_TIMER.
The documentation says to use tmr.SYS_TIMER and in the rare case
of uart or net being compiled in but not tmr, the system timer
can be had by using nil or omitting the parameter.
  • Loading branch information...
1 parent 28d4476 commit d2f5032d63c94c8b18e3cd76d595ae4db01ebb23 @martinwguy martinwguy committed Feb 18, 2012
Showing with 0 additions and 4 deletions.
  1. +0 −2 src/modules/net.c
  2. +0 −2 src/modules/uart.c
View
@@ -199,7 +199,6 @@ const LUA_REG_TYPE net_map[] =
{ LSTRKEY( "ERR_CLOSED" ), LNUMVAL( ELUA_NET_ERR_CLOSED ) },
{ LSTRKEY( "ERR_ABORTED" ), LNUMVAL( ELUA_NET_ERR_ABORTED ) },
{ LSTRKEY( "ERR_OVERFLOW" ), LNUMVAL( ELUA_NET_ERR_OVERFLOW ) },
- { LSTRKEY( "SYS_TIMER" ), LNUMVAL( PLATFORM_TIMER_SYS_ID ) },
{ LSTRKEY( "NO_TIMEOUT" ), LNUMVAL( 0 ) },
{ LSTRKEY( "INF_TIMEOUT" ), LNUMVAL( PLATFORM_TIMER_INF_TIMEOUT ) },
#endif
@@ -221,7 +220,6 @@ LUALIB_API int luaopen_net( lua_State *L )
MOD_REG_NUMBER( L, "ERR_CLOSED", ELUA_NET_ERR_CLOSED );
MOD_REG_NUMBER( L, "ERR_ABORTED", ELUA_NET_ERR_ABORTED );
MOD_REG_NUMBER( L, "ERR_OVERFLOW", ELUA_NET_ERR_OVERFLOW );
- MOD_REG_NUMBER( L, "SYS_TIMER", PLATFORM_TIMER_SYS_ID );
MOD_REG_NUMBER( L, "NO_TIMEOUT", 0 );
MOD_REG_NUMBER( L, "INF_TIMEOUT", PLATFORM_TIMER_INF_TIMEOUT );
View
@@ -266,7 +266,6 @@ const LUA_REG_TYPE uart_map[] =
{ LSTRKEY( "FLOW_NONE" ), LNUMVAL( PLATFORM_UART_FLOW_NONE ) },
{ LSTRKEY( "FLOW_RTS" ), LNUMVAL( PLATFORM_UART_FLOW_RTS ) },
{ LSTRKEY( "FLOW_CTS" ), LNUMVAL( PLATFORM_UART_FLOW_CTS ) },
- { LSTRKEY( "SYS_TIMER" ), LNUMVAL( PLATFORM_TIMER_SYS_ID ) },
#endif
#if LUA_OPTIMIZE_MEMORY > 0 && defined( BUILD_SERMUX )
{ LSTRKEY( "__metatable" ), LROVAL( uart_map ) },
@@ -293,7 +292,6 @@ LUALIB_API int luaopen_uart( lua_State *L )
MOD_REG_NUMBER( L, "FLOW_NONE", PLATFORM_UART_FLOW_NONE );
MOD_REG_NUMBER( L, "FLOW_RTS", PLATFORM_UART_FLOW_RTS );
MOD_REG_NUMBER( L, "FLOW_CTS", PLATFORM_UART_FLOW_CTS );
- MOD_REG_NUMBER( L, "SYS_TIMER", PLATFORM_TIMER_SYS_ID );
return 1;
#endif // #if LUA_OPTIMIZE_MEMORY > 0

0 comments on commit d2f5032

Please sign in to comment.