рефакторинг
This commit is contained in:
parent
61f79dd914
commit
43ccea0c82
@ -308,7 +308,7 @@ void SdfmInit(void)
|
||||
|
||||
|
||||
|
||||
void sdfmGet(uint16_t N)
|
||||
void sdfmGetResult(uint16_t N)
|
||||
{
|
||||
uint16_t i = 0;
|
||||
int32_t OffsetCount = 0;
|
||||
@ -383,7 +383,7 @@ uint32_t IntFlags;
|
||||
IntFlags = Sdfm_readFlagRegister(SDFM1);
|
||||
sdfmIndex |= (IntFlags & 0xF000)>>12;
|
||||
|
||||
for(i = 0; i < 4; i++) if((uint16_t)IntFlags & (0x1000 << i)) sdfmGet(i);
|
||||
for(i = 0; i < 4; i++) if((uint16_t)IntFlags & (0x1000 << i)) sdfmGetResult(i);
|
||||
for(i = 0; i < 4; i++) if((uint16_t)IntFlags & (0x100 << i)) sdfmErr(i);
|
||||
|
||||
Sdfm_clearFlagRegister(SDFM1,IntFlags);
|
||||
@ -401,7 +401,7 @@ uint32_t IntFlags;
|
||||
IntFlags = Sdfm_readFlagRegister(SDFM2);
|
||||
sdfmIndex |= (IntFlags & 0xF000)>>8;
|
||||
|
||||
for(i = 0; i < 4; i++) if((uint16_t)IntFlags & (0x1000 << i)) sdfmGet(i+4);
|
||||
for(i = 0; i < 4; i++) if((uint16_t)IntFlags & (0x1000 << i)) sdfmGetResult(i+4);
|
||||
for(i = 0; i < 4; i++) if((uint16_t)IntFlags & (0x100 << i)) sdfmErr(i+4);
|
||||
|
||||
Sdfm_clearFlagRegister(SDFM2,IntFlags);
|
||||
|
Loading…
Reference in New Issue
Block a user