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

The source code of this header can be browsed online.

Description  

Members  

Types  

Functions  

Macros  

Members detail  

#define DEV_ENUM_CANCEL(n)  

This macro is declared in device/class/enum.h source file, line 101.

See also dev_enum_cancel_t.

#define DEV_ENUM_MATCH_DRIVER(n)  

This macro is declared in device/class/enum.h source file, line 82.

See also dev_enum_match_driver_t.

#define DEV_ENUM_REQUEST(n)  

This macro is declared in device/class/enum.h source file, line 93.

See also dev_enum_request_t.

#define DRIVER_ENUM_METHODS(prefix)  

This macro is declared in device/class/enum.h source file, line 116.

See also struct driver_enum_s.

#define __DEVICE_ENUM_H__  

This macro is declared in device/class/enum.h source file, line 31.

typedef error_t (dev_enum_cancel_t)(const struct device_enum_s *accessor, struct dev_enum_rq_s *rq)   

This typedef is declared in device/class/enum.h source file, line 106.

This typedef cancel a request.

This declaration involves expansion of the DEV_ENUM_CANCEL macro.

typedef bool_t (dev_enum_match_driver_t)(const struct device_enum_s *accessor, const struct dev_enum_ident_s *ident, size_t count, struct device_s *dev)   

This typedef is declared in device/class/enum.h source file, line 91.

This typedef determines if the drv driver is suitable to drive the dev device. The device must have been enumerated by the accessor device. This typedef generally relies on the enumeration ids table provided by the driver.

This declaration involves expansion of the DEV_ENUM_MATCH_DRIVER macro.

typedef void (dev_enum_request_t)(const struct device_enum_s *accessor, struct dev_enum_rq_s *rq)   

This typedef is declared in device/class/enum.h source file, line 98.

This typedef enqueues a request.

This declaration involves expansion of the DEV_ENUM_REQUEST macro.

void dev_enum_rq_done(struct dev_enum_rq_s *rq)  

This function is declared in device/class/enum.h source file, line 80.

This function invokes or schedules execution of the enum request callback associated to the request. For use in device drivers.

struct dev_enum_rq_s * dev_enum_rq_from_kr(struct kroutine_s *kr)  

This function is declared in device/class/enum.h source file, line 80.

This function retrieves a pointer to the request when in the request completion callback routine.

struct dev_enum_rq_s * dev_enum_rq_head(dev_request_queue_root_t *q)  

This function is declared in device/class/enum.h source file, line 80.

This function returns the oldest enum request in the given queue. A NULL pointer is returned if the queue is empty. For use in device drivers.

void dev_enum_rq_init(struct dev_enum_rq_s *rq, kroutine_exec_t *exec)  

This function is declared in device/class/enum.h source file, line 80.

This function initializes the given enum request callback. This must be used before submitting the request to a driver.

This is available when CONFIG_MUTEK_KROUTINE_SCHED is defined.

void dev_enum_rq_init_immediate(struct dev_enum_rq_s *rq, kroutine_exec_t *exec)  

This function is declared in device/class/enum.h source file, line 80.

This function initializes the given enum request callback. This must be used before submitting the request to a driver.

void dev_enum_rq_init_queue(struct dev_enum_rq_s *rq, kroutine_exec_t *exec, struct kroutine_queue_s *queue)  

This function is declared in device/class/enum.h source file, line 80.

This function initializes the given enum request callback. This must be used before submitting the request to a driver.

This is available when CONFIG_MUTEK_KROUTINE_QUEUE is defined.

void dev_enum_rq_init_seq(struct dev_enum_rq_s *rq, kroutine_exec_t *exec, struct kroutine_sequence_s *seq)  

This function is declared in device/class/enum.h source file, line 80.

This function initializes the given enum request callback. This must be used before submitting the request to a driver.

This is available when CONFIG_MUTEK_KROUTINE_SCHED is defined.

struct dev_enum_rq_s * dev_enum_rq_pop(dev_request_queue_root_t *q)  

This function is declared in device/class/enum.h source file, line 80.

This function removes and return the oldest enum request in the queue. A NULL pointer is returned if the queue is empty. For use in device drivers.

void dev_enum_rq_pushback(dev_request_queue_root_t *q, struct dev_enum_rq_s *rq)  

This function is declared in device/class/enum.h source file, line 80.

This function insert a new enum request at the end of the given queue. For use in device drivers.

void dev_enum_rq_remove(dev_request_queue_root_t *q, struct dev_enum_rq_s *rq)  

