I have a problem with reading a level on the pins. The code is configured in ATMEL START and int_main() modified in atmel studio. All gpio are defined in driver_init.c and not included to this code but from there I can control the pin level (true/false) also I have a connected a LED to the GPIO_5.
So, the problem is, no mater what level I set on the pin (diode On/OFF) the serial port always displays"low".
struct io_descriptor *io1;
/* Initializes MCU, drivers and middleware */
pin_level = gpio_get_pin_level(GPIO_5);
if (pin_level == 1)
io_write(io1, (uint8_t *)"high", 4);
io_write(io1, (uint8_t *)"low", 3);