pub fn get_dma_stream_handle(stream: StreamLabel) -> StatusExpand description
Get global identifier for a given DMA stream label
§Usage
This syscall set the MA stream handle that matches the given label in the SVC_EXCHANGE area if the label matches a DMA stream that has been declared in the device tree and is owned by the current task.
If label is not found or no accessible shared memory is found, the resulting status is Status::Invalid. The SVC_EXCHANGE area is not set.
NOTE: except without good reasons, do not use this syscall directly
§Example
ⓘ
match get_dma_stream_handle(streamlabel) {
Status::Ok => (),
any_err => return (any_err),
}
let exch_area = unsafe { &mut SVC_EXCHANGE_AREA[..4] };
let handle = u32::from_ne_bytes(exch_area.try_into().map_err(|_| Status::Invalid)?);