Loading...
Searching...
No Matches
vbus_interfaces.h File Reference

This header contains the definition of VBUS sub-interfaces and convenience functions to work with the interface IDs. More...

`#include <l4/sys/types.h>`
Include dependency graph for vbus_interfaces.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Typedefs

typedef enum l4vbus_iface_type_t | l4vbus_iface_type_t
| Different sub-interfaces a vbus device may support.

## Enumerations

enum | l4vbus_iface_type_t { L4VBUS_INTERFACE_ICU = 0 , L4VBUS_INTERFACE_GPIO , L4VBUS_INTERFACE_PCI , L4VBUS_INTERFACE_PCIDEV , L4VBUS_INTERFACE_PM , L4VBUS_INTERFACE_BUS , L4VBUS_INTERFACE_GENERIC = 0x20 }
| Different sub-interfaces a vbus device may support. More...
enum | { L4VBUS_IFACE_SHIFT = 26 }

## Functions

unsigned | l4vbus_subinterface (unsigned opcode)
| Return the ID of the vbus sub-interface.
unsigned | l4vbus_interface_opcode (unsigned opcode)
| Return the function opcode within the sub-interface of the vbus command.
int | l4vbus_subinterface_supported (l4_uint32_t dev_type, l4vbus_iface_type_t iface_type)
| Check if a vbus device supports a given sub-interface.

## Detailed Description

This header contains the definition of VBUS sub-interfaces and convenience functions to work with the interface IDs.

Definition in file vbus_interfaces.h.

## Typedef Documentation

## l4vbus_iface_type_t

typedef enum l4vbus_iface_type_t l4vbus_iface_type_t

Different sub-interfaces a vbus device may support.

The IPC interface of vbus devices is divided into functional groups of sub-interfaces. Every device must implement the generic interface which provides general device information. According to the type of device, additional functionality may be supported.

The sub-interface constants are first of all used to divide the function opcode space of the interface into these functional groups (see L4VBUS_IFACE_SHIFT). They also make up a bitmask that specify the type of the device, i.e. from the point of view of the client a device is defined by the kinds of sub-interfaces it supports.

## Enumeration Type Documentation

## anonymous enum

anonymous enum

Enumerator
L4VBUS_IFACE_SHIFT | Sub-interface ID shift. Divides the function opcode sent via IPC into a sub-interface ID and the actual function opcode within the sub-interface.

Definition at line 48 of file vbus_interfaces.h.

## l4vbus_iface_type_t

enum l4vbus_iface_type_t

Different sub-interfaces a vbus device may support.

The IPC interface of vbus devices is divided into functional groups of sub-interfaces. Every device must implement the generic interface which provides general device information. According to the type of device, additional functionality may be supported.

The sub-interface constants are first of all used to divide the function opcode space of the interface into these functional groups (see L4VBUS_IFACE_SHIFT). They also make up a bitmask that specify the type of the device, i.e. from the point of view of the client a device is defined by the kinds of sub-interfaces it supports.

Enumerator
L4VBUS_INTERFACE_ICU | Interrupt Controller.
L4VBUS_INTERFACE_GPIO | GPIO.
L4VBUS_INTERFACE_PCI | PCI.
L4VBUS_INTERFACE_PCIDEV | PCI Device.
L4VBUS_INTERFACE_PM | Power Management.
L4VBUS_INTERFACE_BUS | VBus.
L4VBUS_INTERFACE_GENERIC | No specific sub interface.

Definition at line 29 of file vbus_interfaces.h.

## Function Documentation

## l4vbus_subinterface_supported()

int l4vbus_subinterface_supported | ( | l4_uint32_t | dev_type,
|  | l4vbus_iface_type_t | iface_type )

inline

Check if a vbus device supports a given sub-interface.

Parameters

  dev_type | Device type as reported in l4vbus_device_t.
  iface_type | Sub-interface type to check for.

Returns
  True if the device supports the sub-interface.

Definition at line 99 of file vbus_interfaces.h.

References L4_INLINE, and L4VBUS_INTERFACE_GENERIC.