device/resources.h header reference
[Devices support library module]

The source code of this header can be browsed online.

Description [link] 

Members [link] 

Types [link] 

Functions [link] 

Macros [link] 

Members detail [link] 

#define DEVICE_RES_FOREACH(dev, rvar, ... /* loop body */ ) [link] 

This macro is declared in device/resources.h source file, line 411.

This macro iterates over resources entries of a device.

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: defined( CONFIG_DEVICE_RESOURCE_ALLOC )

#define DEVICE_RES_FOREACH(dev, rvar, ... /* loop body */ ) [link] 

This macro is declared in device/resources.h source file, line 431.

This macro iterates over resources entries of a device.

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: not defined( CONFIG_DEVICE_RESOURCE_ALLOC )

#define DEV_STATIC_RES_BLOB_PARAM(name_, value_) [link] 

This macro is declared in device/resources.h source file, line 852.

This macro specifies a generic blob parameter resource in a static device resources table declaration.

See also DEV_RES_BLOB_PARAM and DEV_DECLARE_STATIC.

#define DEV_STATIC_RES_DEVCLASS_PARAM(name_, path_, class__) [link] 

This macro is declared in device/resources.h source file, line 955.

This macro specifies a named device dependency resource in a static device resources table declaration.

See also DEV_RES_DEV_PARAM and DEV_DECLARE_STATIC.

#define DEV_STATIC_RES_DEV_PARAM(name_, path_) [link] 

This macro is declared in device/resources.h source file, line 942.

This macro specifies a named device dependency resource in a static device resources table declaration. The requested class is DRIVER_CLASS_NONE.

See also DEV_STATIC_RES_DEVCLASS_PARAM.

#define DEV_STATIC_RES_FREQ(num_, denom_) [link] 

This macro is declared in device/resources.h source file, line 756.

This macro specifies a frequency resource entry in a static device resources table declaration. A default value is used for frequency accuracy.

See also DEV_RES_FREQ and DEV_DECLARE_STATIC.

#define DEV_STATIC_RES_FREQ_ACC(num_, denom_, _acc_m, _acc_e) [link] 

This macro is declared in device/resources.h source file, line 769.

This macro is similar to DEV_STATIC_RES_FREQ, with a specified value for the accuracy.

See also struct dev_freq_s.

#define DEV_STATIC_RES_ID(major_, minor_) [link] 

This macro is declared in device/resources.h source file, line 631.

This macro specifies a numerical instance identifier in a static device resources table declaration.

See also DEV_RES_ID and DEV_DECLARE_STATIC.

#define DEV_STATIC_RES_IO(start_, end_) [link] 

This macro is declared in device/resources.h source file, line 571.

This macro specifies an IO space address range entry in a static device resources table declaration.

See also DEV_RES_IO and DEV_DECLARE_STATIC.

#define DEV_STATIC_RES_MEM(start_, end_) [link] 

This macro is declared in device/resources.h source file, line 601.

This macro specifies a memory range entry in a static device resources table declaration.

See also DEV_RES_MEM and DEV_DECLARE_STATIC.

#define DEV_STATIC_RES_PRODUCT(id_, name_) [link] 

This macro is declared in device/resources.h source file, line 725.

This macro specifies a product id resource entry in a static device resources table declaration.

See also DEV_RES_PRODUCT and DEV_DECLARE_STATIC.

#define DEV_STATIC_RES_REVISION(major_, minor_) [link] 

This macro is declared in device/resources.h source file, line 660.

This macro specifies a revision resource entry in a static device resources table declaration.

See also DEV_RES_REVISION and DEV_DECLARE_STATIC.

#define DEV_STATIC_RES_STR_PARAM(name_, value_) [link] 

This macro is declared in device/resources.h source file, line 812.

This macro specifies a generic string parameter resource in a static device resources table declaration.

See also DEV_RES_STR_PARAM and DEV_DECLARE_STATIC.

#define DEV_STATIC_RES_UINT_ARRAY_PARAM(name_, ...) [link] 

This macro is declared in device/resources.h source file, line 978.

This macro specifies a generic integer array parameter resource in a static device resources table declaration.

See also DEV_RES_UINT_ARRAY_PARAM and DEV_DECLARE_STATIC.

