Struct bcm2709_spi::DirectMemory [] [src]

pub struct DirectMemory { /* fields omitted */ }

Interface for getting structs to map to /dev/mem blocks

Methods

impl DirectMemory
[src]

Lifetimes and mmap(...) access:

On file descriptor close, memory is not unmapped. From POSIX, the memory mapped from a file can continue to be used until it is unmapped, even if the file is closed before the unmap.

This means that the GPIO and SPI (mmapped access) to /dev/mem can remain active and call munmap(...) when Dropped, which will fully close out the resource.

[src]

Opens /dev/mem; may not succeed.

[src]

Creates the GPIO interface

[src]

Creates the SPI interface; takes ownership via GPIO of all SPI pins: SPI_CE1, SPI_CE0, SPI_MISO, SPI_MOSI, SPI_CLK

Trait Implementations

impl Drop for DirectMemory
[src]

[src]

Close the /dev/mem file descriptor on drop

Auto Trait Implementations

impl Send for DirectMemory

impl Sync for DirectMemory