define pen_type_t as a vendor-specific type

This commit is contained in:
Andreas Steffen
2012-08-20 22:37:08 +02:00
parent 88a5abf5e2
commit dbb7859f9f
35 changed files with 301 additions and 624 deletions
+19 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2011 Andreas Steffen
* Copyright (C) 2011-2012 Andreas Steffen
* HSR Hochschule fuer Technik Rapperswil
*
* This program is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
#include <library.h>
typedef enum pen_t pen_t;
typedef struct pen_type_t pen_type_t;
enum pen_t {
PEN_IETF = 0x000000, /* 0 */
@@ -40,6 +41,23 @@ enum pen_t {
PEN_RESERVED = 0xffffff, /* 16777215 */
};
/**
* Vendor specific type
*/
struct pen_type_t {
pen_t vendor_id;
u_int32_t type;
};
/**
* Create a pen_type_t struct
*/
static inline pen_type_t pen_type_create(pen_t vendor_id, u_int32_t type)
{
pen_type_t pen_type = {vendor_id, type};
return pen_type;
}
/**
* enum names for pen_t.
*/