Untitled diff

Created Diff never expires
6 removals
30 lines
6 additions
30 lines
void testSet(void){
void testSet(void){
SETBIT(I2C_PORT,I2C_SDA);
SETBIT(I2C_PORT,I2C_SDA);
}
}
void testClr(void){
void testClr(void){
CLEARBIT(I2C_PORT,I2C_SDA);
CLEARBIT(I2C_PORT,I2C_SDA);
}
}
int main(void)
int main(void)
{
{
//init();
//init();
DDRB = 0x18;
DDRB = 0x18;
for(;;)
for(;;)
{
{
if (bit_is_clear(PINB, PB0)){
if (bit_is_clear(PINB, PB0)){
_delay_ms(SM_DELAY); //prell delay
_delay_ms(SM_DELAY); //prell delay
testClr();
//testClr();
//CLEARBIT(I2C_PORT,I2C_SDA);
CLEARBIT(I2C_PORT,I2C_SDA);
while(bit_is_clear(PINB, PB0)); //until button is released
while(bit_is_clear(PINB, PB0)); //until button is released
_delay_ms(SM_DELAY); //prell delay
_delay_ms(SM_DELAY); //prell delay
testSet();
//testSet();
//SETBIT(I2C_PORT,I2C_SDA);
SETBIT(I2C_PORT,I2C_SDA);
}
}
}
}
return 0;
return 0;
}
}