#define DEV_STATIC_RES_UINT_PARAM(name_, value_) [link] 

This macro is declared in device/resources.h source file, line 895.

This macro specifies a generic integer parameter resource in a static device resources table declaration.

See also DEV_RES_UINT_PARAM and DEV_DECLARE_STATIC.

#define DEV_STATIC_RES_VENDOR(id_, name_) [link] 

This macro is declared in device/resources.h source file, line 697.

This macro specifies a vendor id resource entry in a static device resources table declaration.

See also DEV_RES_VENDOR and DEV_DECLARE_STATIC.

#define __DEVICE_RESOURCES_H__ [link] 

This macro is declared in device/resources.h source file, line 23.

enum dev_resource_flags_e [link] 

This enum is declared in device/resources.h source file, line 130.

IdentifierDescription
DEVICE_RES_FLAGS_FREE_PTR0first resource field is a pointer which must be freeed on cleanup
DEVICE_RES_FLAGS_FREE_PTR1second resource field is a pointer which must be freeed on cleanup
DEVICE_RES_FLAGS_ENUM_RESERVED0reserved for use by enumerator driver

struct dev_resource_s [link] 

This struct is declared in device/resources.h source file, line 141.

Device resource entry.

See also struct dev_resource_table_s.

FieldDescription
union <anonymous> {
const void * ptr[2];
uintptr_t uint[2];
uint64_t uint64;
struct <anonymous> {See DEV_RES_MEM.
uintptr_t start;
uintptr_t end;
} mem;
struct <anonymous> {See DEV_RES_IO.
uintptr_t start;
uintptr_t end;
} io;
struct <anonymous> {See DEV_RES_IRQ.
uintptr_t src_id:CONFIG_DEVICE_IRQ_MAX_OUTPUT_ID;id of irq source endpoint of the device
uintptr_t sink_id:CONFIG_DEVICE_IRQ_MAX_INPUT_ID;id of irq sink endpoint of interrupt controller
uintptr_t trig_mode:8;initial irq trigger mode,
See also enum dev_irq_sense_modes_e.
uintptr_t irq_id:CONFIG_DEVICE_IRQ_MAX_LOGICAL_ID;logical irq id, used when trig_mode is DEV_IRQ_SENSE_ID_BUS
uintptr_t route_mask:CONFIG_DEVICE_IRQ_MAX_ROUTES;specifies source endpoints of the controller that can be used to forward this irq.
} irq;
struct <anonymous> {See DEV_RES_GPIO.
const char * label;
uintptr_t id:CONFIG_DEVICE_GPIO_MAX_ID;
uintptr_t width:CONFIG_DEVICE_GPIO_MAX_WIDTH;
} gpio;
struct <anonymous> {See DEV_RES_IOMUX.
const char * label;
uintptr_t demux:CONFIG_DEVICE_IOMUX_MAX_DEMUX;
uintptr_t io_id:CONFIG_DEVICE_IOMUX_MAX_ID;
uintptr_t mux:CONFIG_DEVICE_IOMUX_MAX_MUX;
uintptr_t config:CONFIG_DEVICE_IOMUX_MAX_CONFIG;
} iomux;
struct <anonymous> {See DEV_RES_DMA.
uint32_t channel_mask;
uint16_t link;
} dma;
struct <anonymous> {See DEV_RES_USBDEV.
uint32_t config;
uint32_t mapin;
uint32_t mapout;
} usbdev;
struct <anonymous> {See DEV_RES_UART.
uintptr_t baudrate:22;
uintptr_t data_bits:5;
uintptr_t stop_bits:2;
uintptr_t parity:2;
uintptr_t flow_ctrl:1;
} uart;
struct <anonymous> {DEV_RES_ID
uintptr_t major;dynamic numeric id
uintptr_t minor;dynamic numeric id
} id;
struct <anonymous> {See DEV_RES_REVISION.
uintptr_t major;
uintptr_t minor;
} revision;
struct <anonymous> {See DEV_RES_VENDOR.
uintptr_t id;optional vendor numeric id, may be -1
const char * name;optional vendor string id, may be NULL
} vendor;
struct <anonymous> {See DEV_RES_PRODUCT.
uintptr_t id;optional device numeric id, may be -1
const char * name;optional device string, may be NULL
} product;
struct <anonymous> {See DEV_RES_CMU_MUX.
uint64_t parent:CONFIG_DEVICE_CLOCK_MAX_ID;node id of the input clock signal
uint64_t node:CONFIG_DEVICE_CLOCK_MAX_ID;node id of the output clock signal
uint64_t num:CONFIG_DEVICE_CLOCK_FRAC_WIDTH;numerator of the frequency scaling
uint64_t denom:CONFIG_DEVICE_CLOCK_FRAC_WIDTH;denominator of the frequency scaling
uint64_t config:CONFIG_DEVICE_CMU_CONFIGID_COUNT;mask of associated configurations
} cmu_mux;
struct <anonymous> {See DEV_RES_CMU_OSC.
uint64_t num:CONFIG_DEVICE_CLOCK_OSCN_WIDTH;numerator of the frequency fractional part
uint64_t denom:CONFIG_DEVICE_CLOCK_OSCD_WIDTH;denominator of the frequency fractional part
uint32_t node:CONFIG_DEVICE_CLOCK_MAX_ID;node id
uint32_t config:CONFIG_DEVICE_CMU_CONFIGID_COUNT;mask of associated configurations
uint32_t acc_m:3;accuracy,
See also struct dev_freq_s.
uint32_t acc_e:5;accuracy,
See also struct dev_freq_s.
} cmu_osc;
struct <anonymous> {See DEV_RES_CLK_SRC.
const char * src;path to the clock source device
uintptr_t src_ep:CONFIG_DEVICE_CLOCK_MAX_ID;node id of the source endpoint, relevant to the device pointed to by src.
uintptr_t sink_ep:CONFIG_DEVICE_CLOCK_MAX_ID;node id of the sink endpoint, relevant to the device which holds this resource.
} clock_src;
struct <anonymous> {See DEV_RES_STR_PARAM.
uintptr_t sink_ep:CONFIG_DEVICE_CLOCK_MAX_ID;
uintptr_t modes:CONFIG_DEVICE_CLOCK_MODE_COUNT*CONFIG_DEVICE_CMU_CONFIGID_COUNT_LOG2;device driver throttling modes to clock provider mask bits
} clock_modes;
struct <anonymous> {See DEV_RES_FREQ.
uint64_t num:CONFIG_DEVICE_CLOCK_OSCN_WIDTH;numerator of the frequency fractional part
uint64_t denom:CONFIG_DEVICE_CLOCK_OSCD_WIDTH;denominator of the frequency fractional part
uint32_t acc_m:3;accuracy,
See also struct dev_freq_s.
uint32_t acc_e:5;accuracy,
See also struct dev_freq_s.
} freq;
struct <anonymous> {See DEV_RES_STR_PARAM.
const char * name;
const char * value;
} str_param;
struct <anonymous> {See DEV_RES_BLOB_PARAM.
const char * name;
const void * value;
} blob_param;
struct <anonymous> {See DEV_RES_UINT_PARAM.
const char * name;
uintptr_t value;
} uint_param;
struct <anonymous> {See DEV_RES_DEV_PARAM.
const char * name;
const char * dev;
uint8_t class_;
} dev_param;
struct <anonymous> {See DEV_RES_UINT_ARRAY_PARAM.
const char * name;
const uintptr_t * array;
uint16_t count;
} uint_array_param;
struct <anonymous> {See DEV_RES_I2C_ADDR.
const char * ctrl;Device path to i2c controller
uint16_t addr;
} i2c_addr;
struct <anonymous> {See DEV_RES_I2C_BITRATE.
uint32_t bitrate;
} i2c_bitrate;
} u;
enum dev_resource_type_e type:8;resource descriptor type
See also enum dev_resource_type_e.
enum dev_resource_flags_e flags:8;

