arduino-libraries / Arduino_USBHostMbed5

Apache License 2.0
4 stars 11 forks source link

Packet size changes #33

Closed AndrewCapon closed 1 year ago

AndrewCapon commented 1 year ago

Hi Guys,

I don't expect this PR to be merged, just as a start to some conversation.

It is related to: https://github.com/arduino-libraries/Arduino_USBHostMbed5/issues/31

To enable new code define ARC_USB_FULL_SIZE=1

For midi devices tested with:

#include <Arduino_USBHostMbed5.h>
#include "USBHostMIDI/USBHostMIDI.h"

mbed::FileHandle *mbed::mbed_override_console(int fd) 
{
  return Serial2;
}

USBHostMIDI hostMidi;

void setup()
{
  Serial2.begin(115200);

  SetupLogic();

  pinMode(PA_15, OUTPUT); //enable the USB-A port
  digitalWrite(PA_15, HIGH);

  printf("Starting USB Midi example...\n");

  while(!hostMidi.connect())
  {
    printf("Waiting for connection...\n");
    delay(1000);
  }
}

void loop()
{
  delay(1000);
}

I also tested the MSD example code and that still works in my testing with two sticks.

Cheers

Andy

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

github-actions[bot] commented 1 year ago

Memory usage change @ 6494fa0d27d0732174ae7c65e03c4227785bb71c

Board flash % RAM for global variables %
arduino:mbed_giga:giga :small_red_triangle: +8288 - +8352 +0.42 - +0.42 0 - 0 0.0 - 0.0
arduino:mbed_opta:opta :small_red_triangle: +8352 - +8352 +0.42 - +0.42 0 - 0 0.0 - 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
Click for full report table Board|`examples/DirList`
flash|%|`examples/DirList`
RAM for global variables|%|`examples/FileRead`
flash|%|`examples/FileRead`
RAM for global variables|%|`examples/FileWrite`
flash|%|`examples/FileWrite`
RAM for global variables|%|`examples/OptaDirList`
flash|%|`examples/OptaDirList`
RAM for global variables|%|`examples/PortentaOTA`
flash|%|`examples/PortentaOTA`
RAM for global variables|% -|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|- `arduino:mbed_giga:giga`|8344|0.42|0|0.0|8352|0.42|0|0.0|8288|0.42|0|0.0|8352|0.42|0|0.0|8352|0.42|0|0.0 `arduino:mbed_opta:opta`|8352|0.42|0|0.0|8352|0.42|0|0.0|8352|0.42|0|0.0|8352|0.42|0|0.0|8352|0.42|0|0.0 `arduino:mbed_portenta:envie_m7`|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A
Click for full report CSV ``` Board,examples/DirList
flash,%,examples/DirList
RAM for global variables,%,examples/FileRead
flash,%,examples/FileRead
RAM for global variables,%,examples/FileWrite
flash,%,examples/FileWrite
RAM for global variables,%,examples/OptaDirList
flash,%,examples/OptaDirList
RAM for global variables,%,examples/PortentaOTA
flash,%,examples/PortentaOTA
RAM for global variables,% arduino:mbed_giga:giga,8344,0.42,0,0.0,8352,0.42,0,0.0,8288,0.42,0,0.0,8352,0.42,0,0.0,8352,0.42,0,0.0 arduino:mbed_opta:opta,8352,0.42,0,0.0,8352,0.42,0,0.0,8352,0.42,0,0.0,8352,0.42,0,0.0,8352,0.42,0,0.0 arduino:mbed_portenta:envie_m7,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A ```
github-actions[bot] commented 1 year ago

Memory usage change @ 8bab89d3d720347bd4b51a1a8d0a6784dd3a7f21

Board flash % RAM for global variables %
arduino:mbed_giga:giga :small_red_triangle: +8288 - +8352 +0.42 - +0.42 0 - 0 0.0 - 0.0
arduino:mbed_opta:opta :small_red_triangle: +8288 - +8352 +0.42 - +0.42 0 - 0 0.0 - 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
Click for full report table Board|`examples/DirList`
flash|%|`examples/DirList`
RAM for global variables|%|`examples/FileRead`
flash|%|`examples/FileRead`
RAM for global variables|%|`examples/FileWrite`
flash|%|`examples/FileWrite`
RAM for global variables|%|`examples/OptaDirList`
flash|%|`examples/OptaDirList`
RAM for global variables|%|`examples/PortentaOTA`
flash|%|`examples/PortentaOTA`
RAM for global variables|% -|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|- `arduino:mbed_giga:giga`|8344|0.42|0|0.0|8288|0.42|0|0.0|8352|0.42|0|0.0|8352|0.42|0|0.0|8352|0.42|0|0.0 `arduino:mbed_opta:opta`|8352|0.42|0|0.0|8288|0.42|0|0.0|8352|0.42|0|0.0|8352|0.42|0|0.0|8352|0.42|0|0.0 `arduino:mbed_portenta:envie_m7`|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A
Click for full report CSV ``` Board,examples/DirList
flash,%,examples/DirList
RAM for global variables,%,examples/FileRead
flash,%,examples/FileRead
RAM for global variables,%,examples/FileWrite
flash,%,examples/FileWrite
RAM for global variables,%,examples/OptaDirList
flash,%,examples/OptaDirList
RAM for global variables,%,examples/PortentaOTA
flash,%,examples/PortentaOTA
RAM for global variables,% arduino:mbed_giga:giga,8344,0.42,0,0.0,8288,0.42,0,0.0,8352,0.42,0,0.0,8352,0.42,0,0.0,8352,0.42,0,0.0 arduino:mbed_opta:opta,8352,0.42,0,0.0,8288,0.42,0,0.0,8352,0.42,0,0.0,8352,0.42,0,0.0,8352,0.42,0,0.0 arduino:mbed_portenta:envie_m7,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A ```