hi support team:
Today,when i use GPIO A to read my key signal, i find it can't read it .but when i use GPIO B or C ,they all can read the signal,that's why?My core is v2.0.
thanks!
Original Attachment has been moved to: ceshi.rar
Hi,
Can you provide the code?
Regards,
Daniel
hello
I have uploaded the attachment
thanks!
Hello,
I cannot open the file.
Could you check it and attach again?
Regards,
Daniel
hi
i'm sorry.new the attachmen have uploaded!
thanks
Hi,
Your If statement is not correct,
if(GPIO_HAL_ReadPins(PTA)>> 1 == 0)
you should use something like this:
if((GPIO_HAL_ReadPins(PTA)) & (1 << 1))
Also, set direction registers:
GPIO_HAL_SetPinDirection(PTA,1,0);
GPIO_HAL_SetPinDirection(PTD,15,1);
Regards,
Daniel
hi,
it's work now,Thank you very much.