Skip to content

Commit

Permalink
Remove uart.SYS_TIMER and net.SYS_TIMER (use tmr.SYS_TIMER)
Browse files Browse the repository at this point in the history
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
martinwguy committed Feb 18, 2012
1 parent 28d4476 commit d2f5032
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/modules/net.c
Expand Up @@ -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
Expand All @@ -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 );

Expand Down
2 changes: 0 additions & 2 deletions src/modules/uart.c
Expand Up @@ -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 ) },
Expand All @@ -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
Expand Down

0 comments on commit d2f5032

Please sign in to comment.