forked from Imagelibrary/rtems
bsp/gen5200: Move bestcomm to bsps
This patch is a part of the BSP source reorganization. Update #3285.
This commit is contained in:
@@ -30,28 +30,28 @@ project_lib_LIBRARIES = librtemsbsp.a
|
||||
librtemsbsp_a_SOURCES =
|
||||
|
||||
# bestcomm
|
||||
librtemsbsp_a_SOURCES += bestcomm/bestcomm_api.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/bestcomm_glue.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/dma_image.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/dma_image.reloc.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/load_task.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/tasksetup_ata.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/tasksetup_bdtable.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/tasksetup_crc16_dp_0.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/tasksetup_crc16_dp_1.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/tasksetup_fec_rx_bd.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/tasksetup_fec_tx_bd.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/tasksetup_gen_dp_0.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/tasksetup_gen_dp_1.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/tasksetup_gen_dp_2.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/tasksetup_gen_dp_3.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/tasksetup_gen_dp_bd_0.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/tasksetup_gen_dp_bd_1.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/tasksetup_gen_rx_bd.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/tasksetup_gen_tx_bd.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/tasksetup_lpc.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/tasksetup_pci_rx.c
|
||||
librtemsbsp_a_SOURCES += bestcomm/tasksetup_pci_tx.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/bestcomm_api.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/bestcomm_glue.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/dma_image.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/dma_image.reloc.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/load_task.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/tasksetup_ata.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/tasksetup_bdtable.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/tasksetup_crc16_dp_0.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/tasksetup_crc16_dp_1.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/tasksetup_fec_rx_bd.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/tasksetup_fec_tx_bd.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/tasksetup_gen_dp_0.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/tasksetup_gen_dp_1.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/tasksetup_gen_dp_2.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/tasksetup_gen_dp_3.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/tasksetup_gen_dp_bd_0.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/tasksetup_gen_dp_bd_1.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/tasksetup_gen_rx_bd.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/tasksetup_gen_tx_bd.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/tasksetup_lpc.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/tasksetup_pci_rx.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/bestcomm/tasksetup_pci_tx.c
|
||||
# clock
|
||||
# clock
|
||||
librtemsbsp_a_SOURCES +=../../../../../../bsps/powerpc/shared/clock/clock.c
|
||||
|
||||
@@ -1,459 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (c) 2004 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/*!
|
||||
* \mainpage Introduction
|
||||
*
|
||||
* \author Motorola Semiconductor Products Sector
|
||||
* \date 2 Apr 2004
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file bestcomm_api.c
|
||||
*
|
||||
* Bestcomm_api.c implements most of the BestComm C API. The
|
||||
* TaskSetup() function is generated by the BestComm Task API tools
|
||||
* in capi/task_api/tasksetup_general.h as configured and included by
|
||||
* code_dma/image_rtos?/task_capi/(*).c. Other functions are defined as
|
||||
* inline in capi/bestcomm_api.h.
|
||||
*/
|
||||
|
||||
#include <bsp/bestcomm/include/ppctypes.h>
|
||||
#include <bsp/bestcomm/bestcomm_api.h>
|
||||
#include <bsp/bestcomm/task_api/bestcomm_cntrl.h>
|
||||
#include <bsp/bestcomm/task_api/bestcomm_api_mem.h>
|
||||
#include <bsp/bestcomm/task_api/tasksetup_bdtable.h>
|
||||
|
||||
/***********************************************************************
|
||||
*/
|
||||
static const char* const TaskVersionString = "BestComm API v2.2 20041209";
|
||||
|
||||
/*
|
||||
* Hidden API data per task.
|
||||
*/
|
||||
|
||||
static BDIdx BDHead[MAX_TASKS];
|
||||
static BDIdx BDTail[MAX_TASKS];
|
||||
|
||||
/*
|
||||
* Virtual memory location of the MBAR. System registers and SRAM are
|
||||
* offset from this address.
|
||||
*/
|
||||
uint8 *MBarGlobal;
|
||||
|
||||
/*
|
||||
* Offset from MBarGlobal to get the physical memory address of the
|
||||
* MBAR. This will be zero for systems that do not use virtual memory in
|
||||
* their device driver model.
|
||||
*/
|
||||
sint64 MBarPhysOffsetGlobal;
|
||||
|
||||
/*
|
||||
* This flag is false when TaskStart() has not yet been called on a
|
||||
* task newly configured by TaskSetup() or TaskStop() has been called.
|
||||
* Otherwise it is true. It is possible that a task disabled itself
|
||||
* (transfer complete or BD ring empty) which will not show up in this
|
||||
* flag.
|
||||
*
|
||||
* It is really only useful for BD tasks that assign buffers (via
|
||||
* TaskBDAssign()) before TaskStart() or after TaskStop() are called.
|
||||
*/
|
||||
int TaskRunning[MAX_TASKS];
|
||||
|
||||
/*!
|
||||
* \brief Get a string containing API version information.
|
||||
* \returns Pointer to the API version string
|
||||
*/
|
||||
const char *TaskVersion(void)
|
||||
{
|
||||
return TaskVersionString;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Initialize the API.
|
||||
* \param MBarRef Reference pointer to the device register memory
|
||||
* map.
|
||||
*
|
||||
* \returns TASK_ERR_NO_ERR on successful initialization.
|
||||
* or TASK_ERR_API_ALREADY_INITIALIZED.
|
||||
*
|
||||
* This function is only used with physical addresses.
|
||||
*
|
||||
* This function will also initialize API internal variables. The return
|
||||
* value TASK_ERR_API_ALREADY_INITIALIZED is intended to help determine if
|
||||
* another process has already instantiated a version of the API.
|
||||
*/
|
||||
int TasksInitAPI(uint8 *MBarRef)
|
||||
{
|
||||
/*
|
||||
* Copy pointer of register space to global variable.
|
||||
* for use by other functions.
|
||||
*/
|
||||
MBarGlobal = MBarRef;
|
||||
|
||||
/*
|
||||
* The offset is 0 if physical and virtual are the same.
|
||||
*/
|
||||
MBarPhysOffsetGlobal = 0;
|
||||
|
||||
/*
|
||||
* IF API has not been initialized yet then...
|
||||
* Make sure all BestComm interrupts are disabled and not pending.
|
||||
* Make sure all tasks are disabled.
|
||||
* This feature can only be put in after a way has been found to
|
||||
* communicaticate with other processes.
|
||||
*/
|
||||
return TASK_ERR_NO_ERR;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Initialize the API when virtual memory is used.
|
||||
* \param MBarRef Reference pointer to the device register memory
|
||||
* map.
|
||||
* \param MBarPhys Actual physical location of MBAR device register
|
||||
* memory map.
|
||||
*
|
||||
* \returns TASK_ERR_NO_ERR on successful initialization.
|
||||
* or TASK_ERR_API_ALREADY_INITIALIZED.
|
||||
*
|
||||
* This function allows using virtual memory addresses as well as physical
|
||||
* addresses. All device registers are offset to the address supplied here,
|
||||
* so the virtual memory space should include enough space for the entire
|
||||
* register set of the device to include the SRAM space.
|
||||
*
|
||||
* This function will also initialize API internal variables. The return
|
||||
* value TASK_ERR_API_ALREADY_INITIALIZED is intended to help determine if
|
||||
* another process has already instantiated a version of the API.
|
||||
*/
|
||||
int TasksInitAPI_VM(uint8 *MBarRef, uint8 *MBarPhys)
|
||||
{
|
||||
/*
|
||||
* Copy pointer of register space to global variable.
|
||||
* for use by other functions.
|
||||
*/
|
||||
MBarGlobal = MBarRef;
|
||||
MBarPhysOffsetGlobal = MBarPhys - MBarRef;
|
||||
|
||||
/*
|
||||
* If API has not been initialized yet then...
|
||||
* Make sure all BestComm interrupts are disabled and not pending.
|
||||
* Make sure all tasks are disabled.
|
||||
* This feature can only be put in after a way has been found to
|
||||
* communicaticate with other processes.
|
||||
*/
|
||||
return TASK_ERR_NO_ERR;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief \em Deprecated
|
||||
* \param sdma Base address of the BestComm register set
|
||||
*
|
||||
* \returns TASK_ERR_NO_ERR
|
||||
*
|
||||
* Use of this function is no longer necessary. It is retained for
|
||||
* compatibility with previous versions of the API.
|
||||
*/
|
||||
int TasksAttachImage(sdma_regs *sdma)
|
||||
{
|
||||
return TASK_ERR_NO_ERR;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Start an initialized task running.
|
||||
* \param taskId Task handle passed back from a successful TaskSetup()
|
||||
* \param autoStartEnable Boolean for whether autostart bit is enabled.
|
||||
* If this is set then the parameter autoStartTask
|
||||
* defines the task to auto start.
|
||||
* \param autoStartTask TaskId for task to autostart. If autoStartEnable
|
||||
* is not set then this parameter is a don't care.
|
||||
* \param intrEnable Boolean for interrupt enable for this task.
|
||||
* \returns TASK_ERR_NO_ERR on success or TASK_ERR_INVALID_ARG if taskId
|
||||
* is invalid.
|
||||
*/
|
||||
int TaskStart(TaskId taskId, uint32 autoStartEnable, TaskId autoStartTask,
|
||||
uint32 intrEnable)
|
||||
{
|
||||
if (intrEnable) {
|
||||
SDMA_INT_ENABLE(SDMA_INT_MASK, taskId);
|
||||
} else {
|
||||
SDMA_INT_DISABLE(SDMA_INT_MASK, taskId);
|
||||
}
|
||||
SDMA_TASK_AUTO_START(SDMA_TCR, taskId, autoStartEnable, autoStartTask)
|
||||
SDMA_TASK_ENABLE(SDMA_TCR, taskId);
|
||||
|
||||
TaskRunning[taskId] = 1;
|
||||
return TASK_ERR_NO_ERR;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Stop a running task.
|
||||
* \param taskId Task handle passed back from a successful TaskSetup()
|
||||
* \returns TASK_ERR_NO_ERR on success or TASK_ERR_INVALID_ARG if taskId
|
||||
* is invalid.
|
||||
*
|
||||
* \em Note: Stopping a polling buffer descriptor task is a catastrophic
|
||||
* operation. It does not merely pause execution. Context is not
|
||||
* saved. The task's pointer into the BD ring is reset back to the
|
||||
* beginning.
|
||||
*
|
||||
* \em Note: This is not the case for the new "fall-through" BD tasks.
|
||||
* They save the BD ring pointer across stop/start boundaries. The
|
||||
* previous polling tasks are considered deprecated.
|
||||
*/
|
||||
int TaskStop(TaskId taskId)
|
||||
{
|
||||
SDMA_INT_DISABLE(SDMA_INT_MASK, taskId);
|
||||
SDMA_TASK_DISABLE(SDMA_TCR, taskId);
|
||||
|
||||
TaskRunning[taskId] = 0;
|
||||
return TASK_ERR_NO_ERR;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Assign a buffer to a buffer descriptor.
|
||||
* \param taskId Task handle passed back from a successful TaskSetup()
|
||||
* \param buffer0 A buffer to send data from or receive data into a device
|
||||
* \param buffer1 A second buffer to send data from or receive data into
|
||||
* a device for use with double-buffer tasks.
|
||||
* \param size Size of the buffer in bytes.
|
||||
* \param bdFlags Buffer descriptor flags to set. Used by ethernet BD tasks.
|
||||
* \returns Handle to the buffer descriptor used by this DMA transfer.
|
||||
* Error is indicated by a negative return value (see TaskErr_t).
|
||||
*
|
||||
* This function is used for both transmit and receive buffer descriptor
|
||||
* tasks. The buffer may be freed by the TaskBDRelease() function.
|
||||
* In the case of tasks with a buffer descriptor with two buffer pointers
|
||||
* this function uses both buffer0 and buffer1 where buffer0 is a source
|
||||
* and buffer1 is a destination. When the buffer descriptor is a single
|
||||
* pointer type, the buffer0 is the only pointer used and buffer1 is ignored.
|
||||
*
|
||||
* Using this function on non-buffer descriptor tasks will produce
|
||||
* unpredictable results.
|
||||
*/
|
||||
BDIdx TaskBDAssign(TaskId taskId, void *buffer0, void *buffer1, int size, uint32 bdFlags)
|
||||
{
|
||||
BDIdx *bdHead;
|
||||
TaskBD_t *bd;
|
||||
BDIdx r = TASK_ERR_NO_ERR;
|
||||
|
||||
if (TaskBDIdxTable[taskId].currBDInUse == TaskBDIdxTable[taskId].numBD) {
|
||||
/*
|
||||
* The buffer ring is full.
|
||||
*/
|
||||
r = TASK_ERR_BD_RING_FULL;
|
||||
|
||||
} else if ( (TaskBDIdxTable[taskId].apiConfig & API_CONFIG_BD_FLAG)
|
||||
&& ((uint32)size & (uint32)(~SDMA_DRD_MASK_LENGTH))) {
|
||||
r = TASK_ERR_SIZE_TOO_LARGE;
|
||||
|
||||
} else if ( !(TaskBDIdxTable[taskId].apiConfig & API_CONFIG_BD_FLAG)
|
||||
&& ((uint32)size & (uint32)(0xffffffff<<SDMA_BD_BIT_READY))) {
|
||||
r = TASK_ERR_SIZE_TOO_LARGE;
|
||||
|
||||
} else {
|
||||
bdHead = &BDHead[taskId];
|
||||
|
||||
/*
|
||||
* Increase Buffer Descriptor in-use variable.
|
||||
*/
|
||||
++TaskBDIdxTable[taskId].currBDInUse;
|
||||
|
||||
/*
|
||||
* Get a generic TaskBD_t pointer to the BD to be assigned.
|
||||
* Assign the buffer pointers.
|
||||
*/
|
||||
bd = TaskBDIdxTable[taskId].BDTablePtr;
|
||||
if (TaskBDIdxTable[taskId].numPtr == 1) {
|
||||
bd = (TaskBD_t *)&(((TaskBD1_t *)bd)[*bdHead]);
|
||||
|
||||
((TaskBD1_t *)bd)->DataPtr[0] = (uint32)buffer0;
|
||||
} else {
|
||||
bd = (TaskBD_t *)&(((TaskBD2_t *)bd)[*bdHead]);
|
||||
|
||||
((TaskBD2_t *)bd)->DataPtr[0] = (uint32)buffer0;
|
||||
((TaskBD2_t *)bd)->DataPtr[1] = (uint32)buffer1;
|
||||
}
|
||||
|
||||
|
||||
if (bd->Status & SDMA_BD_MASK_READY) {
|
||||
/*
|
||||
* This BD is in use.
|
||||
*/
|
||||
r = TASK_ERR_BD_BUSY;
|
||||
|
||||
} else {
|
||||
|
||||
/*
|
||||
* Set status bits and length. As soon as Status is written, the
|
||||
* BestComm may perform the transfer.
|
||||
*/
|
||||
if (TaskBDIdxTable[taskId].apiConfig & API_CONFIG_BD_FLAG) {
|
||||
bd->Status = ( ((uint32)SDMA_DRD_MASK_FLAGS & bdFlags)
|
||||
| ((uint32)SDMA_DRD_MASK_LENGTH & (uint32)size)
|
||||
| ((uint32)SDMA_BD_MASK_READY));
|
||||
} else {
|
||||
bd->Status = ( ((uint32)SDMA_BD_MASK_SIGN & (uint32)size)
|
||||
| ((uint32)SDMA_BD_MASK_READY));
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the current BD index and increment.
|
||||
*/
|
||||
r = *bdHead;
|
||||
*bdHead = (BDIdx)((*bdHead + 1) % (BDIdx)TaskBDIdxTable[taskId].numBD);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Reenable a fall-through BD tasks that might have exited.
|
||||
*/
|
||||
if (TaskRunning[taskId]) {
|
||||
SDMA_TASK_ENABLE(SDMA_TCR, taskId);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Release last buffer in the buffer descriptor ring.
|
||||
* \param taskId Task handle passed back from a successful TaskSetup()
|
||||
*
|
||||
* \returns Buffer descriptor index of next buffer index that will be released
|
||||
* by another call of this function.
|
||||
* TASK_ERR_BD_RING_EMPTY is returned if the ring is already empty.
|
||||
*
|
||||
* This function allows the system to reallocate the memory used by
|
||||
* the buffer. It also cleans up the structure in the BD ring by
|
||||
* removing the tail buffer in the ring. The buffer descriptor tasks
|
||||
* are designed around this. Non-BD tasks do not use this function.
|
||||
*
|
||||
* Using this function on non-buffer descriptor tasks will produce
|
||||
* unpredictable results.
|
||||
*/
|
||||
BDIdx TaskBDRelease(TaskId taskId)
|
||||
{
|
||||
BDIdx *bdTail;
|
||||
TaskBD_t *bd;
|
||||
|
||||
bdTail = &BDTail[taskId];
|
||||
|
||||
if (TaskBDIdxTable[taskId].currBDInUse == 0) {
|
||||
/*
|
||||
* Buffer Descriptor ring is empty, Can't Release!
|
||||
*/
|
||||
return TASK_ERR_BD_RING_EMPTY;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get a generic TaskBD_t pointer to the next BD to be released.
|
||||
*/
|
||||
bd = TaskGetBD(taskId, *bdTail);
|
||||
|
||||
/*
|
||||
* Verify the ready bit is clear.
|
||||
*/
|
||||
if (bd->Status & SDMA_BD_MASK_READY) {
|
||||
return TASK_ERR_BD_BUSY;
|
||||
}
|
||||
|
||||
/*
|
||||
* Increment the tail pointer around the ring, decrement in-use.
|
||||
*/
|
||||
*bdTail = (BDIdx)((*bdTail + 1) % (BDIdx)TaskBDIdxTable[taskId].numBD);
|
||||
--TaskBDIdxTable[taskId].currBDInUse;
|
||||
|
||||
return *bdTail;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Release all buffers.
|
||||
* \param taskId Task handle passed back from a successful TaskSetup()
|
||||
*
|
||||
* \returns Buffer descriptor index of next buffer that will be
|
||||
* assigned by TaskBDAssign() which will also be the first
|
||||
* released by the next call to TaskBDRelease() or
|
||||
* TASK_ERR_TASK_RUNNING if the task has not been stopped.
|
||||
*
|
||||
* This function is similar to TaskBDRelease() except that it releases
|
||||
* all assigned buffers including those not yet processed by the BestComm
|
||||
* task; i.e. SDMA_BD_MASK_READY is set.
|
||||
* Non-BD tasks do not use this
|
||||
* function.
|
||||
*
|
||||
* The task should not be running. Call TaskStop() first.
|
||||
*
|
||||
* \em Note: Partially transmitted buffers are up to the user to handle.
|
||||
*
|
||||
* Using this function on non-buffer descriptor tasks will produce
|
||||
* unpredictable results.
|
||||
*/
|
||||
BDIdx TaskBDReset(TaskId taskId)
|
||||
{
|
||||
BDIdx i;
|
||||
TaskBD_t *bd, *bdTab;
|
||||
|
||||
if (TaskRunning[taskId]) {
|
||||
return TASK_ERR_TASK_RUNNING;
|
||||
}
|
||||
|
||||
bdTab = TaskBDIdxTable[taskId].BDTablePtr;
|
||||
|
||||
for (i = (BDIdx)TaskBDIdxTable[taskId].numBD - 1; i >= 0; --i) {
|
||||
|
||||
if (TaskBDIdxTable[taskId].numPtr == 1) {
|
||||
bd = (TaskBD_t *)&(((TaskBD1_t *)bdTab)[i]);
|
||||
} else {
|
||||
bd = (TaskBD_t *)&(((TaskBD2_t *)bdTab)[i]);
|
||||
}
|
||||
|
||||
bd->Status = 0x0;
|
||||
}
|
||||
|
||||
TaskBDIdxTable[taskId].currBDInUse = 0;
|
||||
*TaskBDIdxTable[taskId].BDStartPtr =
|
||||
(volatile uint32)((volatile uint32)TaskBDIdxTable[taskId].BDTablePtr
|
||||
+ MBarPhysOffsetGlobal);
|
||||
return BDHead[taskId] = BDTail[taskId] = 0;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Return BestComm debug information.
|
||||
* \param taskId Task handle passed back from a successful TaskSetup()
|
||||
* \param paramSet TBD
|
||||
* \returns TBD
|
||||
*
|
||||
* The implementation of this function is yet to be determined.
|
||||
*/
|
||||
int TaskDebug(TaskId taskId, TaskDebugParamSet_t *paramSet)
|
||||
{
|
||||
if ((taskId < 0) || (taskId >= MAX_TASKS)) {
|
||||
return TASK_ERR_INVALID_ARG;
|
||||
}
|
||||
if (paramSet == NULL) {
|
||||
return TASK_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
return TASK_ERR_NO_ERR;
|
||||
}
|
||||
@@ -1,262 +0,0 @@
|
||||
/*===============================================================*\
|
||||
| Project: RTEMS generic MPC5200 BSP |
|
||||
+-----------------------------------------------------------------+
|
||||
| Copyright (c) 2004-2005 |
|
||||
| Embedded Brains GmbH |
|
||||
| Obere Lagerstr. 30 |
|
||||
| D-82178 Puchheim |
|
||||
| Germany |
|
||||
| rtems@embedded-brains.de |
|
||||
+-----------------------------------------------------------------+
|
||||
| The license and distribution terms for this file may be |
|
||||
| found in the file LICENSE in this distribution or at |
|
||||
| |
|
||||
| http://www.rtems.org/license/LICENSE. |
|
||||
| |
|
||||
+-----------------------------------------------------------------+
|
||||
| this file contains glue functions to the Freescale BestComm API |
|
||||
\*===============================================================*/
|
||||
#include <assert.h>
|
||||
#include <rtems.h>
|
||||
#include <bsp.h>
|
||||
#include <bsp/irq.h>
|
||||
#include <bsp/mpc5200.h>
|
||||
#include <bsp/bestcomm/include/ppctypes.h> /* uint32, et. al. */
|
||||
#include <bsp/bestcomm/dma_image.h>
|
||||
#include <bsp/bestcomm/task_api/bestcomm_cntrl.h>
|
||||
#include <bsp/bestcomm/bestcomm_api.h>
|
||||
#include <bsp/bestcomm/bestcomm_glue.h>
|
||||
#include <bsp/bestcomm/include/mgt5200/sdma.h>
|
||||
#include <rtems/score/heapimpl.h>
|
||||
|
||||
extern const uint32 taskTableBytes;
|
||||
|
||||
static Heap_Control bestcomm_heap;
|
||||
|
||||
/*=========================================================================*\
|
||||
| Function: |
|
||||
\*-------------------------------------------------------------------------*/
|
||||
void bestcomm_glue_irq_enable
|
||||
(
|
||||
/*-------------------------------------------------------------------------*\
|
||||
| Purpose: |
|
||||
| enable interrupt for given task number |
|
||||
+---------------------------------------------------------------------------+
|
||||
| Input Parameters: |
|
||||
\*-------------------------------------------------------------------------*/
|
||||
int bestcomm_taskno /* task number to enable */
|
||||
)
|
||||
/*-------------------------------------------------------------------------*\
|
||||
| Return Value: |
|
||||
| none |
|
||||
\*=========================================================================*/
|
||||
{
|
||||
if (0 != ((1UL<<bestcomm_taskno) & SDMA_INT_BIT_IMPL)) {
|
||||
/*
|
||||
* valid task number
|
||||
* enable interrupt in bestcomm mask
|
||||
*/
|
||||
SDMA_INT_ENABLE(&mpc5200.sdma.IntMask,bestcomm_taskno);
|
||||
}
|
||||
}
|
||||
|
||||
/*=========================================================================*\
|
||||
| Function: |
|
||||
\*-------------------------------------------------------------------------*/
|
||||
void bestcomm_glue_irq_disable
|
||||
(
|
||||
/*-------------------------------------------------------------------------*\
|
||||
| Purpose: |
|
||||
| disable interrupt for given task number |
|
||||
+---------------------------------------------------------------------------+
|
||||
| Input Parameters: |
|
||||
\*-------------------------------------------------------------------------*/
|
||||
int bestcomm_taskno /* task number to disable */
|
||||
)
|
||||
/*-------------------------------------------------------------------------*\
|
||||
| Return Value: |
|
||||
| none |
|
||||
\*=========================================================================*/
|
||||
{
|
||||
if (0 != ((1UL<<bestcomm_taskno) & SDMA_INT_BIT_IMPL)) {
|
||||
/*
|
||||
* valid task number
|
||||
* disable interrupt in bestcomm mask
|
||||
*/
|
||||
SDMA_INT_DISABLE(&mpc5200.sdma.IntMask,bestcomm_taskno);
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
rtems_interrupt_handler handler;
|
||||
void *arg;
|
||||
} bestcomm_glue_irq_handlers_t;
|
||||
|
||||
static bestcomm_glue_irq_handlers_t bestcomm_glue_irq_handlers[32];
|
||||
|
||||
/*=========================================================================*\
|
||||
| Function: |
|
||||
\*-------------------------------------------------------------------------*/
|
||||
void bestcomm_glue_irq_install
|
||||
(
|
||||
/*-------------------------------------------------------------------------*\
|
||||
| Purpose: |
|
||||
| install given function as bestcomm interrupt handler |
|
||||
+---------------------------------------------------------------------------+
|
||||
| Input Parameters: |
|
||||
\*-------------------------------------------------------------------------*/
|
||||
int bestcomm_taskno, /* task number for handler */
|
||||
rtems_interrupt_handler handler, /* function to call */
|
||||
void *arg
|
||||
)
|
||||
/*-------------------------------------------------------------------------*\
|
||||
| Return Value: |
|
||||
| none |
|
||||
\*=========================================================================*/
|
||||
{
|
||||
if (0 != ((1UL<<bestcomm_taskno) & SDMA_INT_BIT_IMPL)) {
|
||||
/*
|
||||
* valid task number
|
||||
* install handler
|
||||
*/
|
||||
bestcomm_glue_irq_handlers[bestcomm_taskno].handler = handler;
|
||||
bestcomm_glue_irq_handlers[bestcomm_taskno].arg = arg;
|
||||
}
|
||||
}
|
||||
|
||||
/*=========================================================================*\
|
||||
| Function: |
|
||||
\*-------------------------------------------------------------------------*/
|
||||
static void bestcomm_glue_irq_dispatcher
|
||||
(
|
||||
/*-------------------------------------------------------------------------*\
|
||||
| Purpose: |
|
||||
| general bestcomm interrupt handler/dispatcher |
|
||||
+---------------------------------------------------------------------------+
|
||||
| Input Parameters: |
|
||||
\*-------------------------------------------------------------------------*/
|
||||
void *arg /* irq specific handle (not used) */
|
||||
)
|
||||
/*-------------------------------------------------------------------------*\
|
||||
| Return Value: |
|
||||
| none |
|
||||
\*=========================================================================*/
|
||||
{
|
||||
uint32_t pending;
|
||||
int curr_taskno;
|
||||
|
||||
pending = mpc5200.sdma.IntPend & ~mpc5200.sdma.IntMask;
|
||||
curr_taskno = 0;
|
||||
while (pending != 0) {
|
||||
if ((pending & (1UL<<curr_taskno)) != 0) {
|
||||
if (bestcomm_glue_irq_handlers[curr_taskno].handler != NULL) {
|
||||
/*
|
||||
* call proper handler
|
||||
*/
|
||||
bestcomm_glue_irq_handlers[curr_taskno].handler
|
||||
(bestcomm_glue_irq_handlers[curr_taskno].arg);
|
||||
}
|
||||
else {
|
||||
/*
|
||||
* This should never happen. we have a pending IRQ but no handler
|
||||
* let's clear this pending bit
|
||||
*/
|
||||
SDMA_CLEAR_IEVENT(&mpc5200.sdma.IntPend,curr_taskno);
|
||||
}
|
||||
/*
|
||||
* clear this bit in our pending copy
|
||||
* and go to next bit
|
||||
*/
|
||||
pending &= ~(1<<curr_taskno);
|
||||
}
|
||||
curr_taskno++;
|
||||
}
|
||||
}
|
||||
|
||||
static bool bestcomm_glue_is_initialized = false;
|
||||
/*=========================================================================*\
|
||||
| Function: |
|
||||
\*-------------------------------------------------------------------------*/
|
||||
void bestcomm_glue_init
|
||||
(
|
||||
/*-------------------------------------------------------------------------*\
|
||||
| Purpose: |
|
||||
| initialize the bestcomm module (if not yet done): |
|
||||
| - load code |
|
||||
| - initialize registers |
|
||||
| - initialize bus arbiter |
|
||||
| - initialize interrupt control |
|
||||
+---------------------------------------------------------------------------+
|
||||
| Input Parameters: |
|
||||
\*-------------------------------------------------------------------------*/
|
||||
void /* none */
|
||||
)
|
||||
/*-------------------------------------------------------------------------*\
|
||||
| Return Value: |
|
||||
| none |
|
||||
\*=========================================================================*/
|
||||
{
|
||||
rtems_status_code sc = RTEMS_SUCCESSFUL;
|
||||
uintptr_t heap_status = 0;
|
||||
|
||||
if (!bestcomm_glue_is_initialized) {
|
||||
bestcomm_glue_is_initialized = true;
|
||||
|
||||
heap_status = _Heap_Initialize(
|
||||
&bestcomm_heap,
|
||||
(char *) &mpc5200.sram [0] + taskTableBytes,
|
||||
sizeof(mpc5200.sram) - taskTableBytes,
|
||||
4
|
||||
);
|
||||
assert(heap_status != 0);
|
||||
|
||||
/*
|
||||
* Set task bar to begin of sram
|
||||
*/
|
||||
mpc5200.sdma.taskBar = (uint32_t)(&(mpc5200.sram[0]));
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* Set core and BestComm XLB priority the same.
|
||||
*/
|
||||
mpc5200.priority_enable |= 0x5;
|
||||
mpc5200.priority = 0x77777171;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Turn off COMM bus prefetch. This affects all data movements on
|
||||
* the COMM bus. (Yes, _PE -- prefetch enable -- should probably be
|
||||
* named _PD.)
|
||||
*/
|
||||
mpc5200.sdma.PtdCntrl |= SDMA_PTDCNTRL_PE;
|
||||
|
||||
TasksInitAPI((uint8*)&mpc5200);
|
||||
|
||||
TasksLoadImage( (void *)&(mpc5200.sdma.taskBar));
|
||||
|
||||
/*
|
||||
* initialize interrupt dispatcher
|
||||
*/
|
||||
sc = rtems_interrupt_handler_install(
|
||||
BSP_SIU_IRQ_SMARTCOMM,
|
||||
"BESTCOMM",
|
||||
RTEMS_INTERRUPT_UNIQUE,
|
||||
bestcomm_glue_irq_dispatcher,
|
||||
NULL
|
||||
);
|
||||
assert(sc == RTEMS_SUCCESSFUL);
|
||||
}
|
||||
}
|
||||
|
||||
void *bestcomm_malloc(size_t size)
|
||||
{
|
||||
return _Heap_Allocate(&bestcomm_heap, size);
|
||||
}
|
||||
|
||||
void bestcomm_free(void *ptr)
|
||||
{
|
||||
if (ptr != NULL) {
|
||||
bool ok = _Heap_Free(&bestcomm_heap, ptr);
|
||||
assert(ok);
|
||||
}
|
||||
}
|
||||
@@ -1,624 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (c) 2004 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include <bsp/bestcomm/dma_image.h>
|
||||
|
||||
TASK_PCI_TX_api_t TASK_PCI_TX_storage;
|
||||
TASK_PCI_TX_api_t *TASK_PCI_TX_api=&TASK_PCI_TX_storage;
|
||||
|
||||
TASK_PCI_RX_api_t TASK_PCI_RX_storage;
|
||||
TASK_PCI_RX_api_t *TASK_PCI_RX_api=&TASK_PCI_RX_storage;
|
||||
|
||||
TASK_FEC_TX_api_t TASK_FEC_TX_storage;
|
||||
TASK_FEC_TX_api_t *TASK_FEC_TX_api=&TASK_FEC_TX_storage;
|
||||
|
||||
TASK_FEC_RX_api_t TASK_FEC_RX_storage;
|
||||
TASK_FEC_RX_api_t *TASK_FEC_RX_api=&TASK_FEC_RX_storage;
|
||||
|
||||
TASK_LPC_api_t TASK_LPC_storage;
|
||||
TASK_LPC_api_t *TASK_LPC_api=&TASK_LPC_storage;
|
||||
|
||||
TASK_ATA_api_t TASK_ATA_storage;
|
||||
TASK_ATA_api_t *TASK_ATA_api=&TASK_ATA_storage;
|
||||
|
||||
TASK_CRC16_DP_0_api_t TASK_CRC16_DP_0_storage;
|
||||
TASK_CRC16_DP_0_api_t *TASK_CRC16_DP_0_api=&TASK_CRC16_DP_0_storage;
|
||||
|
||||
TASK_CRC16_DP_1_api_t TASK_CRC16_DP_1_storage;
|
||||
TASK_CRC16_DP_1_api_t *TASK_CRC16_DP_1_api=&TASK_CRC16_DP_1_storage;
|
||||
|
||||
TASK_GEN_DP_0_api_t TASK_GEN_DP_0_storage;
|
||||
TASK_GEN_DP_0_api_t *TASK_GEN_DP_0_api=&TASK_GEN_DP_0_storage;
|
||||
|
||||
TASK_GEN_DP_1_api_t TASK_GEN_DP_1_storage;
|
||||
TASK_GEN_DP_1_api_t *TASK_GEN_DP_1_api=&TASK_GEN_DP_1_storage;
|
||||
|
||||
TASK_GEN_DP_2_api_t TASK_GEN_DP_2_storage;
|
||||
TASK_GEN_DP_2_api_t *TASK_GEN_DP_2_api=&TASK_GEN_DP_2_storage;
|
||||
|
||||
TASK_GEN_DP_3_api_t TASK_GEN_DP_3_storage;
|
||||
TASK_GEN_DP_3_api_t *TASK_GEN_DP_3_api=&TASK_GEN_DP_3_storage;
|
||||
|
||||
TASK_GEN_TX_BD_api_t TASK_GEN_TX_BD_storage;
|
||||
TASK_GEN_TX_BD_api_t *TASK_GEN_TX_BD_api=&TASK_GEN_TX_BD_storage;
|
||||
|
||||
TASK_GEN_RX_BD_api_t TASK_GEN_RX_BD_storage;
|
||||
TASK_GEN_RX_BD_api_t *TASK_GEN_RX_BD_api=&TASK_GEN_RX_BD_storage;
|
||||
|
||||
TASK_GEN_DP_BD_0_api_t TASK_GEN_DP_BD_0_storage;
|
||||
TASK_GEN_DP_BD_0_api_t *TASK_GEN_DP_BD_0_api=&TASK_GEN_DP_BD_0_storage;
|
||||
|
||||
TASK_GEN_DP_BD_1_api_t TASK_GEN_DP_BD_1_storage;
|
||||
TASK_GEN_DP_BD_1_api_t *TASK_GEN_DP_BD_1_api=&TASK_GEN_DP_BD_1_storage;
|
||||
|
||||
|
||||
|
||||
|
||||
void init_dma_image_TASK_PCI_TX(uint8 *taskBar, sint64 vMemOffset)
|
||||
{
|
||||
uint8 *vMem_taskBar = (taskBar - vMemOffset);
|
||||
TASK_PCI_TX_api->TaskNum = 0;
|
||||
TASK_PCI_TX_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0000UL);
|
||||
TASK_PCI_TX_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0004UL);
|
||||
TASK_PCI_TX_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0008UL);
|
||||
TASK_PCI_TX_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x000cUL);
|
||||
TASK_PCI_TX_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0018UL);
|
||||
TASK_PCI_TX_api->TaskPragma = (volatile uint8 *)(TASK_PCI_TX_api->PtrFDT)+3;
|
||||
TASK_PCI_TX_api->NumDRD = 7;
|
||||
TASK_PCI_TX_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrStartTDT) + 0x0008UL - vMemOffset);
|
||||
TASK_PCI_TX_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrStartTDT) + 0x0010UL - vMemOffset);
|
||||
TASK_PCI_TX_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrStartTDT) + 0x0018UL - vMemOffset);
|
||||
TASK_PCI_TX_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrStartTDT) + 0x0020UL - vMemOffset);
|
||||
TASK_PCI_TX_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrStartTDT) + 0x0024UL - vMemOffset);
|
||||
TASK_PCI_TX_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrStartTDT) + 0x002cUL - vMemOffset);
|
||||
TASK_PCI_TX_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrStartTDT) + 0x0038UL - vMemOffset);
|
||||
TASK_PCI_TX_api->NumVar = 12;
|
||||
TASK_PCI_TX_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrVarTab) - vMemOffset);
|
||||
TASK_PCI_TX_api->NumInc = 5;
|
||||
TASK_PCI_TX_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrVarTab) + (4*24) - vMemOffset);
|
||||
TASK_PCI_TX_api->AddrDstFIFO = &(TASK_PCI_TX_api->var[0]);
|
||||
TASK_PCI_TX_api->IncrBytes = (volatile sint16 *)&(TASK_PCI_TX_api->inc[0])+1;
|
||||
TASK_PCI_TX_api->AddrPktSizeReg = &(TASK_PCI_TX_api->var[1]);
|
||||
TASK_PCI_TX_api->IncrSrc = (volatile sint16 *)&(TASK_PCI_TX_api->inc[1])+1;
|
||||
TASK_PCI_TX_api->AddrSCStatusReg = &(TASK_PCI_TX_api->var[2]);
|
||||
TASK_PCI_TX_api->Bytes = &(TASK_PCI_TX_api->var[3]);
|
||||
TASK_PCI_TX_api->IterExtra = &(TASK_PCI_TX_api->var[4]);
|
||||
TASK_PCI_TX_api->StartAddrSrc = &(TASK_PCI_TX_api->var[7]);
|
||||
}
|
||||
|
||||
|
||||
void init_dma_image_TASK_PCI_RX(uint8 *taskBar, sint64 vMemOffset)
|
||||
{
|
||||
uint8 *vMem_taskBar = (taskBar - vMemOffset);
|
||||
TASK_PCI_RX_api->TaskNum = 1;
|
||||
TASK_PCI_RX_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0020UL);
|
||||
TASK_PCI_RX_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0024UL);
|
||||
TASK_PCI_RX_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0028UL);
|
||||
TASK_PCI_RX_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x002cUL);
|
||||
TASK_PCI_RX_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0038UL);
|
||||
TASK_PCI_RX_api->TaskPragma = (volatile uint8 *)(TASK_PCI_RX_api->PtrFDT)+3;
|
||||
TASK_PCI_RX_api->NumDRD = 5;
|
||||
TASK_PCI_RX_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_RX_api->PtrStartTDT) + 0x0008UL - vMemOffset);
|
||||
TASK_PCI_RX_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_RX_api->PtrStartTDT) + 0x0010UL - vMemOffset);
|
||||
TASK_PCI_RX_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_RX_api->PtrStartTDT) + 0x0018UL - vMemOffset);
|
||||
TASK_PCI_RX_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_RX_api->PtrStartTDT) + 0x0020UL - vMemOffset);
|
||||
TASK_PCI_RX_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_RX_api->PtrStartTDT) + 0x002cUL - vMemOffset);
|
||||
TASK_PCI_RX_api->NumVar = 9;
|
||||
TASK_PCI_RX_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_RX_api->PtrVarTab) - vMemOffset);
|
||||
TASK_PCI_RX_api->NumInc = 4;
|
||||
TASK_PCI_RX_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_RX_api->PtrVarTab) + (4*24) - vMemOffset);
|
||||
TASK_PCI_RX_api->AddrPktSizeReg = &(TASK_PCI_RX_api->var[0]);
|
||||
TASK_PCI_RX_api->IncrBytes = (volatile sint16 *)&(TASK_PCI_RX_api->inc[0])+1;
|
||||
TASK_PCI_RX_api->AddrSrcFIFO = &(TASK_PCI_RX_api->var[1]);
|
||||
TASK_PCI_RX_api->IncrDst = (volatile sint16 *)&(TASK_PCI_RX_api->inc[1])+1;
|
||||
TASK_PCI_RX_api->Bytes = &(TASK_PCI_RX_api->var[2]);
|
||||
TASK_PCI_RX_api->IterExtra = &(TASK_PCI_RX_api->var[3]);
|
||||
TASK_PCI_RX_api->StartAddrDst = &(TASK_PCI_RX_api->var[6]);
|
||||
}
|
||||
|
||||
|
||||
void init_dma_image_TASK_FEC_TX(uint8 *taskBar, sint64 vMemOffset)
|
||||
{
|
||||
uint8 *vMem_taskBar = (taskBar - vMemOffset);
|
||||
TASK_FEC_TX_api->TaskNum = 2;
|
||||
TASK_FEC_TX_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0040UL);
|
||||
TASK_FEC_TX_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0044UL);
|
||||
TASK_FEC_TX_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0048UL);
|
||||
TASK_FEC_TX_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x004cUL);
|
||||
TASK_FEC_TX_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0058UL);
|
||||
TASK_FEC_TX_api->TaskPragma = (volatile uint8 *)(TASK_FEC_TX_api->PtrFDT)+3;
|
||||
TASK_FEC_TX_api->NumDRD = 22;
|
||||
TASK_FEC_TX_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0004UL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0008UL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0010UL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x001cUL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0020UL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0024UL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x002cUL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[7] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0030UL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[8] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0034UL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[9] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0038UL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[10] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0044UL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[11] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0048UL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[12] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x004cUL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[13] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0054UL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[14] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0060UL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[15] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0064UL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[16] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0068UL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[17] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x006cUL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[18] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0074UL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[19] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x007cUL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[20] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0084UL - vMemOffset);
|
||||
TASK_FEC_TX_api->DRD[21] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0088UL - vMemOffset);
|
||||
TASK_FEC_TX_api->NumVar = 20;
|
||||
TASK_FEC_TX_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrVarTab) - vMemOffset);
|
||||
TASK_FEC_TX_api->NumInc = 7;
|
||||
TASK_FEC_TX_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrVarTab) + (4*24) - vMemOffset);
|
||||
TASK_FEC_TX_api->AddrDRD = &(TASK_FEC_TX_api->var[0]);
|
||||
TASK_FEC_TX_api->AddrDRDIdx = 19;
|
||||
*TASK_FEC_TX_api->AddrDRD = (volatile uint32)(TASK_FEC_TX_api->DRD[19]);
|
||||
TASK_FEC_TX_api->IncrBytes = (volatile sint16 *)&(TASK_FEC_TX_api->inc[0])+1;
|
||||
TASK_FEC_TX_api->AddrDstFIFO = &(TASK_FEC_TX_api->var[1]);
|
||||
TASK_FEC_TX_api->IncrSrc = (volatile sint16 *)&(TASK_FEC_TX_api->inc[1])+1;
|
||||
TASK_FEC_TX_api->AddrEnable = &(TASK_FEC_TX_api->var[2]);
|
||||
TASK_FEC_TX_api->IncrSrcMA = (volatile sint16 *)&(TASK_FEC_TX_api->inc[2])+1;
|
||||
TASK_FEC_TX_api->BDTableBase = &(TASK_FEC_TX_api->var[3]);
|
||||
TASK_FEC_TX_api->BDTableLast = &(TASK_FEC_TX_api->var[4]);
|
||||
TASK_FEC_TX_api->BDTableStart = &(TASK_FEC_TX_api->var[5]);
|
||||
TASK_FEC_TX_api->Bytes = &(TASK_FEC_TX_api->var[6]);
|
||||
}
|
||||
|
||||
|
||||
void init_dma_image_TASK_FEC_RX(uint8 *taskBar, sint64 vMemOffset)
|
||||
{
|
||||
uint8 *vMem_taskBar = (taskBar - vMemOffset);
|
||||
TASK_FEC_RX_api->TaskNum = 3;
|
||||
TASK_FEC_RX_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0060UL);
|
||||
TASK_FEC_RX_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0064UL);
|
||||
TASK_FEC_RX_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0068UL);
|
||||
TASK_FEC_RX_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x006cUL);
|
||||
TASK_FEC_RX_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0078UL);
|
||||
TASK_FEC_RX_api->TaskPragma = (volatile uint8 *)(TASK_FEC_RX_api->PtrFDT)+3;
|
||||
TASK_FEC_RX_api->NumDRD = 13;
|
||||
TASK_FEC_RX_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0004UL - vMemOffset);
|
||||
TASK_FEC_RX_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x000cUL - vMemOffset);
|
||||
TASK_FEC_RX_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0010UL - vMemOffset);
|
||||
TASK_FEC_RX_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0014UL - vMemOffset);
|
||||
TASK_FEC_RX_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0020UL - vMemOffset);
|
||||
TASK_FEC_RX_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0024UL - vMemOffset);
|
||||
TASK_FEC_RX_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x002cUL - vMemOffset);
|
||||
TASK_FEC_RX_api->DRD[7] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0038UL - vMemOffset);
|
||||
TASK_FEC_RX_api->DRD[8] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x003cUL - vMemOffset);
|
||||
TASK_FEC_RX_api->DRD[9] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0040UL - vMemOffset);
|
||||
TASK_FEC_RX_api->DRD[10] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0048UL - vMemOffset);
|
||||
TASK_FEC_RX_api->DRD[11] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0050UL - vMemOffset);
|
||||
TASK_FEC_RX_api->DRD[12] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0058UL - vMemOffset);
|
||||
TASK_FEC_RX_api->NumVar = 15;
|
||||
TASK_FEC_RX_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrVarTab) - vMemOffset);
|
||||
TASK_FEC_RX_api->NumInc = 7;
|
||||
TASK_FEC_RX_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrVarTab) + (4*24) - vMemOffset);
|
||||
TASK_FEC_RX_api->AddrEnable = &(TASK_FEC_RX_api->var[0]);
|
||||
TASK_FEC_RX_api->IncrBytes = (volatile sint16 *)&(TASK_FEC_RX_api->inc[0])+1;
|
||||
TASK_FEC_RX_api->AddrSrcFIFO = &(TASK_FEC_RX_api->var[1]);
|
||||
TASK_FEC_RX_api->IncrDst = (volatile sint16 *)&(TASK_FEC_RX_api->inc[1])+1;
|
||||
TASK_FEC_RX_api->BDTableBase = &(TASK_FEC_RX_api->var[2]);
|
||||
TASK_FEC_RX_api->IncrDstMA = (volatile sint16 *)&(TASK_FEC_RX_api->inc[2])+1;
|
||||
TASK_FEC_RX_api->BDTableLast = &(TASK_FEC_RX_api->var[3]);
|
||||
TASK_FEC_RX_api->BDTableStart = &(TASK_FEC_RX_api->var[4]);
|
||||
TASK_FEC_RX_api->Bytes = &(TASK_FEC_RX_api->var[5]);
|
||||
}
|
||||
|
||||
|
||||
void init_dma_image_TASK_LPC(uint8 *taskBar, sint64 vMemOffset)
|
||||
{
|
||||
uint8 *vMem_taskBar = (taskBar - vMemOffset);
|
||||
TASK_LPC_api->TaskNum = 4;
|
||||
TASK_LPC_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0080UL);
|
||||
TASK_LPC_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0084UL);
|
||||
TASK_LPC_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0088UL);
|
||||
TASK_LPC_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x008cUL);
|
||||
TASK_LPC_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0098UL);
|
||||
TASK_LPC_api->TaskPragma = (volatile uint8 *)(TASK_LPC_api->PtrFDT)+3;
|
||||
TASK_LPC_api->NumDRD = 4;
|
||||
TASK_LPC_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_LPC_api->PtrStartTDT) + 0x000cUL - vMemOffset);
|
||||
TASK_LPC_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_LPC_api->PtrStartTDT) + 0x0018UL - vMemOffset);
|
||||
TASK_LPC_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_LPC_api->PtrStartTDT) + 0x0024UL - vMemOffset);
|
||||
TASK_LPC_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_LPC_api->PtrStartTDT) + 0x002cUL - vMemOffset);
|
||||
TASK_LPC_api->NumVar = 9;
|
||||
TASK_LPC_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_LPC_api->PtrVarTab) - vMemOffset);
|
||||
TASK_LPC_api->NumInc = 8;
|
||||
TASK_LPC_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_LPC_api->PtrVarTab) + (4*24) - vMemOffset);
|
||||
TASK_LPC_api->Bytes = &(TASK_LPC_api->var[0]);
|
||||
TASK_LPC_api->IncrBytes = (volatile sint16 *)&(TASK_LPC_api->inc[0])+1;
|
||||
TASK_LPC_api->IterExtra = &(TASK_LPC_api->var[1]);
|
||||
TASK_LPC_api->IncrDst = (volatile sint16 *)&(TASK_LPC_api->inc[1])+1;
|
||||
TASK_LPC_api->IncrDstMA = (volatile sint16 *)&(TASK_LPC_api->inc[2])+1;
|
||||
TASK_LPC_api->IncrSrc = (volatile sint16 *)&(TASK_LPC_api->inc[3])+1;
|
||||
TASK_LPC_api->StartAddrDst = &(TASK_LPC_api->var[4]);
|
||||
TASK_LPC_api->IncrSrcMA = (volatile sint16 *)&(TASK_LPC_api->inc[4])+1;
|
||||
TASK_LPC_api->StartAddrSrc = &(TASK_LPC_api->var[5]);
|
||||
}
|
||||
|
||||
|
||||
void init_dma_image_TASK_ATA(uint8 *taskBar, sint64 vMemOffset)
|
||||
{
|
||||
uint8 *vMem_taskBar = (taskBar - vMemOffset);
|
||||
TASK_ATA_api->TaskNum = 5;
|
||||
TASK_ATA_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x00a0UL);
|
||||
TASK_ATA_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x00a4UL);
|
||||
TASK_ATA_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x00a8UL);
|
||||
TASK_ATA_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x00acUL);
|
||||
TASK_ATA_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x00b8UL);
|
||||
TASK_ATA_api->TaskPragma = (volatile uint8 *)(TASK_ATA_api->PtrFDT)+3;
|
||||
TASK_ATA_api->NumDRD = 7;
|
||||
TASK_ATA_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrStartTDT) + 0x0004UL - vMemOffset);
|
||||
TASK_ATA_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrStartTDT) + 0x000cUL - vMemOffset);
|
||||
TASK_ATA_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrStartTDT) + 0x0010UL - vMemOffset);
|
||||
TASK_ATA_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrStartTDT) + 0x0014UL - vMemOffset);
|
||||
TASK_ATA_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrStartTDT) + 0x0024UL - vMemOffset);
|
||||
TASK_ATA_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrStartTDT) + 0x002cUL - vMemOffset);
|
||||
TASK_ATA_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrStartTDT) + 0x0030UL - vMemOffset);
|
||||
TASK_ATA_api->NumVar = 12;
|
||||
TASK_ATA_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrVarTab) - vMemOffset);
|
||||
TASK_ATA_api->NumInc = 6;
|
||||
TASK_ATA_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrVarTab) + (4*24) - vMemOffset);
|
||||
TASK_ATA_api->AddrEnable = &(TASK_ATA_api->var[0]);
|
||||
TASK_ATA_api->IncrBytes = (volatile sint16 *)&(TASK_ATA_api->inc[0])+1;
|
||||
TASK_ATA_api->BDTableBase = &(TASK_ATA_api->var[1]);
|
||||
TASK_ATA_api->IncrDst = (volatile sint16 *)&(TASK_ATA_api->inc[1])+1;
|
||||
TASK_ATA_api->BDTableLast = &(TASK_ATA_api->var[2]);
|
||||
TASK_ATA_api->IncrSrc = (volatile sint16 *)&(TASK_ATA_api->inc[2])+1;
|
||||
TASK_ATA_api->BDTableStart = &(TASK_ATA_api->var[3]);
|
||||
TASK_ATA_api->Bytes = &(TASK_ATA_api->var[4]);
|
||||
}
|
||||
|
||||
|
||||
void init_dma_image_TASK_CRC16_DP_0(uint8 *taskBar, sint64 vMemOffset)
|
||||
{
|
||||
uint8 *vMem_taskBar = (taskBar - vMemOffset);
|
||||
TASK_CRC16_DP_0_api->TaskNum = 6;
|
||||
TASK_CRC16_DP_0_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x00c0UL);
|
||||
TASK_CRC16_DP_0_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x00c4UL);
|
||||
TASK_CRC16_DP_0_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x00c8UL);
|
||||
TASK_CRC16_DP_0_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x00ccUL);
|
||||
TASK_CRC16_DP_0_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x00d8UL);
|
||||
TASK_CRC16_DP_0_api->TaskPragma = (volatile uint8 *)(TASK_CRC16_DP_0_api->PtrFDT)+3;
|
||||
TASK_CRC16_DP_0_api->NumDRD = 9;
|
||||
TASK_CRC16_DP_0_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0004UL - vMemOffset);
|
||||
TASK_CRC16_DP_0_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0008UL - vMemOffset);
|
||||
TASK_CRC16_DP_0_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0014UL - vMemOffset);
|
||||
TASK_CRC16_DP_0_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0018UL - vMemOffset);
|
||||
TASK_CRC16_DP_0_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0024UL - vMemOffset);
|
||||
TASK_CRC16_DP_0_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0028UL - vMemOffset);
|
||||
TASK_CRC16_DP_0_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0034UL - vMemOffset);
|
||||
TASK_CRC16_DP_0_api->DRD[7] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0038UL - vMemOffset);
|
||||
TASK_CRC16_DP_0_api->DRD[8] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0040UL - vMemOffset);
|
||||
TASK_CRC16_DP_0_api->NumVar = 10;
|
||||
TASK_CRC16_DP_0_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrVarTab) - vMemOffset);
|
||||
TASK_CRC16_DP_0_api->NumInc = 8;
|
||||
TASK_CRC16_DP_0_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrVarTab) + (4*24) - vMemOffset);
|
||||
TASK_CRC16_DP_0_api->Bytes = &(TASK_CRC16_DP_0_api->var[0]);
|
||||
TASK_CRC16_DP_0_api->IncrBytes = (volatile sint16 *)&(TASK_CRC16_DP_0_api->inc[0])+1;
|
||||
TASK_CRC16_DP_0_api->IterExtra = &(TASK_CRC16_DP_0_api->var[1]);
|
||||
TASK_CRC16_DP_0_api->IncrDst = (volatile sint16 *)&(TASK_CRC16_DP_0_api->inc[1])+1;
|
||||
TASK_CRC16_DP_0_api->IncrDstMA = (volatile sint16 *)&(TASK_CRC16_DP_0_api->inc[2])+1;
|
||||
TASK_CRC16_DP_0_api->IncrSrc = (volatile sint16 *)&(TASK_CRC16_DP_0_api->inc[3])+1;
|
||||
TASK_CRC16_DP_0_api->StartAddrDst = &(TASK_CRC16_DP_0_api->var[4]);
|
||||
TASK_CRC16_DP_0_api->IncrSrcMA = (volatile sint16 *)&(TASK_CRC16_DP_0_api->inc[4])+1;
|
||||
TASK_CRC16_DP_0_api->StartAddrSrc = &(TASK_CRC16_DP_0_api->var[5]);
|
||||
}
|
||||
|
||||
|
||||
void init_dma_image_TASK_CRC16_DP_1(uint8 *taskBar, sint64 vMemOffset)
|
||||
{
|
||||
uint8 *vMem_taskBar = (taskBar - vMemOffset);
|
||||
TASK_CRC16_DP_1_api->TaskNum = 7;
|
||||
TASK_CRC16_DP_1_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x00e0UL);
|
||||
TASK_CRC16_DP_1_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x00e4UL);
|
||||
TASK_CRC16_DP_1_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x00e8UL);
|
||||
TASK_CRC16_DP_1_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x00ecUL);
|
||||
TASK_CRC16_DP_1_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x00f8UL);
|
||||
TASK_CRC16_DP_1_api->TaskPragma = (volatile uint8 *)(TASK_CRC16_DP_1_api->PtrFDT)+3;
|
||||
TASK_CRC16_DP_1_api->NumDRD = 9;
|
||||
TASK_CRC16_DP_1_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0004UL - vMemOffset);
|
||||
TASK_CRC16_DP_1_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0008UL - vMemOffset);
|
||||
TASK_CRC16_DP_1_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0014UL - vMemOffset);
|
||||
TASK_CRC16_DP_1_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0018UL - vMemOffset);
|
||||
TASK_CRC16_DP_1_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0024UL - vMemOffset);
|
||||
TASK_CRC16_DP_1_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0028UL - vMemOffset);
|
||||
TASK_CRC16_DP_1_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0034UL - vMemOffset);
|
||||
TASK_CRC16_DP_1_api->DRD[7] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0038UL - vMemOffset);
|
||||
TASK_CRC16_DP_1_api->DRD[8] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0040UL - vMemOffset);
|
||||
TASK_CRC16_DP_1_api->NumVar = 10;
|
||||
TASK_CRC16_DP_1_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrVarTab) - vMemOffset);
|
||||
TASK_CRC16_DP_1_api->NumInc = 8;
|
||||
TASK_CRC16_DP_1_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrVarTab) + (4*24) - vMemOffset);
|
||||
TASK_CRC16_DP_1_api->Bytes = &(TASK_CRC16_DP_1_api->var[0]);
|
||||
TASK_CRC16_DP_1_api->IncrBytes = (volatile sint16 *)&(TASK_CRC16_DP_1_api->inc[0])+1;
|
||||
TASK_CRC16_DP_1_api->IterExtra = &(TASK_CRC16_DP_1_api->var[1]);
|
||||
TASK_CRC16_DP_1_api->IncrDst = (volatile sint16 *)&(TASK_CRC16_DP_1_api->inc[1])+1;
|
||||
TASK_CRC16_DP_1_api->IncrDstMA = (volatile sint16 *)&(TASK_CRC16_DP_1_api->inc[2])+1;
|
||||
TASK_CRC16_DP_1_api->IncrSrc = (volatile sint16 *)&(TASK_CRC16_DP_1_api->inc[3])+1;
|
||||
TASK_CRC16_DP_1_api->StartAddrDst = &(TASK_CRC16_DP_1_api->var[4]);
|
||||
TASK_CRC16_DP_1_api->IncrSrcMA = (volatile sint16 *)&(TASK_CRC16_DP_1_api->inc[4])+1;
|
||||
TASK_CRC16_DP_1_api->StartAddrSrc = &(TASK_CRC16_DP_1_api->var[5]);
|
||||
}
|
||||
|
||||
|
||||
void init_dma_image_TASK_GEN_DP_0(uint8 *taskBar, sint64 vMemOffset)
|
||||
{
|
||||
uint8 *vMem_taskBar = (taskBar - vMemOffset);
|
||||
TASK_GEN_DP_0_api->TaskNum = 8;
|
||||
TASK_GEN_DP_0_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0100UL);
|
||||
TASK_GEN_DP_0_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0104UL);
|
||||
TASK_GEN_DP_0_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0108UL);
|
||||
TASK_GEN_DP_0_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x010cUL);
|
||||
TASK_GEN_DP_0_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0118UL);
|
||||
TASK_GEN_DP_0_api->TaskPragma = (volatile uint8 *)(TASK_GEN_DP_0_api->PtrFDT)+3;
|
||||
TASK_GEN_DP_0_api->NumDRD = 4;
|
||||
TASK_GEN_DP_0_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_0_api->PtrStartTDT) + 0x000cUL - vMemOffset);
|
||||
TASK_GEN_DP_0_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_0_api->PtrStartTDT) + 0x0018UL - vMemOffset);
|
||||
TASK_GEN_DP_0_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_0_api->PtrStartTDT) + 0x0024UL - vMemOffset);
|
||||
TASK_GEN_DP_0_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_0_api->PtrStartTDT) + 0x002cUL - vMemOffset);
|
||||
TASK_GEN_DP_0_api->NumVar = 9;
|
||||
TASK_GEN_DP_0_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_0_api->PtrVarTab) - vMemOffset);
|
||||
TASK_GEN_DP_0_api->NumInc = 8;
|
||||
TASK_GEN_DP_0_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_0_api->PtrVarTab) + (4*24) - vMemOffset);
|
||||
TASK_GEN_DP_0_api->Bytes = &(TASK_GEN_DP_0_api->var[0]);
|
||||
TASK_GEN_DP_0_api->IncrBytes = (volatile sint16 *)&(TASK_GEN_DP_0_api->inc[0])+1;
|
||||
TASK_GEN_DP_0_api->IterExtra = &(TASK_GEN_DP_0_api->var[1]);
|
||||
TASK_GEN_DP_0_api->IncrDst = (volatile sint16 *)&(TASK_GEN_DP_0_api->inc[1])+1;
|
||||
TASK_GEN_DP_0_api->IncrDstMA = (volatile sint16 *)&(TASK_GEN_DP_0_api->inc[2])+1;
|
||||
TASK_GEN_DP_0_api->IncrSrc = (volatile sint16 *)&(TASK_GEN_DP_0_api->inc[3])+1;
|
||||
TASK_GEN_DP_0_api->StartAddrDst = &(TASK_GEN_DP_0_api->var[4]);
|
||||
TASK_GEN_DP_0_api->IncrSrcMA = (volatile sint16 *)&(TASK_GEN_DP_0_api->inc[4])+1;
|
||||
TASK_GEN_DP_0_api->StartAddrSrc = &(TASK_GEN_DP_0_api->var[5]);
|
||||
}
|
||||
|
||||
|
||||
void init_dma_image_TASK_GEN_DP_1(uint8 *taskBar, sint64 vMemOffset)
|
||||
{
|
||||
uint8 *vMem_taskBar = (taskBar - vMemOffset);
|
||||
TASK_GEN_DP_1_api->TaskNum = 9;
|
||||
TASK_GEN_DP_1_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0120UL);
|
||||
TASK_GEN_DP_1_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0124UL);
|
||||
TASK_GEN_DP_1_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0128UL);
|
||||
TASK_GEN_DP_1_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x012cUL);
|
||||
TASK_GEN_DP_1_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0138UL);
|
||||
TASK_GEN_DP_1_api->TaskPragma = (volatile uint8 *)(TASK_GEN_DP_1_api->PtrFDT)+3;
|
||||
TASK_GEN_DP_1_api->NumDRD = 4;
|
||||
TASK_GEN_DP_1_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_1_api->PtrStartTDT) + 0x000cUL - vMemOffset);
|
||||
TASK_GEN_DP_1_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_1_api->PtrStartTDT) + 0x0018UL - vMemOffset);
|
||||
TASK_GEN_DP_1_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_1_api->PtrStartTDT) + 0x0024UL - vMemOffset);
|
||||
TASK_GEN_DP_1_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_1_api->PtrStartTDT) + 0x002cUL - vMemOffset);
|
||||
TASK_GEN_DP_1_api->NumVar = 9;
|
||||
TASK_GEN_DP_1_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_1_api->PtrVarTab) - vMemOffset);
|
||||
TASK_GEN_DP_1_api->NumInc = 8;
|
||||
TASK_GEN_DP_1_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_1_api->PtrVarTab) + (4*24) - vMemOffset);
|
||||
TASK_GEN_DP_1_api->Bytes = &(TASK_GEN_DP_1_api->var[0]);
|
||||
TASK_GEN_DP_1_api->IncrBytes = (volatile sint16 *)&(TASK_GEN_DP_1_api->inc[0])+1;
|
||||
TASK_GEN_DP_1_api->IterExtra = &(TASK_GEN_DP_1_api->var[1]);
|
||||
TASK_GEN_DP_1_api->IncrDst = (volatile sint16 *)&(TASK_GEN_DP_1_api->inc[1])+1;
|
||||
TASK_GEN_DP_1_api->IncrDstMA = (volatile sint16 *)&(TASK_GEN_DP_1_api->inc[2])+1;
|
||||
TASK_GEN_DP_1_api->IncrSrc = (volatile sint16 *)&(TASK_GEN_DP_1_api->inc[3])+1;
|
||||
TASK_GEN_DP_1_api->StartAddrDst = &(TASK_GEN_DP_1_api->var[4]);
|
||||
TASK_GEN_DP_1_api->IncrSrcMA = (volatile sint16 *)&(TASK_GEN_DP_1_api->inc[4])+1;
|
||||
TASK_GEN_DP_1_api->StartAddrSrc = &(TASK_GEN_DP_1_api->var[5]);
|
||||
}
|
||||
|
||||
|
||||
void init_dma_image_TASK_GEN_DP_2(uint8 *taskBar, sint64 vMemOffset)
|
||||
{
|
||||
uint8 *vMem_taskBar = (taskBar - vMemOffset);
|
||||
TASK_GEN_DP_2_api->TaskNum = 10;
|
||||
TASK_GEN_DP_2_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0140UL);
|
||||
TASK_GEN_DP_2_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0144UL);
|
||||
TASK_GEN_DP_2_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0148UL);
|
||||
TASK_GEN_DP_2_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x014cUL);
|
||||
TASK_GEN_DP_2_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0158UL);
|
||||
TASK_GEN_DP_2_api->TaskPragma = (volatile uint8 *)(TASK_GEN_DP_2_api->PtrFDT)+3;
|
||||
TASK_GEN_DP_2_api->NumDRD = 4;
|
||||
TASK_GEN_DP_2_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_2_api->PtrStartTDT) + 0x000cUL - vMemOffset);
|
||||
TASK_GEN_DP_2_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_2_api->PtrStartTDT) + 0x0018UL - vMemOffset);
|
||||
TASK_GEN_DP_2_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_2_api->PtrStartTDT) + 0x0024UL - vMemOffset);
|
||||
TASK_GEN_DP_2_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_2_api->PtrStartTDT) + 0x002cUL - vMemOffset);
|
||||
TASK_GEN_DP_2_api->NumVar = 9;
|
||||
TASK_GEN_DP_2_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_2_api->PtrVarTab) - vMemOffset);
|
||||
TASK_GEN_DP_2_api->NumInc = 8;
|
||||
TASK_GEN_DP_2_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_2_api->PtrVarTab) + (4*24) - vMemOffset);
|
||||
TASK_GEN_DP_2_api->Bytes = &(TASK_GEN_DP_2_api->var[0]);
|
||||
TASK_GEN_DP_2_api->IncrBytes = (volatile sint16 *)&(TASK_GEN_DP_2_api->inc[0])+1;
|
||||
TASK_GEN_DP_2_api->IterExtra = &(TASK_GEN_DP_2_api->var[1]);
|
||||
TASK_GEN_DP_2_api->IncrDst = (volatile sint16 *)&(TASK_GEN_DP_2_api->inc[1])+1;
|
||||
TASK_GEN_DP_2_api->IncrDstMA = (volatile sint16 *)&(TASK_GEN_DP_2_api->inc[2])+1;
|
||||
TASK_GEN_DP_2_api->IncrSrc = (volatile sint16 *)&(TASK_GEN_DP_2_api->inc[3])+1;
|
||||
TASK_GEN_DP_2_api->StartAddrDst = &(TASK_GEN_DP_2_api->var[4]);
|
||||
TASK_GEN_DP_2_api->IncrSrcMA = (volatile sint16 *)&(TASK_GEN_DP_2_api->inc[4])+1;
|
||||
TASK_GEN_DP_2_api->StartAddrSrc = &(TASK_GEN_DP_2_api->var[5]);
|
||||
}
|
||||
|
||||
|
||||
void init_dma_image_TASK_GEN_DP_3(uint8 *taskBar, sint64 vMemOffset)
|
||||
{
|
||||
uint8 *vMem_taskBar = (taskBar - vMemOffset);
|
||||
TASK_GEN_DP_3_api->TaskNum = 11;
|
||||
TASK_GEN_DP_3_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0160UL);
|
||||
TASK_GEN_DP_3_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0164UL);
|
||||
TASK_GEN_DP_3_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0168UL);
|
||||
TASK_GEN_DP_3_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x016cUL);
|
||||
TASK_GEN_DP_3_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0178UL);
|
||||
TASK_GEN_DP_3_api->TaskPragma = (volatile uint8 *)(TASK_GEN_DP_3_api->PtrFDT)+3;
|
||||
TASK_GEN_DP_3_api->NumDRD = 4;
|
||||
TASK_GEN_DP_3_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_3_api->PtrStartTDT) + 0x000cUL - vMemOffset);
|
||||
TASK_GEN_DP_3_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_3_api->PtrStartTDT) + 0x0018UL - vMemOffset);
|
||||
TASK_GEN_DP_3_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_3_api->PtrStartTDT) + 0x0024UL - vMemOffset);
|
||||
TASK_GEN_DP_3_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_3_api->PtrStartTDT) + 0x002cUL - vMemOffset);
|
||||
TASK_GEN_DP_3_api->NumVar = 9;
|
||||
TASK_GEN_DP_3_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_3_api->PtrVarTab) - vMemOffset);
|
||||
TASK_GEN_DP_3_api->NumInc = 8;
|
||||
TASK_GEN_DP_3_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_3_api->PtrVarTab) + (4*24) - vMemOffset);
|
||||
TASK_GEN_DP_3_api->Bytes = &(TASK_GEN_DP_3_api->var[0]);
|
||||
TASK_GEN_DP_3_api->IncrBytes = (volatile sint16 *)&(TASK_GEN_DP_3_api->inc[0])+1;
|
||||
TASK_GEN_DP_3_api->IterExtra = &(TASK_GEN_DP_3_api->var[1]);
|
||||
TASK_GEN_DP_3_api->IncrDst = (volatile sint16 *)&(TASK_GEN_DP_3_api->inc[1])+1;
|
||||
TASK_GEN_DP_3_api->IncrDstMA = (volatile sint16 *)&(TASK_GEN_DP_3_api->inc[2])+1;
|
||||
TASK_GEN_DP_3_api->IncrSrc = (volatile sint16 *)&(TASK_GEN_DP_3_api->inc[3])+1;
|
||||
TASK_GEN_DP_3_api->StartAddrDst = &(TASK_GEN_DP_3_api->var[4]);
|
||||
TASK_GEN_DP_3_api->IncrSrcMA = (volatile sint16 *)&(TASK_GEN_DP_3_api->inc[4])+1;
|
||||
TASK_GEN_DP_3_api->StartAddrSrc = &(TASK_GEN_DP_3_api->var[5]);
|
||||
}
|
||||
|
||||
|
||||
void init_dma_image_TASK_GEN_TX_BD(uint8 *taskBar, sint64 vMemOffset)
|
||||
{
|
||||
uint8 *vMem_taskBar = (taskBar - vMemOffset);
|
||||
TASK_GEN_TX_BD_api->TaskNum = 12;
|
||||
TASK_GEN_TX_BD_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0180UL);
|
||||
TASK_GEN_TX_BD_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0184UL);
|
||||
TASK_GEN_TX_BD_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0188UL);
|
||||
TASK_GEN_TX_BD_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x018cUL);
|
||||
TASK_GEN_TX_BD_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0198UL);
|
||||
TASK_GEN_TX_BD_api->TaskPragma = (volatile uint8 *)(TASK_GEN_TX_BD_api->PtrFDT)+3;
|
||||
TASK_GEN_TX_BD_api->NumDRD = 8;
|
||||
TASK_GEN_TX_BD_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrStartTDT) + 0x0004UL - vMemOffset);
|
||||
TASK_GEN_TX_BD_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrStartTDT) + 0x000cUL - vMemOffset);
|
||||
TASK_GEN_TX_BD_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrStartTDT) + 0x0010UL - vMemOffset);
|
||||
TASK_GEN_TX_BD_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrStartTDT) + 0x0014UL - vMemOffset);
|
||||
TASK_GEN_TX_BD_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrStartTDT) + 0x0020UL - vMemOffset);
|
||||
TASK_GEN_TX_BD_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrStartTDT) + 0x0028UL - vMemOffset);
|
||||
TASK_GEN_TX_BD_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrStartTDT) + 0x0030UL - vMemOffset);
|
||||
TASK_GEN_TX_BD_api->DRD[7] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrStartTDT) + 0x0034UL - vMemOffset);
|
||||
TASK_GEN_TX_BD_api->NumVar = 13;
|
||||
TASK_GEN_TX_BD_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrVarTab) - vMemOffset);
|
||||
TASK_GEN_TX_BD_api->NumInc = 7;
|
||||
TASK_GEN_TX_BD_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrVarTab) + (4*24) - vMemOffset);
|
||||
TASK_GEN_TX_BD_api->AddrDstFIFO = &(TASK_GEN_TX_BD_api->var[0]);
|
||||
TASK_GEN_TX_BD_api->IncrBytes = (volatile sint16 *)&(TASK_GEN_TX_BD_api->inc[0])+1;
|
||||
TASK_GEN_TX_BD_api->AddrEnable = &(TASK_GEN_TX_BD_api->var[1]);
|
||||
TASK_GEN_TX_BD_api->IncrSrc = (volatile sint16 *)&(TASK_GEN_TX_BD_api->inc[1])+1;
|
||||
TASK_GEN_TX_BD_api->BDTableBase = &(TASK_GEN_TX_BD_api->var[2]);
|
||||
TASK_GEN_TX_BD_api->IncrSrcMA = (volatile sint16 *)&(TASK_GEN_TX_BD_api->inc[2])+1;
|
||||
TASK_GEN_TX_BD_api->BDTableLast = &(TASK_GEN_TX_BD_api->var[3]);
|
||||
TASK_GEN_TX_BD_api->BDTableStart = &(TASK_GEN_TX_BD_api->var[4]);
|
||||
TASK_GEN_TX_BD_api->Bytes = &(TASK_GEN_TX_BD_api->var[5]);
|
||||
}
|
||||
|
||||
|
||||
void init_dma_image_TASK_GEN_RX_BD(uint8 *taskBar, sint64 vMemOffset)
|
||||
{
|
||||
uint8 *vMem_taskBar = (taskBar - vMemOffset);
|
||||
TASK_GEN_RX_BD_api->TaskNum = 13;
|
||||
TASK_GEN_RX_BD_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x01a0UL);
|
||||
TASK_GEN_RX_BD_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x01a4UL);
|
||||
TASK_GEN_RX_BD_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x01a8UL);
|
||||
TASK_GEN_RX_BD_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x01acUL);
|
||||
TASK_GEN_RX_BD_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x01b8UL);
|
||||
TASK_GEN_RX_BD_api->TaskPragma = (volatile uint8 *)(TASK_GEN_RX_BD_api->PtrFDT)+3;
|
||||
TASK_GEN_RX_BD_api->NumDRD = 7;
|
||||
TASK_GEN_RX_BD_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrStartTDT) + 0x0004UL - vMemOffset);
|
||||
TASK_GEN_RX_BD_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrStartTDT) + 0x000cUL - vMemOffset);
|
||||
TASK_GEN_RX_BD_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrStartTDT) + 0x0010UL - vMemOffset);
|
||||
TASK_GEN_RX_BD_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrStartTDT) + 0x0014UL - vMemOffset);
|
||||
TASK_GEN_RX_BD_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrStartTDT) + 0x0020UL - vMemOffset);
|
||||
TASK_GEN_RX_BD_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrStartTDT) + 0x0028UL - vMemOffset);
|
||||
TASK_GEN_RX_BD_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrStartTDT) + 0x002cUL - vMemOffset);
|
||||
TASK_GEN_RX_BD_api->NumVar = 12;
|
||||
TASK_GEN_RX_BD_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrVarTab) - vMemOffset);
|
||||
TASK_GEN_RX_BD_api->NumInc = 5;
|
||||
TASK_GEN_RX_BD_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrVarTab) + (4*24) - vMemOffset);
|
||||
TASK_GEN_RX_BD_api->AddrEnable = &(TASK_GEN_RX_BD_api->var[0]);
|
||||
TASK_GEN_RX_BD_api->IncrBytes = (volatile sint16 *)&(TASK_GEN_RX_BD_api->inc[0])+1;
|
||||
TASK_GEN_RX_BD_api->AddrSrcFIFO = &(TASK_GEN_RX_BD_api->var[1]);
|
||||
TASK_GEN_RX_BD_api->IncrDst = (volatile sint16 *)&(TASK_GEN_RX_BD_api->inc[1])+1;
|
||||
TASK_GEN_RX_BD_api->BDTableBase = &(TASK_GEN_RX_BD_api->var[2]);
|
||||
TASK_GEN_RX_BD_api->BDTableLast = &(TASK_GEN_RX_BD_api->var[3]);
|
||||
TASK_GEN_RX_BD_api->BDTableStart = &(TASK_GEN_RX_BD_api->var[4]);
|
||||
TASK_GEN_RX_BD_api->Bytes = &(TASK_GEN_RX_BD_api->var[5]);
|
||||
}
|
||||
|
||||
|
||||
void init_dma_image_TASK_GEN_DP_BD_0(uint8 *taskBar, sint64 vMemOffset)
|
||||
{
|
||||
uint8 *vMem_taskBar = (taskBar - vMemOffset);
|
||||
TASK_GEN_DP_BD_0_api->TaskNum = 14;
|
||||
TASK_GEN_DP_BD_0_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x01c0UL);
|
||||
TASK_GEN_DP_BD_0_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x01c4UL);
|
||||
TASK_GEN_DP_BD_0_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x01c8UL);
|
||||
TASK_GEN_DP_BD_0_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x01ccUL);
|
||||
TASK_GEN_DP_BD_0_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x01d8UL);
|
||||
TASK_GEN_DP_BD_0_api->TaskPragma = (volatile uint8 *)(TASK_GEN_DP_BD_0_api->PtrFDT)+3;
|
||||
TASK_GEN_DP_BD_0_api->NumDRD = 7;
|
||||
TASK_GEN_DP_BD_0_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrStartTDT) + 0x0004UL - vMemOffset);
|
||||
TASK_GEN_DP_BD_0_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrStartTDT) + 0x000cUL - vMemOffset);
|
||||
TASK_GEN_DP_BD_0_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrStartTDT) + 0x0010UL - vMemOffset);
|
||||
TASK_GEN_DP_BD_0_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrStartTDT) + 0x0014UL - vMemOffset);
|
||||
TASK_GEN_DP_BD_0_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrStartTDT) + 0x0024UL - vMemOffset);
|
||||
TASK_GEN_DP_BD_0_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrStartTDT) + 0x002cUL - vMemOffset);
|
||||
TASK_GEN_DP_BD_0_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrStartTDT) + 0x0030UL - vMemOffset);
|
||||
TASK_GEN_DP_BD_0_api->NumVar = 12;
|
||||
TASK_GEN_DP_BD_0_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrVarTab) - vMemOffset);
|
||||
TASK_GEN_DP_BD_0_api->NumInc = 6;
|
||||
TASK_GEN_DP_BD_0_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrVarTab) + (4*24) - vMemOffset);
|
||||
TASK_GEN_DP_BD_0_api->AddrEnable = &(TASK_GEN_DP_BD_0_api->var[0]);
|
||||
TASK_GEN_DP_BD_0_api->IncrBytes = (volatile sint16 *)&(TASK_GEN_DP_BD_0_api->inc[0])+1;
|
||||
TASK_GEN_DP_BD_0_api->BDTableBase = &(TASK_GEN_DP_BD_0_api->var[1]);
|
||||
TASK_GEN_DP_BD_0_api->IncrDst = (volatile sint16 *)&(TASK_GEN_DP_BD_0_api->inc[1])+1;
|
||||
TASK_GEN_DP_BD_0_api->BDTableLast = &(TASK_GEN_DP_BD_0_api->var[2]);
|
||||
TASK_GEN_DP_BD_0_api->IncrSrc = (volatile sint16 *)&(TASK_GEN_DP_BD_0_api->inc[2])+1;
|
||||
TASK_GEN_DP_BD_0_api->BDTableStart = &(TASK_GEN_DP_BD_0_api->var[3]);
|
||||
TASK_GEN_DP_BD_0_api->Bytes = &(TASK_GEN_DP_BD_0_api->var[4]);
|
||||
}
|
||||
|
||||
|
||||
void init_dma_image_TASK_GEN_DP_BD_1(uint8 *taskBar, sint64 vMemOffset)
|
||||
{
|
||||
uint8 *vMem_taskBar = (taskBar - vMemOffset);
|
||||
TASK_GEN_DP_BD_1_api->TaskNum = 15;
|
||||
TASK_GEN_DP_BD_1_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x01e0UL);
|
||||
TASK_GEN_DP_BD_1_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x01e4UL);
|
||||
TASK_GEN_DP_BD_1_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x01e8UL);
|
||||
TASK_GEN_DP_BD_1_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x01ecUL);
|
||||
TASK_GEN_DP_BD_1_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x01f8UL);
|
||||
TASK_GEN_DP_BD_1_api->TaskPragma = (volatile uint8 *)(TASK_GEN_DP_BD_1_api->PtrFDT)+3;
|
||||
TASK_GEN_DP_BD_1_api->NumDRD = 7;
|
||||
TASK_GEN_DP_BD_1_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrStartTDT) + 0x0004UL - vMemOffset);
|
||||
TASK_GEN_DP_BD_1_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrStartTDT) + 0x000cUL - vMemOffset);
|
||||
TASK_GEN_DP_BD_1_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrStartTDT) + 0x0010UL - vMemOffset);
|
||||
TASK_GEN_DP_BD_1_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrStartTDT) + 0x0014UL - vMemOffset);
|
||||
TASK_GEN_DP_BD_1_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrStartTDT) + 0x0024UL - vMemOffset);
|
||||
TASK_GEN_DP_BD_1_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrStartTDT) + 0x002cUL - vMemOffset);
|
||||
TASK_GEN_DP_BD_1_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrStartTDT) + 0x0030UL - vMemOffset);
|
||||
TASK_GEN_DP_BD_1_api->NumVar = 12;
|
||||
TASK_GEN_DP_BD_1_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrVarTab) - vMemOffset);
|
||||
TASK_GEN_DP_BD_1_api->NumInc = 6;
|
||||
TASK_GEN_DP_BD_1_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrVarTab) + (4*24) - vMemOffset);
|
||||
TASK_GEN_DP_BD_1_api->AddrEnable = &(TASK_GEN_DP_BD_1_api->var[0]);
|
||||
TASK_GEN_DP_BD_1_api->IncrBytes = (volatile sint16 *)&(TASK_GEN_DP_BD_1_api->inc[0])+1;
|
||||
TASK_GEN_DP_BD_1_api->BDTableBase = &(TASK_GEN_DP_BD_1_api->var[1]);
|
||||
TASK_GEN_DP_BD_1_api->IncrDst = (volatile sint16 *)&(TASK_GEN_DP_BD_1_api->inc[1])+1;
|
||||
TASK_GEN_DP_BD_1_api->BDTableLast = &(TASK_GEN_DP_BD_1_api->var[2]);
|
||||
TASK_GEN_DP_BD_1_api->IncrSrc = (volatile sint16 *)&(TASK_GEN_DP_BD_1_api->inc[2])+1;
|
||||
TASK_GEN_DP_BD_1_api->BDTableStart = &(TASK_GEN_DP_BD_1_api->var[3]);
|
||||
TASK_GEN_DP_BD_1_api->Bytes = &(TASK_GEN_DP_BD_1_api->var[4]);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,84 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (c) 2004 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#if defined(__rtems__) || defined(MPC5200_BAPI_LIBC_HEADERS)
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include <bsp/bestcomm/include/ppctypes.h>
|
||||
#include <bsp/bestcomm/include/mgt5200/sdma.h>
|
||||
#include <bsp/bestcomm/include/mgt5200/mgt5200.h>
|
||||
|
||||
#include <bsp/bestcomm/dma_image.h>
|
||||
#include <bsp/bestcomm/bestcomm_api.h>
|
||||
|
||||
#ifdef __MWERKS__
|
||||
__declspec(section ".text") extern const uint32 taskTable;
|
||||
__declspec(section ".text") extern const uint32 taskTableBytes;
|
||||
__declspec(section ".text") extern const uint32 taskTableTasks;
|
||||
__declspec(section ".text") extern const uint32 offsetEntry;
|
||||
#else
|
||||
extern const uint32 taskTable [];
|
||||
extern const uint32 taskTableBytes;
|
||||
extern const uint32 taskTableTasks;
|
||||
extern const uint32 offsetEntry;
|
||||
#endif
|
||||
|
||||
typedef struct SCTDT {
|
||||
uint32 start;
|
||||
uint32 stop;
|
||||
uint32 var;
|
||||
uint32 fdt;
|
||||
uint32 rsvd1;
|
||||
uint32 rsvd2;
|
||||
uint32 context;
|
||||
uint32 litbase;
|
||||
} SCTDT_T;
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Load BestComm tasks into SRAM.
|
||||
* \param sdma Base address of the BestComm register set
|
||||
*
|
||||
* The BestComm tasks must be loaded before any task can be setup,
|
||||
* enabled, etc. This might be called as part of a boot sequence before
|
||||
* any BestComm drivers are required.
|
||||
*/
|
||||
void TasksLoadImage(sdma_regs *sdma)
|
||||
{
|
||||
uint32 i;
|
||||
SCTDT_T *tt;
|
||||
|
||||
/* copy task table from source to destination */
|
||||
memcpy((void *)((uint8 *)(sdma->taskBar) - MBarPhysOffsetGlobal), taskTable, taskTableBytes);
|
||||
/* adjust addresses in task table */
|
||||
for (i=0; i < (uint32) taskTableTasks; i++) {
|
||||
tt = (SCTDT_T *)(((uint8 *)(sdma->taskBar) - MBarPhysOffsetGlobal) + (uint32) offsetEntry + (i * sizeof (SCTDT_T)));
|
||||
tt->start += sdma->taskBar;
|
||||
tt->stop += sdma->taskBar;
|
||||
tt->var += sdma->taskBar;
|
||||
tt->fdt = (sdma->taskBar & 0xFFFFFF00) + tt->fdt;
|
||||
tt->context += sdma->taskBar;
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Generated by GUI, one per configured tasks.
|
||||
*/
|
||||
|
||||
#define TASK_BASE TASK_ATA
|
||||
#define TASK_API TASK_ATA_api_t
|
||||
#define TASKSETUP_NAME TaskSetup_TASK_ATA
|
||||
|
||||
/* Pragma settings */
|
||||
#define PRECISE_INC 0
|
||||
#define NO_ERROR_RST 0
|
||||
#define PACK_DATA 0
|
||||
#define INTEGER_MODE 0
|
||||
#define SPEC_READS 1
|
||||
#define WRITE_LINE_BUFFER 1
|
||||
#define READ_LINE_BUFFER 1
|
||||
|
||||
#define MISALIGNED 0
|
||||
|
||||
#define INITIATOR_DATA -1
|
||||
|
||||
#define AUTO_START -1
|
||||
#define ITERATIONS -1
|
||||
|
||||
#define MAX_BD 4
|
||||
#define BD_FLAG 0
|
||||
|
||||
#define INCR_TYPE_SRC 1
|
||||
#define INCR_SRC 0
|
||||
#define TYPE_SRC FLEX_T
|
||||
|
||||
#define INCR_TYPE_DST 1
|
||||
#define INCR_DST 0
|
||||
#define TYPE_DST FLEX_T
|
||||
|
||||
#include <bsp/bestcomm/task_api/tasksetup_general.h>
|
||||
@@ -1,117 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (c) 2004 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <bsp/bestcomm/bestcomm_api.h>
|
||||
#include <bsp/bestcomm/bestcomm_glue.h>
|
||||
#include <bsp/bestcomm/task_api/tasksetup_bdtable.h>
|
||||
#include <bsp/bestcomm/include/mgt5200/mgt5200.h>
|
||||
|
||||
#ifdef __MWERKS__
|
||||
__declspec(section ".text") extern const uint32 taskTable;
|
||||
__declspec(section ".text") extern const uint32 taskTableBytes;
|
||||
__declspec(section ".text") extern const uint32 taskTableTasks;
|
||||
__declspec(section ".text") extern const uint32 offsetEntry;
|
||||
#else
|
||||
extern const uint32 taskTable;
|
||||
extern const uint32 taskTableBytes;
|
||||
extern const uint32 taskTableTasks;
|
||||
extern const uint32 offsetEntry;
|
||||
#endif
|
||||
|
||||
TaskBDIdxTable_t TaskBDIdxTable[MAX_TASKS];
|
||||
|
||||
void TaskSetup_BDTable(volatile uint32 *BasePtr, volatile uint32 *LastPtr, volatile uint32 *StartPtr,
|
||||
int TaskNum, uint32 NumBD, uint16 MaxBD,
|
||||
uint8 NumPtr, ApiConfig_t ApiConfig, uint32 Status)
|
||||
{
|
||||
int i, j;
|
||||
uint32 *ptr;
|
||||
|
||||
/*
|
||||
* First time through the Buffer Descriptor table configuration
|
||||
* set the buffer descriptor table with parameters that will not
|
||||
* change since they are determined by the task itself. The
|
||||
* SramOffsetGlobal variable must be updated to reflect the new SRAM
|
||||
* space used by the buffer descriptor table. The next time through
|
||||
* this function (i.e. TaskSetup called again) the only parameters
|
||||
* that should be changed are the LastPtr pointers and the NumBD part
|
||||
* of the table.
|
||||
*/
|
||||
if (TaskBDIdxTable[TaskNum].BDTablePtr == 0) {
|
||||
size_t AllocSize = 0;
|
||||
void *AllocBegin = NULL;
|
||||
|
||||
switch (NumPtr) {
|
||||
case 1:
|
||||
AllocSize += MaxBD*sizeof(TaskBD1_t);
|
||||
break;
|
||||
case 2:
|
||||
AllocSize += MaxBD*sizeof(TaskBD2_t);
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
AllocBegin = bestcomm_malloc(AllocSize);
|
||||
assert(AllocBegin != NULL);
|
||||
|
||||
TaskBDIdxTable[TaskNum].BDTablePtr = AllocBegin;
|
||||
TaskBDIdxTable[TaskNum].numPtr = NumPtr;
|
||||
TaskBDIdxTable[TaskNum].apiConfig = ApiConfig;
|
||||
TaskBDIdxTable[TaskNum].BDStartPtr = StartPtr;
|
||||
|
||||
*StartPtr = *BasePtr = (uint32)((uint32)TaskBDIdxTable[TaskNum].BDTablePtr
|
||||
+ MBarPhysOffsetGlobal);
|
||||
}
|
||||
|
||||
TaskBDIdxTable[TaskNum].currBDInUse = 0;
|
||||
TaskBDIdxTable[TaskNum].numBD = (uint16)NumBD;
|
||||
switch (NumPtr) {
|
||||
case 1:
|
||||
*LastPtr = (uint32)(*BasePtr + sizeof(TaskBD1_t) * (NumBD - 1));
|
||||
break;
|
||||
case 2:
|
||||
*LastPtr = (uint32)(*BasePtr + sizeof(TaskBD2_t) * (NumBD - 1));
|
||||
break;
|
||||
default:
|
||||
/* error */
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the status bits. Clear the data pointers.
|
||||
*/
|
||||
if (MaxBD > 0) {
|
||||
ptr = TaskBDIdxTable[TaskNum].BDTablePtr;
|
||||
for (i = 0; i < NumBD; i++) {
|
||||
*(ptr++) = Status;
|
||||
for (j = 0; j < NumPtr; j++) {
|
||||
*(ptr++) = 0x0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Generated by GUI, one per configured tasks.
|
||||
*/
|
||||
|
||||
#define TASK_BASE TASK_CRC16_DP_0
|
||||
#define TASK_API TASK_CRC16_DP_0_api_t
|
||||
#define TASKSETUP_NAME TaskSetup_TASK_CRC16_DP_0
|
||||
|
||||
/* Pragma settings */
|
||||
#define PRECISE_INC 0
|
||||
#define NO_ERROR_RST 0
|
||||
#define PACK_DATA 0
|
||||
#define INTEGER_MODE 0
|
||||
#define SPEC_READS 1
|
||||
#define WRITE_LINE_BUFFER 1
|
||||
#define READ_LINE_BUFFER 1
|
||||
|
||||
#define MISALIGNED 1
|
||||
|
||||
#define INITIATOR_DATA -1
|
||||
|
||||
#define AUTO_START -2
|
||||
#define ITERATIONS 1
|
||||
|
||||
#define MAX_BD 0
|
||||
#define BD_FLAG 0
|
||||
|
||||
#define INCR_TYPE_SRC 1
|
||||
#define INCR_SRC 0
|
||||
#define TYPE_SRC FLEX_T
|
||||
|
||||
#define INCR_TYPE_DST 1
|
||||
#define INCR_DST 0
|
||||
#define TYPE_DST FLEX_T
|
||||
|
||||
#include <bsp/bestcomm/task_api/tasksetup_general.h>
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Generated by GUI, one per configured tasks.
|
||||
*/
|
||||
|
||||
#define TASK_BASE TASK_CRC16_DP_1
|
||||
#define TASK_API TASK_CRC16_DP_1_api_t
|
||||
#define TASKSETUP_NAME TaskSetup_TASK_CRC16_DP_1
|
||||
|
||||
/* Pragma settings */
|
||||
#define PRECISE_INC 0
|
||||
#define NO_ERROR_RST 0
|
||||
#define PACK_DATA 0
|
||||
#define INTEGER_MODE 0
|
||||
#define SPEC_READS 1
|
||||
#define WRITE_LINE_BUFFER 1
|
||||
#define READ_LINE_BUFFER 1
|
||||
|
||||
#define MISALIGNED 1
|
||||
|
||||
#define INITIATOR_DATA -1
|
||||
|
||||
#define AUTO_START -2
|
||||
#define ITERATIONS 1
|
||||
|
||||
#define MAX_BD 0
|
||||
#define BD_FLAG 0
|
||||
|
||||
#define INCR_TYPE_SRC 1
|
||||
#define INCR_SRC 0
|
||||
#define TYPE_SRC FLEX_T
|
||||
|
||||
#define INCR_TYPE_DST 1
|
||||
#define INCR_DST 0
|
||||
#define TYPE_DST FLEX_T
|
||||
|
||||
#include <bsp/bestcomm/task_api/tasksetup_general.h>
|
||||
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Generated by GUI, one per configured tasks.
|
||||
*/
|
||||
|
||||
#define TASK_BASE TASK_FEC_RX
|
||||
#define TASK_API TASK_FEC_RX_api_t
|
||||
#define TASKSETUP_NAME TaskSetup_TASK_FEC_RX
|
||||
|
||||
/* Pragma settings */
|
||||
#define PRECISE_INC 0
|
||||
#define NO_ERROR_RST 0
|
||||
#define PACK_DATA 0
|
||||
#define INTEGER_MODE 0
|
||||
#define SPEC_READS 1
|
||||
#define WRITE_LINE_BUFFER 1
|
||||
#define READ_LINE_BUFFER 1
|
||||
|
||||
#define MISALIGNED 0
|
||||
#define MISALIGNED_START 1
|
||||
|
||||
#define INITIATOR_DATA INITIATOR_FEC_RX
|
||||
|
||||
#define AUTO_START -1
|
||||
#define ITERATIONS -1
|
||||
|
||||
#define MAX_BD 256
|
||||
#define BD_FLAG 0
|
||||
|
||||
#define INCR_TYPE_SRC 0
|
||||
#define INCR_SRC 0
|
||||
#define TYPE_SRC FLEX_T
|
||||
|
||||
#define INCR_TYPE_DST 1
|
||||
#define INCR_DST 0
|
||||
#define TYPE_DST FLEX_T
|
||||
|
||||
#include <bsp/bestcomm/task_api/tasksetup_general.h>
|
||||
@@ -1,38 +0,0 @@
|
||||
|
||||
/*
|
||||
* Generated by GUI, one per configured tasks.
|
||||
*/
|
||||
|
||||
#define TASK_BASE TASK_FEC_TX
|
||||
#define TASK_API TASK_FEC_TX_api_t
|
||||
#define TASKSETUP_NAME TaskSetup_TASK_FEC_TX
|
||||
|
||||
/* Pragma settings */
|
||||
#define PRECISE_INC 0
|
||||
#define NO_ERROR_RST 0
|
||||
#define PACK_DATA 0
|
||||
#define INTEGER_MODE 0
|
||||
#define SPEC_READS 1
|
||||
#define WRITE_LINE_BUFFER 1
|
||||
#define READ_LINE_BUFFER 1
|
||||
|
||||
#define MISALIGNED 1
|
||||
#define MISALIGNED_START 1
|
||||
|
||||
#define INITIATOR_DATA INITIATOR_FEC_TX
|
||||
|
||||
#define AUTO_START -1
|
||||
#define ITERATIONS -1
|
||||
|
||||
#define MAX_BD 256
|
||||
#define BD_FLAG 1
|
||||
|
||||
#define INCR_TYPE_SRC 1
|
||||
#define INCR_SRC 0
|
||||
#define TYPE_SRC FLEX_T
|
||||
|
||||
#define INCR_TYPE_DST 0
|
||||
#define INCR_DST 0
|
||||
#define TYPE_DST FLEX_T
|
||||
|
||||
#include <bsp/bestcomm/task_api/tasksetup_general.h>
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Generated by GUI, one per configured tasks.
|
||||
*/
|
||||
|
||||
#define TASK_BASE TASK_GEN_DP_0
|
||||
#define TASK_API TASK_GEN_DP_0_api_t
|
||||
#define TASKSETUP_NAME TaskSetup_TASK_GEN_DP_0
|
||||
|
||||
/* Pragma settings */
|
||||
#define PRECISE_INC 0
|
||||
#define NO_ERROR_RST 0
|
||||
#define PACK_DATA 0
|
||||
#define INTEGER_MODE 0
|
||||
#define SPEC_READS 1
|
||||
#define WRITE_LINE_BUFFER 1
|
||||
#define READ_LINE_BUFFER 1
|
||||
|
||||
#define MISALIGNED 1
|
||||
|
||||
#define INITIATOR_DATA -1
|
||||
|
||||
#define AUTO_START -2
|
||||
#define ITERATIONS 1
|
||||
|
||||
#define MAX_BD 0
|
||||
#define BD_FLAG 0
|
||||
|
||||
#define INCR_TYPE_SRC 1
|
||||
#define INCR_SRC 0
|
||||
#define TYPE_SRC FLEX_T
|
||||
|
||||
#define INCR_TYPE_DST 1
|
||||
#define INCR_DST 0
|
||||
#define TYPE_DST FLEX_T
|
||||
|
||||
#include <bsp/bestcomm/task_api/tasksetup_general.h>
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Generated by GUI, one per configured tasks.
|
||||
*/
|
||||
|
||||
#define TASK_BASE TASK_GEN_DP_1
|
||||
#define TASK_API TASK_GEN_DP_1_api_t
|
||||
#define TASKSETUP_NAME TaskSetup_TASK_GEN_DP_1
|
||||
|
||||
/* Pragma settings */
|
||||
#define PRECISE_INC 0
|
||||
#define NO_ERROR_RST 0
|
||||
#define PACK_DATA 0
|
||||
#define INTEGER_MODE 0
|
||||
#define SPEC_READS 1
|
||||
#define WRITE_LINE_BUFFER 1
|
||||
#define READ_LINE_BUFFER 1
|
||||
|
||||
#define MISALIGNED 1
|
||||
|
||||
#define INITIATOR_DATA -1
|
||||
|
||||
#define AUTO_START -2
|
||||
#define ITERATIONS 1
|
||||
|
||||
#define MAX_BD 0
|
||||
#define BD_FLAG 0
|
||||
|
||||
#define INCR_TYPE_SRC 1
|
||||
#define INCR_SRC 0
|
||||
#define TYPE_SRC FLEX_T
|
||||
|
||||
#define INCR_TYPE_DST 1
|
||||
#define INCR_DST 0
|
||||
#define TYPE_DST FLEX_T
|
||||
|
||||
#include <bsp/bestcomm/task_api/tasksetup_general.h>
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Generated by GUI, one per configured tasks.
|
||||
*/
|
||||
|
||||
#define TASK_BASE TASK_GEN_DP_2
|
||||
#define TASK_API TASK_GEN_DP_2_api_t
|
||||
#define TASKSETUP_NAME TaskSetup_TASK_GEN_DP_2
|
||||
|
||||
/* Pragma settings */
|
||||
#define PRECISE_INC 0
|
||||
#define NO_ERROR_RST 0
|
||||
#define PACK_DATA 0
|
||||
#define INTEGER_MODE 0
|
||||
#define SPEC_READS 1
|
||||
#define WRITE_LINE_BUFFER 1
|
||||
#define READ_LINE_BUFFER 1
|
||||
|
||||
#define MISALIGNED 1
|
||||
|
||||
#define INITIATOR_DATA -1
|
||||
|
||||
#define AUTO_START -2
|
||||
#define ITERATIONS 1
|
||||
|
||||
#define MAX_BD 0
|
||||
#define BD_FLAG 0
|
||||
|
||||
#define INCR_TYPE_SRC 1
|
||||
#define INCR_SRC 0
|
||||
#define TYPE_SRC FLEX_T
|
||||
|
||||
#define INCR_TYPE_DST 1
|
||||
#define INCR_DST 0
|
||||
#define TYPE_DST FLEX_T
|
||||
|
||||
#include <bsp/bestcomm/task_api/tasksetup_general.h>
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Generated by GUI, one per configured tasks.
|
||||
*/
|
||||
|
||||
#define TASK_BASE TASK_GEN_DP_3
|
||||
#define TASK_API TASK_GEN_DP_3_api_t
|
||||
#define TASKSETUP_NAME TaskSetup_TASK_GEN_DP_3
|
||||
|
||||
/* Pragma settings */
|
||||
#define PRECISE_INC 0
|
||||
#define NO_ERROR_RST 0
|
||||
#define PACK_DATA 0
|
||||
#define INTEGER_MODE 0
|
||||
#define SPEC_READS 1
|
||||
#define WRITE_LINE_BUFFER 1
|
||||
#define READ_LINE_BUFFER 1
|
||||
|
||||
#define MISALIGNED 1
|
||||
|
||||
#define INITIATOR_DATA -1
|
||||
|
||||
#define AUTO_START -2
|
||||
#define ITERATIONS 1
|
||||
|
||||
#define MAX_BD 0
|
||||
#define BD_FLAG 0
|
||||
|
||||
#define INCR_TYPE_SRC 1
|
||||
#define INCR_SRC 0
|
||||
#define TYPE_SRC FLEX_T
|
||||
|
||||
#define INCR_TYPE_DST 1
|
||||
#define INCR_DST 0
|
||||
#define TYPE_DST FLEX_T
|
||||
|
||||
#include <bsp/bestcomm/task_api/tasksetup_general.h>
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Generated by GUI, one per configured tasks.
|
||||
*/
|
||||
|
||||
#define TASK_BASE TASK_GEN_DP_BD_0
|
||||
#define TASK_API TASK_GEN_DP_BD_0_api_t
|
||||
#define TASKSETUP_NAME TaskSetup_TASK_GEN_DP_BD_0
|
||||
|
||||
/* Pragma settings */
|
||||
#define PRECISE_INC 0
|
||||
#define NO_ERROR_RST 0
|
||||
#define PACK_DATA 0
|
||||
#define INTEGER_MODE 0
|
||||
#define SPEC_READS 1
|
||||
#define WRITE_LINE_BUFFER 1
|
||||
#define READ_LINE_BUFFER 1
|
||||
|
||||
#define MISALIGNED 0
|
||||
|
||||
#define INITIATOR_DATA -1
|
||||
|
||||
#define AUTO_START -1
|
||||
#define ITERATIONS -1
|
||||
|
||||
#define MAX_BD 128
|
||||
#define BD_FLAG 0
|
||||
|
||||
#define INCR_TYPE_SRC 1
|
||||
#define INCR_SRC 0
|
||||
#define TYPE_SRC FLEX_T
|
||||
|
||||
#define INCR_TYPE_DST 1
|
||||
#define INCR_DST 0
|
||||
#define TYPE_DST FLEX_T
|
||||
|
||||
#include <bsp/bestcomm/task_api/tasksetup_general.h>
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Generated by GUI, one per configured tasks.
|
||||
*/
|
||||
|
||||
#define TASK_BASE TASK_GEN_DP_BD_1
|
||||
#define TASK_API TASK_GEN_DP_BD_1_api_t
|
||||
#define TASKSETUP_NAME TaskSetup_TASK_GEN_DP_BD_1
|
||||
|
||||
/* Pragma settings */
|
||||
#define PRECISE_INC 0
|
||||
#define NO_ERROR_RST 0
|
||||
#define PACK_DATA 0
|
||||
#define INTEGER_MODE 0
|
||||
#define SPEC_READS 1
|
||||
#define WRITE_LINE_BUFFER 1
|
||||
#define READ_LINE_BUFFER 1
|
||||
|
||||
#define MISALIGNED 0
|
||||
|
||||
#define INITIATOR_DATA -1
|
||||
|
||||
#define AUTO_START -1
|
||||
#define ITERATIONS -1
|
||||
|
||||
#define MAX_BD 32
|
||||
#define BD_FLAG 0
|
||||
|
||||
#define INCR_TYPE_SRC 1
|
||||
#define INCR_SRC 0
|
||||
#define TYPE_SRC FLEX_T
|
||||
|
||||
#define INCR_TYPE_DST 1
|
||||
#define INCR_DST 0
|
||||
#define TYPE_DST FLEX_T
|
||||
|
||||
#include <bsp/bestcomm/task_api/tasksetup_general.h>
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Generated by GUI, one per configured tasks.
|
||||
*/
|
||||
|
||||
#define TASK_BASE TASK_GEN_RX_BD
|
||||
#define TASK_API TASK_GEN_RX_BD_api_t
|
||||
#define TASKSETUP_NAME TaskSetup_TASK_GEN_RX_BD
|
||||
|
||||
/* Pragma settings */
|
||||
#define PRECISE_INC 0
|
||||
#define NO_ERROR_RST 0
|
||||
#define PACK_DATA 0
|
||||
#define INTEGER_MODE 0
|
||||
#define SPEC_READS 1
|
||||
#define WRITE_LINE_BUFFER 1
|
||||
#define READ_LINE_BUFFER 1
|
||||
|
||||
#define MISALIGNED 0
|
||||
|
||||
#define INITIATOR_DATA -1
|
||||
|
||||
#define AUTO_START -1
|
||||
#define ITERATIONS -1
|
||||
|
||||
#define MAX_BD 64
|
||||
#define BD_FLAG 0
|
||||
|
||||
#define INCR_TYPE_SRC 0
|
||||
#define INCR_SRC 0
|
||||
#define TYPE_SRC FLEX_T
|
||||
|
||||
#define INCR_TYPE_DST 1
|
||||
#define INCR_DST 0
|
||||
#define TYPE_DST FLEX_T
|
||||
|
||||
#include <bsp/bestcomm/task_api/tasksetup_general.h>
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Generated by GUI, one per configured tasks.
|
||||
*/
|
||||
|
||||
#define TASK_BASE TASK_GEN_TX_BD
|
||||
#define TASK_API TASK_GEN_TX_BD_api_t
|
||||
#define TASKSETUP_NAME TaskSetup_TASK_GEN_TX_BD
|
||||
|
||||
/* Pragma settings */
|
||||
#define PRECISE_INC 0
|
||||
#define NO_ERROR_RST 0
|
||||
#define PACK_DATA 0
|
||||
#define INTEGER_MODE 0
|
||||
#define SPEC_READS 1
|
||||
#define WRITE_LINE_BUFFER 1
|
||||
#define READ_LINE_BUFFER 1
|
||||
|
||||
#define MISALIGNED 1
|
||||
|
||||
#define INITIATOR_DATA -1
|
||||
|
||||
#define AUTO_START -1
|
||||
#define ITERATIONS -1
|
||||
|
||||
#define MAX_BD 64
|
||||
#define BD_FLAG 0
|
||||
|
||||
#define INCR_TYPE_SRC 1
|
||||
#define INCR_SRC 0
|
||||
#define TYPE_SRC FLEX_T
|
||||
|
||||
#define INCR_TYPE_DST 0
|
||||
#define INCR_DST 0
|
||||
#define TYPE_DST FLEX_T
|
||||
|
||||
#include <bsp/bestcomm/task_api/tasksetup_general.h>
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Generated by GUI, one per configured tasks.
|
||||
*/
|
||||
|
||||
#define TASK_BASE TASK_LPC
|
||||
#define TASK_API TASK_LPC_api_t
|
||||
#define TASKSETUP_NAME TaskSetup_TASK_LPC
|
||||
|
||||
/* Pragma settings */
|
||||
#define PRECISE_INC 0
|
||||
#define NO_ERROR_RST 0
|
||||
#define PACK_DATA 0
|
||||
#define INTEGER_MODE 0
|
||||
#define SPEC_READS 1
|
||||
#define WRITE_LINE_BUFFER 1
|
||||
#define READ_LINE_BUFFER 1
|
||||
|
||||
#define MISALIGNED 1
|
||||
|
||||
#define INITIATOR_DATA -1
|
||||
|
||||
#define AUTO_START -2
|
||||
#define ITERATIONS 1
|
||||
|
||||
#define MAX_BD 0
|
||||
#define BD_FLAG 0
|
||||
|
||||
#define INCR_TYPE_SRC 1
|
||||
#define INCR_SRC 0
|
||||
#define TYPE_SRC FLEX_T
|
||||
|
||||
#define INCR_TYPE_DST 1
|
||||
#define INCR_DST 0
|
||||
#define TYPE_DST FLEX_T
|
||||
|
||||
#include <bsp/bestcomm/task_api/tasksetup_general.h>
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Generated by GUI, one per configured tasks.
|
||||
*/
|
||||
|
||||
#define TASK_BASE TASK_PCI_RX
|
||||
#define TASK_API TASK_PCI_RX_api_t
|
||||
#define TASKSETUP_NAME TaskSetup_TASK_PCI_RX
|
||||
|
||||
/* Pragma settings */
|
||||
#define PRECISE_INC 0
|
||||
#define NO_ERROR_RST 0
|
||||
#define PACK_DATA 0
|
||||
#define INTEGER_MODE 1
|
||||
#define SPEC_READS 1
|
||||
#define WRITE_LINE_BUFFER 1
|
||||
#define READ_LINE_BUFFER 1
|
||||
|
||||
#define MISALIGNED 0
|
||||
|
||||
#define INITIATOR_DATA INITIATOR_SCPCI_RX
|
||||
|
||||
#define AUTO_START -2
|
||||
#define ITERATIONS 0
|
||||
|
||||
#define MAX_BD 0
|
||||
#define BD_FLAG 0
|
||||
|
||||
#define INCR_TYPE_SRC 0
|
||||
#define INCR_SRC 0
|
||||
#define TYPE_SRC FLEX_T
|
||||
|
||||
#define INCR_TYPE_DST 1
|
||||
#define INCR_DST 0
|
||||
#define TYPE_DST FLEX_T
|
||||
|
||||
#include <bsp/bestcomm/task_api/tasksetup_general.h>
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Generated by GUI, one per configured tasks.
|
||||
*/
|
||||
|
||||
#define TASK_BASE TASK_PCI_TX
|
||||
#define TASK_API TASK_PCI_TX_api_t
|
||||
#define TASKSETUP_NAME TaskSetup_TASK_PCI_TX
|
||||
|
||||
/* Pragma settings */
|
||||
#define PRECISE_INC 0
|
||||
#define NO_ERROR_RST 0
|
||||
#define PACK_DATA 0
|
||||
#define INTEGER_MODE 1
|
||||
#define SPEC_READS 1
|
||||
#define WRITE_LINE_BUFFER 1
|
||||
#define READ_LINE_BUFFER 1
|
||||
|
||||
#define MISALIGNED 0
|
||||
|
||||
#define INITIATOR_DATA INITIATOR_SCPCI_TX
|
||||
|
||||
#define AUTO_START -2
|
||||
#define ITERATIONS 0
|
||||
|
||||
#define MAX_BD 0
|
||||
#define BD_FLAG 0
|
||||
|
||||
#define INCR_TYPE_SRC 1
|
||||
#define INCR_SRC 0
|
||||
#define TYPE_SRC FLEX_T
|
||||
|
||||
#define INCR_TYPE_DST 0
|
||||
#define INCR_DST 0
|
||||
#define TYPE_DST FLEX_T
|
||||
|
||||
#include <bsp/bestcomm/task_api/tasksetup_general.h>
|
||||
Reference in New Issue
Block a user