Untitled diff

Created Diff never expires
4 removals
Lines
Total
Removed
Words
Total
Removed
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
30 lines
4 additions
Lines
Total
Added
Words
Total
Added
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
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;
}
}