GPIO question, setting and clearing

This is a genral mcu question. What doe sit mean to clear and set a gpio pin?

For example, in the code below, clearing a pin turns off the Led? I would of thought settin gthe pin would turn it on?

#define LED_ON() gpio_clear_pin(GPIO_1, PIN_ID_10)
#define LED_OFF() gpio_set_pin(GPIO_1, PIN_ID_10)

Depends on how the LED is wired. The AVR pin driver is able to source or sink.

Typical practice is to connect positive side of LED to the supply, and switch the negative side - out of habit, since a large number of devices can only sink, not source.

"This is a genral mcu question. What doe sit mean to clear and set a gpio pin?"
Generally, logic is treated as active high, so setting a pin makes it high (1) and clearing a pin makes it low (0).
If an LED is wired pin to Anode, cathode to resistor, resistor to Gnd, then setting the pin woud turn the LED on, and clear would turn the LED off.

If an external NPN transistor was being used as a buffer for LED strings powered from 12V, 12V to positive of the string, negative to NPN collecter, NPN emitter to GND, and the gpio driving the NPN base (thru a current limit resistor), then setting the pin to 1 would turn on the NPN and light the strip.

If an LED is wired pin to cathode, anode to resistor, resistor to +5 then clearing the pin would turn the LED on, and setting the pin would turn the LED off.

So it all comes down to context and how things are wired up. Generally "set" is active (high), and "clear" is inactive (low).

Generally, logic is treated as active high, so setting a pin makes it high (1) (~Vcc, 5V on AVR) and clearing a pin makes it low (0) (~GND, 0V.)

DrAzzy:
Typical practice is to connect positive side of LED to the supply, and switch the negative side - out of habit, since a large number of devices can only sink, not source.

this is true. in the normal world of electronics most devices (chip selects, serial, etc) are active low. unfortunately in arduino-land the opposite was chosen. musicians/artists... gotta love 'em.

one of the first things i do with promini and other boards is, for variety of reasons, reverse that led. of course it still blinks ok (on-off-on-off-on...).