enum dev_resource_table_flags_e [link] 

This enum is declared in device/resources.h source file, line 368.

IdentifierDescription
DEVICE_RES_TBL_FLAGS_ALLOCATED
DEVICE_RES_TBL_FLAGS_STATIC_CONST

struct dev_resource_table_s [link] 

This struct is declared in device/resources.h source file, line 375.

Table of device resources

FieldDescription
struct dev_resource_table_s * next;chaining of resource entry block
enum dev_resource_table_flags_e flags:8;
uint8_t count;number of entries in the block
struct dev_resource_s table[0];

enum dev_resource_type_e [link] 

This enum is declared in device/resources.h source file, line 46.

This enum specifies the types of device resource entries.

See also Device resources.

IdentifierDescription
DEV_RES_UNUSEDMark a resource entry as not used.
DEV_RES_MEMMemory address range.
See also DEV_STATIC_RES_MEM, device_res_add_mem and device_res_get_mem.
DEV_RES_IOIO space address range.
See also DEV_STATIC_RES_IO, device_res_add_io and device_res_get_io.
DEV_RES_IRQThis entry specifies the connection of an irq output of the device to an interrupt controller.
See also device_res_add_irq, DEV_STATIC_RES_DEV_ICU, DEV_STATIC_RES_DEV_ICU, DEV_STATIC_RES_IRQ and DEV_STATIC_RES_IRQ.
DEV_RES_GPIOThis entry specifies a pin label name along with a range of associated contiguous pin ids. It used to define a set of GPIO pins which are needed to drive an external device. The label specifies a driver specific role for the pin range. A link to the GPIO controller for which the pin ids are relevant must be specified in a separate DEV_RES_DEV_PARAM resource entry named gpio.
See also DEV_STATIC_RES_DEV_GPIO, DEV_STATIC_RES_DEV_GPIO, DEV_STATIC_RES_GPIO, DEV_STATIC_RES_GPIO and device_res_add_gpio.
DEV_RES_IOMUXThis entry specifies a pin label name along with the associated pin muxing configuration. It used to define which pins of the chip must be dedicated to IOs of an internal device.
See also DEV_STATIC_RES_DEV_IOMUX, DEV_STATIC_RES_DEV_IOMUX, DEV_STATIC_RES_IOMUX, DEV_STATIC_RES_IOMUX and device_res_add_iomux.
DEV_RES_UARTDefault serial line configuration for an UART.
See also DEV_STATIC_RES_UART and device_res_add_uart.
DEV_RES_IDNumerical identifier which uniquely identify an instance of the device. Processor devices must use this resource in order to specifies the cpu id.
See also DEV_STATIC_RES_ID, device_res_add_id, device_res_get_rev and device_res_get_id.
DEV_RES_VENDORVendor ID. Both a numerical and a string values can be specified. The exact meaning of the value depends on the parent enumerator device.
See also DEV_STATIC_RES_VENDOR and device_res_add_vendor.
DEV_RES_PRODUCTProduct ID. Both a numerical and a string values can be specified. The exact meaning of the value depends on the parent enumerator device.
See also DEV_STATIC_RES_PRODUCT and device_res_add_product.
DEV_RES_REVISIONHardware revision number.
See also DEV_STATIC_RES_REVISION and device_res_add_revision.
DEV_RES_FREQConstant frequency value.
See also DEV_STATIC_RES_FREQ, device_get_res_freq and device_res_add_freq.
DEV_RES_CMU_MUXCMU Clock multiplexer and scaler configuration entry.
See also device_res_add_cmu_mux, DEV_STATIC_RES_CMU_MUX and DEV_STATIC_RES_CMU_MUX.
DEV_RES_CMU_OSCCMU Clock oscillator configuration entry.
See also device_res_add_cmu_osc, DEV_STATIC_RES_CMU_OSC and DEV_STATIC_RES_CMU_OSC.
DEV_RES_CLK_SRCDevice clock source mapping.
See also device_res_add_clock_src, DEV_STATIC_RES_CLK_SRC and DEV_STATIC_RES_CLK_SRC.
DEV_RES_CLK_MODES Device clock throttling modes.
See also DEV_STATIC_RES_CLOCK_MODES and DEV_STATIC_RES_CLOCK_MODES.
DEV_RES_STR_PARAMGeneric string parameters. The exact meaning of the value is driver dependent.
See also DEV_STATIC_RES_STR_PARAM, device_get_param_str and device_res_add_str_param.
DEV_RES_BLOB_PARAMGeneric binary object parameter. The exact meaning of the value is driver dependent.
See also DEV_STATIC_RES_BLOB_PARAM and device_get_param_blob.
DEV_RES_UINT_PARAMGeneric integer parameter. The exact meaning of the value is driver dependent.
See also DEV_STATIC_RES_UINT_PARAM, device_get_param_uint and device_res_add_uint_param.
DEV_RES_DEV_PARAMNamed dependency on an other device. The exact meaning of the value may be device class dependent or driver dependent. The device initialization will not occur until the specified path points to an existing and properly initialized device. The class information is used to check for availability of a specific API implementation by the driver associated to the device, it may be DRIVER_CLASS_NONE.
See also DEV_STATIC_RES_DEVCLASS_PARAM, device_get_param_dev_accessor and device_res_add_dev_param.
DEV_RES_UINT_ARRAY_PARAMGeneric integer array parameter. The exact meaning of the value is driver dependent.
See also DEV_STATIC_RES_UINT_ARRAY_PARAM, device_get_param_uint_array and device_res_add_uint_array_param.
DEV_RES_I2C_ADDRSee #DEV_STATIC_RES_I2C and device_i2c_res_addr.
DEV_RES_I2C_BITRATESee #DEV_STATIC_RES_I2C and device_i2c_res_bitrate.
DEV_RES_DMADMA channel mapping. The config parameter is driver specific.
See also DEV_STATIC_RES_DMA and DEV_STATIC_RES_DMA.
DEV_RES_USBDEVUSB device endpoint mapping.
DEV_RES_TYPES_COUNTNumber of resource types

