pub struct RaspberryPi { /* private fields */ }
Expand description

An interface to RaspberryPi libraries

Implementations

Initialize a new RaspberryPi.

Safety
  1. There may only be 1 instance of this struct in the program at any given time.
  2. The libraries libbcm_host.so in the search path must be the correct libraries with the correct function definitions.
  3. No other calls may be made to the VideoCore may be made in this process by any means while this struct is active. This includes linking and using FFMpeg in-process.

Init bcm_host.

This must be called before any other functions.

Right now, this is safe to call multiple times, even while already initialized.

Deinit bcm_host.

The impl is currently a no-op, but this may change in the future.

Safety

The user must be done using the GPU.

Get the size of the graphics display.

Get the model type

Return true if this is a pi 4, or in the same family.

Return true if fkms is active.

Return true if kms is active.

Get the processor id.

Stop the service from being used.

Send command to general command serivce

get resonse from general command serivce

vcos initialization. Call this function before using other vcos functions. Calls can be nested within the same process; they are reference counted so that only a call from uninitialized state has any effect.

Note

On platforms/toolchains that support it, gcc’s constructor attribute or similar is used to invoke this function before main() or equivalent.

Returns

Status of initialisation.

vcos deinitialization. Call this function when vcos is no longer required, in order to free resources. Calls can be nested within the same process; they are reference counted so that only a call that decrements the reference count to 0 has any effect.

Note

On platforms/toolchains that support it, gcc’s destructor attribute or similar is used to invoke this function after exit() or equivalent.

Safety

This function should not be called if vcos is not initialized. Furthermore, you should not use this while still using vcos interfaces.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.