Tage Mellemstrand 584b68b7b1
Add support for reading and writing to I2C devices from lua (#934)
* Add i2c read support to lua

* Add i2c write support to lua

With memory permissions before write

* Adjust i2c write

* Fix inverted id check, better permissions

* Change write to not return anything on success

* Add some documentation for lua i2c

* Change write length from 1024 to 64

* Add whitelist for i2c writing

* Move i2c module into preload

* Add registers and bitmasks for mcu

Add documentation to lua-doc

* Fix missing column divider in lua-doc

* Add ~= 0 then to lua example

* Add some more registers
2026-03-25 23:18:03 +01:00
..
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2026-03-25 11:31:14 +01:00
2025-03-21 08:25:04 +01:00
2026-03-25 11:13:09 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2026-03-25 11:13:09 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2026-03-25 11:13:09 +01:00
2025-03-21 08:25:04 +01:00
2026-03-25 11:13:09 +01:00
2026-03-25 11:13:09 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2026-03-25 11:13:09 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2026-03-25 11:13:09 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2026-03-25 11:13:09 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2026-03-25 11:13:09 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2025-03-21 08:25:04 +01:00
2026-03-25 11:13:09 +01:00

This is Lua 5.4.8 with a few modifications:

  • Patches made to silence warnings: 9905b939b2
  • lua.c, luac.c, lua.hpp removed (not useful in GodMode9)
  • liolib.c, loslib.c removed (replaced with custom implementations)

License of Lua 5.4.8

Copyright © 19942025 Lua.org, PUC-Rio.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.