libdragon
Functions | Variables
rsp.c File Reference

Hardware Coprocessor Interface. More...

#include <stdint.h>
#include <stdarg.h>
#include <malloc.h>
#include <string.h>
#include "libdragon.h"

Functions

static void ADD_TAIL (job_queue_t *q, job_t *j)
 Add job to end of queue.
static job_tREMOVE_HEAD (job_queue_t *q)
 Remove job from head of queue and return it.
static void REMOVE_NODE (job_queue_t *q, job_t *j)
 Remove job from queue.
static uint32_t __rsp_lock (uint32_t wait)
 Lock access to RSP DMA.
static void __rsp_unlock ()
 Unlock access to RSP DMA.
static void __rsp_wait_dma (uint32_t busy)
 Wait for RSP DMA.
static void __rsp_dma_read (uint32_t offs, void *src, uint32_t len)
 Set RSP DMA for read to D/IMEM from DRAM.
static void __rsp_dma_write (uint32_t offs, void *dst, uint32_t len)
 Set RSP DMA for write to DRAM from D/IMEM.
static uint32_t __rsp_get_status ()
 Return the status bits in the RSP.
static void __rsp_set_status (uint32_t flags)
 Set or clear the status bits in the RSP.
static void __rsp_set_pc (uint32_t pc)
 Set RSP PC.
static void __rsp_interrupt ()
 RSP interrupt handler.
void rsp_init (void)
 Initialize the RSP system.
void rsp_close (void)
 Close the RSP system.
void rsp_load_lib (uint8_t *lib)
 Load RSP library to D/IMEM.
uint32_t rsp_lib_fn (char *mod, uint32_t fn)
 Return the vector of the function entry point in a module.
void rsp_queue_job (job_t *job)
 Queue a job for the RSP.
void rsp_do_job (job_t *job)
 Queue a job for the RSP and wait until it's done.
void rsp_wait_job (job_t *job)
 Wait on a queued job for the RSP.
void rsp_abort_job (job_t *job)
 Abort a queued job for the RSP.
job_trsp_new_job (uint32_t fn, void(*cb)(job_t *), uint32_t count,...)
 Return a new job structure with fields filled in.
void rsp_dispose_job (job_t *job)
 Dispose of an existing job structure.

Variables

job_queue_t jobQueue

Detailed Description

Hardware Coprocessor Interface.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines