GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > CTDB / V5-2-2

Constituent: sumt_bc_sib     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

SUMT_bc_core.c File Reference

Primary Summit device interface functions. More...

#include "vxWorks.h"
#include "sysLib.h"
#include "CTDB/SUMT_bc.h"
#include "CTDB/CO1553_util.h"
#include "CTDB/CO1553_bc.h"
#include "PBS/LI.h"
#include "PBS/FPA.h"
#include "PBS/FORK.h"
#include "PBS/TASK.h"
#include "PBS/MBA.h"
#include "PBS/WUT.h"
#include "PBS/TOV.h"
#include "MSG/MSG_pubdefs.h"
#include "SUMT_private.h"
#include "SUMT_bc_private.h"
#include "SUMT_bc_board.h"

Include dependency graph for SUMT_bc_core.c:

Include dependency graph

Device Control Functions

unsigned int SUMT_bcSizeof (void)
 Get the size of a bus controller driver descriptor.

SUMT_BCSUMT_bcGet (void)
 Get a pointer to the bus controller driver static descriptor.

unsigned int SUMT_bcInit (SUMT_BC *bc, const SUMT_BC_Bus_Config *busConfig, const SUMT_BC_Pkt_Config *pktConfig, const SUMT_BC_Task_Config *taskConfig)
 Intialize a bus controller driver and 1553 device hardware.

unsigned int SUMT_bcExit (SUMT_BC *bc)
 Shutdown a bus controller driver and 1553 device hardware.

unsigned int SUMT_bcStart (SUMT_BC *bc)
 Start the bus controller processing 1553 bus commands.


Defines

#define MEM_ALLOC(_size)   MBA_alloc((_size))
#define MEM_FREE(_mem)   MBA_free((_mem))

Functions

unsigned int SUMT_bcConfigure (SUMT_BC *bc, const SUMT_BC_Bus_Config *busConfig)
int SUMT_bcTask (SUMT_BC *bc, FORK_msg_sys *msg)
void SUMT_bcTerminate (SUMT_BC *bc)
unsigned int SUMT_bcStop (SUMT_BC *bc)

Variables

SUMT_BC bcDesc
CO1553_BC_Telem telemDesc
CO1553_BC_Cmd_Rx cmdRxDesc
CO1553_BC_Cmd_Tx cmdTxDesc

Detailed Description

Primary Summit device interface functions.

Author:
D.L. Wood

Functions to handle initialization and control of the Summit bus cotroller.


Define Documentation

#define MEM_ALLOC _size   )     MBA_alloc((_size))
 

Helper macro to call user defined memory allocator.

Parameters:
_size The size in bytes of memory to allocate.
Returns:
A pointer to the memory, or NULL on error.

#define MEM_FREE _mem   )     MBA_free((_mem))
 

Helper macro to call user defined memory allocator.

Parameters:
_mem A pointer to the memory to free.


Function Documentation

unsigned int SUMT_bcConfigure SUMT_BC bc,
const SUMT_BC_Bus_Config config
[static]
 

Performs the work necessary to configure the BCRTM bus controller device. A BC command block structure list is layed out in the device shared memory with an end-of-list marker on the last command . Each bus command is given a data buffer large enough to hold one 1553 message. Shared memory space is also reserved for the BCRTM event interrupt log. Information about the bus command list in use is cached in the bc structure.

Parameters:
bc A device descriptor.
config A 1553 bus configuration structure.
Returns:
A CTDB MSG code.

Here is the call graph for this function:

unsigned int SUMT_bcExit SUMT_BC bc  ) 
 

Shutdown a bus controller driver and 1553 device hardware.

Stops the bus contoller from sending 1553 bus commands and releases system resources claimed by the driver. The bus contoller event service task will be deleted.

Parameters:
bc A device descriptor.
Returns:
A CTDB MSG code.

SUMT_BC * SUMT_bcGet void   ) 
 

Get a pointer to the bus controller driver static descriptor.

Returns a pointer to a static instance of the driver descriptor. This pointer may be passed in as the first paramter to all of the other driver functions. SUMT_bcInit() must be called before use.

Returns:
A pointer to the BC driver descriptor.

unsigned int SUMT_bcInit SUMT_BC bc,
const SUMT_BC_Bus_Config busConfig,
const SUMT_BC_Pkt_Config pktConfig,
const SUMT_BC_Task_Config taskConfig
 

Intialize a bus controller driver and 1553 device hardware.

Intializes the Summit bus controller device descriptor and device hardware. The device and associated software structures are configured according to the contents of the busConfig, boardConfig, pktConfig, and cbConfig structures.

Parameters:
bc An uninitialized device descriptor.
busConfig The configuration values for the 1553 bus schedule.
pktConfig The configuration values for the application packet interface.
taskConfig The configuration values for the BC service task.
Returns:
A CTDB MSG code.

Here is the call graph for this function:

unsigned int SUMT_bcSizeof void   ) 
 

Get the size of a bus controller driver descriptor.

Returns the size of a Summit bus controller driver descriptor. The user is responsible for allocating this memory before calling SUMT_bcInit().

This function is obsolete. Use SUMT_bcGet() to provide an instance of the simulator descriptor instead.

Returns:
The size in bytes of the device descriptor.

unsigned int SUMT_bcStart SUMT_BC bc  ) 
 

Start the bus controller processing 1553 bus commands.

Starts the bus controller processing bus commands to send to the remote terminal. A 40 millisecond second frame timer is also started, so that once the current list of bus commands is processed, the BCRTM device is restarted the next frame tick with a new command list.

Parameters:
bc A device descriptor.
Returns:
A CTDB MSG code.

Here is the call graph for this function:

unsigned int SUMT_bcStop SUMT_BC bc  ) 
 

Stops the bus controller from sending 1553 bus commands. In actuallity, the device is not stopped immediately, but simply will not be restarted for the next one second frame.

Parameters:
bc A device descriptor.
Returns:
A CTDB MSG code.

int SUMT_bcTask SUMT_BC bc,
FORK_msg_sys *  msg
[static]
 

The bus controller event service task. This task listens for new interrupt descriptor messages placed on a queue by SUMT_bcIntr(). The interrupt event information is parsed to determine the appropriate action. If the interrupt event is an error, then the user error callback is invoked. Otherwise, if the event is a data message transmit or receive, the SUMT_bcMsg() function is called to further process the event.

Parameters:
bc A device descriptor.
msg A pointer to the event message.
Returns:
FORK_C_CONTINUE

Here is the call graph for this function:

void SUMT_bcTerminate SUMT_BC bc  )  [static]
 

Stops the bus controller event service loop and returns all resources claimed by the driver.

Parameters:
bc A device descriptor.

Here is the call graph for this function:


Variable Documentation

bcDesc [static]
 

An instance of the driver descriptor; used for SUMT_bcGet().

cmdRxDesc [static]
 

An instance of the telecommand receive interface descriptor.

cmdTxDesc [static]
 

An instance of the telecommand transmit interface descriptor.

telemDesc [static]
 

An instance of the telemetry interface descriptor.


Generated on Thu May 5 21:56:07 2005 by doxygen 1.3.3