Start working on T3 ADC test

This commit is contained in:
meepingsnesroms
2019-09-17 10:11:35 -07:00
parent 7be8825f96
commit 6b351c67fd
5 changed files with 13 additions and 56 deletions

View File

@@ -987,3 +987,8 @@ var testArmAccess(void){
return makeVar(LENGTH_0, TYPE_NULL, 0);
}
var tsc2101ReadAllAnalogValues(void){
return makeVar(LENGTH_0, TYPE_NULL, 0);
}

View File

@@ -26,5 +26,6 @@ var unaligned32bitAccess(void);
var isIrq2AttachedToSdCardChipSelect(void);
var callSysUnimplemented(void);
var testArmAccess(void);
var tsc2101ReadAllAnalogValues(void);
#endif

View File

@@ -193,57 +193,6 @@ var getTrapAddress(void){
return makeVar(LENGTH_0, TYPE_NULL, 0);
}
var manualLssa(void){
static Boolean firstRun = true;
static uint32_t nibble;
static uint32_t hexValue;
static uint32_t originalLssa;
static Boolean customEnabled;
if(firstRun){
nibble = 0x10000000;
hexValue = 0x77777777;
originalLssa = readArbitraryMemory32(HW_REG_ADDR(LSSA));
customEnabled = false;
debugSafeScreenClear(C_WHITE);
firstRun = false;
}
if(getButtonPressed(buttonUp))
hexValue += nibble;
if(getButtonPressed(buttonDown))
hexValue -= nibble;
if(getButtonPressed(buttonRight))
if(nibble > 0x00000001)
nibble >>= 4;
if(getButtonPressed(buttonLeft))
if(nibble < 0x10000000)
nibble <<= 4;
if(getButtonPressed(buttonSelect))
if(customEnabled){
writeArbitraryMemory32(HW_REG_ADDR(LSSA), originalLssa);
customEnabled = false;
}
else{
writeArbitraryMemory32(HW_REG_ADDR(LSSA), hexValue);
customEnabled = true;
}
if(getButtonPressed(buttonBack)){
firstRun = true;
exitSubprogram();
}
StrPrintF(sharedDataBuffer, "Enter switchs between this address and the custom LSSA.\nNew LSSA:\n0x%08lX", hexValue);
UG_PutString(0, 0, sharedDataBuffer);
return makeVar(LENGTH_0, TYPE_NULL, 0);
}
var dumpBootloaderToFile(void){
makeFile((uint8_t*)0xFFFFFE00, 0x200, "BOOTLOADER.BIN");
exitSubprogram();

View File

@@ -9,7 +9,6 @@ Err makeFile(uint8_t* data, uint32_t size, char* fileName);
uint16_t ads7846GetValue(uint8_t channel, Boolean referenceMode, Boolean mode8Bit);
var hexRamBrowser(void);
var getTrapAddress(void);
var manualLssa(void);
var dumpBootloaderToFile(void);
var listRomInfo(void);
var listRamInfo(void);

View File

@@ -380,10 +380,6 @@ void resetFunctionViewer(void){
totalHwTests++;
}
StrNCopy(hwTests[totalHwTests].name, "Manual LSSA", TEST_NAME_LENGTH);
hwTests[totalHwTests].testFunction = manualLssa;
totalHwTests++;
StrNCopy(hwTests[totalHwTests].name, "TSTAT1 Semaphore Info", TEST_NAME_LENGTH);
hwTests[totalHwTests].testFunction = tstat1GetSemaphoreLockOrder;
totalHwTests++;
@@ -401,5 +397,12 @@ void resetFunctionViewer(void){
StrNCopy(hwTests[totalHwTests].name, "Test ARM Mode Access", TEST_NAME_LENGTH);
hwTests[totalHwTests].testFunction = testArmAccess;
totalHwTests++;
if(isT3){
StrNCopy(hwTests[totalHwTests].name, "TSC2101 ADC Read", TEST_NAME_LENGTH);
hwTests[totalHwTests].testFunction = tsc2101ReadAllAnalogValues;
totalHwTests++;
}
}
}