insane-adding-machines / unicore-mx

UniCore-MX | Universal Core for ARM Cortex-M0/0+/3/4/7/X
GNU General Public License v3.0
50 stars 8 forks source link

USBD stack design inputs #40

Open kuldeepdhaka opened 7 years ago

kuldeepdhaka commented 7 years ago

Inputs from @alexrayne

  1. talking of usbd_transfer

    <alexrayne> sounds like i need always remember valid ep_size. can i pass 0 to use configured one?
    ... <snip> ...
    <kuldeep> alexrayne, usually i keep a `#define MY_ENDPOINT_SIZE 64` to ease out the process.
  2. transfer reuse

    <alexrayne> kuldeep, i this it better to introduce some flag for transfer, prevents it destroy after execution. submit such transfer once, and it always callbacks. callback just directly modifyes transfer.buffer and length. is it possible now?
    <kuldeep> (though i have to think on how to let user distroy the transfer if the flag prevent destroying the transfer)
    ... <snip> ...
    <kuldeep> this flag will modify the life cycle of the transfer. we need to think on the new life cycle. (its pro/cons)
kuldeepdhaka commented 7 years ago
  1. (setup) if the control buffer argument is also passed as argument to setup callback OR there is some way to retreive the buffer, it would help in writing better code