TivaWare Peripheral Driver Library User's Guide,(spmu298)文档关于GPIO章节内提到GPIOPinTypeKBColumn和GPIOPinTypeKBRow两个函数用于矩阵键盘控制,但是所给出的描述比较简单,请教论坛内大神能否提供以上两个函数的详细使用方法,最好能展示一段例程代码,谢谢!!!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
void
GPIOPinTypeKBColumn(uint32_t ui32Port, uint8_t ui8Pins)
{
//
// Check the arguments.
//
ASSERT(_GPIOBaseValid(ui32Port));
//
// Make the pin(s) be peripheral controlled.
//
GPIODirModeSet(ui32Port, ui8Pins, GPIO_DIR_MODE_HW);
//
// Set the pad(s) for standard push-pull operation.
//
GPIOPadConfigSet(ui32Port, ui8Pins, GPIO_STRENGTH_2MA,
GPIO_PIN_TYPE_STD_WPU);
}
用MDK搜索
void GPIOPinTypeKBRow(uint32_t ui32Port, uint8_t ui8Pins) { // // Check the arguments. // ASSERT(_GPIOBaseValid(ui32Port)); // // Make the pin(s) be peripheral controlled. // GPIODirModeSet(ui32Port, ui8Pins, GPIO_DIR_MODE_HW); // // Set the pad(s) for push/pull operation. // GPIOPadConfigSet(ui32Port, ui8Pins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); }