error_t device_get_param_blob(const struct device_s *dev, const char *name, uint8_t id, const void **a) [link] 

This function is declared in device/resources.h source file, line 867.

This function retrieves the value of a blob parameter resource entry from the associated parameter name.

See also DEV_RES_BLOB_PARAM.

error_t device_get_param_dev_accessor(struct device_s *dev, const char *name, struct device_accessor_s *acc, enum driver_class_e cl) [link] 

This function is declared in device/resources.h source file, line 974.

This function initializes a device accessor object from a device path parameter resource of the device tree. This actually perform the resource lookup from the provided name and call the device_get_accessor_by_path function with the device path specified in the device resource.

See also DEV_RES_DEV_PARAM.

error_t device_get_param_str(const struct device_s *dev, const char *name, const char **a) [link] 

This function is declared in device/resources.h source file, line 826.

This function retrieves the value of a generic string parameter resource entry from the associated parameter name.

See also DEV_RES_STR_PARAM.

void device_get_param_str_default(const struct device_s *dev, const char *name, const char **a, const char *def) [link] 

This function is declared in device/resources.h source file, line 841.

This function is similar to device_get_param_str. A default value is returned instead of an error when the entry is not found.

error_t device_get_param_uint(const struct device_s *dev, const char *name, uintptr_t *a) [link] 

This function is declared in device/resources.h source file, line 909.

This function retrieves the value of a integer parameter resource entry from the associated parameter name.

See also DEV_RES_UINT_PARAM.

error_t device_get_param_uint_array(const struct device_s *dev, const char *name, uint16_t *count, const uintptr_t **a) [link] 

This function is declared in device/resources.h source file, line 1000.

This function retrieves the value of a integer parameter resource entry from the associated parameter name.

See also DEV_RES_UINT_ARRAY_PARAM.

void device_get_param_uint_default(const struct device_s *dev, const char *name, uintptr_t *a, uintptr_t def) [link] 

This function is declared in device/resources.h source file, line 924.

This function is similar to device_get_param_uint. A default value is returned instead of an error when the entry is not found.

error_t device_get_res_freq(const struct device_s *dev, struct dev_freq_s *freq, uint_fast8_t index) [link] 

This function is declared in device/resources.h source file, line 786.

This function looks up a frequency resource entry.

See also DEV_RES_FREQ.

enum dev_pin_driving_e device_io_mode_symbol(char l) [link] 

This function is declared in device/resources.h source file, line 1014.

This function returns a dev_pin_driving_e value from a char symbol. DEV_PIN_DISABLED is returned if the passed char is not recognized.

error_t device_res_add_dev_param(struct device_s *dev, const char *name, const char *path, enum driver_class_e cl) [link] 

This function is declared in device/resources.h source file, line 938.

This function attaches a device path parameter resource to the device.

This is available when CONFIG_DEVICE_RESOURCE_ALLOC is defined.

See also DEV_RES_DEV_PARAM.

error_t device_res_add_freq(struct device_s *dev, const struct dev_freq_s *freq) [link] 

This function is declared in device/resources.h source file, line 752.

This function attaches a frequency resource to the device.

This is available when CONFIG_DEVICE_RESOURCE_ALLOC is defined.

See also DEV_RES_FREQ.

error_t device_res_add_id(struct device_s *dev, uintptr_t major, uintptr_t minor) [link] 

This function is declared in device/resources.h source file, line 627.

This function adds a device instance identifier to the device resource table.

This is available when CONFIG_DEVICE_RESOURCE_ALLOC is defined.

See also DEV_RES_ID.

error_t device_res_add_io(struct device_s *dev, uintptr_t start, uintptr_t end) [link] 

This function is declared in device/resources.h source file, line 567.

This function appends an IO space address range to the device resources table.

This is available when CONFIG_DEVICE_RESOURCE_ALLOC is defined.

See also DEV_RES_IO.

error_t device_res_add_mem(struct device_s *dev, uintptr_t start, uintptr_t end) [link] 

This function is declared in device/resources.h source file, line 598.

This function adds a memory space address range to the device resources table.

This is available when CONFIG_DEVICE_RESOURCE_ALLOC is defined.

See also DEV_RES_MEM.

error_t device_res_add_product(struct device_s *dev, uintptr_t id, const char *name) [link] 

This function is declared in device/resources.h source file, line 721.

This function attaches a product identifier resource entry to the device. The string will be duplicated if not NULL.

This is available when CONFIG_DEVICE_RESOURCE_ALLOC is defined.

See also DEV_RES_PRODUCT.

error_t device_res_add_revision(struct device_s *dev, uintptr_t major, uintptr_t minor) [link] 

This function is declared in device/resources.h source file, line 656.

This function adds a revision entry for the device.

This is available when CONFIG_DEVICE_RESOURCE_ALLOC is defined.

See also DEV_RES_REVISION.

error_t device_res_add_str_param(struct device_s *dev, const char *name, const char *value) [link] 

This function is declared in device/resources.h source file, line 808.

This function attaches a generic string parameter resource to the device.

This is available when CONFIG_DEVICE_RESOURCE_ALLOC is defined.

See also DEV_RES_STR_PARAM.

error_t device_res_add_uint_array_param(struct device_s *dev, const char *name, uint16_t count, uintptr_t values[]) [link] 

This function is declared in device/resources.h source file, line 994.

This function attaches an integer array parameter resource to the device. The name string will be duplicated.

This is available when CONFIG_DEVICE_RESOURCE_ALLOC is defined.

See also DEV_RES_UINT_ARRAY_PARAM.

error_t device_res_add_uint_param(struct device_s *dev, const char *name, uintptr_t value) [link] 

This function is declared in device/resources.h source file, line 891.

This function attaches an integer parameter resource to the device. The name string will be duplicated.

This is available when CONFIG_DEVICE_RESOURCE_ALLOC is defined.

See also DEV_RES_UINT_PARAM.

error_t device_res_add_vendor(struct device_s *dev, uintptr_t id, const char *name) [link] 

This function is declared in device/resources.h source file, line 693.

This function attaches a vendor identifier resource entry to the device. The string will be duplicated if not NULL.

This is available when CONFIG_DEVICE_RESOURCE_ALLOC is defined.

See also DEV_RES_VENDOR.

error_t device_res_get_io(const struct device_s *dev, uint_fast8_t id, uintptr_t *start, uintptr_t *end) [link] 

This function is declared in device/resources.h source file, line 586.

This function looks up an IO resource entry and reads either fields. start and end pointers may be NULL.

See also DEV_RES_IO.

error_t device_res_get_mem(const struct device_s *dev, uint_fast8_t id, uintptr_t *start, uintptr_t *end) [link] 

This function is declared in device/resources.h source file, line 616.

This function looks up a memory range resource entry and reads either fields. start and end pointers may be NULL.

See also DEV_RES_MEM.

error_t device_res_get_rev(const struct device_s *dev, uint_fast8_t id, uintptr_t *major, uintptr_t *minor) [link] 

