reduce static RAM usage to maintain SH3 support

This commit is contained in:
Lephe 2022-10-09 18:15:12 +02:00
parent 97701e8eed
commit c9df6326e4
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495
2 changed files with 8 additions and 2 deletions

View file

@ -13,7 +13,7 @@ extern "C" {
#include <stddef.h> #include <stddef.h>
/* Maximum number of file descriptors */ /* Maximum number of file descriptors */
#define FS_FD_MAX 32 #define FS_FD_MAX 16
/* fs_descriptor_type_t: Overloaded file descriptor functions /* fs_descriptor_type_t: Overloaded file descriptor functions

View file

@ -1,5 +1,6 @@
#include <gint/usb.h> #include <gint/usb.h>
#include "usb_private.h" #include "usb_private.h"
#include <stdlib.h>
//--- //---
// Endpoint assignment // Endpoint assignment
@ -7,7 +8,12 @@
/* Current configuration: list of interfaces and endpoint assignments */ /* Current configuration: list of interfaces and endpoint assignments */
static usb_interface_t const *conf_if[16]; static usb_interface_t const *conf_if[16];
static endpoint_t conf_ep[32]; static endpoint_t *conf_ep;
GCONSTRUCTOR static void usb_alloc(void)
{
conf_ep = malloc(32 * sizeof *conf_ep);
}
/* usb_configure_endpoint(): Get endpoint data for a concrete address */ /* usb_configure_endpoint(): Get endpoint data for a concrete address */
endpoint_t *usb_configure_endpoint(int endpoint) endpoint_t *usb_configure_endpoint(int endpoint)