mend
This commit is contained in:
parent
234c2b14fa
commit
1fee7c69dd
|
@ -47,11 +47,11 @@ int k210_fpioa_get_io_by_function(uint8_t function)
|
|||
{
|
||||
int index = 0;
|
||||
uint32_t RegValue = 0x0000;
|
||||
uint32_t *fpioa = (uint32_t *)K210_FPIOA_BASE;
|
||||
uint32_t *fpioa_base = (uint32_t *)K210_FPIOA_BASE;
|
||||
|
||||
for (index = 0; index < K210_IO_NUMBER; index++)
|
||||
{
|
||||
RegValue = getreg32(&fpioa[index]);
|
||||
RegValue = getreg32(&fpioa_base[index]);
|
||||
if ((RegValue & 0xFF) == function)
|
||||
return index;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ int k210_fpioa_get_io_by_function(uint8_t function)
|
|||
|
||||
void k210_fpioa_config(uint32_t io, uint32_t ioflags)
|
||||
{
|
||||
uint32_t *fpioa = (uint32_t *)K210_FPIOA_BASE;
|
||||
uint32_t *fpioa_base = (uint32_t *)K210_FPIOA_BASE;
|
||||
DEBUGASSERT(io < K210_IO_NUMBER);
|
||||
putreg32(ioflags, &fpioa[io]);
|
||||
putreg32(ioflags, &fpioa_base[io]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue