在查看函数库中的函数的时候,发现很多函数中都有ASSERT(_GPIOBaseValid(ui32Port));语句,比如:
GPIOIntNumberGet(uint32_t ui32Port)
{
uint_fast32_t ui32Idx, ui32Rows;
const uint32_t (*ppui32GPIOIntMap)[2];
//
// Check the arguments.
//
ASSERT(_GPIOBaseValid(ui32Port));
ppui32GPIOIntMap = g_ppui32GPIOIntMapBlizzard;
ui32Rows = g_ui32GPIOIntMapBlizzardRows;
if(CLASS_IS_TM4C129)
{
ppui32GPIOIntMap = g_ppui32GPIOIntMapSnowflake;
ui32Rows = g_ui32GPIOIntMapSnowflakeRows;
}
//
// Loop through the table that maps I2C base addresses to interrupt
// numbers.
//
for(ui32Idx = 0; ui32Idx < ui32Rows; ui32Idx++)
{
//
// See if this base address matches.
//
if(ppui32GPIOIntMap[ui32Idx][0] == ui32Port)
{
//
// Return the corresponding interrupt number.
//
return(ppui32GPIOIntMap[ui32Idx][1]);
}
}
//
// The base address could not be found, so return an error.
//
return(0);
}
请问,这个函数是什么意思,怎么找到这个函数的源码,谢谢。
user4226666:
TI的工程师呢,解答一下啊,谢谢