1. 24 Apr, 2024 1 commit
  2. 22 Apr, 2024 7 commits
  3. 20 Apr, 2024 1 commit
  4. 17 Apr, 2024 1 commit
    • Angus Gratton's avatar
      shared/tinyusb: Fix dynamic USB control callbacks for wLength==0. · d11ca092
      Angus Gratton authored
      In the case where an OUT control transfer triggers with wLength==0 (i.e.
      all data sent in the SETUP phase, and no additional data phase) the
      callbacks were previously implemented to return b"" (i.e. an empty buffer
      for the data phase).
      
      However this didn't actually work as intended because b"" can't provide a
      RW buffer (needed for OUT transfers with a data phase to write data into),
      so actually the endpoint would stall.
      
      The symptom was often that the device process the request (if processing
      it in the SETUP phase when all information was already available), but the
      host sees the endpoint stall and eventually returns an error.
      
      This commit changes the behaviour so returning True from the SETUP phase of
      a control transfer queues a zero length status response.
      Signed-off-by: default avatarAngus Gratton <angus@redyak.com.au>
      d11ca092
  5. 11 Apr, 2024 1 commit
  6. 30 Mar, 2024 3 commits
  7. 29 Mar, 2024 5 commits
  8. 28 Mar, 2024 17 commits
  9. 27 Mar, 2024 4 commits
    • Damien George's avatar
      shared/tinyusb: Increase default string descr max length to 40 chars. · 35e8d184
      Damien George authored
      When defining custom USB devices, longer strings may be needed.  Eventually
      the memory for string descriptors can be allocated on demand, but for now
      this bigger value should be reasonable.
      Signed-off-by: default avatarDamien George <damien@micropython.org>
      35e8d184
    • Angus Gratton's avatar
      shared/tinyusb: Update some code comments for runtime USB. · 0f16ae92
      Angus Gratton authored
      Updates a few code comments that were out of date or poorly worded. No code
      changes.
      
      This work was funded through GitHub Sponsors.
      Signed-off-by: default avatarAngus Gratton <angus@redyak.com.au>
      0f16ae92
    • Angus Gratton's avatar
      shared/tinyusb: Don't disconnect on soft reset unless USB was active. · 935f5391
      Angus Gratton authored
      Previously, constructing the singleton USBDevice object was enough to
      trigger a USB disconnect on soft reset. Now it also has to be active.
      
      The only case where this changes the behaviour is if the USBDevice object
      has been constructed but never set to active (no more disconnect in this
      case). Otherwise, behaviour is the same.
      
      This change was requested by hippy on the raspberrypi forums.
      
      This work was funded through GitHub Sponsors.
      Signed-off-by: default avatarAngus Gratton <angus@redyak.com.au>
      935f5391
    • Damien George's avatar
      rp2/CMakeLists: Apply O2 optimisation to map, mpz and vm source code. · 79edaddf
      Damien George authored
      Enabling this optimisation increases the RPI_PICO firmware by +3344 bytes.
      
      Performace change is:
      
      diff of scores (higher is better)
      N=100 M=100             rpi-base -> rpi-opt      diff      diff% (error%)
      bm_chaos.py               196.56 ->  215.26 :  +18.70 =  +9.514% (+/-0.05%)
      bm_fannkuch.py             52.47 ->   54.37 :   +1.90 =  +3.621% (+/-0.05%)
      bm_fft.py                1476.74 -> 1530.06 :  +53.32 =  +3.611% (+/-0.01%)
      bm_float.py              2305.65 -> 2444.11 : +138.46 =  +6.005% (+/-0.08%)
      bm_hexiom.py               32.83 ->   35.09 :   +2.26 =  +6.884% (+/-0.05%)
      bm_nqueens.py            2335.85 -> 2259.78 :  -76.07 =  -3.257% (+/-0.06%)
      bm_pidigits.py            366.23 ->  465.81 :  +99.58 = +27.191% (+/-0.04%)
      bm_wordcount.py            41.20 ->   41.87 :   +0.67 =  +1.626% (+/-0.01%)
      core_import_mpy_multi.py  327.44 ->  335.24 :   +7.80 =  +2.382% (+/-0.08%)
      core_import_mpy_single.py  63.41 ->   64.98 :   +1.57 =  +2.476% (+/-0.21%)
      core_locals.py             27.24 ->   29.19 :   +1.95 =  +7.159% (+/-0.01%)
      core_qstr.py              137.31 ->  140.84 :   +3.53 =  +2.571% (+/-0.03%)
      core_str.py                18.44 ->   18.10 :   -0.34 =  -1.844% (+/-0.03%)
      core_yield_from.py        221.69 ->  211.72 :   -9.97 =  -4.497% (+/-0.01%)
      misc_aes.py               303.38 ->  308.72 :   +5.34 =  +1.760% (+/-0.02%)
      misc_mandel.py           1501.00 -> 1746.60 : +245.60 = +16.362% (+/-0.04%)
      misc_pystone.py          1348.22 -> 1456.75 : +108.53 =  +8.050% (+/-0.07%)
      misc_raytrace.py          223.81 ->  246.16 :  +22.35 =  +9.986% (+/-0.07%)
      viper_call0.py            331.05 ->  331.10 :   +0.05 =  +0.015% (+/-0.00%)
      viper_call1a.py           323.34 ->  323.39 :   +0.05 =  +0.015% (+/-0.00%)
      viper_call1b.py           241.01 ->  241.04 :   +0.03 =  +0.012% (+/-0.00%)
      viper_call1c.py           242.88 ->  242.92 :   +0.04 =  +0.016% (+/-0.00%)
      viper_call2a.py           318.41 ->  318.46 :   +0.05 =  +0.016% (+/-0.00%)
      viper_call2b.py           211.27 ->  211.30 :   +0.03 =  +0.014% (+/-0.00%)
      
      And the test `tests/basics/builtin_pow3_intbig.py` now passes (it uses a
      lot of mpz code and previously took longer than 10 seconds to run on
      RPI_PICO, which would lead to a timeout in the test runner).
      Signed-off-by: default avatarDamien George <damien@micropython.org>
      79edaddf