fix regression from r3848 that was making some mic malfunction

This commit is contained in:
zeromus 2010-11-14 07:25:24 +00:00
parent 5141a38ec6
commit 4180b540a7
2 changed files with 15 additions and 12 deletions

View File

@ -3719,9 +3719,11 @@ void FASTCALL _MMU_ARM7_write16(u32 adr, u16 val)
T1WriteWord(MMU.MMU_MEM[ARMCPU_ARM7][(REG_SPIDATA >> 20) & 0xff], REG_SPIDATA & 0xfff, fw_transfer(&MMU.fw, (u8)val)); T1WriteWord(MMU.MMU_MEM[ARMCPU_ARM7][(REG_SPIDATA >> 20) & 0xff], REG_SPIDATA & 0xfff, fw_transfer(&MMU.fw, (u8)val));
return; return;
case 2 : case 2:
//printf("%08X\n",MMU.SPI_CMD); {
switch(MMU.SPI_CMD&0xFC) int channel = (MMU.SPI_CMD&0x70)>>4;
//printf("%08X\n",channel);
switch(channel)
{ {
case TSC_MEASURE_TEMP1: case TSC_MEASURE_TEMP1:
if(spicnt & 0x800) if(spicnt & 0x800)
@ -3805,8 +3807,9 @@ void FASTCALL _MMU_ARM7_write16(u32 adr, u16 val)
else else
val = 0; val = 0;
break; break;
}
break;
} }
break;
case 3 : case 3 :
/* NOTICE: Device 3 of SPI is reserved (unused and unusable) */ /* NOTICE: Device 3 of SPI is reserved (unused and unusable) */

View File

@ -406,13 +406,13 @@
#define IRQ_MASK_ARM7_SPI (1<<23) #define IRQ_MASK_ARM7_SPI (1<<23)
#define IRQ_MASK_ARM7_WIFI (1<<24) #define IRQ_MASK_ARM7_WIFI (1<<24)
#define TSC_MEASURE_TEMP1 0x84 #define TSC_MEASURE_TEMP1 0
#define TSC_MEASURE_Y 0x90 #define TSC_MEASURE_Y 1
#define TSC_MEASURE_BATTERY 0xA4 #define TSC_MEASURE_BATTERY 2
#define TSC_MEASURE_Z1 0xB4 #define TSC_MEASURE_Z1 3
#define TSC_MEASURE_Z2 0xC4 #define TSC_MEASURE_Z2 4
#define TSC_MEASURE_X 0xD0 #define TSC_MEASURE_X 5
#define TSC_MEASURE_AUX 0xE4 #define TSC_MEASURE_AUX 6
#define TSC_MEASURE_TEMP2 0xF4 #define TSC_MEASURE_TEMP2 7
#endif #endif