⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 raw1394.h

📁 libraw1394-1.1.0.tar.gz 1394的一个库文件
💻 H
📖 第 1 页 / 共 4 页
字号:
                               unsigned long rawtag);/** * raw1394_start_async_send - send an asynchronous packet * @handle: libraw1394 handle * @length: the amount of quadlets of data to send * @header_length: the number of quadlets in the header * @expect_response: indicate with a 0 or 1 whether to receive a completion event * @data: pointer to data to send * @rawtag: data to identify the request to completion handler * * This starts sending an arbitrary async packet. It gets an array of quadlets  * consisting of header and data (without CRC in between). Header information  * is always in machine byte order, data (data block as well as quadlet data  * in a read response for data quadlet) shall be in big endian byte order.  * expect_response indicates, if we expect a response (i.e. if we will get the  * tag back after the packet was sent or after a response arrived). length is  * the length of the complete packet (header_length + length of the data block). * The main purpose of this function is to send responses for incoming  * transactions, that are handled by the application. * Do not use that function, unless you really know, what you do! Sending  * corrupt packet may lead to weird results. * * Returns: 0 on success or -1 on failure (sets errno) **/int raw1394_start_async_send(raw1394handle_t handle,                             size_t length, size_t header_length,                              unsigned int expect_response,                             quadlet_t *data, unsigned long rawtag);/** * raw1394_read - send async read request to a node and wait for response. * @handle: libraw1394 handle * @node: target node * @addr: address to read from * @length: amount of data to read in quadlets * @buffer: pointer to buffer where data will be saved * * This does the complete transaction and will return when it's finished.  It * will call raw1394_loop_iterate() as often as necessary, return values of * handlers called will be therefore lost. * * Returns: 0 on success or -1 on failure (sets errno) **/int raw1394_read(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,                 size_t length, quadlet_t *buffer);/** * raw1394_write - send async write request to a node and wait for response. * @handle: libraw1394 handle * @node: target node * @addr: address to write to * @length: amount of data to write in quadlets * @data: pointer to data to be sent * * This does the complete transaction and will return when it's finished.  It * will call raw1394_loop_iterate() as often as necessary, return values of * handlers called will be therefore lost. * * Returns: 0 on success or -1 on failure (sets errno) **/int raw1394_write(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,                  size_t length, quadlet_t *data);/** * raw1394_lock - send 32-bit compare-swap lock request and wait for response. * @handle: libraw1394 handle * @node: target node * @addr: address to read from * @extcode: extended transaction code determining the lock operation * @data: data part of lock parameters * @arg: arg part of lock parameters * @result: address where return value will be written * * This does the complete transaction and will return when it's finished.  It * will call raw1394_loop_iterate() as often as necessary, return values of * handlers called will be therefore lost. * * Returns: 0 on success or -1 on failure (sets errno) **/int raw1394_lock(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,                 unsigned int extcode, quadlet_t data, quadlet_t arg,                 quadlet_t *result);/** * raw1394_lock64 - send 64-bit compare-swap lock request and wait for response. * @handle: libraw1394 handle * @node: target node * @addr: address to read from * @extcode: extended transaction code determining the lock operation * @data: data part of lock parameters * @arg: arg part of lock parameters * @result: address where return value will be written * * This does the complete transaction and will return when it's finished.  It * will call raw1394_loop_iterate() as often as necessary, return values of * handlers called will be therefore lost. * * Returns: 0 on success or -1 on failure (sets errno) **/int raw1394_lock64(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,                 unsigned int extcode, octlet_t data, octlet_t arg,                 octlet_t *result);/** * raw1394_async_stream * @handle: libraw1394 handle * @channel: the isochronous channel number to send on * @tag: data to be put into packet's tag field * @sy: data to be put into packet's sy field * @speed: speed at which to send * @length: amount of data to send * @data: pointer to data to send * * Returns: 0 on success or -1 on failure (sets errno) **/int raw1394_async_stream(raw1394handle_t handle, unsigned int channel,                         unsigned int tag, unsigned int sy, unsigned int speed,                         size_t length, quadlet_t *data);/** * raw1394_async_send * @handle: libraw1394 handle * @length: the amount of quadlets of data to send * @header_length: the number of quadlets in the header * @expect_response: indicate with a 0 or 1 whether to receive a completion event * @data: pointer to data to send * * Returns: 0 on success or -1 on failure (sets errno) **/int raw1394_async_send(raw1394handle_t handle,                       size_t length, size_t header_length,                       unsigned int expect_response,                       quadlet_t *data);/** * raw1394_start_fcp_listen - enable reception of FCP events * @handle: libraw1394 handle * * FCP = Function Control Protocol (see IEC 61883-1) * Enables the reception of FCP events (writes to the FCP_COMMAND or * FCP_RESPONSE address ranges) on @handle.  FCP requests are then passed to the * callback specified with raw1394_set_fcp_handler(). * * Returns: 0 on success or -1 on failure (sets errno) **/int raw1394_start_fcp_listen(raw1394handle_t handle);/** * raw1394_stop_fcp_listen - disable reception of FCP events * @handle: libraw1394 handle * * Stops the reception of FCP events (writes to the FCP_COMMAND or * FCP_RESPONSE address ranges) on @handle. * * Returns: 0 on success or -1 on failure (sets errno) **/int raw1394_stop_fcp_listen(raw1394handle_t handle);/** * raw1394_get_libversion - Returns the version string * * Instead, typically, one uses 'pkg-config --mod-version libraw1394' * Might be useful for an application. * * Returns: a pointer to a string containing the version number */const char *raw1394_get_libversion(void);/** * raw1394_update_config_rom - updates the configuration ROM of a host * @handle: libraw1394 handle * @new_rom: a pointer to the new ROM image * @size: the size of the new ROM image in quadlets * @rom_version: the version numer of the current version, not the new * * @rom_version must be the current * version, otherwise it will fail with return value -1.  * * Returns: -1 (failure) if the version is incorrect,  * -2 (failure) if the new rom version is too big, or * 0 for success **/int raw1394_update_config_rom(raw1394handle_t handle, const quadlet_t        *new_rom, size_t size, unsigned char rom_version);/** * raw1394_get_config_rom - reads the current version of the configuration ROM of a host * @handle: libraw1394 handle * @buffer: the memory address at which to store the copy of the ROM * @buffersize: is the size of the buffer, @rom_size * @rom_size: upon successful return, contains the size of the ROM * @rom_version: upon successful return, contains the version of the rom * * returns the size of the current rom image. @rom_version is the * version number of the fetched rom. * * Return: -1 (failure) if the buffer was too small or 0 for success **/int raw1394_get_config_rom(raw1394handle_t handle, quadlet_t *buffer,        size_t buffersize, size_t *rom_size, unsigned char *rom_version);/** * iso_handler_t - DEPRECATED * @handle: libraw1394 handle * * DEPRECATED **/typedef int (*iso_handler_t)(raw1394handle_t, int channel, size_t length,                             quadlet_t *data); /** * raw1394_set_iso_handler - set isochronous packet handler (DEPRECATED) * @handle: libraw1394 handle * @new_h: pointer to new handler * * DEPRECATED * * Sets the handler to be called when an isochronous packet is received to * @new_h and returns the old handler.  The default handler does nothing. * * In order to actually get iso packet events, receiving on a specific channel * first has to be enabled with raw1394_start_iso_rcv() and can be stopped again * with raw1394_stop_iso_rcv(). **/iso_handler_t raw1394_set_iso_handler(raw1394handle_t handle,                                      unsigned int channel,                                      iso_handler_t new_h);/** * raw1394_start_iso_rcv - enable isochronous receiving (DEPRECATED) * @handle: libraw1394 handle * @channel: channel number to start receiving on * * DEPRECATED * * Enables the reception of isochronous packets in @channel on @handle. * Isochronous packets are then passed to the callback specified with * raw1394_set_iso_handler(). **/int raw1394_start_iso_rcv(raw1394handle_t handle, unsigned int channel);/** * raw1394_stop_iso_rcv - stop isochronous receiving (DEPRECATED) * @handle: libraw1394 handle * @channel: channel to stop receiving on * * DEPRECATED * * Stops the reception of isochronous packets in @channel on @handle. **/int raw1394_stop_iso_rcv(raw1394handle_t handle, unsigned int channel);/** * raw1394_start_iso_write - initiate an isochronous packet write (DEPRECATED) * @handle: libraw1394 handle * @channel: channel number on which to send on * @tag: data to be put into packet's tag field * @sy: data to be put into packet's sy field * @speed: speed at which to send * @length: amount of data to send * @data: pointer to data to send * @rawtag: data to identify the request to completion handler * * DEPRECATED * * This function starts the specified isochronous packet transmission and * returns %0 for success and a negative number for an error, in which case * errno will be set. * * When the send completes, a raw1394_loop_iterate() will call the tag handler * and pass it the tag and error code of the transaction.  @tag should therefore * be set to something that uniquely identifies this transaction (e.g. a struct * pointer casted to unsigned long). * * Isochronous packets are automatically **/int raw1394_start_iso_write(raw1394handle_t handle, unsigned int channel,                            unsigned int tag, unsigned int sy,                            unsigned int speed, size_t length, quadlet_t *data,                            unsigned long rawtag);/** * raw1394_iso_write - DEPRECATED * @handle: libraw1394 handle * * DEPRECATED **/int raw1394_iso_write(raw1394handle_t handle, unsigned int channel,                      unsigned int tag, unsigned int sy, unsigned int speed,                      size_t length, quadlet_t *data);#ifdef __cplusplus}#endif#endif /* _LIBRAW1394_RAW1394_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -