GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> CTDB / V5-5-5 > vsbc_bc_pmc1553 / mv2304


Interface   Data Structures   File List   Data Fields   Globals  

VSBC_bc_private.h File Reference

Private definitions for Summit 1553 bus controller device driver. More...

#include <vxWorks.h>
#include <CTDB/VSBC_bc.h>
#include <PBS/FORK.h>
#include <PBS/FPA.h>
#include <PBS/WUT.h>
#include <PBS/RW.h>
#include <MSG/MSG_pubdefs.h>
#include <SUMT_private.h>

Classes

struct  _VSBC_BC

Defines

#define VSBC_BC_LOG_SIZE   64
#define VSBC_BC_N_INTR   16
#define VSBC_BC_FRAME_PERIOD   40000000

Typedefs

typedef enum _VSBC_BC_Event VSBC_BC_Event

Enumerations

enum  _VSBC_BC_Event {
  VSBC_BC_EVENT_INIT,
  VSBC_BC_EVENT_FRAME,
  VSBC_BC_EVENT_EXIT,
  VSBC_BC_EVENT_BUS_A,
  VSBC_BC_EVENT_BUS_B
}

Functions

void VSBC_bcIntr (VSBC_BC *bc)
 Interrupt handler for driver.
void VSBC_bcMsg (VSBC_BC *bc)
 Processes a 1553 data message event.
WUT_cb_status VSBC_bcFrame (VSBC_BC *bc, WUT_tmr *timer)
 Start a new bus frame.
void VSBC_bcSwitchPost (VSBC_BC *bc, const VSBC_BC_Event event)
 Post primary bus switch operation.


Detailed Description

Private definitions for Summit 1553 bus controller device driver.

Author:
D.L. Wood

Define Documentation

#define VSBC_BC_FRAME_PERIOD   40000000

The period in nanoseconds of the bus controller frame timer.

Referenced by VSBC_bcFrame(), and VSBC_bcStart().

#define VSBC_BC_LOG_SIZE   64

The size in bytes of the Summit BC event log.

Referenced by VSBC_bcInit().

#define VSBC_BC_N_INTR   16

The maximum number of interrupt event messages stored in the service queue.

Referenced by VSBC_bcInit().


Typedef Documentation

The typedef for _VSBC_BC_Event.


Enumeration Type Documentation

Codes indicating the work the RT service task needs to do.

Enumerator:
VSBC_BC_EVENT_INIT  Initialization request for service task.
VSBC_BC_EVENT_FRAME  Last bus frame complete.
VSBC_BC_EVENT_EXIT  The user is requesting shutdown.
VSBC_BC_EVENT_BUS_A  Request to make bus A primary.
VSBC_BC_EVENT_BUS_B  Request to make bus B primary.


Function Documentation

WUT_cb_status VSBC_bcFrame ( VSBC_BC bc,
WUT_tmr *  timer 
)

Start a new bus frame.

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

Parameters:
bc A device descriptor.
timer The WUT handle for the frame timer.
Returns:
WUT_K_STATE_CHANGE_YES.

References _VSBC_BC::base_addr, _VSBC_BC::frame_cmd_blk, _VSBC_BC::frame_count, SUMT_addrLocalToChip(), SUMT_REG_CONTROL, SUMT_REG_SRT_DP, _VSBC_BC::sumt_regs, SUMT_STEX, SUMT_WORD_READ, SUMT_WORD_WRITE, VSBC_BC_FRAME_PERIOD, and VSBC_BC_NUM_BUS_FRAME.

Referenced by VSBC_bcStart().

void VSBC_bcIntr ( VSBC_BC bc  ) 

Interrupt handler for driver.

Handles Summit bus controller device interrupts. A descriptor is allocated from the interrupt pool. The internal status register as well as the contents of the event log in shared memory are saved to the interrupt descriptor. The descriptor is placed on a queue to be handled by VSBC_bcTask() at a later time.

Parameters:
bc A device descriptor.

References SUMT_DMAF, SUMT_EOL, SUMT_ILLCMD, SUMT_ILLOP, SUMT_MERR, SUMT_REG_COMMAND, SUMT_REG_IRQ_MASK, SUMT_REG_IRQ_PEND, SUMT_REG_STATUS, _VSBC_BC::sumt_regs, SUMT_WORD_READ, SUMT_WRAPF, _VSBC_BC::task_queue, VSBC_BC_EVENT_FRAME, and VSBC_bcBoardIntrAck().

Referenced by VSBC_bcBoardIntrConnect(), and VSBC_bcBoardIntrDisconnect().

void VSBC_bcMsg ( VSBC_BC bc  ) 

void VSBC_bcSwitchPost ( VSBC_BC bc,
const VSBC_BC_Event  event 
)

Post primary bus switch operation.

Marks that a bus switch operation has been requested. The actual changeover will occur on the next call to VSBC_bcMsg().

Parameters:
bc A device descriptor.
event VSBC_BC_EVENT_BUS_A or VSBC_BC_EVENT_BUS_B.

References _VSBC_BC::bus_side, _VSBC_BC::bus_switch, VSBC_BC_BUS_SIDE_B, and VSBC_BC_EVENT_BUS_A.

Referenced by VSBC_bcTask().


Generated on Tue Sep 27 14:35:37 2011 by  doxygen 1.5.8