Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Manifest

The manifest is the root of a driver and is the input to the compiler. All objects that make up the driver are defined in it.

To save on boilerplate, if you only have one device in your driver, you can forego specifying the manifest and just have a device as the root object.

All config variables present on devices are available here too and serve as the default config for all devices. Devices can then override them again.

Example

/// doc comment line
manifest Example {
    default-byte-order: LE,
    register-address-type: i32,
    command-address-type: i32,
    buffer-address-type: i32,
    word-boundaries: "bD:0B:_",
    register-address-mode: mapped,
    default-access: RW,

    device node,
    fieldset node,
    enum node,
    extern node,
}

Table

PropertyValue
Identifier namespaceAll
Supports repeatno
Supports basetypeno
Supports conversion typeno
Supports short propertiesno
Supports propertiesyes, see below
Supports subnodesyes, see below

Long properties

These properties are specified in the node body.

default-byte-order

Sets the global default byte order used by fieldsets. This can be overridden per device and fieldset.

// byte order
default-byte-order: LE

Info

  • required: no
  • multiple allowed: no
  • supports doc comments: no

register-address-type

Sets the global type used to address the registers for all devices. This can be overridden per device.

// integer type
register-address-type: i32

Info

  • required: no
  • multiple allowed: no
  • supports doc comments: no

command-address-type

Sets the global type used to address the commands for all devices. This can be overridden per device.

// integer type
command-address-type: i32

Info

  • required: no
  • multiple allowed: no
  • supports doc comments: no

buffer-address-type

Sets the global type used to address the buffers for all devices. This can be overridden per device.

// integer type
buffer-address-type: i32

Info

  • required: no
  • multiple allowed: no
  • supports doc comments: no

word-boundaries

Sets the global word splitting rules for all objects. This can be overridden per device.

This option exists to aid in copying names from the datasheet. Those names are often not proper names for types and operations. So by setting the rules, the compiler can split identifiers into good proper words and then convert them to the required casing. The splitting is done with convert_case using their string representation for boundaries.

In short, place a colon (:) between every boundary. Then each boundary follows the expressed pattern. For example aB will split words when a lower case letter is followed by an upper case letter. Some symbols are also allowed as boundary, like - & _.

If not specified, this uses a reasonable default for splitting.

// string
word-boundaries: "bD:0B:_"

Info

  • required: no
  • multiple allowed: no
  • supports doc comments: no

register-address-mode

Sets the global address mode for registers. This can be overridden per device.

When specified, the registers are assumed to share an address space:

  • With the mapped option, that address space is a memory-mapped space where if register A has address X and is Y bytes big, then register B (if it exists) will have the address X+Y.
  • With the indexed option, that address space has one register per number where if object A has address X, then object B (if it exists) will have the address X+1.

If this value is specified, then it permits bulk register reads and writes.

// address mode
register-address-mode: mapped

Info

  • required: no
  • multiple allowed: no
  • supports doc comments: no

default-access

When set, all subobjects use this value as their access value (unless overridden) and don’t require an access specifier anymore

// access specifier
default-access: RW

Info

  • required: no
  • multiple allowed: no
  • supports doc comments: no

Possible subnodes

Subnodes of the following types are allowed in the node body.