i have a supreme 10 with both GPIO’s hooked up to LEDs
I use the following code below
#include "adl_global.h"
const u16 wm_apmCustomStackSize = 1024;
s32 MyGpioHandle1;
s32 MyGpioHandle2;
adl_ioDefs_t MyGpioConfig1 [ 1 ] = { ADL_IO_GPIO | 21 | ADL_IO_DIR_OUT };
adl_ioDefs_t MyGpioConfig2 [ 1 ] = { ADL_IO_GPIO | 25 | ADL_IO_DIR_OUT };
adl_ioDefs_t Gpio_to_write1 = ADL_IO_GPIO | 21 ;
adl_ioDefs_t Gpio_to_write2 = ADL_IO_GPIO | 25 ;
void adl_main(adl_InitType_e adlInitType)
{
MyGpioHandle1 = adl_ioSubscribe ( 1, MyGpioConfig1, 0, 0, 0 );
MyGpioHandle2 = adl_ioSubscribe ( 1, MyGpioConfig2, 0, 0, 0 );
adl_ioWriteSingle ( MyGpioHandle2, &Gpio_to_write2, 0);
adl_ioWriteSingle ( MyGpioHandle2, &Gpio_to_write2, 1);
adl_ioWriteSingle ( MyGpioHandle1, &Gpio_to_write1, 0);
adl_ioWriteSingle ( MyGpioHandle1, &Gpio_to_write1, 1);
}
The LEDs are all high when i run the program…however if i comment out this only
adl_ioWriteSingle ( MyGpioHandle1, &Gpio_to_write1, 0);
adl_ioWriteSingle ( MyGpioHandle1, &Gpio_to_write1, 1);
Then one of the LEDs turn low (the other stays high), and if i comment out this only
adl_ioWriteSingle ( MyGpioHandle2, &Gpio_to_write2, 0);
adl_ioWriteSingle ( MyGpioHandle2, &Gpio_to_write2, 1);
Then the other LED turns low, (the other stays high).
Is it possible to turn both outputs low?