You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because InputConnection is Clone, Send and Sync, (and to a lesser extent, OutputConnection is a superset of InputConnection), the API is prone to data races, which is UB. Consider cloning an InputSignal, sending it to the second core, and using both clones to set up some peripheral.
The behaviour, when connecting multiple peripherals is also undefined (as the different peripherals may overwrite each others' settings).
We can probably leave the output-related implementation unchanged. There can only be one OutputConnection in safe code, and only a single peripheral may drive that.
For the input side, however, I think we will need to make the user set up the pin, before passing it to peripherals. This way we can ensure, that, if the user want to connect peripherals which would, by default use conflicting configuration, the user needs to specify what actually happens.
The text was updated successfully, but these errors were encountered:
Because
InputConnection
isClone, Send and Sync
, (and to a lesser extent,OutputConnection
is a superset ofInputConnection
), the API is prone to data races, which is UB. Consider cloning an InputSignal, sending it to the second core, and using both clones to set up some peripheral.The behaviour, when connecting multiple peripherals is also undefined (as the different peripherals may overwrite each others' settings).
We can probably leave the output-related implementation unchanged. There can only be one OutputConnection in safe code, and only a single peripheral may drive that.
For the input side, however, I think we will need to make the user set up the pin, before passing it to peripherals. This way we can ensure, that, if the user want to connect peripherals which would, by default use conflicting configuration, the user needs to specify what actually happens.
The text was updated successfully, but these errors were encountered: