Notification of memory device plugged in
Stefan Fröhling (7826) 167 posts |
1. Is there any way to detect that a new device (USB Stick or SD card) was inserted? 2. Does anyone has a code example with OS_ClaimVector on OS_File to detect saving of files? |
John WILLIAMS (8368) 493 posts |
1. USBInfo (Paul Reuvers) can certainly detect when a recognised USB device of any kind is plugged-in or unplugged. |
Stuart Swales (8827) 1357 posts |
Have a gander at UpCallV. For file changes, see https://www.riscosopen.org/wiki/documentation/show/OS_UpCall%203 |
Stefan Fröhling (7826) 167 posts |
@All Thanks! |
Charles Ferguson (8243) 427 posts |
As I understand it the Upcalls are not documented for the insertion and removal of devices. So I did so a few years ago. See the chapter “Drive hints” here: https://github.com/gerph/riscos-prminxml-staging/releases/download/v2023-09-04/RISC_OS_PRM_Staging.pdf / https://github.com/gerph/riscos-prminxml-staging/releases/download/v2023-09-04/PRMinXML-Staging-v2023-09-04.zip Source here: https://github.com/gerph/riscos-prminxml-staging/blob/master/src/riscos5/drivehints.xml |
Stefan Fröhling (7826) 167 posts |
@Charles. OK Thanks. Will have a look at that too. |