- some fields needed to build usb_serial
- use the dano version by default - s/ddraquire/ddaquire/ git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25203 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
df5030c7e3
commit
d4a5975f50
@ -24,9 +24,12 @@ struct ddrover {
|
||||
};
|
||||
|
||||
struct ddomain {
|
||||
|
||||
struct ddrover *r;
|
||||
bool bg;
|
||||
bool locked;
|
||||
};
|
||||
|
||||
|
||||
typedef bool (*tty_service_func)(struct tty *tty, struct ddrover *rover, uint op);
|
||||
|
||||
struct tty {
|
||||
@ -82,7 +85,8 @@ struct ttyfile {
|
||||
|
||||
typedef struct tty_module_info tty_module_info;
|
||||
|
||||
struct tty_module_info {
|
||||
// this version is compatible with BeOS R5
|
||||
struct tty_module_info_r5 {
|
||||
// not a real bus manager... no rescan() !
|
||||
module_info mi;
|
||||
status_t (*ttyopen)(struct ttyfile *, struct ddrover *, tty_service_func);
|
||||
@ -91,10 +95,6 @@ struct tty_module_info {
|
||||
status_t (*ttyread)(struct ttyfile *, struct ddrover *, char *, size_t *);
|
||||
status_t (*ttywrite)(struct ttyfile *, struct ddrover *, const char *, size_t *);
|
||||
status_t (*ttycontrol)(struct ttyfile *, struct ddrover *, ulong, void *, size_t);
|
||||
#if 0 /* Dano! */
|
||||
status_t (*ttyselect)(struct ttyfile *, struct ddrover *, uint8, uint32, selectsync *);
|
||||
status_t (*ttydeselect)(struct ttyfile *, struct ddrover *, uint8, selectsync *);
|
||||
#endif
|
||||
void (*ttyinit)(struct tty *, bool);
|
||||
void (*ttyilock)(struct tty *, struct ddrover *, bool );
|
||||
void (*ttyhwsignal)(struct tty *, struct ddrover *, int, bool);
|
||||
@ -102,7 +102,7 @@ struct tty_module_info {
|
||||
int (*ttyout)(struct tty *, struct ddrover *);
|
||||
struct ddrover *(*ddrstart)(struct ddrover *);
|
||||
void (*ddrdone)(struct ddrover *);
|
||||
void (*ddracquire)(struct ddrover *, struct ddomain *);
|
||||
void (*ddacquire)(struct ddrover *, struct ddomain *);
|
||||
};
|
||||
|
||||
// BeOS R5.1d0 has a different module with the same version...
|
||||
@ -116,7 +116,6 @@ struct tty_module_info_dano {
|
||||
status_t (*ttyread)(struct ttyfile *, struct ddrover *, char *, size_t *);
|
||||
status_t (*ttywrite)(struct ttyfile *, struct ddrover *, const char *, size_t *);
|
||||
status_t (*ttycontrol)(struct ttyfile *, struct ddrover *, ulong, void *, size_t);
|
||||
|
||||
status_t (*ttyselect)(struct ttyfile *, struct ddrover *, uint8, uint32, selectsync *);
|
||||
status_t (*ttydeselect)(struct ttyfile *, struct ddrover *, uint8, selectsync *);
|
||||
|
||||
@ -127,10 +126,13 @@ struct tty_module_info_dano {
|
||||
int (*ttyout)(struct tty *, struct ddrover *);
|
||||
struct ddrover *(*ddrstart)(struct ddrover *);
|
||||
void (*ddrdone)(struct ddrover *);
|
||||
void (*ddracquire)(struct ddrover *, struct ddomain *);
|
||||
void (*ddacquire)(struct ddrover *, struct ddomain *);
|
||||
};
|
||||
|
||||
#define B_TTY_MODULE_NAME "bus_managers/tty/v1"
|
||||
#define B_TTY_MODULE_NAME_R5 "bus_managers/tty/v1"
|
||||
#define B_TTY_MODULE_NAME_DANO "bus_managers/tty/v1.1"
|
||||
|
||||
#define B_TTY_MODULE_NAME B_TTY_MODULE_NAME_DANO
|
||||
#define tty_module_info tty_module_info_dano
|
||||
|
||||
#endif /* _TTY_TTYLAYER_H */
|
||||
|
@ -130,19 +130,19 @@ tty_out(struct tty *, struct ddrover *)
|
||||
|
||||
|
||||
struct ddrover *
|
||||
tty_ddr_start(struct ddrover *)
|
||||
tty_dd_rstart(struct ddrover *)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
tty_ddr_done(struct ddrover *)
|
||||
tty_dd_rdone(struct ddrover *)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
tty_ddr_acquire(struct ddrover *, struct ddomain *)
|
||||
tty_dd_acquire(struct ddrover *, struct ddomain *)
|
||||
{
|
||||
}
|
||||
|
||||
@ -190,7 +190,7 @@ tty_module_std_ops(int32 op, ...)
|
||||
}
|
||||
|
||||
|
||||
static struct tty_module_info sTTYModule = {
|
||||
static struct tty_module_info_r5 sR5TTYModule = {
|
||||
// ! this is *NOT* a real bus manager (no rescan call!)
|
||||
//{
|
||||
{
|
||||
@ -206,18 +206,14 @@ static struct tty_module_info sTTYModule = {
|
||||
&tty_read,
|
||||
&tty_write,
|
||||
&tty_control,
|
||||
#if 0 /* Dano! */
|
||||
&tty_select,
|
||||
&tty_deselect,
|
||||
#endif
|
||||
&tty_init,
|
||||
&tty_ilock,
|
||||
&tty_hwsignal,
|
||||
&tty_in,
|
||||
&tty_out,
|
||||
&tty_ddr_start,
|
||||
&tty_ddr_done,
|
||||
&tty_ddr_acquire
|
||||
&tty_dd_rstart,
|
||||
&tty_dd_rdone,
|
||||
&tty_dd_acquire
|
||||
};
|
||||
|
||||
static struct tty_module_info_dano sDanoTTYModule = {
|
||||
@ -243,13 +239,13 @@ static struct tty_module_info_dano sDanoTTYModule = {
|
||||
&tty_hwsignal,
|
||||
&tty_in,
|
||||
&tty_out,
|
||||
&tty_ddr_start,
|
||||
&tty_ddr_done,
|
||||
&tty_ddr_acquire
|
||||
&tty_dd_rstart,
|
||||
&tty_dd_rdone,
|
||||
&tty_dd_acquire
|
||||
};
|
||||
|
||||
module_info *modules[] = {
|
||||
(module_info *)&sTTYModule,
|
||||
(module_info *)&sR5TTYModule,
|
||||
(module_info *)&sDanoTTYModule,
|
||||
NULL
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user