Wie Nil.at schon sagte:
Code:
            while (Port_ReadBit(PORT_SW1))       // ;
            {
                 Port_WriteBit(PORT_LED1,PORT_ON);
            }
            AbsDelay(500);
            while(Port_ReadBit(PORT_SW1))         // ;
            {
                    Port_WriteBit(PORT_LED1,PORT_OFF);
            }
(Rein sytaktisch, ohne über sinn und unsinn nachzudenken)