Skip to content

Commit

Permalink
Document SIF DMA transfer structure
Browse files Browse the repository at this point in the history
  • Loading branch information
frno7 committed Jul 14, 2021
1 parent 594d4e3 commit d9417bb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
6 changes: 3 additions & 3 deletions include/iopmod/module/sifman.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ id_(6) void sifman_set_dchain(void)
* Return: DMA transfer id, or zero if no DMA id could be allocated and a
* retry may be necessary
*/
id_(7) int sifman_set_dma(const struct sifman_dma_transfer *dma_tr, int count)
id_(7) int sifman_set_dma(const struct sif_dma_transfer *dma_tr, int count)
alias_(sceSifSetDma);

/**
Expand All @@ -36,7 +36,7 @@ id_(7) int sifman_set_dma(const struct sifman_dma_transfer *dma_tr, int count)
id_(8) enum sifman_dma_status sifman_dma_stat(int dma_id)
alias_(sceSifDmaStat);

id_(9) void sifman_set_one_dma(struct sifman_dma_transfer dma_tr)
id_(9) void sifman_set_one_dma(struct sif_dma_transfer dma_tr)
alias_(sceSifSetOneDma);

id_(12) void sifman_dma0_transfer(void *addr, int size, int mode)
Expand Down Expand Up @@ -89,6 +89,6 @@ id_(30) void sifman_set_dma_intr_handler(void (*handler)(void *), void *arg)
id_(31) void sifman_reset_dma_intr_handler(void)
alias_(sceSifResetDmaIntrHandler);

id_(32) unsigned int sifman_set_dma_intr(struct sifman_dma_transfer *dma_tr,
id_(32) unsigned int sifman_set_dma_intr(struct sif_dma_transfer *dma_tr,
int len, void (*func)(void), void *data)
alias_(sceSifSetDmaIntr);
20 changes: 14 additions & 6 deletions include/iopmod/sifman.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@
#ifndef IOPMOD_SIFMAN_H
#define IOPMOD_SIFMAN_H

struct sifman_dma_transfer
{
void *src;
void *dst;
int size;
int attr;
#include <iopmod/types.h>

/**
* struct sif_dma_transfer - SIF DMA transfer structure
* @src: sub data to copy from, must be aligned with a 4-byte DMA boundary
* @dst: main data to copy to, must be aligned with a 16-byte DMA boundary
* @nbytes: size in bytes to copy, will be rounded up to multiple of 16 bytes
* @attr: zero or DMA completion attributes
*/
struct sif_dma_transfer {
void *src;
main_addr_t dst;
size_t nbytes;
u32 attr;
};

/**
Expand Down

0 comments on commit d9417bb

Please sign in to comment.