#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/systm.h>
#include <sys/kobj.h>
#include <sys/malloc.h>
#include <sys/bus.h>
#include <dev/sound/midi/mpu401.h>
#include <dev/sound/midi/midi.h>
#include "mpu_if.h"
#include "mpufoi_if.h"
Go to the source code of this file.
|
#define | KOBJMETHOD_END { NULL, NULL } |
|
#define | MPU_DATAPORT 0 |
|
#define | MPU_CMDPORT 1 |
|
#define | MPU_STATPORT 1 |
|
#define | MPU_RESET 0xff |
|
#define | MPU_UART 0x3f |
|
#define | MPU_ACK 0xfe |
|
#define | MPU_STATMASK 0xc0 |
|
#define | MPU_OUTPUTBUSY 0x40 |
|
#define | MPU_INPUTBUSY 0x80 |
|
#define | MPU_TRYDATA 50 |
|
#define | MPU_DELAY 2500 |
|
#define | CMD(m, d) MPUFOI_WRITE(m, m->cookie, MPU_CMDPORT,d) |
|
#define | STATUS(m) MPUFOI_READ(m, m->cookie, MPU_STATPORT) |
|
#define | READ(m) MPUFOI_READ(m, m->cookie, MPU_DATAPORT) |
|
#define | WRITE(m, d) MPUFOI_WRITE(m, m->cookie, MPU_DATAPORT,d) |
|
#define | MPU_INTR_BUF 16 |
|
#define | RXRDY(m) ( (STATUS(m) & MPU_INPUTBUSY) == 0) |
|
#define | TXRDY(m) ( (STATUS(m) & MPU_OUTPUTBUSY) == 0) |
|
#define | D(x, l) |
|
|
| __FBSDID ("$FreeBSD$") |
|
static void | mpu401_timeout (void *m) |
|
static int | mpu401_minit (struct snd_midi *, void *) |
|
static int | mpu401_muninit (struct snd_midi *, void *) |
|
static int | mpu401_minqsize (struct snd_midi *, void *) |
|
static int | mpu401_moutqsize (struct snd_midi *, void *) |
|
static void | mpu401_mcallback (struct snd_midi *, void *, int) |
|
static void | mpu401_mcallbackp (struct snd_midi *, void *, int) |
|
static const char * | mpu401_mdescr (struct snd_midi *, void *, int) |
|
static const char * | mpu401_mprovider (struct snd_midi *, void *) |
|
| DEFINE_CLASS (mpu401, mpu401_methods, 0) |
|
static int | mpu401_intr (struct mpu401 *m) |
|
struct mpu401 * | mpu401_init (kobj_class_t cls, void *cookie, driver_intr_t softintr, mpu401_intr_t **cb) |
|
int | mpu401_uninit (struct mpu401 *m) |
|
◆ CMD
◆ KOBJMETHOD_END
#define KOBJMETHOD_END { NULL, NULL } |
◆ MPU_ACK
◆ MPU_CMDPORT
◆ MPU_DATAPORT
◆ MPU_DELAY
◆ MPU_INPUTBUSY
#define MPU_INPUTBUSY 0x80 |
◆ MPU_INTR_BUF
◆ MPU_OUTPUTBUSY
#define MPU_OUTPUTBUSY 0x40 |
◆ MPU_RESET
◆ MPU_STATMASK
#define MPU_STATMASK 0xc0 |
◆ MPU_STATPORT
◆ MPU_TRYDATA
◆ MPU_UART
◆ READ
◆ RXRDY
◆ STATUS
◆ TXRDY
◆ WRITE
◆ __FBSDID()
◆ DEFINE_CLASS()
◆ mpu401_init()
struct mpu401 * mpu401_init |
( |
kobj_class_t |
cls, |
|
|
void * |
cookie, |
|
|
driver_intr_t |
softintr, |
|
|
mpu401_intr_t ** |
cb |
|
) |
| |
◆ mpu401_intr()
static int mpu401_intr |
( |
struct mpu401 * |
m | ) |
|
|
static |
Definition at line 121 of file mpu401.c.
References b, D, m, M_TXEN, midi_in(), midi_out(), MIDI_TYPE, mpu401_timeout(), MPU_INPUTBUSY, MPU_INTR_BUF, MPU_OUTPUTBUSY, READ, STATUS, and WRITE.
◆ mpu401_mcallback()
static void mpu401_mcallback |
( |
struct snd_midi * |
sm, |
|
|
void * |
arg, |
|
|
int |
flags |
|
) |
| |
|
static |
◆ mpu401_mcallbackp()
static void mpu401_mcallbackp |
( |
struct snd_midi * |
sm, |
|
|
void * |
arg, |
|
|
int |
flags |
|
) |
| |
|
static |
◆ mpu401_mdescr()
static const char * mpu401_mdescr |
( |
struct snd_midi * |
sm, |
|
|
void * |
arg, |
|
|
int |
verbosity |
|
) |
| |
|
static |
◆ mpu401_minit()
static int mpu401_minit |
( |
struct snd_midi * |
sm, |
|
|
void * |
arg |
|
) |
| |
|
static |
◆ mpu401_minqsize()
int mpu401_minqsize |
( |
struct snd_midi * |
sm, |
|
|
void * |
arg |
|
) |
| |
|
static |
◆ mpu401_moutqsize()
int mpu401_moutqsize |
( |
struct snd_midi * |
sm, |
|
|
void * |
arg |
|
) |
| |
|
static |
◆ mpu401_mprovider()
static const char * mpu401_mprovider |
( |
struct snd_midi * |
m, |
|
|
void * |
arg |
|
) |
| |
|
static |
◆ mpu401_muninit()
int mpu401_muninit |
( |
struct snd_midi * |
sm, |
|
|
void * |
arg |
|
) |
| |
|
static |
◆ mpu401_timeout()
void mpu401_timeout |
( |
void * |
m | ) |
|
|
static |
◆ mpu401_uninit()
int mpu401_uninit |
( |
struct mpu401 * |
m | ) |
|
◆ mpu401_intr
◆ mpu401_methods
kobj_method_t mpu401_methods[] |
|
static |
Initial value:= {
}
static int mpu401_moutqsize(struct snd_midi *, void *)
static int mpu401_minqsize(struct snd_midi *, void *)
static int mpu401_minit(struct snd_midi *, void *)
static void mpu401_mcallbackp(struct snd_midi *, void *, int)
static const char * mpu401_mdescr(struct snd_midi *, void *, int)
static void mpu401_mcallback(struct snd_midi *, void *, int)
static int mpu401_muninit(struct snd_midi *, void *)
static const char * mpu401_mprovider(struct snd_midi *, void *)
Definition at line 97 of file mpu401.c.