NervesFlutterSupport.Udev (nerves_flutter_support v1.3.0)

The Flutter engine requires that udev is running to register input devices. This module provides utility functions to start eudev (a more minimal udev) and register devices. It also provides a number of utility methods to fetch the current DRI cards, and get info about them.

Summary

Functions

Returns a child_spec() that monitors the eudev daemon

Returns a list of tuples that contain information about the specified DRI card name

Returns a list of named devices under /dev/dri

On some devices like the Raspberry Pi, /dev/dri/card0 and /dev/dri/card1 are not deterministically named. Generally one of the cards will only be the 3D accelerator, while the other is actually the display card.

Reloads and triggers udev rules using udevadm

Functions

create_child(args)

@spec create_child(list()) :: Supervisor.child_spec()

Returns a child_spec() that monitors the eudev daemon

get_card_info(card_name)

@spec get_card_info(binary()) :: [tuple()] | :error

Returns a list of tuples that contain information about the specified DRI card name

get_cards()

@spec get_cards() :: [binary()]

Returns a list of named devices under /dev/dri

is_output_card?(card_name)

@spec is_output_card?(binary()) :: boolean()

On some devices like the Raspberry Pi, /dev/dri/card0 and /dev/dri/card1 are not deterministically named. Generally one of the cards will only be the 3D accelerator, while the other is actually the display card.

This function will return true if the passed in card name is a output card (can actually draw to a display.)

setup()

@spec setup() :: :ok

Reloads and triggers udev rules using udevadm