Hi,
I'm back at the very basics, why do my GPIOs PORTC15 & PORTC18 not get set high with the following code?
gpio_pin_config_t ConfigC15 = { .pinDirection = kGPIO_DigitalOutput, .outputLogic = 0 };
gpio_pin_config_t ConfigC18 = { .pinDirection = kGPIO_DigitalOutput, .outputLogic = 0 };
GPIO_PinInit(GPIOC,15,&ConfigC15);
GPIO_PinInit(GPIOC,18,&ConfigC18);
GPIO_PinWrite(GPIOC,15,1);
GPIO_PinWrite(GPIOC,18,1);
What am I missing?
Same resiult when I set the default outputLogic to 1 instead.
Hm, I added
CLOCK_EnableClock(kCLOCK_PortC);
before the lines above but still no luck.
Solved! Go to Solution.
Hi,
Which mcu do you use? Do you configure the pin multiplexing? Configure the pin as GPIO ? The sdk has gpio example. You can refer it.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 days after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi,
Which mcu do you use? Do you configure the pin multiplexing? Configure the pin as GPIO ? The sdk has gpio example. You can refer it.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 days after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------