dsp56kのヘルプ・マニュアル
日本語 英語
dsp56k --help
man dsp56k
DSP56K(4) Linux Programmer’s Manual DSP56K(4)
名前
dsp56k - DSP56001 のインターフェース・デバイス
書式
#include
ssize_t read(int fd, void *data, size_t length);
ssize_t write(int fd, void *data, size_t length);
int ioctl(int fd, DSP56K_UPLOAD, struct dsp56k_upload *program);
int ioctl(int fd, DSP56K_SET_TX_WSIZE, int wsize);
int ioctl(int fd, DSP56K_SET_RX_WSIZE, int wsize);
int ioctl(int fd, DSP56K_HOST_FLAGS, struct dsp56k_host_flags *flags);
int ioctl(int fd, DSP56K_HOST_CMD, int cmd);
設定
dsp56k デバイスは、メジャー番号 55、マイナー番号 0 のキャラクター・デバ
イスである。
説明
Motorola DSP56001 は、Atari Falcon030 互換のコンピュータで使われてい る
フ ルプログラマブルな 24 ビットのデジタルシグナルプロセッサーである。ス
ペシャルファイル dsp56k は、DSP56001 の制御と双方向ハンドシェイクホスト
ポートでのデータの送受信のために使われる。
デ ータストリームをシグナルプロセッサーに送信するためには、デバイスに対
して write(2) を使うこと。処理されたデータを受信するためには、 read(2)
を使うこと。ホスト側では、データは 8, 16, 24, 32 ビット単位で送受信でき
るが、 DSP56001 内では、24 ビット単位で扱われる。
次の ioctl(2) コールが dsp56k デバイスを制御するために使われる。
DSP56K_UPLOAD
DSP56001 をリセットし、プログラムをアップロードする 。 ioctl(2)
の 3 番目の引き数は、構造体 struct dsp56k_binary へのポインタで
なければならない。構造体のメンバー bin は DSP56001 バイナリプ ロ
グ ラムを指し、構造体のメンバー len は 24 ビットワードで数えたプ
ログラムの長さに設定されていなければならない。
DSP56K_SET_TX_WSIZE
送信ワードサイズを設定する。設定できる値は 1 〜 4 の範囲で、この
バ イ ト 数 分 だけ 1 度に DSP56001 に送信する。このデータ単位は
、DSP56001 本来の 24 ビットデータ形式に合わせるため、ゼロのバ イ
トで埋められたり、切り詰められたりする。
DSP56K_SET_RX_WSIZE
受信ワードサイズを設定する。設定できる値は 1 〜 4 の範囲で、この
バイト数分だけ 1 度に DSP56001 から受信する。このデータ 単 位 は
、DSP56001 本来の 24 ビットデータ形式に合わせるため、切り詰めら
れたり、NULL バイト ('\0') で埋められたりする。
DSP56K_HOST_FLAGS
ホストフラグを読み書きする。ホストフラグは、一般的な目的で使うこ
とのできるビットで、ホストコンピュータと DSP56001 の両方から読む
ことができる。ビット 0 と 1 は、ホストによって書き込むことができ
、ビット 2 と 3 は、DSP56001 によって書き込むことができる。
ホ ストフラグにアクセスするためには、 ioctl(2) の 3 番目の引き数
が構造体 struct dsp56k_host_flags へのポインタでなければならない
。 この構造体のメンバー dir のビット 0 または 1 が設定されると、
メンバー out の対応するビットの値がホストフラグに書き込まれる 。
すべてのホストフラグの状態は、構造体のメンバー status の下から 4
ビットとして返される。
DSP56K_HOST_CMD
ホストコマンドを送信する。送信できる値は 0 〜 31 の 範 囲 で
、DSP56001 で動作しているプログラムによって処理されるユーザー定
義コマンドである。
ファイル
/dev/dsp56k
関連項目
linux/include/asm-m68k/dsp56k.h, linux/drivers/char/dsp56k.c,
http://dsp56k.nocrew.org/, DSP56000/DSP56001 Digital Signal Processor
User’s Manual
Linux 2000-03-01 DSP56K(4)
DSP56K(4) Linux Programmer’s Manual DSP56K(4)
NAME
dsp56k - DSP56001 interface device
SYNOPSIS
#include
ssize_t read(int fd, void *data, size_t length);
ssize_t write(int fd, void *data, size_t length);
int ioctl(int fd, DSP56K_UPLOAD, struct dsp56k_upload *program);
int ioctl(int fd, DSP56K_SET_TX_WSIZE, int wsize);
int ioctl(int fd, DSP56K_SET_RX_WSIZE, int wsize);
int ioctl(int fd, DSP56K_HOST_FLAGS, struct dsp56k_host_flags *flags);
int ioctl(int fd, DSP56K_HOST_CMD, int cmd);
CONFIGURATION
The dsp56k device is a character device with major number 55 and minor
number 0.
DESCRIPTION
The Motorola DSP56001 is a fully programmable 24-bit digital signal
processor found in Atari Falcon030-compatible computers. The dsp56k
special file is used to control the DSP56001, and to send and receive
data using the bidirectional handshaked host port.
To send a data stream to the signal processor, use write(2) to the
device, and read(2) to receive processed data. The data can be sent or
received in 8, 16, 24, or 32-bit quantities on the host side, but will
always be seen as 24-bit quantities in the DSP56001.
The following ioctl(2) calls are used to control the dsp56k device:
DSP56K_UPLOAD
resets the DSP56001 and uploads a program. The third ioctl(2)
argument must be a pointer to a struct dsp56k_binary with mem-
bers bin pointing to a DSP56001 binary program, and len set to
the length of the program, counted in 24-bit words.
DSP56K_SET_TX_WSIZE
sets the transmit word size. Allowed values are in the range 1
to 4, and is the number of bytes that will be sent at a time to
the DSP56001. These data quantities will either be padded with
zero bytes, or truncated to fit the native 24-bit data format of
the DSP56001.
DSP56K_SET_RX_WSIZE
sets the receive word size. Allowed values are in the range 1
to 4, and is the number of bytes that will be received at a time
from the DSP56001. These data quantities will either truncated,
or padded with a null byte ('\0') to fit the native 24-bit data
format of the DSP56001.
DSP56K_HOST_FLAGS
read and write the host flags. The host flags are four general-
purpose bits that can be read by both the hosting computer and
the DSP56001. Bits 0 and 1 can be written by the host, and bits
2 and 3 can be written by the DSP56001.
To access the host flags, the third ioctl(2) argument must be a
pointer to a struct dsp56k_host_flags. If bit 0 or 1 is set in
the dir member, the corresponding bit in out will be written to
the host flags. The state of all host flags will be returned in
the lower four bits of the status member.
DSP56K_HOST_CMD
sends a host command. Allowed values are in the range 0 to 31,
and is a user-defined command handled by the program running in
the DSP56001.
FILES
/dev/dsp56k
SEE ALSO
linux/include/asm-m68k/dsp56k.h, linux/drivers/char/dsp56k.c,
http://dsp56k.nocrew.org/, DSP56000/DSP56001 Digital Signal Processor
User’s Manual
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2000-03-01 DSP56K(4)