Пример #1
0
static void updateLED(void)
{
	if (!cpldSupported) return;
	if (isChipDiceJR())
	{
		pTargetCpld[CPLD_LED_REG] = ledMsk;
	}
	else
	{
		targetWriteCPLDSPIWord (CPLD_SPI_WR_CMD(CPLD_LED_REG,ledMsk));
	}
}
Пример #2
0
HRESULT	myModesDump(void)
{
  uint32 i;
  
  cliPrintf("Dump MODES\n");
  for (i=0; i<MYMODES_NBMODES; i++)
  {
    cliPrintf("%-3i %c %s\n",i,(curMode==i)?'*':' ',modeDesc[isChipDiceJR()?1:0][i]->modeName);
  }
  cliPrintf("\n");
  return NO_ERROR;
}
Пример #3
0
extern uint8 targetGetSw (void)
{
	if (!cpldSupported) return initialSwitchSetting;
	
	if (isChipDiceJR())
	{
		return pTargetCpld[CPLD_SW_REG] & 0x0f;
	}
	else
	{
		return (uint8)targetReadCPLDSPIWord (CPLD_SPI_RD_CMD(CPLD_SW_REG,0)) & 0x0f;
	}
}
Пример #4
0
MODE_CFG * myModesInitialize (uint32 mode, uint32 ac3bits)
{
	//try to read the structure from EEPROM
	curMode = mode;
	if (curMode >=	MYMODES_NBMODES)
	  curMode = 0;

  curMode = 3;	// *** only one mode implemented so far for AVC

  modeDesc[isChipDiceJR()?1:0][curMode]->fInit(ac3bits);
  
  sysDebugPrintf("***************************************\n");
  sysDebugPrintf("* myMode board configuration          *\n");
  sysDebugPrintf("* Board is hard coded to mode: %-3i    *\n",curMode);
  sysDebugPrintf("* Name: %-28s  *\n",modeDesc[isChipDiceJR()?1:0][curMode]->modeName);
#ifdef _DICE_DRIVER
  sysDebugPrintf("* Use: dicedriver.dump                *\n");
#elif defined _AVC
  sysDebugPrintf("* Use: avcdriver.dump                 *\n");
#endif
  sysDebugPrintf("***************************************\n");
  return modeDesc[isChipDiceJR()?1:0][curMode];
}
Пример #5
0
void targetSpiInit(void) 
{

	spiGetSlaveDevice(&cpldSSId);
	spiGetSlaveDevice(&codecSSId);

	spiConfigure(codecSSId, SPI_SET_SS_ROUTINE, spi_slave_select);
	spiConfigure(codecSSId, SPI_COMPLETE_CB, spi_slave_complete_sb);
	spiConfigure(codecSSId, SPI_RATE, (void *)SPI_SPEED);
	spiConfigure(codecSSId, SPI_WSIZE, (void *)SPI_WSIZE_16);
	spiConfigure(cpldSSId, SPI_COMPLETE_CB, spi_slave_complete_sb);
	spiConfigure(cpldSSId, SPI_RATE, (void *)SPI_SPEED);
	spiConfigure(cpldSSId, SPI_WSIZE, (void *)SPI_WSIZE_16);	
	
	TCSemaphoreOpen (&codecSem,0);
	TCSemaphoreOpen (&cpldSem,0);
	//at init time, let's talk to CPLD and initialize
	//read the CPLD version
	spiOpBlockNoTask(cpldSSId, CPLD_SPI_RD_CMD(CPLD_VER_REG,0), &cpldVer);
	if (cpldVer>=255) cpldVer = 0;
	cpldSupported = ((cpldVer >= 12) && (cpldVer < 128));
	
	if (cpldSupported) 
	{
		if (isChipDiceJR())
			spiOpBlockNoTask(cpldSSId, CPLD_SPI_WR_CMD(CPLD_CTRL_REG,CPLD_CTRL_PAR_EN | 
																	CPLD_CTRL_CODEC_EN | 
																	CPLD_CTRL_SPI1_EN | 
																	CPLD_CTRL_SPI2_EN | 
																	CPLD_CTRL_USER_EN), NULL);
		else
			spiOpBlockNoTask(cpldSSId, CPLD_SPI_WR_CMD(CPLD_CTRL_REG,CPLD_CTRL_CODEC_EN | 
																	CPLD_CTRL_SPI1_EN | 
																	CPLD_CTRL_SPI2_EN | 
																	CPLD_CTRL_USER_EN), NULL);	
 		//read the switches
		spiOpBlockNoTask(cpldSSId, CPLD_SPI_RD_CMD(CPLD_SW_REG,0), &initialSwitchSetting);
	}
	else
		initialSwitchSetting = 0x0; //mode 0, not Meter mode
	
}	
Пример #6
0
//	SplashCB
static HRESULT SplashCB(void)
{
	HRESULT	hResult = NO_ERROR;
	
	cliPrintf("* Running Dice JR/Mini 1394 Appl                         *\n");
	if (isChipDiceJR())
	{	
		cliPrintf("*    Chip Detected :  DICE JR (TCD2220)                  *\n");
	} 
	else
	{
		cliPrintf("*    Chip Detected :  DICE Mini (TCD2210)                *\n");
	}
	cliPrintf("* Board S/N: %08d                                    *\n", serialNo);
	cliPrintf("*  Built with SDK Version: %02d.%02d.%02d, build %04d          *\n", 
			  kTCAT_DICE_VERSION_MAJOR, 
			  kTCAT_DICE_VERSION_MINOR,  
			  kTCAT_DICE_VERSION_SUB,
			  kTCAT_DICE_VERSION_BUILD);

#ifdef _USE_OLD_VERSION_INFO
	cliPrintf("*  Firmware Application Version: %02d.%02d                     *\n", 
			  diceApp_vendor_major_rev(), 
			  diceApp_vendor_minor_rev());
#else
	cliPrintf("*  Firmware Application Version: %02d.%02d.%02d, build %04d    *\n", 
			  diceApp_vendor_major_rev(), 
			  diceApp_vendor_minor_rev(),  
			  diceApp_vendor_sub_rev(),
			  diceApp_vendor_build_rev());
#endif

	cliPrintf(diceApp_build_time());
	cliPrintf("*    MIDI is ");
#ifdef USE_UART1_FOR_MIDI
	{
		cliPrintf("enabled.");
	}
#else
	{
		cliPrintf("disabled.");
	}
#endif
	cliPrintf("                                    *\n");
	cliPrintf("**********************************************************\n");
	cliPrintf("* Target: DICE EVM002 Evaluation Board                   *\n");

#ifdef _MLAN
#ifdef _OPEN_MLAN 
	cliPrintf("* Driver: Generic Transporter mLAN                       *\n");
#else // _OPEN_MLAN 
	cliPrintf("* Driver: mLAN                                           *\n");
#endif
#elif defined _DICE_DRIVER
	cliPrintf("* Driver: DiceDriver                                     *\n");
#elif defined _AVC
	cliPrintf("* Driver: AV/C                                           *\n");
#else
    cliPrintf("* Driver: No Driver                                      *\n");
#endif
#ifdef _SPECIAL_PARTITION_MEMORY 
    cliPrintf("* AVS special memory partitions                          *\n");
#endif
#ifdef _EAP
	cliPrintf("* EAP is supported.                                      *\n");
#endif
	uint8 cpldVer;
	BOOL cpldSupported;
	targetGetCPLDInfo (&cpldVer, &cpldSupported);
	cliPrintf("*                                                        *\n");
	cliPrintf("* CPLD: (the CPLD handles Switch and LED's)              *\n");
	cliPrintf("*   Ver: %01X.%01X %-44s*\n",(uint32)(cpldVer>>4)&0xf,cpldVer&0xf,cpldSupported?"Full LED/SW Support":"PLEASE UPDATE CPLD TO VER 1  OR HIGHER");
	cliPrintf("**********************************************************\n");
	return hResult;
}
Пример #7
0
//	SplashCB
static HRESULT SplashCB(void)
{
	HRESULT	hResult = NO_ERROR;
	
	cliPrintf("* Running Dice JR/Mini 1394 EAP Appl                     *\n");
	cliPrintf("*   Extended Application Protocol support for control    *\n");
	cliPrintf("*   of mixer, peak and routing from Host                 *\n");
	cliPrintf("*                                                        *\n");

	if (isChipDiceJR())
	{	
		cliPrintf("*    Chip Detected :  DICE JR (TCD2220)                  *\n");
	} 
	else
	{
		cliPrintf("*    Chip Detected :  DICE Mini (TCD2210)                *\n");
	}
	cliPrintf("* Board S/N: %08d                                    *\n", serialNo);
	cliPrintf("*  Built with SDK Version: %02d.%02d.%02d, build %04d          *\n", 
			  kTCAT_DICE_VERSION_MAJOR, 
			  kTCAT_DICE_VERSION_MINOR,  
			  kTCAT_DICE_VERSION_SUB,
			  kTCAT_DICE_VERSION_BUILD);

#ifdef _USE_OLD_VERSION_INFO
	cliPrintf("*  Firmware Application Version: %02d.%02d                     *\n", 
			  diceApp_vendor_major_rev(), 
			  diceApp_vendor_minor_rev());
#else
	cliPrintf("*  Firmware Application Version: %02d.%02d.%02d, build %04d    *\n", 
			  diceApp_vendor_major_rev(), 
			  diceApp_vendor_minor_rev(),  
			  diceApp_vendor_sub_rev(),
			  diceApp_vendor_build_rev());
#endif

	cliPrintf(diceApp_build_time());
	cliPrintf("*    MIDI is ");
#ifdef USE_UART1_FOR_MIDI
	{
		cliPrintf("enabled.");
	}
#else
	{
		cliPrintf("disabled.");
	}
#endif
	cliPrintf("                                    *\n");
	cliPrintf("**********************************************************\n");
	cliPrintf("* Target: EVM003                                         *\n");

#ifdef _MLAN
#ifdef _OPEN_MLAN 
	cliPrintf("* Driver: Generic Transporter mLAN                       *\n");
#else // _OPEN_MLAN 
	cliPrintf("* Driver: mLAN                                           *\n");
#endif
#elif defined _DICE_DRIVER
	cliPrintf("* Driver: DiceDriver                                     *\n");
#elif defined _AVC
	cliPrintf("* Driver: AV/C                                           *\n");
#else
    cliPrintf("* Driver: No Driver                                      *\n");
#endif
#ifdef _SPECIAL_PARTITION_MEMORY 
    cliPrintf("* AVS special memory partitions                          *\n");
#endif
#ifdef _EAP
	cliPrintf("* EAP is supported.                                      *\n");
#endif
	cliPrintf("*                                                        *\n");
	cliPrintf("**********************************************************\n");
	return hResult;
}