This function is declared in device/resources.h source file, line 675.

This function looks up a revision resource entry and reads either fields. start and end pointers may be NULL.

See also DEV_RES_ID.

#define DEV_STATIC_RESOURCES(args_...) [link] 

This macro is declared in device/resources.h source file, line 395.

This macro yields a static pointer to an static initialized struct dev_resource_s object.

This macro is for internal use only.

See also DEV_DECLARE_STATIC.

#define DEV_STATIC_RESOURCES_ARRAY(args_...) [link] 

This macro is declared in device/resources.h source file, line 387.

This macro is for internal use only.

error_t device_res_alloc(struct device_s *dev, struct dev_resource_s **res, enum dev_resource_type_e type) [link] 

This function is declared in device/resources.h source file, line 453.

This function returns a poiner to next unused resource slot.

This is available when CONFIG_DEVICE_RESOURCE_ALLOC is defined.

This function is for internal use only.

error_t device_res_alloc_str(struct device_s *dev, enum dev_resource_type_e type, const char *a, const char *b, struct dev_resource_s **r_) [link] 

This function is declared in device/resources.h source file, line 555.

This function allocates a new device resource and setup one or two string fields. The a and b parameters may be NULL. Strings are duplicated.

This is available when CONFIG_DEVICE_RESOURCE_ALLOC is defined.

This function is for internal use only.

error_t device_res_alloc_uint(struct device_s *dev, enum dev_resource_type_e type, uintptr_t a, uintptr_t b, struct dev_resource_s **r_) [link] 

This function is declared in device/resources.h source file, line 494.

This function allocates a new device resource and setups 2 integer or pointer fields.

This is available when CONFIG_DEVICE_RESOURCE_ALLOC is defined.

This function is for internal use only.

error_t device_res_alloc_uint64(struct device_s *dev, enum dev_resource_type_e type, uint64_t a, struct dev_resource_s **r_) [link] 

This function is declared in device/resources.h source file, line 531.

This function allocates a new device resource and setups a 64 bits integer field.

This is available when CONFIG_DEVICE_RESOURCE_ALLOC is defined.

This function is for internal use only.

void device_res_cleanup(struct dev_resource_s *r) [link] 

This function is declared in device/resources.h source file, line 458.

This function releases the resource values and mark the resource entry as DEV_RES_UNUSED.

This is available when CONFIG_DEVICE_RESOURCE_ALLOC is defined.

This function is for internal use only.

struct dev_resource_s * device_res_get(const struct device_s *dev, enum dev_resource_type_e type, uint_fast8_t index) [link] 

This function is declared in device/resources.h source file, line 465.

This function looks up a resource entry with given type. The index parameter can be used to find different resources of the same type.

This function is for internal use only.

struct dev_resource_s * device_res_get_from_name(const struct device_s *dev, enum dev_resource_type_e type, uint_fast8_t index, const char *name) [link] 

This function is declared in device/resources.h source file, line 474.

This function looks up a resource entry with given type and name. The first resource field must be a string. The index parameter can be used to find different resources of the same type. The comparison stops on the first character which does not match [-_A-Za-z0-9] in name.

This function is for internal use only.

error_t device_res_get_id(const struct device_s *dev, uint_fast8_t id, uintptr_t *major, uintptr_t *minor) [link] 

This function is declared in device/resources.h source file, line 646.

This function looks up an instance identifier resource entry and reads either fields. start and end pointers may be NULL.

This function is for internal use only.

See also DEV_RES_ID.

error_t device_res_get_uint(const struct device_s *dev, enum dev_resource_type_e type, uint_fast8_t id, uintptr_t *a, uintptr_t *b) [link] 

This function is declared in device/resources.h source file, line 501.

This function looks up a resource entry and reads one or two integer fields. a and b pointers may be NULL.

This function is for internal use only.

error_t device_res_get_uint64(const struct device_s *dev, enum dev_resource_type_e type, uint_fast8_t id, uint64_t *a) [link] 

This function is declared in device/resources.h source file, line 538.

This function looks up a resource entry and reads a 64 bits integer resource field.

This function is for internal use only.

Valid XHTML 1.0 StrictGenerated by diaxen on Thu Aug 4 15:44:06 2022 using MkDoc