This function is declared in device/class/enum.h source file, line 80.

This function removes the specified enum request from the queue. For use in device drivers.

struct dev_enum_rq_s  

This struct is declared in device/class/enum.h source file, line 58.

FieldDescription
union <anonymous> {
struct dev_request_s base;
typeof(struct dev_request_s::error) error;
typeof(struct dev_request_s::pvdata) pvdata;
};
enum dev_enum_rq_type_e type:8;
union <anonymous> {
struct <anonymous> {
device_enum_rev_t rev;
} list;
struct <anonymous> {
struct device_s * dev;
const struct driver_class_s * api;
enum driver_class_e class_:8;
} init;
};

struct dev_request_s * dev_enum_rq_s_base(struct dev_enum_rq_s *x)  

struct dev_enum_rq_s * dev_enum_rq_s_cast(struct dev_request_s *x)  

enum dev_enum_rq_type_e  

This enum is declared in device/class/enum.h source file, line 43.

IdentifierDescription
DEV_ENUM_LIST_EVENTThis enum_value request waits for a change in the list of child devices. The request terminates when the rev field become lower than the current revision counter of the enumerator. The rev field is updated to the last value of the counter.
DEV_ENUM_INIT_EVENTThis enum_value request waits for an existing child device driver to complete the initialization of the specified class. The ref_count of the device is increased if the request terminates successfully.

error_t dev_enum_wait_rq(const struct device_enum_s *acc, struct dev_enum_rq_s *rq)  

This function is declared in device/class/enum.h source file, line 125.

This function use the scheduler api to put current context in wait state during the request. This can only be called from a scheduler context.

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

struct device_enum_s  

This struct is declared in DRIVER_CLASS_TYPES function like macro expansion, line 20 in device/class/enum.h source file, line 114.

This struct is the device accessor object type for the enum device class. This accessor must be initialized by calling the device_get_accessor function.

See also DRIVER_CLASS_ENUM, struct device_accessor_s and Device accessor.

FieldDescription
union <anonymous> {
struct device_accessor_s base;
struct <anonymous> {
struct device_s * dev;
struct driver_enum_s * api;
uint_fast8_t number;
};
};

struct device_accessor_s * device_enum_s_base(struct device_enum_s *x)  

This function is declared in DRIVER_CLASS_TYPES function like macro expansion, line 41 in device/class/enum.h source file, line 114.

This function casts a enum device accessor to a generic device accessor

struct device_enum_s * device_enum_s_cast(struct device_accessor_s *x)  

This function is declared in DRIVER_CLASS_TYPES function like macro expansion, line 34 in device/class/enum.h source file, line 114.

This function casts a generic device accessor to a enum device accessor

struct driver_enum_s  

This struct is declared in DRIVER_CLASS_TYPES function like macro expansion, line 5 in device/class/enum.h source file, line 114.

This struct is the driver API descriptor for the enum device class.

See also DRIVER_CLASS_ENUM and struct driver_class_s.

error_t dev_drv_enum_cancel_generic(dev_request_queue_root_t *q, struct device_s *dev, struct dev_enum_rq_s *rq)  

This function is a generic implementation of the dev_enum_cancel_t function suitable for most enum driver.

This is available when CONFIG_DEVICE_ENUM is defined.

This function is for internal use only.

void dev_drv_enum_child_init(dev_request_queue_root_t *q, struct device_s *cdev)  

This function is a generic implementation of the DEV_USE_ENUM_CHILD_INIT operation handler suitable for most enum drivers.

This is available when CONFIG_DEVICE_ENUM is defined.

This function is for internal use only.

void dev_drv_enum_init_enqueue(dev_request_queue_root_t *q, struct dev_enum_rq_s *rq)  

This function is a generic implementation of the DEV_ENUM_INIT_EVENT request handler suitable for most enum drivers. The dev_drv_enum_request_generic function handle all type of requests.

This is available when CONFIG_DEVICE_ENUM is defined.

This function is for internal use only.

void dev_drv_enum_request_generic(dev_request_queue_root_t *q, struct device_s *dev, struct dev_enum_rq_s *rq)  

This function is a generic implementation of the dev_enum_request_t function suitable for most enum drivers. The dev_drv_enum_init_enqueue function should be used when only the DEV_ENUM_INIT_EVENT type of request requires a generic implementation.

This is available when CONFIG_DEVICE_ENUM is defined.

This function is for internal use only.

Valid XHTML 1.0 StrictGenerated by diaxen on Wed Oct 17 21:18:37 2018 using MkDoc