Commit graph

11 commits

Author SHA1 Message Date
Lephe
dd564f094a
keydev: add a keyboard device layer to abstract away globals
The new keyboard device (keydev) interface implements the kernel's view
of a keyboard providing input events. Its main role is to abstract all
the globals of the KEYSC driver and getkey functions into a separate
object: the "keyboard device".

The device implements event transformations such as modifiers and
repeats, instead of leaving them to getkey. While this can seem
surprising at first, a real keyboard controller is responsible for
repeats and modifier actions depend on the state of the keyboard which
is only tracked in real-time.

In this commit, getkey() has not changed yet apart from indirectly using
the keydev interface with pollevent(). It will be changed soon to use
event transforms in keydev_read(), and will be left in charge of
providing repeat profiles, handling return-to-menu, backlight changes
and timeouts, all of which are user convenience features.
2021-03-05 09:31:34 +01:00
Lephe
cb2d067967
std/string: add strchr(), strrchr(), and strchrnul() 2021-02-15 17:28:11 +01:00
Lephe
553982a445
std/stdio: support asprintf() and vasprintf() 2021-02-15 09:48:10 +01:00
Lephe
bbf6401213
kprint: add floating-point formatting based in Grisu2b 59,56 2021-02-02 22:18:15 +01:00
Lephe
023675d449
improve structure of sources and formatted printer
* Create an `src/3rdparty` folder for third-party code (to add the
  Grisu2B alfogithm soon).
* Split the formatted printer into gint's kprint (src/kprint), its
  extension and interface (include/gint/kprint.h), and its use in the
  standard stdio functions (src/std/print.c).
* Slightly improve the interface of kformat_geometry() to avoid relying
  on knowing format specifiers.
* Add a function to register more formatters, to allow floating-point
  formatters without requiring them.
2021-02-02 18:19:10 +01:00
Lephe
6440527527
rtc: add an rtc_ticks() function similar to RTC_GetTicks() 2021-02-02 18:19:08 +01:00
Lephe
7e1becbd79
cmake: only require version 3.16 2021-02-02 18:18:06 +01:00
Lephe
e5a7d968a6
cmake: declare assets through the fxSDK utility 2021-01-27 20:48:59 +01:00
Lephe
815d479ab7
cmake: install FindGint.cmake (previously in the fxSDK) 2021-01-27 08:57:23 +01:00
Lephe
8157f4b2ab
cmake: restore options USER_VRAM and STATIC_GRAY 2021-01-25 19:06:42 +01:00
Lephe
0525b51ba5
switch build system to CMake
This factors the burden of compiler specification in the fxSDK while
providing substantially more support through CMake modules.
2021-01-25 15:31:20 +01:00