Commit Graph

17 Commits

Author SHA1 Message Date
Lephe 20b7238057
std: move endian.h to fxlibc 2021-06-08 10:05:33 +02:00
Lephe fc6fb9dc09
std: remove the malloc impl and string header 2021-06-07 21:52:52 +02:00
Lephe 3a6165f026
std: remove the TinyMT-based rand implementation 2021-06-07 19:16:58 +02:00
Lephe 991b616a10
std: remove the printf implementation 2021-06-07 18:53:05 +02:00
Lephe 74b2dbeb36
string: use __restrict instead of restrict for C++ compatibility 2021-04-27 14:48:34 +02:00
Lephe 52bc1fc848
(typos and TODOs) 2021-04-20 12:19:24 +02:00
Lephe 1315c26099
usb: USB 2.0 function driver (WIP)
* Add the power management functions (mostly stable even under
  overclock; requires some testing, but no known issue)

* Add a dynamic configuration system where interfaces can declare
  descriptors with arbitrary endpoint numbers and additional
  parameters, and the driver allocates USB resources (endpoints, pipes
  and FIFO memory) between interfaces at startup. This allows
  implementations of different classes to be independent from each
  other.

* Add responses to common SETUP requests.

* Add pipe logic that allows programs to write data synchronously or
  asynchronously to pipes, in a single or several fragments, regardless
  of the buffer size (still WIP with a few details to polish and the
  API is not public yet).

* Add a WIP bulk IN interface that allows sending data to the host.
  This will eventually support the fxlink protocol.
2021-04-11 19:04:54 +02: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 52d95e72ed
stdlib: force rand() to return a non-negative number
Negative numbers come with tricky modulus results and are excluded from
the return values of the standard rand().
2020-10-09 09:17:48 +02:00
Lephe 9d1187b5b4
string: optimized memcpy, memcmp, memset; decent memmove
This change adds optimized versions of the core memory functions,
relying on 4-alignment, 2-alignment, and the SH4's unaligned move
instruction to (hopefully) attain good performance in all situations.
2020-07-04 15:05:28 +02:00
Lephe 50cc536324
libc: add random number generation with TinyMT
TinyMT is licensed under its own terms. See src/std/tinymt/LICENSE.txt.
2020-05-31 17:03:14 +02:00
Lephe 86cd9b98d4
small improvements
* Update TOTO list
* Change the type of gint_vbr to comply with a new warning in GCC 9
* Add strcmp()
2019-09-19 15:59:38 +02:00
Lephe a05d3416f0
std: support integer size formats (hh, h, l, ll) 2019-09-19 15:58:35 +02:00
Antoine 8cbd5be038 Ajout de la fonction srtcat et modification du 0 de la police de la Graph 90+E 2019-07-31 04:24:42 -04:00
lephe d9c32b2b05 libc: split standard headers properly
Since Memallox's newlib port is currently unstable, gint has to
provide some standard functions on its own. Instead of a single
<gint/std.h> header, this commit makes a gint/std directory containing
headers under standard names.
2019-07-16 15:38:18 -04:00