mirror of https://github.com/dzavalishin/openpod
device name field
This commit is contained in:
parent
7327be3f75
commit
3ed4bb4ad7
|
@ -60,6 +60,9 @@ pod_device simple_device =
|
|||
0, 0,
|
||||
0, // flags
|
||||
|
||||
// Device name, either static or runtime-generated
|
||||
"simple driver skeleton device name - RENAME ME!",
|
||||
|
||||
&simple_driver,
|
||||
|
||||
&dev_func, // dev io entry points
|
||||
|
|
|
@ -48,7 +48,9 @@ type Pod_Device is record
|
|||
class_id : Byte;
|
||||
class_flags : Byte; -- Class specific flags,
|
||||
internal_flags : Byte; -- Not exposed as state change to kernel
|
||||
state_flags : Byte; -- Device state
|
||||
state_flags : Byte; -- Device state
|
||||
|
||||
name : Interfaces.C.Strings.chars_ptr; --access Character;
|
||||
|
||||
drv : access Pod_Driver;
|
||||
|
||||
|
|
|
@ -2,11 +2,9 @@
|
|||
#include <pod_kernel_api.h>
|
||||
|
||||
|
||||
// Default implementation, supports just logging
|
||||
// Default implementation, supports just logging, replace in a real kernel, if need something more
|
||||
|
||||
// __attribute__((weak))
|
||||
|
||||
errno_t
|
||||
errno_t __attribute__((weak))
|
||||
pod_dev_event( struct pod_driver *drv, struct pod_device *dev, int event_id, void *event_info )
|
||||
{
|
||||
(void)dev;
|
||||
|
|
|
@ -68,6 +68,8 @@ typedef struct pod_device
|
|||
uint8_t internal_flags; // Not exposed as state change to kernel
|
||||
uint8_t state_flags; // Device state
|
||||
|
||||
char *name;
|
||||
|
||||
struct pod_driver *drv;
|
||||
|
||||
pod_dev_f *calls; // dev io entry points
|
||||
|
|
|
@ -137,6 +137,8 @@ pod_device test_device =
|
|||
0, 0,
|
||||
0, // flags
|
||||
|
||||
"test device",
|
||||
|
||||
&test_driver,
|
||||
|
||||
&dev_func, // dev io entry points
|
||||
|
|
Loading…
Reference in New Issue